__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/27943793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onAddUserToContactList( java.lang.String strUserId ) { try { session.addToContactList( Long.parseLong( strUserId ), true ); } catch( java.lang.NumberFormatException e ) { System.err.println( "JComVcPlugin.onAddUserToContactList(" + strUserId + ") - Error to add user" ); } } COM: <s> implement the on add user to contact list event listener </s>
funcom_train/32628751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIsUnique( boolean unique ) { if (unique) { // add the unique type to this property addRDFType( getVocabulary().UniqueProperty() ); } else { // remove the transitive type from this property removeProperty( RDF.type, getVocabulary().UniqueProperty() ); } } COM: <s> set the flag to indicate that this property is to be considered </s>
funcom_train/21954731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeFrame(JInternalFrame f) { super.closeFrame(f); JInternalFrame allFrames[] = getAllFrames(); if (allFrames.length > 0 && allFrames[0] != null) try { allFrames[0].setSelected(true); } catch (java.beans.PropertyVetoException pve) { } } COM: <s> in addition to closing the current frame this also activates </s>
funcom_train/21023282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAttachmentSelected() { if (!dataTable.getSelectedRows().isEmpty()) { if (((GWTQueryResult) data.get(Integer.parseInt(dataTable.getText(getSelectedRow(),7)))).getAttachment()!=null ) { return true; } else { return false; } } else { return false; } } COM: <s> return true or false if actual selected row is attachment </s>
funcom_train/13491649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean copy_stream(final Object[] r, final List bindings) throws IOException { InputStream is = (InputStream) r[0]; OutputStream os = (OutputStream) r[1]; byte[] buffer = new byte[sChunk]; int length; while ((length = is.read(buffer, 0, sChunk)) != -1) os.write(buffer, 0, length); is.close(); os.close(); Object[] retobj = new Object[2]; retobj[0] = r[0]; retobj[1] = r[1]; bindings.add(retobj); return Boolean.TRUE; } COM: <s> a built in predicate copy stream implementing the copying of streams </s>
funcom_train/23234143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getDamage(ConfigurableFactoryContext ctx) throws IllegalArgumentException { String s; if ((s = ctx.getAttribute("damage")) == null) { throw new IllegalArgumentException("Required attribute 'damage' missing"); } try { return Integer.parseInt(s); } catch (NumberFormatException ex) { throw new IllegalArgumentException("Invalid 'damage' attribute: " + s); } } COM: <s> extract the damage amount from a context </s>
funcom_train/27868684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getMetadata() throws OAIException { Node ret = null; priCheckIdOnly(); try { Node node = XPathAPI.selectSingleNode(xmlRecord, "oai:metadata/*", repo.getNamespaceNode()); if (node != null) { ret = node.cloneNode(true); } } catch (TransformerException te) { throw new OAIException(OAIException.CRITICAL_ERR, te.getMessage()); } return ret; } COM: <s> returns the metadata section of the record as an xml node </s>
funcom_train/37573134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getKeyInt() { int keyInt; String keyString = getKey(); if (Utils.blank(keyString)) keyInt = Utils.NULL_INT; else { try { keyInt = Integer.parseInt(key); } catch (java.lang.NumberFormatException e) { keyInt = Utils.NULL_INT; } } return keyInt; } COM: <s> return the key as an int or null int </s>
funcom_train/29031327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected GameState removeClient(Client client, String reason) { logger.info("removing " + client + " from game '" + this.game + "' (reason: '" + reason + "')"); this.game.removeClient(client); if (this.game.getClients().isEmpty()) { return new TerminatedGameState(this.game); } else { this.game.sendAll(new PlayerQuitMessage(client.getUserName(), reason,client.getClientID())); this.game.gamePlayersChanged(); return this; } } COM: <s> remove client from the game </s>
funcom_train/8357578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPnlControls() { if (pnlControls == null) { pnlControls = new JPanel(); pnlControls.setLayout(new BorderLayout()); pnlControls.add(getPnlButtons(), java.awt.BorderLayout.SOUTH); pnlControls.add(getPnlAttribute(), java.awt.BorderLayout.NORTH); pnlControls.add(getPnlDataModel(), java.awt.BorderLayout.CENTER); } return pnlControls; } COM: <s> this method initializes pnl controls </s>
funcom_train/44772582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ItemState createInstance(ItemState other) { if (other.isNode()) { NodeState ns = (NodeState) other; return createInstance(ns.getUUID(), ns.getNodeTypeName(), ns.getParentUUID()); } else { PropertyState ps = (PropertyState) other; return createInstance(ps.getName(), ps.getParentUUID()); } } COM: <s> create a new node state instance </s>
funcom_train/25862892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean scanUnitFromResponse(NodoResponse[] responses) { hasScanned = false; for (NodoResponse nodoResponse : responses) { if ( nodoResponse.is(NodoResponse.Direction.Output) && nodoResponse.is(CommandInfo.Name.Unit)) { setNodoUnit(nodoResponse.getCommand().getData1()); hasScanned = true; break; } } return hasScanned; } COM: <s> command to scan the unit parameters from the boot </s>
funcom_train/28902103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean executeAsk(SPARQLQuery query, SetOfStatements rdf) { if (query == null || rdf == null) { throw new IllegalArgumentException(); } if (rdf instanceof DataSet) { return (Boolean) executeLocalStoreQuery(query); } else if (rdf instanceof LabelledGroupOfStatements || rdf instanceof SetOfStatementsMerger) { URI label = ((LabelledGroupOfStatements) rdf).getLabel(); query.setLabelledGroup(label); return (Boolean) executeLocalStoreQuery(query); } return (Boolean) executeLocalMemoryQuery(query, rdf); } COM: <s> executes sparql ask query against arbitrary rdf data type </s>
funcom_train/3903957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAttemptAbsoluteDurationLimitPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LimitConditionsType_attemptAbsoluteDurationLimit_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LimitConditionsType_attemptAbsoluteDurationLimit_feature", "_UI_LimitConditionsType_type"), ImsssPackage.Literals.LIMIT_CONDITIONS_TYPE__ATTEMPT_ABSOLUTE_DURATION_LIMIT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the attempt absolute duration limit feature </s>
funcom_train/20342425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getSelectCommand() { if (selectCommand == null) {//GEN-END:|63-getter|0|63-preInit // write pre-init user code here selectCommand = new Command("Select", Command.OK, 0);//GEN-LINE:|63-getter|1|63-postInit // write post-init user code here }//GEN-BEGIN:|63-getter|2| return selectCommand; } COM: <s> returns an initiliazed instance of select command component </s>
funcom_train/33611058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCorner(C value) { if ((value == null && getCorner() != null) || !value.equals(getCorner())) { GraphicImage<C> gs = (GraphicImage<C>) entry.local; gs.setCorner(value); entry.needsConversion = true; firePlottableChanged(); } } COM: <s> sets location of images corner point </s>
funcom_train/5804899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void checkInterfaceOrIfIndex(Event e) throws InsufficientInformationException { if (e == null) throw new NullPointerException("e is null"); if (e.getInterface() == null || e.getInterface().length() == 0) { if (!e.hasIfIndex()) { throw new InsufficientInformationException("Both ipaddr and ifIndex for event are unavailable"); } } } COM: <s> ensures the given event has an interface or if index </s>
funcom_train/46874514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void correct() { x = x*1048576.0; x = Math.rint(x); x = x/1048576.0; y = y*1048576.0; y = Math.rint(y); y = y/1048576.0; z = z*1048576.0; z = Math.rint(z); z = z/1048576.0; } COM: <s> makes correction of all coordinates to avoid calculation errors like </s>
funcom_train/9727148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void extend(Bounds3D bounds) { minx = bounds.minx < minx ? bounds.minx : minx; miny = bounds.miny < miny ? bounds.miny : miny; minz = bounds.minz < minz ? bounds.minz : minz; maxx = bounds.maxx > maxx ? bounds.maxx : maxx; maxy = bounds.maxy > maxy ? bounds.maxy : maxy; maxz = bounds.maxz > maxz ? bounds.maxz : maxz; } COM: <s> extend the bound to include union of two bounding boxes </s>
funcom_train/44421151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendToNetwork( ORPGMessage msg ) throws ModuleCommunicationException{ if ( msg.getDestination() == null){ log.warning("Message for module "+msg.getHandlerId()+" dropped due to missing address information."); return; } if ( ! isInitialized() ){ throw new ModuleCommunicationException("Network Not Available"); } routeManager.sendMessageToNetwork(msg); } COM: <s> send an orpgmessage to the network subsystem </s>
funcom_train/29919788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isReadable(String url) throws SQLException { try { StringTokenizer st = new StringTokenizer(url, ":"); st.nextToken(); String typeDriver = st.nextToken(); if (!typeDriver.equals("elvyx")) return false; } catch (Exception e) { throw new SQLException("No suitable driver"); } return true; } COM: <s> read parameters from url </s>
funcom_train/13304339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsMandatoryPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Attribute_isMandatory_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Attribute_isMandatory_feature", "_UI_Attribute_type"), NegotiationPackage.Literals.ATTRIBUTE__IS_MANDATORY, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is mandatory feature </s>
funcom_train/9202730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMinimumAngle(double minimumAngle) { // make sure the minimum is less than or equal to the maximum if (minimumAngle > this.maximumAngle) throw new IllegalArgumentException("The minimum angle must be less than or equal to the current maximum angle."); // wake up both bodies this.body1.setAsleep(false); this.body2.setAsleep(false); // set the new target angle this.minimumAngle = minimumAngle; } COM: <s> sets the minimum angle between the two constrained </s>
funcom_train/1570843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(final Object o) { if (!(o instanceof NSTimeRange)) return -1; /* we are 'smaller' than null or other objects? */ long res = this.fromTime - ((NSTimeRange)o).fromTime; return (res == 0 ? 0 : ((res < 0) ? -1 : 1)); } COM: <s> this method calls compare to on the from dates of the two ranges </s>
funcom_train/4412604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLastPage(int volume) { if (volume<1 || volume > getVolumes()) { throw new IllegalArgumentException("Value out of range: " + volume); } if (volume == getVolumes()) { return getPages(); } else { // since startPages is zero based, "volume" means next volume return startPages[volume] - 1; } } COM: <s> gets the last page number in the specified volume </s>
funcom_train/49457054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addProductsExpertise(Db db, List<Integer> products, int modifier) throws Exception { try { db.enter(); if(products == null || products.size() == 0) return 0; int n=0; Iterator<Integer> it = products.iterator(); while(it.hasNext()){ Integer productId = it.next(); n += ExpertiseFactory.addExpertise(db, db, Integer.valueOf(peopleId), null, null, productId, modifier); } return n; } finally{ db.exit(); } } COM: <s> set a list of product id as an expertise for this user </s>
funcom_train/28888654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUpdate() { final TestDataModelBroker<R, L> tdmb= new TestDataModelBroker<R, L> (); final R tdmr = (R)new TestDataModelRow("Duke", "South Street", "Lakeview", "CA", 12345); final int rowsInserted = tdmb.update(tdmr); loginfo("Rows updated for test table " + rowsInserted); } COM: <s> example update into database table name test </s>
funcom_train/25374197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double dotProduct(double[] other) throws Exception { // other is a non-sparse array of values double result = 0; // do a fast dot product int n1 = m_values.numValues(); for (int i = 0; i < n1; i++) { int ind1 = m_values.index(i); result += m_values.valueSparseDouble(i) * other[ind1]; } return result; } COM: <s> computes the dot product between this vector instance and the </s>
funcom_train/1559368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void genColors(String name, Color color) { if (tokenColors == null) { genColors(); } tokenColors[TOKENS.get(name)] = color; if (TOKENS.get(name) == JavascriptLexerConstants.DEFAULT) { for (Integer i : typeToDefault) { tokenColors[i] = tokenColors[0]; } } } COM: <s> generate a color for a type of keyword </s>
funcom_train/1058791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setFonts() { // FontData[] fontdata={new FontData("Arial", 9, SWT.NORMAL)}; selectedElementsLabel.setFont(JFaceResources.getDialogFont()); selectedElementsTable.setFont(JFaceResources.getDialogFont()); possibleElementsLabel.setFont(JFaceResources.getDialogFont()); possibleElementsTable.setFont(JFaceResources.getDialogFont()); } COM: <s> apply font to elements that display text </s>
funcom_train/42268554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedItem(TreeItem selectedItem) { if (this.selectedItem!=null) { HorizontalPanel p =(HorizontalPanel)this.selectedItem.getWidget(); Label l = (Label)p.getWidget(1); l.setStyleName("treeLabel"); } this.selectedItem = selectedItem; HorizontalPanel p =(HorizontalPanel)selectedItem.getWidget(); Label l = (Label)p.getWidget(1); l.setStyleName("treeLabelSelected"); } COM: <s> use this when a new item in the tree is selected </s>
funcom_train/20618827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addTextField(){ sLogger.debug("addTextField called"); add(message); message.setContentType("text/html"); Font lfont = font.deriveFont(Font.PLAIN, font.getSize()); message.setFont(lfont); message.setForeground(foreground); message.setBounds(getWidth()/10,12*getHeight()/30,getWidth()-getWidth()/5, height-13*getHeight()/30); message.setBackground(new Color(0,0,0,0)); message.setText(text); message.setVisible(true); } COM: <s> adds the text field </s>
funcom_train/40720055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Diagnostic validate(EObject eObject) { List<Diagnostic> diagnostics = new ArrayList<Diagnostic>(); myTypeResolver.resolveType(eObject); validateEObject(eObject, diagnostics); diagnostics.addAll(myTypeResolver.getErrors()); return new BasicDiagnostic(this.getClass().getCanonicalName(), 0, diagnostics, "", new Object[] {}); } COM: <s> validates all generic related type conformance constraints on a given </s>
funcom_train/39218762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean useCacheDir(File cachedir) { if (PySystemState.appletMode) return false; if(cachedir == null) return false; if (!cachedir.isDirectory() && cachedir.mkdirs() == false) { warning("can't create package cache dir, '"+cachedir+"'"); return false; } this.cachedir = cachedir; return true; } COM: <s> initialize off the shelf default local file system cache impl </s>
funcom_train/34828675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getNode(String namespace, String name, boolean create) { String key = nodeKey(namespace, name); Node n = (Node) nodeMap.get(key); if (n == null && create) { n = new Node(namespace, name); nodeMap.put(nodeKey(n), n); } return n; } COM: <s> get the named node optionally creating it if it does not exist </s>
funcom_train/31057201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void signal( EventPublisherShadow source, Object info ) { if( ( info != null ) && ( info instanceof String ) ) { String report = (String)info; if( !shadow.getPlayingSong() ) { Debug.notice( "Calling getNextSong" ); nextSong = getNextSong(); if( nextSong != null ) shadow.playSong( nextSong ); } } } COM: <s> if we get a signal then we are finished playing so we should </s>
funcom_train/1953264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCursorPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TimeInfo_cursor_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TimeInfo_cursor_feature", "_UI_TimeInfo_type"), TemporalPackage.Literals.TIME_INFO__CURSOR, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the cursor feature </s>
funcom_train/19367272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char charAt(int index) { if(index < 0) { throw new IndexOutOfBoundsException(Integer.toString(index)); } if(index >= length()) { throw new IndexOutOfBoundsException(Integer.toString(index)); } if(index < prefix.length()) { return prefix.charAt(index); } return remainder.charAt(index - prefix.length()); } COM: <s> returns the code char code value at the specified index </s>
funcom_train/40001454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buildSurface() { // build surface, if needed if (sourcePolygon instanceof TexturedPolygon3D) { Texture texture = ((TexturedPolygon3D)sourcePolygon).getTexture(); if (texture instanceof ShadedSurface) { ShadedSurface surface = (ShadedSurface)texture; if (surface.isCleared()) { surface.buildSurface(); builtSurfaces.add(surface); } surface.setDirty(false); } } } COM: <s> builds the surface of the polygon if it has a </s>
funcom_train/15623903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadSmoothFaces(final ErrorView errorView) { try { final URL url = IOUtils.getResource(configurationDirectory, IGUIConstants.SMOOTH_FILE); SmoothFacesLoader.load(url, smoothFaces, errorView); } catch (final IOException ex) { errorView.addWarning(ErrorViewCategory.ARCHETYPES_FILE_INVALID, IGUIConstants.SMOOTH_FILE + ": " + ex.getMessage()); } } COM: <s> loads all smooth faces </s>
funcom_train/32368263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSiblingNode(PhyloTreeNode pSibling) { if (pSibling == null) { return; } if (getSiblingNode() == null) { setSiblingNode(pSibling); //Note: this is a private method so we don't need to call the following: //pSibling.setParentNode(this.getParentNode()); } else { getSiblingNode().addSiblingNode(pSibling); } } COM: <s> add a sibling node </s>
funcom_train/16738314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveNodes(final OutputStream stream) throws IOException { try (OutputStreamWriter outputWriter = new OutputStreamWriter(stream)) { try { this.toJSONArray().write(outputWriter); } catch (JSONException ex) { throw new RuntimeException("Impossible, the value cannot be an invalid number!", ex); } } } COM: <s> save the map of nodes into an output stream as json </s>
funcom_train/26512370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runAgents (String agentType, String[] params, String numberAgents) { int numberRequired = Integer.parseInt(numberAgents); System.out.println (params.length); for (int count = 0; count < numberRequired; count++) { String agentName = String.valueOf(count); doCommand (agentType, agentName, params); } } COM: <s> method called to run a number of agents named 0 </s>
funcom_train/37483153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(String itemName) { for (int i = 0; i < list.size(); i++) { MaintenanceItem findItem = (MaintenanceItem) list.get(i); if (findItem.getItemName().equals(itemName)) { list.remove(i); } } } COM: <s> removes the item with the specified name index from the collection </s>
funcom_train/32831091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDifference_notEqualsDifferentOrder() { Difference result = reflectionComparator.getDifference(arrayA, arrayDifferentOrder); Difference elementDifference = getInnerDifference("0", result); assertEquals(1, elementDifference.getLeftValue()); assertEquals(3, elementDifference.getRightValue()); } COM: <s> test for two equal arrays with different order and no lenient order </s>
funcom_train/11373710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int metaSave(String[] argv, int idx) throws IOException { String pathname = argv[idx]; DistributedFileSystem dfs = getDFS(); dfs.metaSave(pathname); System.out.println("Created file " + pathname + " on server " + dfs.getUri()); return 0; } COM: <s> dumps dfs data structures into specified file </s>
funcom_train/40338592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int category(FileSystemElement element) { final FileSystemElementDispatcher<Integer> fsDispatcher = new FileSystemElementDispatcher<Integer>() { @Override public Integer match(FileElement e) { return CATEGORY_FILE; } @Override public Integer match(DirectoryElement e) { return CATEGORY_DIRECTORY; } }; return fsDispatcher.match(element); } COM: <s> returns the category of the given </s>
funcom_train/1673984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DatabaseEntry copyEntry(DatabaseEntry entry) { int len = entry.getSize(); byte[] data; if (len == 0) { data = LogUtils.ZERO_LENGTH_BYTE_ARRAY; } else { data = new byte[len]; System.arraycopy (entry.getData(), entry.getOffset(), data, 0, data.length); } return new DatabaseEntry(data); } COM: <s> returns a deep copy of the given database entry </s>
funcom_train/9292800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public ijResult XA_DisconnectStatement() throws ParseException, SQLException { String n = null; jj_consume_token(XA_DISCONNECT); if (jj_2_131(2)) { n = identifier(); } else { ; } xahelper.XADisconnectStatement(this, n); {if (true) return null;} throw new Error("Missing return statement in function"); } COM: <s> xa disconnect statement is xa disconnect xaconnid identifier </s>
funcom_train/49132909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DocumentCache getXMLDocumentCache() throws JAnalyticsException { File base = new File(System.getProperty("java.io.tmpdir"), "testdir"); Properties config = new Properties(); config.put(FileDocumentCache.BASE_DIRECTORY_PROPERTY, base .getAbsolutePath()); config.put(FileDocumentCache.CACHE_SIZE_PROPERTY, Integer .toString(MAX_CACHE_SIZE)); DocumentCacheFactory.loadConfig(FileDocumentCache.class.getName(), config); DocumentCache cache = DocumentCacheFactory.createDocumentCache(); return cache; } COM: <s> gets the cache </s>
funcom_train/28763208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActivated(java.math.BigDecimal value) throws com.intersys.objects.CacheException { com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value); mInternal.setProperty(ii_Activated, jj_Activated,kk_Activated, com.intersys.objects.Database.RET_PRIM, "Activated", dh); return; } COM: <s> sets new value for code activated code </s>
funcom_train/5462038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void crawlDurationProperty(Property property, Resource parentNode, RDFContainer rdfContainer) { Node propertyValue = getRdfPropertyValue(rdfContainer, property, IcalDataType.DURATION); addStatement(rdfContainer, parentNode, NCAL.duration, propertyValue); } COM: <s> crawls the duration property </s>
funcom_train/29027341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCanVisiblePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Column_canVisible_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Column_canVisible_feature", "_UI_Column_type"), DbdesignerPackage.Literals.COLUMN__CAN_VISIBLE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the can visible feature </s>
funcom_train/37518679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitAssertStatement(/*@non_null@*/ JAssertStatement self ) { JavaStyleComment[] comments = self.getComments(); if(comments!=null){ visitComments(comments); } print("assert "); self.predicate().accept(this); if (self.hasThrowMessage()) { print(" : "); self.throwMessage().accept(this); } print(";"); } COM: <s> prints a assert statement </s>
funcom_train/37041869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRemainingTime() { TimingCondition cond = getAuctionClosingCondition(MaxRoundsAuctionClosingCondition.class); if (cond != null) { return ((MaxRoundsAuctionClosingCondition) cond).getRemainingRounds(); } else { cond = getDayEndingCondition(MaxRoundsDayEndingCondition.class); if (cond != null) { return ((MaxRoundsDayEndingCondition) cond).getRemainingRounds(); } else { throw new AuctionRuntimeException( getClass() + " requires a TimingCondition knowing remaining time in the market to be configured"); } } } COM: <s> return the time remaining before the market closes </s>
funcom_train/42114491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command get_okCommand2() { if (okCommand2 == null) {// GEN-END:MVDGetBegin10 // Insert pre-init code here okCommand2 = new Command("Ok", Command.OK, 1);// GEN-LINE:MVDGetInit10 // Insert post-init code here }// GEN-BEGIN:MVDGetEnd10 return okCommand2; }// GEN-END:MVDGetEnd10 COM: <s> this method returns instance for ok command2 component and should be </s>
funcom_train/40424416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IncludeTar createIncludeTar() { /* * Create a peer TarFileSet corresponding to one of our own IncludeTars. * This causes the superclass to call us back during execution. */ TarFileSet peer = super.createTarFileSet(); IncludeTar includeTar = new IncludeTar(peer); peerMap.put(peer, includeTar); return includeTar; } COM: <s> add a new tar to include in this tar operation </s>
funcom_train/3751894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void expand(StringFinder context, String templateName, StringCollector collector) { Object tpl = templateName.startsWith("@") ? context.getObject(templateName.substring(1)) : getTemplate(templateName, context); expandTemplate(context, tpl, collector); } COM: <s> expand a named template filling in substitutions from the supplied </s>
funcom_train/1179313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double probability(double X) { checkRange(X,0.0,Double.MAX_VALUE); if(X==0.0) return 0.0; else return Math.exp(-SpecialMath.logGamma(shape)-X+(shape-1)*Math.log(X)); } COM: <s> probability density function of a gamma distribution </s>
funcom_train/25791942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveCollapseSettings(ArgusSettings settings) { if (m_autoCollapseCheckBox.isSelected()) { settings.setAttribute("MSC", "collapse", "true"); } else { settings.setAttribute("MSC", "collapse", "false"); } } COM: <s> save the collapse settings </s>
funcom_train/4780696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshPathAccessRules(final Path path) { final DefaultTableModel model = new NonEditableTableModel(); try { model.setDataVector(document.getPathAccessRules(path), getPathAccessRulesColumnNames()); } catch (final AppException ae) { displayError(ResourceUtil.getString("mainframe.error.errorloadingaccessrulesforpath")); } getAccessRulesPane().getAccessRulesTable().setModel(model); AutofitTableColumns.autoResizeTable(getAccessRulesPane().getAccessRulesTable(), true); } COM: <s> refresh access rules table for the selected path </s>
funcom_train/10484671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void throwFirstException() throws Exception { if (firstException != null) { if (firstException instanceof Exception) { Exception e = (Exception) firstException; throw e; } else if (firstException instanceof RuntimeException) { RuntimeException e = (RuntimeException) firstException; throw e; } else { throw new RuntimeException("Unknown type of exception: " + firstException, firstException); } } } COM: <s> throws the first exception that was thrown if there was one </s>
funcom_train/36062669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Form getSiteGroupForm( ){ Form form = new Form(); form.addField( new Field("Name", new PatternValidator(Pattern.compile("[-a-z0-9. _]{1,32}", Pattern.CASE_INSENSITIVE), "Name is not valid (can only contain letters, numbers, spaces, periods and underscores)")) ); form.addField( new Field("Description") ); return form; } COM: <s> get a form that can validate the site group </s>
funcom_train/9577529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HashSet getHashSetAllTerms() { HashSet allTerms = new HashSet(); Iterator it = this.terms.values().iterator(); while (it.hasNext()) { OBO_Object obj = (OBO_Object) it.next(); allTerms.add(obj); } return allTerms; } COM: <s> allows access to all the terms of a given ontology </s>
funcom_train/21844586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(final InstructionContext env) throws JBasicException { env.checkActive(); int code = 0; if( env.instruction.integerValid) code = 1; else if( env.instruction.stringValid) code = 2; switch( code ) { case 0: env.codeStream.statement.program.rewindDataElements(); break; case 1: env.codeStream.statement.program.rewindDataElements(env.instruction.integerOperand); break; case 2: env.codeStream.statement.program.rewindDataElements(env.instruction.stringOperand); break; } } COM: <s> rewind read stream to first data statement element </s>
funcom_train/8137027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String generateNOnce(HttpServletRequest request) { long currentTime = System.currentTimeMillis(); String nOnceValue = request.getRemoteAddr() + ":" + currentTime + ":" + privateKey; byte[] buffer = null; synchronized (md5Helper) { buffer = md5Helper.digest(nOnceValue.getBytes()); } nOnceValue = md5Encoder.encode(buffer); return nOnceValue; } COM: <s> generate a unique token </s>
funcom_train/12803944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logInvalidProperty(Property invalidProperty, String action, String domainName) { getLogger().error(invalidPropertyMessage.format( new Object[] {action, invalidProperty.getKey(), invalidProperty.getValue(), invalidProperty.getType(), domainName})); } COM: <s> logs an error for the given invalid property object </s>
funcom_train/28913058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DOMParserImpl (SymbolTable symbolTable) { this ( (XMLParserConfiguration) ObjectFactory.createObject ( "org.apache.xerces.xni.parser.XMLParserConfiguration", "org.apache.xerces.parsers.XML11Configuration")); fConfiguration.setProperty ( Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY, symbolTable); } // <init>(SymbolTable) COM: <s> constructs a dom builder using the specified symbol table </s>
funcom_train/33233440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand1() { if (exitCommand1 == null) {//GEN-END:|61-getter|0|61-preInit // write pre-init user code here exitCommand1 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|61-getter|1|61-postInit // write post-init user code here }//GEN-BEGIN:|61-getter|2| return exitCommand1; } COM: <s> returns an initiliazed instance of exit command1 component </s>
funcom_train/47673449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getTotalPhysicalMemoryValue() { String result = null; ObjectName objectName = null; try { objectName = new ObjectName("java.lang:type=OperatingSystem"); result = new DecimalFormat("#,###,###").format(jvm.getAttribute(objectName, "TotalPhysicalMemorySize")); return result + " bytes"; } catch (Exception ex) { return "ERROR"; } } COM: <s> gets the total physical memory from mules vm mbean server </s>
funcom_train/32763747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CorrelationMatrix getCovariance() { PhaseVector vecMean = this.getMean(); PhaseMatrix matCorrel = this; PhaseMatrix matAve2 = vecMean.outerProd(vecMean); CorrelationMatrix matCov = new CorrelationMatrix(matCorrel.minus(matAve2)); matCov.setElem(IND_HOM,IND_HOM, 1.0); // set the unity homogeneous diagonal return matCov; } COM: <s> compute and return the covariance matrix of the distribution </s>
funcom_train/14461552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToRefTracker(){ if (ixti>0) { try{ if(parent_rec!=null) parent_rec.getWorkBook().getRefTracker().addCellRange(this); }catch(Exception ex){ Logger.logErr("PtgRef.addToRefTracker() failed.", ex); } } } COM: <s> add this reference to the reference tracker </s>
funcom_train/35848173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddMultiple() { Object[] elements = fillModel(); Model.getPump().flushModelEvents(); assertEquals(10, model.getSize()); assertEquals(model.getElementAt(5), elements[5]); assertEquals(model.getElementAt(0), elements[0]); assertEquals(model.getElementAt(9), elements[9]); } COM: <s> tests the programmatically adding of multiple elements to the list </s>
funcom_train/11321601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HtmlStringBuffer appendAttributes(Map<String, String> attributes) { if (attributes == null) { throw new IllegalArgumentException("Null attributes parameter"); } for (Map.Entry<String, String> entry : attributes.entrySet()) { String name = entry.getKey(); if (!name.equals("id")) { appendAttributeEscaped(name, entry.getValue()); } } return this; } COM: <s> append the given map of attribute names and values to the string buffer </s>
funcom_train/17394871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JMenu createFontMenu() { CommandMenu menu = new CommandMenu("Font"); String[] fonts = Toolkit.getDefaultToolkit().getFontList(); for (String font : fonts) { menu.add(new ChangeAttributeAction(font, "FontName", font, view)); } return menu; } COM: <s> creates the fonts menus </s>
funcom_train/3409106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof ECFieldF2m) { // no need to compare rp here since ks and rp // should be equivalent return ((m == ((ECFieldF2m)obj).m) && (Arrays.equals(ks, ((ECFieldF2m) obj).ks))); } return false; } COM: <s> compares this finite field for equality with the </s>
funcom_train/12756954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performResultDelete() { // Delete the currently selected mapping(s) int[] index = resultTable.getSelectedRows(); Collection rows = new ArrayList(); for (int i = 0; i < index.length; i++) { EnyWareIdentityRow row = (EnyWareIdentityRow) resultTableModel .getRowDatumFor(index[i]); rows.add(row); } deleteRows(rows, resultTableModel); } COM: <s> method perform result delete </s>
funcom_train/8080515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printAllModels() { if (m_isLeaf) { System.out.println(m_nodeModel.toString()); } else { System.out.println(m_nodeModel.toString()); m_left.printAllModels(); m_right.printAllModels(); } } COM: <s> print all the linear models at the learf debugging purposes </s>
funcom_train/32758725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Color getForeground( final JTable table, final int column, final ScoreRecord record ) { if ( record != null ) { final double tolerance = DOCUMENT.cuttoffFraction; final int modelColumn = table.convertColumnIndexToModel( column ); switch ( modelColumn ) { case ScoreColumns.SETPOINT_LIVE_VALUE_COLUMN: return record.isSetpointWithinTolerance( tolerance ) ? Color.BLACK : Color.RED; case ScoreColumns.READBACK_LIVE_VALUE_COLUMN: return record.isReadbackWithinTolerance( tolerance ) ? Color.BLACK : Color.RED; default: return Color.BLACK; } } else { return Color.BLACK; } } COM: <s> determine the foreground color for the table cell </s>
funcom_train/23234935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMapData(InputStream in) throws IOException, ClassNotFoundException { Log4J.startMethod(logger, "setMapData"); LayerDefinition layer=LayerDefinition.decode(in); width=layer.getWidth(); height=layer.getHeight(); logger.debug("Layer("+layer.getName()+"): " +width+"x"+height); map=layer.expose(); Log4J.finishMethod(logger, "setMapData"); } COM: <s> sets the data that will be rendered </s>
funcom_train/18485604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(java.lang.String xmlData) { try { XMLResource document = (XMLResource) m_collection.createResource(null, "XMLResource"); document.setContent(xmlData); m_collection.storeResource(document); m_outRES.fireOutPin("OK"); } catch (Exception ex) { m_outERR.fireOutPin(ex.getMessage()); } } COM: <s> add xml data into the database </s>
funcom_train/2999371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSoft2Manual(int format, int direction) { data[3] &= 0x1F; // Clean the upper three bits data[3] |= 0x80; data[3] |= (format == Format.OLD_MOTOROLA) ? 0x40 : 0; data[3] |= (direction == Direction.FORWARD) ? 0 : 0x20; } COM: <s> set the state so it will program a temporary transfer from </s>
funcom_train/21777934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetNode( boolean isDebug) { setAreNeighborsShown( false); if (isDebug && (variableLinkCount != 0)) { System.err.println( "reset constraint node: " + constraint.getId() + "; variableLinkCount != 0: " + variableLinkCount); } variableLinkCount = 0; } // end resetNode COM: <s> code reset node code when closed by token close traversal </s>
funcom_train/3107402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireBrowseListDownloaded(DownloadRequest dr) { final ClientListener[] listeners = (ClientListener[]) listenerList .getListeners(ClientListener.class); for (int i = 0; i < listeners.length; i++) { listeners[i].browseListDownloaded((IClient) this, dr, host); } } COM: <s> notify registered listeners that the browse list for the client has been </s>
funcom_train/17868637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColSpec (int col_index) { for (int i = 0; i < outlines_.size(); i++) { if (elementAt(i).match(col_index)) { return elementAt(i).getColSpec(col_index); } } return ""; }; COM: <s> get the style portion of the column </s>
funcom_train/29545675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSet query(String sqlQuery) { this.lastError = null; try { Statement myStatement = this.DBConnection.createStatement(); return myStatement.executeQuery(sqlQuery); } catch (SQLException err) { this.lastError = err.getMessage(); // String errorMsg = "Error executing the SQL query:\n" + sqlQuery + "\n" + err; // this.error(errorMsg); return null; } } COM: <s> execute the fully qualified sql query statement </s>
funcom_train/43166758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setError(int code, int category, String desc, String extDesc) { com.uvasoftware.core.primitives.SIFError error = new com.uvasoftware.core.primitives.SIFError(); error.setSIFCode(BigInteger.valueOf(code)); error.setSIFCategory(BigInteger.valueOf(category)); error.setSIFDesc(desc); error.setSIFExtendedDesc(extDesc); this.message.getSIFResponse().setSIFError(error); } COM: <s> turns this response into a error notification </s>
funcom_train/22432470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getButtonApply() { if (buttonApply == null) { buttonApply = new JButton(); buttonApply.setBounds(new java.awt.Rectangle(175,75,126,26)); buttonApply.setText(MessageText.getString( "master.gui.Account.buttonApply")); buttonApply.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { applyButtonPressed(); } }); } return buttonApply; } COM: <s> this method initializes button apply </s>
funcom_train/38217458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String renderChilds(int recLevel, StatsCapable statsCapable) { StringBuffer ret; if (statsCapable.isStatsEnabled()) ret = renderChildInfo(recLevel, statsCapable); else ret = renderNonStatsChild(recLevel, statsCapable); /* if (statsCapable.hasChilds()) { recLevel++; for (StatsCapable child : statsCapable.getChilds()) ret.append(renderChilds(recLevel, child)); } */ return ret.toString(); } COM: <s> helper method recursive use renders a child of an statscapable </s>
funcom_train/48391695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addNoClickHandler(com.smartgwt.client.widgets.events.NoClickHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.events.NoClickEvent.getType()) == 0) setupNoClickEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.events.NoClickEvent.getType()); } COM: <s> add a no click handler </s>
funcom_train/4392910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Process getProcessFromDB(long id) { final Session session = sessionFactory.openSession(); Process process = null; // start Transaction session.beginTransaction(); // load BPEL-processes from repository with given id Query query = session .createQuery("FROM Process WHERE extensibleelements_e_id = " + id); List<Process> processes = (List<Process>) query.list(); process = processes.get(0); // commit Transaction session.getTransaction().commit(); session.close(); return process; } COM: <s> returns the process from the database which has the given id </s>
funcom_train/26665853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PatientBean getPatient() { if (patientViewed == null || patientViewed.getPatientIdentifier() == null) { throw new IllegalArgumentException( "Patient viewed must have a patient identifier."); } PatientIdentifier patientId = patientViewed.getId(); PatientBean ret = (PatientBean) children.get(patientId); if (ret != null) return ret; ret = new PatientBean(children); ret.setId(patientId); results.getPatient().add(ret); children.put(ret.getId(), ret); return ret; } COM: <s> gets the patient object creating a new one if necessary for the current </s>
funcom_train/39911580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetRh2() { System.out.println("setRh2"); TextField tf = null; Page1 instance = new Page1(); instance.setRh2(tf); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set rh2 method of class timesheetmanagement </s>
funcom_train/9891425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TaskStatus getStatus() throws SQLException { if (m_isDeleted) { return TaskStatus.DELETED; } if (m_finishTs!=null) { return TaskStatus.FINISHED; } if (m_startTs!=null && m_startTs.after(DateHelper.now())) { return TaskStatus.PLANED; } if (hasWorkingTimes()) { return TaskStatus.ACTIVE; } else { return TaskStatus.READY; } } COM: <s> get the status of the task </s>
funcom_train/50509767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processRequest(Request request) { synchronized(this) { Iterator iter = subElements(); while (iter.hasNext()) { Configurable child = (Configurable)iter.next(); if (child instanceof InvokerFactory) { InvokerFactory factory = (InvokerFactory)child; if (factory.acceptsRequest(request)) { Invoker invoker = factory.getInvoker(request); _invocations.add(invoker); invoker.start(); break; } } } } } COM: <s> this method is used to pass a request for further processing </s>
funcom_train/5461686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void crawlStandardObservance(Component component, Resource parentNode, RDFContainer rdfContainer) { Resource standardParentNode = generateAnonymousNode(rdfContainer); addStatement(rdfContainer, standardParentNode, RDF.type, NCAL.TimezoneObservance); crawlPropertyList(component, standardParentNode, rdfContainer); addStatement(rdfContainer, parentNode, NCAL.standard, standardParentNode); } COM: <s> crawls a single standard timezone observance component </s>
funcom_train/34340975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getCampo0() { if (campo0 == null) {//GEN-END:|24-getter|0|24-preInit // write pre-init user code here campo0 = new TextField("campo0", null, 5, TextField.ANY);//GEN-LINE:|24-getter|1|24-postInit // write post-init user code here }//GEN-BEGIN:|24-getter|2| return campo0; } COM: <s> returns an initiliazed instance of campo0 component </s>
funcom_train/32770021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getMenuView() { if (menuView == null) { menuView = new JMenu(); menuView.setText(OpenJCADLanguage.getString("_view_")); // Generated menuView.add(getJMenuItem()); menuView.add(getJMenuItem1()); menuView.add(getJMenuItem2()); menuView.add(getJMenuItem3()); } return menuView; } COM: <s> this method initializes menu view </s>
funcom_train/5787883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(String streamid) { // the most current value NodeData nval = serverCache.getCache(streamid); if(!clientData.acceptable(nval)) { // send an update to the remote client logger.debug("updating remote client value."+ " setting local value to "+nval.getValue()); out.println(Constants.CHANGE_VALUE+" "+nval.getValue()); stats.increment(Constants.SENT_MESSAGES); clientData.setValue(nval.getValue()); } else logger.debug("update not needed"); } COM: <s> determines if the value should be updated and updates </s>
funcom_train/4427981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInitialState() { for (Entry<Var, Object> entry : state.entrySet()) { Var stateVariable = entry.getKey(); Object value = stateVariable.getValue(); if (value == null) { // oops not static! throw new OrccRuntimeException("null state variable"); } else { if (!value.equals(entry.getValue())) { return false; } } } // all state variables' values equal initial values return true; } COM: <s> returns true if all the state variables in the given map have runtime </s>