__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/17963562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtilities.writeStroke(this.outlineStroke, stream); SerialUtilities.writePaint(this.outlinePaint, stream); SerialUtilities.writePaint(this.backgroundPaint, stream); SerialUtilities.writePaint(this.itemPaint, stream); } COM: <s> provides serialization support </s>
funcom_train/50300273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getPreset(String keyS) { boolean found=false; Point panTilt=new Point(0,0); for (int i=0;i<LINES;++i) { String lineS=presetsINI.getDesc(i); if (lineS.equals(keyS)&&!found) { found=true; panTilt.x=presetsINI.getPan(i); panTilt.y=presetsINI.getTilt(i); } } return panTilt; } COM: <s> returns the pan tilt for a preset </s>
funcom_train/19385836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testComputeCommandLine03() { jcc.setJcHome(jcHome); jcc.setConfigFile(new File("my_config_file")); assertEquals(new String[]{ JavaEnvUtils.getJreExecutable("java"), JCConverter.CONVERTER_CLASS_NAME, "-config", "my_config_file" }, jcc.computeCommandLine().getCommandline()); } COM: <s> config file command line </s>
funcom_train/14239860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ObjectVariableAssociationEnd getOpposite(){ ObjectVariableAssociationEnd opposite_ovae; if (this.objectVariableAssociation.getEnd0().equals(this)) opposite_ovae = this.objectVariableAssociation.getEnd1(); else opposite_ovae = this.objectVariableAssociation.getEnd0(); if (opposite_ovae.equals(this)) { return null; } return opposite_ovae; } COM: <s> get the opposite object variable association end </s>
funcom_train/43288750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModelPart getPartById(final String id) { synchronized (modelParts) { Iterator it = modelParts.keySet().iterator(); while (it.hasNext()) { ModelPart part = (ModelPart) it.next(); String cId = (String) modelParts.get(part); if (cId != null && cId.equals(id)) { return part; } } } // not found return null; } COM: <s> get a model part by its id </s>
funcom_train/49602021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDigestEncryptionAlgorithm() { try { return lookupMnemonicByOID(getSignerInfo(signedData) .getDigestEncryptionAlgorithm().getObjectId()); } catch (NoSuchAlgorithmException nsae) { nsae.printStackTrace(); throw new IllegalStateException(nsae.toString()); } } COM: <s> gets the name of the algorithm used in the signature </s>
funcom_train/45442794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String brandSource(String source, String urlString) { if (source.startsWith("/*")) { source = "/** \r\n * Sourcecode fetched by merobase.com \r\n * Origin: " + urlString + "\r\n" + " * " + source.substring(3, source.length()); } else { source = "/** \r\n * Sourcecode fetched by merobase.com \r\n * Origin: " + urlString + "\r\n */\r\n" + source; } return source; } COM: <s> add a branding to the source </s>
funcom_train/44715267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disable() { checkEnableProcess(); int currState = getState(); if (currState == DISABLED) { return; } setState(DISABLED); save(); //if finished then inform other dependent // task that it was rolled back if (currState == FINISHED) { rollbackEvt(); triggerListenerUpdateState(); } else if (currState == ENABLED) { disableEvt(); } } COM: <s> disables a task </s>
funcom_train/25504690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image loadWidgetDisabledImage(String[] widgetKey) throws ResourceUnavailableException { assert widgetKey != null; assert widgetKey.length == 2; assert widgetKey[0] != null; assert widgetKey[1] != null; final String[] key = new String[] { widgetKey[0], widgetKey[1] + ".disabledimage" }; return loadImage(key); } COM: <s> load a widgets disabled image attribute </s>
funcom_train/4193788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void saveFile(String file) { if (file==null) return; //else try { BufferedWriter out=new BufferedWriter(new FileWriter(file)); out.write(toLines()); out.close(); } catch (IOException e) { System.err.println("ERROR writing on file \""+file+"\""); } } COM: <s> saves configure attributes on the specified i file i </s>
funcom_train/14585501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSummaryGameStats() { String summary = "Offense: " + offense + ", " + Txtflo.convertDown(down) + " and " + startYdsToGo + " at the " + yardline + "\n" + Txtflo.convertTime(time) + " in " + Txtflo.convertQuarter(quarter) + ", " + Txtflo.convertScores(ofScore, dfScore, offense, defense); return summary; } COM: <s> gets a summary of the game time statistics in prose form </s>
funcom_train/50088259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector getUnion(Vector vec1, Vector vec2){ // FIXME: the JavaDoc does not describe what happens: that vec1 gets to be the union! Vector is = (Vector)vec1.clone(); for (int f = vec2.size()- 1; f > -1; f--){ if (!vec1.contains((Atom)vec2.elementAt(f))) is.addElement((Atom)vec2.elementAt(f)); } return is; } COM: <s> returns a vector that contains the union of vectors vec1 and vec2 </s>
funcom_train/2293694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void defineWidgets() { // initialize the user object to use for the dialog initFileInfo(); setKeyPrefix(KEY_PREFIX); addWidget(new CmsWidgetDialogParameter(this, "path", PAGES[0], new CmsDisplayWidget())); addWidget(new CmsWidgetDialogParameter(this, "title", PAGES[0], new CmsDisplayWidget())); } COM: <s> creates the list of widgets for this dialog </s>
funcom_train/12558921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(TreeSelectionEvent e) { MyTreeNode n = (MyTreeNode) tree.getLastSelectedPathComponent(); if (n != currentTreeNode) { currentTreeNode = n; if (deltaTarget != null) { currentTreeNode.cgNode.setDelta(deltaTarget); deltaTarget = null; deltaPrompt.setVisible(false); } refreshTable(); } } COM: <s> handles tree selection changes </s>
funcom_train/35219351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Identifiable obj) { try { // create a xquery query to perform the update of the object into the root of the collection String query = "update insert " + Marshaler.toXML(obj) + " into " + DOC_ROOT; JOXM.logInfo(query); // execute the query xqueryService.execute(xqueryService.compile(query)); } catch(Exception e) { e.printStackTrace(); } } COM: <s> persists the contents of the given object to the collection associated with </s>
funcom_train/45773877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAction() { int[] rows = m_table.getSelectedRows(); if (rows.length > 0) { DefaultTableModel tModel = (DefaultTableModel) m_table.getModel(); for (int i = rows.length - 1; i > -1; i--) { tModel.removeRow(rows[i]); } setButtonsProperties(); } } COM: <s> remove all selected actions </s>
funcom_train/50689170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doNIPALS() { PLSCompute.doNIPALS(doMeanCenter, doStandardDevScale, ncomp, maxncomp, ncomp_status, X, Y, B, PP, QQ, RR, TT, UU, WW, m_width, m_belowpoint); } COM: <s> do standard nipals pls </s>
funcom_train/11020591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Renderable renderAttributeContext() { return new AbstractDefaultToStringRenderable(getVelocityContext(), null, getResponse(), getRequest()) { public boolean render(InternalContextAdapter context, Writer writer) { Request velocityRequest = createVelocityRequest( getServletContext(), writer); TilesContainer container = TilesAccess .getCurrentContainer(velocityRequest); container.renderContext(velocityRequest); return true; } }; } COM: <s> renders the current attribute context </s>
funcom_train/45539318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reloadDescriptors() { Map map= new HashMap(); // SaveParticipantDescriptor desc= new SaveParticipantDescriptor(new CleanUpPostSaveListener()) { // /** // * {@inheritDoc} // */ // public ISaveParticipantPreferenceConfiguration createPreferenceConfiguration() { // return new CleanUpSaveParticipantPreferenceConfiguration(); // } // }; // map.put(desc.getId(), desc); fDescriptors= map; } COM: <s> loads the save participants </s>
funcom_train/22165819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String GetLabel(NamedEntityTypeEnumI[] pi_Types) { for (int i = 0; i != pi_Types.length; ++i) { if (m_BitValue.get(pi_Types[i].BitPos())) { if (pi_Types[i].Label() != null) return pi_Types[i].Label(); } } return null; } COM: <s> get a label for the current entity </s>
funcom_train/1990087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void nodeDelete(GUITreeNode node) { GUITreeNode parentNode = (GUITreeNode) node.getParent(); int index = getIndexOfChild(parentNode, node); node.removeFromParent(); fireTreeNodesRemoved(this, getPathToRoot(parentNode), new int[] { index }, new Object[] { node }); } COM: <s> notifies that the node must be deleted from the model </s>
funcom_train/6409713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rotateScreenAligned(Camera camera) { // coopt diff for our in direction: look.set(camera.getDirection()).negateLocal(); // coopt loc for our left direction: left.set(camera.getLeft()).negateLocal(); orient.fromAxes(left, camera.getUp(), look); worldRotation.fromRotationMatrix(orient); } COM: <s> rotate the billboard so it points directly opposite the direction the </s>
funcom_train/31667898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseToDOM() { ByteArrayInputStream is = new ByteArrayInputStream(content); // set tidy parameters Tidy tidy = new Tidy(); tidy.setUpperCaseTags(false); tidy.setUpperCaseAttrs(false); tidy.setErrout(new PrintWriter(new NullWriter())); domDoc = tidy.parseDOM(is,null); } COM: <s> parses the document to a dom tree using tidy </s>
funcom_train/16884337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private String objectLinkCheckBox( String cbName, int index, int cbValue ) { // String cbID = cbName + "[" + index + "]"; // CheckBoxInput cbInstance = new CheckBoxInput( cbID, Integer.toString( cbValue ) ); // return cbInstance.render(); // } COM: <s> makes a check box name cb name index and with value cb value </s>
funcom_train/38536152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isAnyZFalse() { if (gzexpr != null) return gzexpr.isAnyFalse(); if (zexpr != null) return zexpr.isFalse(); if (currentConstVal!=null) return !currentConstVal.booleanValue(); return currentGenConstVal.isAnyFalse(); } COM: <s> returns true if any z node is false </s>
funcom_train/47107559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemArmor11() { JMenuItem menuItem = new JMenuItem(); menuItem.setText(Armor.A_11.getItemName()); menuItem.setEnabled(false); menuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { controller.setPlrReadiedArmor(Armor.A_11); } }); return menuItem; } COM: <s> creates the twelfth choice for the armor menu </s>
funcom_train/47513576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Instance getFeatureVector(Interaction i) { Instance inst = new Instance(structure.size()); Set<String> posSet = new HashSet<String>(); for(Vertex v : i.depPath.vertices){ posSet.add((String)v.getUserDatum(Keys.POS)); } for(Enumeration<Attribute> e = data.enumerateAttributes(); e.hasMoreElements();){ Attribute a = e.nextElement(); if(posSet.contains(a.name())) inst.setValue(a, new Double(1)); else inst.setValue(a, new Double(0)); } return inst; } COM: <s> returns a numeric feature vector that counts pos </s>
funcom_train/1723232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void testLoadingTwice() { // expect(mProvider.getCaches()).andReturn(mList1); // PowerMock.replayAll(); // // CachesProviderLazy lazy = new CachesProviderLazy(mProvider, MINDIST, MINTIME, mClock); // // assertEquals(mList1, lazy.getCaches()); // assertEquals(mList1, lazy.getCaches()); // PowerMock.verifyAll(); // } COM: <s> getting the list the second time doesnt reload the list </s>
funcom_train/31520358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public Calendar build(final Reader in) throws IOException, ParserException { long tmStart = System.currentTimeMillis(); try { return super.build(in); } finally { log.debug("Calendar built in " + Long.toString(System.currentTimeMillis() - tmStart) + " ms"); } } COM: <s> builds an i calendar model by cap calendar from the specified reader </s>
funcom_train/35320107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAccessibleColumnDescription(int c, Accessible a) { if (c < 0 || c >= getAccessibleColumnCount()) { throw new IllegalArgumentException(Integer.toString(c)); } if (columnDescription == null) { int numColumns = getAccessibleColumnCount(); columnDescription = new Accessible[numColumns]; } columnDescription[c] = a; } COM: <s> sets the description text of the specified column of the table </s>
funcom_train/12188769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStringValue() throws ExpressionException { final Function function = new CountFunction(); Value result = function.invoke(expressionContextMock, new Value[]{factory.createStringValue("abc")}); assertTrue(result instanceof IntValue); assertEquals(1, ((IntValue) result).asJavaInt()); } COM: <s> tests if 1 is returned for string </s>
funcom_train/31930933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu createSystemMenu() { JMenu system = new JMenu(); system.setText("System"); system.setMnemonic(KeyEvent.VK_Y); system.add(m_propertiesAction); system.addSeparator(); system.add(m_preferencesAction); system.addSeparator(); system.add(createLookAndFeelSubMenu()); return system; } COM: <s> create and return the options menu for the menu bar </s>
funcom_train/1150183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setupRMI(RMIMessage server) throws RemoteException { Registry registry = LocateRegistry.getRegistry(BREADBOX_SERVER_PORT); try { registry.bind("RMIMessageReceiver", this); } catch (AlreadyBoundException e) { registry.rebind("RMIMessageReceiver", this); } Message m = new Message(0, OperationType.INITIALIZE.toString(), null); server.sendMessage(m); } COM: <s> sets up the local rmi server and sends an </s>
funcom_train/8201273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCloning() { LegendItem item = new LegendItem("Item", "Description", "ToolTip", "URL", new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), Color.red); assertFalse(item instanceof Cloneable); } COM: <s> cloning is not required for this class as it is designed to be </s>
funcom_train/37587381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void currThreadSet(DebugThreadData thread) { _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) { _listeners.get(i).currThreadSet(thread); } } finally { _lock.endRead(); } } COM: <s> called when the current selected thread is set in the debugger </s>
funcom_train/31529359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireManagedObjectRemoved(Object pObject) { Iterator _listeners = listeners.iterator(); while(_listeners.hasNext()) { ((DCContainerListener)_listeners.next()).managedObjectRemoved( new DCContainerEvent(this, DCContainerEvent.COMPONENT_REMOVED, pObject, null, -1)); } } COM: <s> fire object removed event </s>
funcom_train/21917056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private VariableExp tryToMatchImplicitAttribute(ParsedPropertyCallExp tree, Environment env, PathName name) { VariableExp result = null; IAttribute att = env.lookupImplicitAttribute(name.getLast()); if( att != null ){ VariableDeclaration source = env.lookupImplicitSourceForAttribute(name.getLast()); result = new VariableExp( source ); result.setImplicit(true); AttributeCallExp attExp = new AttributeCallExp(att); attExp.setMarkedPre(tree.isMarkedPre()); result.setAppliedProperty(attExp); } return result ; } COM: <s> try to analyze i name i as if it is an implicit attribute </s>
funcom_train/22001738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { // TODO: equals shouldn't say the equations are equal unless they // ARE the same equations. Otherwise it should rate them slightly // differently?? I'm not sure. // TODO: Also the 'order' variable isn't defined if the order is // not set. So this variable shouldnt always be generated by // mutator. Individual other = (Individual) object; return getValue().equals(other.getValue()); } COM: <s> test the invidiuals final values for equality </s>
funcom_train/43269902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(final IEditorPart parent) { // set parent m_Parent = parent; // add model listeners if (m_Model != null) { m_Model.addSelectionListener(this); manager = new SemanticDescriptionController(Activator.getDefault() .getModelContainer()); manager .setTransformationSupplier(new DefaultSLLSemanticPartModifierTransformationSupplier()); manager.setModel(m_Model); Activator.getDefault().getModelContainer().addDescription( manager.getDescription()); } } COM: <s> this is a code imodel view code method </s>
funcom_train/33895923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectUsers(List selectUsers, List cancelUsers) { Collection users = this.getUsers(); for (Iterator it = selectUsers.iterator(); it.hasNext();) { User user = (User) it.next(); if (!users.contains(user)) users.add(user); } for (Iterator it = cancelUsers.iterator(); it.hasNext();) { User user = (User) it.next(); if (users.contains(user)) users.remove(user); } } COM: <s> select or repeal users </s>
funcom_train/43894462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void endSchemaType() throws SAXException { contentHandler.endElement(SCHEMA_NS, "sequence", "xs:sequence"); contentHandler.endElement(SCHEMA_NS, "extension", "xs:extension"); contentHandler.endElement(SCHEMA_NS, "complexContent", "xs:complexContent"); contentHandler.endElement(SCHEMA_NS, "complexType", "xs:complexType"); } COM: <s> end the schema fragment for a feature type </s>
funcom_train/38252786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parseAccession (String line) { //String value = ""; /* StringTokenizer aToken = new StringTokenizer(line); aToken.nextToken(); while(aToken.hasMoreTokens()) { value += " "+aToken.nextToken(); } */ elPattern.match(line); curElHas.put("value", elPattern.getParen(2)); } COM: <s> parse genbank accession record </s>
funcom_train/15584823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Weight nextHeaviest() { switch(this) { case EXTREMELY_LIGHT: return VERY_LIGHT; case VERY_LIGHT: return LIGHT; case LIGHT: return NORMAL; case NORMAL: return DARK; case DARK: return SEMI_BOLD; case SEMI_BOLD: return BOLD; case BOLD: return EXTRA_BOLD; case EXTRA_BOLD: return BLACK; case BLACK: return this; default: return null; } } COM: <s> returns the next heaviest weight </s>
funcom_train/28898457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getStatsPanel() { if (statsPanel == null) { FlowLayout flowLayout = new FlowLayout(); statsLabel = new JLabel(); statsLabel.setText("<html>Move the mouse<br>over this label<br>to see the stats!</html>"); statsPanel = new JPanel(); statsPanel.setLayout(flowLayout); statsPanel.add(statsLabel, null); } return statsPanel; } COM: <s> this method initializes stats panel </s>
funcom_train/8080763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double computeAccu(Instances data, int clas){ double accu = 0; for(int i=0; i<data.numInstances(); i++){ Instance inst = data.instance(i); if((int)inst.classValue() == clas) accu += inst.weight(); } return accu; } COM: <s> private function to compute number of accurate instances </s>
funcom_train/47989711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logError(int line, int column, String source, String detail) { if(line == -1 && column == -1 && source == null) { logError(detail); } else { log("Error on line " + line + " column " + column + " of " + source); log(" " + detail); } } COM: <s> prints an error message to the log </s>
funcom_train/9709818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onMessage(MessageContext msgContext) { // Transport input stream gets closed after calling setComplete // method. Have to build the whole envelope including the // attachments at this stage. Data might get lost if the input // stream gets closed before building the whole envelope. this.envelope = msgContext.getEnvelope(); this.envelope.buildWithAttachments(); } COM: <s> this is called when we receive a message </s>
funcom_train/50079294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AttributeList getAttributes(String[] attributes) { AttributeList list = new AttributeList(); for (int i = 0; i < attributes.length; i++) { Object value = null; try { value = this.getAttribute(attributes[i]); } catch (Exception e) { // Ignore exceptions. } list.add(new Attribute(attributes[i], value)); } return list; } COM: <s> enables the values of several attributes of the dynamic mbean </s>
funcom_train/46378541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeEntityComponent(Class clazz) { if (app == null) { return; } synchronized (app.getAppCleanupLock()) { synchronized (entityComponents) { EntityComponentEntry entry = entityComponentEntryForClass(clazz); if (entry != null) { entityComponents.remove(entry); for (View2D view : views) { view.removeEntityComponent(clazz); } } } } } COM: <s> remove an entity component from this windows view that have them </s>
funcom_train/4518441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setYAxisWidth(TimeBarViewerInterface emitting, int yAxisWIdth) { for (TimeBarViewerInterface viewer : _viewers) { if (!emitting.equals(viewer)) { // do not set on the emitting viewer viewer.removePropertyChangeListener(this); viewer.setYAxisWidth(yAxisWIdth); viewer.addPropertyChangeListener(this); } } } COM: <s> set the y axis width value for all viewers but the emitting viewer </s>
funcom_train/43895291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getAttribute(String xPath) { if (xPath.indexOf(featureType.getTypeName()) > -1) { if (xPath.endsWith("]")) { // TODO get index and grab it return getAttribute(0); } else { return getAttribute(0); } } return null; } COM: <s> not really interested yet </s>
funcom_train/48905798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VendorBO create() throws DataException { String id = null; try{ id = GUID.generate(); } catch (Exception e) { throw new DataException("Could not generate new Vendor", e); } VendorBO v = new VendorBO(id); Cache c = Cache.getInstance(); c.put(v.getVguid(), v); return v; } COM: <s> this method is used to create a business object of type vendor </s>
funcom_train/20904332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void append (String txt, int style){ try { document.insertString(document.getLength(), txt,attrSet[style]); } catch (BadLocationException e) { System.err.println("!!! MyTextPane.append: Fehler bein anhaengen von\n"+txt); e.printStackTrace(); } }//append COM: <s> haengt text an </s>
funcom_train/44773423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stateOut() { //call all the listeners of the state out if(iStateListener!=null&&(iStateListener.size()>0)){ //make a copy of the listeners in case //anyone adds/removes listeners List listeners = null; synchronized(this){ listeners = this.iStateListener; } StateEvent event = new StateEvent(this,this); for(int i=0;i<listeners.size();i++){ ((IStateListener)listeners.get(i)).stateOut(event); } } } COM: <s> calls all the listeners of the state out </s>
funcom_train/22397331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MailStoreRequest createFolderRefreshRequest(FolderTreeItem folder, FolderMessage[] loadedMessages) { if(client instanceof ImapClient) { return new ImapFolderRefreshRequest(this, folder, loadedMessages); } else if(client instanceof PopClient) { return new PopFolderRefreshRequest(this, folder, loadedMessages); } else { throw new UnsupportedOperationException(); } } COM: <s> creates a request to synchronize a locally cached folder with data from </s>
funcom_train/38223881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RuleTrigger evaluate() { if ( log.isDebugEnabled() ) log.debug( "evaluate: " + this.getClass().getName() ); RuleTrigger rt = ruleNetwork.getTrigger( this ); // Only evaluate if dirty and not yet evaluated // A rule is dirty if the RuleTrigger is not null if ( rt != null && !rt.isEvaluated() ) { rt.setScore( weight ); rt.setEvaluated( true ); } return rt; } COM: <s> evaluate the leaf </s>
funcom_train/15955598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStateVertex(int index, SCStateVertex v) { if( index >= fVertexes.length) { SCStateVertex[] lNew = new SCStateVertex[index+1]; System.arraycopy(fVertexes,0,lNew,0, fVertexes.length); fVertexes = lNew; } fVertexes[index] = v; } COM: <s> sets state at same relative position as in referenced statemachine </s>
funcom_train/45758095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean resizeDocument(Rectangle newPosSize){ wl.resetTrigger(); xWin.setPosSize(newPosSize.X, newPosSize.Y, newPosSize.Width, newPosSize.Height, PosSize.POSSIZE); try { Thread.sleep(3000); } catch(java.lang.InterruptedException e) {} return wl.resizedTrigger; } COM: <s> resize window to the given rectangle </s>
funcom_train/43247072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetPatientType() { System.out.println("setPatientType"); String patientType = ""; PatientDemographicsObject instance = new PatientDemographicsObject(); instance.setPatientType(patientType); // 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 patient type method of class org </s>
funcom_train/35167896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeRMSE() { try { rmseString = testPath+trainingFile.substring(20, 22)+"RMSE.txt"; //BE CAREFULL 20,22 depend by txtPath rmseFile =new BufferedWriter(new FileWriter(rmseString)); for(int i=0; i<rmse.length; i++){ rmseFile.write(String.valueOf(rmse[i])); rmseFile.newLine(); } rmseFile.close(); } catch (Exception e) { e.printStackTrace(); } } COM: <s> put in file the rmse values each 200 epochs </s>
funcom_train/47104270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateFacing(Direction direction){ if(!inDungeon){ if(direction == Direction.EAST || direction == Direction.NORTHEAST || direction == Direction.SOUTHEAST) facing = Facing.RIGHT; else if(direction == Direction.WEST || direction == Direction.SOUTHWEST || direction == Direction.NORTHWEST){ facing = Facing.LEFT; } } else { if(direction == Direction.NORTH) facing = Facing.UP; else if(direction == Direction.EAST) facing = Facing.RIGHT; else if(direction == Direction.SOUTH) facing = Facing.DOWN; else if(direction == Direction.WEST) facing = Facing.LEFT; } } COM: <s> updates the players facing direction based on the movement direction </s>
funcom_train/47676252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void storeInnerDividerLocaton(int p_dividerLocation) { Preferences node = NbPreferences.forModule(ConnectorsDialog.class); node.put(INNER_DIVIDER_LOCATION, String.valueOf(p_dividerLocation)); try { node.sync(); } catch (BackingStoreException ex) { ex.printStackTrace(); } } COM: <s> store the current inner divider location to the file system for later </s>
funcom_train/18569860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCallId() { call = new Call(signature, argValues, returnValue); try { call.getCallId(); fail("expected exception"); } catch (IllegalStateException e) { } call.setSignatureSequence(1); assertEquals(signature + ":1", call.getCallId()); } COM: <s> test the call id </s>
funcom_train/43895003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LineString line(int[] xy) { Coordinate[] coords = new Coordinate[xy.length / 2]; for (int i = 0; i < xy.length; i += 2) { coords[i / 2] = new Coordinate(xy[i], xy[i + 1]); } return gf.createLineString(coords); } COM: <s> creates a line from the specified var x var var y var coordinates </s>
funcom_train/25419944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getUseCollections() { RequestContext context = this.getRequestContext(); StringAttributeMap params = context.getCatalogConfiguration().getParameters(); String s = Val.chkStr(params.getValue("catalog.useCollections")); return s.equalsIgnoreCase("true"); } COM: <s> determine if collections are in use </s>
funcom_train/50541502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() throws Exception { TimeScheduler timer; super.start(); timer=stack != null ? stack.timer : null; if(timer == null) throw new Exception("STABLE.start(): timer is null"); sched=timer; // we use only asynchronous method invocations... if(_corr != null) _corr.setDeadlockDetection(false); initialize(); startGossip(); } COM: <s> start the layer </s>
funcom_train/44624284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void skipThroughSemi() { while (S.token() != Token.SEMI && S.token() != Token.EOF && S.jmlToken() != JmlToken.ENDJMLCOMMENT) S.nextToken(); if (S.token() == Token.SEMI) S.nextToken(); } COM: <s> skips up to and including a semicolon though not including any eof or </s>
funcom_train/9113937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String join(String separator) { int len = length(); StringBuffer sb = new StringBuffer(); for (int i = 0; i < len; i += 1) { if (i > 0) { sb.append(separator); } sb.append(JSONUtils.valueToString(this.elements.get(i))); } return sb.toString(); } COM: <s> make a string from the contents of this jsonarray </s>
funcom_train/2616507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteRequest() { if (holidaySelected != null) { if (holidaySelected.getEntity().getDate().after(new Date())) { HolidayRequestManager.getInstance().removeRequest(holidaySelected.getEntity()); MessageOk message = new MessageOk("Ok", "Ok!", null, Roma.i18n().getString("RequestDeleted")); refreshCalendar(); RomaFrontend.flow().forward(message); } } } COM: <s> method that delete the selected request </s>
funcom_train/17049329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DomElement getXmlElement() { if (_xmlElement == null) { final String xmlString = getXmlString(); if (xmlString != null) { try { _xmlElement = (DomElement)XmlFactory.buildDomNode(xmlString, false); } catch (IOException e) { } } } return _xmlElement; } COM: <s> get the current xml element if xml string is well formed or null </s>
funcom_train/42711029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJScrollPaneInvoiceTBs() { if (jScrollPaneInvoiceTBs == null) { jScrollPaneInvoiceTBs = new JScrollPane(); jScrollPaneInvoiceTBs.setBounds(new Rectangle(140, 270, 631, 131)); jScrollPaneInvoiceTBs.setViewportView(getJListInvoiceTBs()); } return jScrollPaneInvoiceTBs; } COM: <s> this method initializes j scroll pane invoice tbs </s>
funcom_train/21110367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calculateSplitting(int prefixInt){ if (checkPrefix(prefixInt)) new BinaryCalculate().prefixInPrefixCalculate(IPToBinary( IPAddressTextField),getChildPrefix(), calculatePrefixInPrefix(prefixInt), "/" + prefixInt); else displayError("Not a valid IPv4 Address & splitting " + "prefix combination"); } COM: <s> calculates the list of ip address ranges needed to accomodate all the ip </s>
funcom_train/18460741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFormula_0() { Vector elements = new Vector(); Term element = new Term(2, "sin", 1); elements.add(element); element = new Term(1, "X", 1); elements.add(element); String formula = getFormula(elements); assertEquals("F(X)=sin(X)", formula); } COM: <s> one formula with depth 1 </s>
funcom_train/13867817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Text createTextNode(String data) { try { return (Text) NodeImpl.build(XMLParserImpl.createTextNode( this.getJsObject(), data)); } catch (JavaScriptException e) { throw new DOMNodeException(DOMException.INVALID_CHARACTER_ERR, e, this); } } COM: <s> this function delegates to the native method code create text node code </s>
funcom_train/15607235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (!(o instanceof Bounds)) return false; Bounds b = (Bounds)o; return (x == b.x && y == b.y && width == b.width && height == b.height && leftPixels == b.leftPixels && rightPixels == b.rightPixels && upPixels == b.upPixels && downPixels == b.downPixels); } COM: <s> return true if these bounds are equal to the given bounds </s>
funcom_train/5896833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ChartEngine newChartEngine() throws UiException { final String PROP = "org.zkoss.zul.chart.engine.class"; final String klass = Library.getProperty(PROP); if (klass == null) throw new UiException("Library property, "+PROP+", required"); final Object v; try { v = Classes.newInstanceByThread(klass); } catch (Exception ex) { throw UiException.Aide.wrap(ex); } if (!(v instanceof ChartEngine)) throw new UiException(ChartEngine.class + " must be implemented by "+v); return (ChartEngine)v; } COM: <s> instantiates the default chart engine </s>
funcom_train/45519197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendIntToXml(Element element, Field field) throws Exception { String fieldName = field.getName(); String fieldValue = String.valueOf(field.getInt(this)); String fieldDescription = getFieldDescription(fieldName); String fieldType = "int"; createXmlElement(element, fieldType, fieldName, fieldValue, fieldDescription); } COM: <s> append int to xml </s>
funcom_train/32979175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseMoved(MouseEvent e) { /* mouseMoved */ if(dwSP!=null) dwSP.mouseMoved(e); else if(dwH!=null) dwH.mouseMoved(e); else if(dwRH!=null) dwRH.mouseMoved(e); else if(dwCG!=null) dwCG.mouseMoved(e); } /* mouseMoved */ COM: <s> mouse moved handle mouse move events </s>
funcom_train/583721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setControlConfiguration( int newValue ) { controlConfiguration = newValue; controlsRow.removeAll(); Button button; switch ( controlConfiguration ) { case CONTROLS_OK: button = JComponents.getOkButton(); button.addActionListener( actionProcessor ); controlsRow.add( button ); break; case CONTROLS_YES_NO: button = JComponents.getYesButton(); button.addActionListener( actionProcessor ); controlsRow.add( button ); button = JComponents.getNoButton(); button.addActionListener( actionProcessor ); controlsRow.add( button ); break; } } COM: <s> sets the control configuration </s>
funcom_train/15493902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBooleanValue(boolean value) throws XMLConfigurationException { if (type == null) { throw new XMLConfigurationException( "The type has not been initialized"); } else if (XMLConfigurationType.BOOLEAN_VALUE == type.getType()) { booleanValue = value; } else { throw new XMLConfigurationException( "The value is not of type [boolean]."); } } COM: <s> the setter method for the boolean value </s>
funcom_train/17679884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean appendInsertValueList(CharBuf s, State state) { if (oracleStyleLOB) { if (state.isNull(stateFieldNo)) s.append("null"); else s.append(oracleStyleLOBNotNullString); return true; } else { s.append('?'); return false; } } COM: <s> append part of the insert value list for us to s e </s>
funcom_train/38492153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(OID oid, org.netsnmp.ASN.ASNValue value) { int i ; for( i = 0 ; i < entries.length ; i++ ) { if( !entries[i].oid.equals(oid) ) continue ; entries[i].value = value ; // replace the value return ; } addEntry(oid, value) ; } COM: <s> replaces the existing value corresponding to oid in the pdu </s>
funcom_train/49604340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double angleAtPoint(int cornerNbr) { int prevP = (cornerNbr + 3) % 4; int nextP = (cornerNbr + 1) % 4; Point corner = getPoint(cornerNbr); Point next = getPoint(nextP); Point prev = getPoint(prevP); double prevDir = corner.direction(prev); double nextDir = corner.direction(next); double result = prevDir - nextDir; if (nextDir > prevDir) { result = (2 * Math.PI + result); } return result; } COM: <s> todo make sure this support the pi pi gap </s>
funcom_train/32056059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setArchivedState(Object s) { System.out.println(s.toString()); if (s instanceof Vector) { Vector v = (Vector) s; Object[] cells = (Object[]) v.get(0); Map attrib = (Map) v.get(1); getGraphLayoutCache().insert(cells, attrib, null, null, null); setWriteProperties((Hashtable) v.get(2)); } } COM: <s> set archived state </s>
funcom_train/20042595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _setTime() { requiredMethod("getTime()") ; boolean result = true ; oObj.setTime(11150000) ; result = oObj.getTime() == 11150000 ; if (! result ) { System.out.println("Getting "+oObj.getTime()+ " expected 11150000"); } tRes.tested("setTime()", result) ; } COM: <s> sets a new value and checks if it was correctly set </s>
funcom_train/3107659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addListener(EventListener listener) { if (listener instanceof SettingsListener) { super.addListener(listener); SettingsListener l = (SettingsListener) listener; l.downloadSlotsChanged(getUsedDownloadSlots(), getDownloadSlots()); l.uploadSlotsChanged(getUsedUploadSlots(), getUploadSlots()); } else { throw new RuntimeException( "listener is not an instance of SettingsListener"); } } COM: <s> add a settings listener to the list of event listeners </s>
funcom_train/43567330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceByChildren(Element old, Element add) throws Exception { ParentNode parent = old.getParent(); int pos = parent.indexOf(old); Elements toInsert = add.getChildElements(); for (int j = 0; j < toInsert.size(); j++) { Element child = toInsert.get(j); child.detach(); parent.insertChild(child, ++pos); } parent.removeChild(old); } COM: <s> replace old by the children of add </s>
funcom_train/39911038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetId() { System.out.println("getId"); employee_client instance = new employee_client(); String expResult = ""; String result = instance.getId(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get id method of class buissness </s>
funcom_train/12808860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector cross(final Vector with){ float x = vals[I2]*with.vals[I3] - vals[I3]*with.vals[I2]; float y = vals[I3]*with.vals[I1] - vals[I1]*with.vals[I3]; float z = vals[I1]*with.vals[I2] - vals[I2]*with.vals[I1]; return new Vector(x, y, z); } COM: <s> computes the cross product of this vector and the specified vector </s>
funcom_train/50878449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void firePointSelected(Point inPoint){ for (int i=0; i<myListeners.size(); i++){ try{ ShapeEditorListener tempListener = (ShapeEditorListener) myListeners.elementAt(i); tempListener.pointSelected(inPoint); } catch (Throwable t){ System.out.println(t); t.printStackTrace(); } } } COM: <s> publish that a point was selected </s>
funcom_train/4520163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected XBeeNode searchCoordinator(){ if(!list.isEmpty()){ XBeeNode node; String key; Set<String> addressKeys = new HashSet<String>(); addressKeys = list.keySet(); Iterator<String> iterator = addressKeys.iterator(); while(iterator.hasNext()){ key = (String) iterator.next(); node = list.get(key); if(node.getType() == DeviceType.COORDINATOR){ this.coordinator = node; //Save the coordinator Node on list for future use return node; //Save the coordinator Node on list for future use } } } return null; } COM: <s> search the coordinator device on the list </s>
funcom_train/34128944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFolder(boolean isStartup) { // add the folder... BaseNode node = getSelectedNode(); if ( node instanceof FolderNode) { FolderNode parent = (FolderNode)node; FolderProperties props = new FolderProperties( "New Folder"); parent.getProperties().addFolderProperties( props); FolderNode folder = new FolderNode( treeModel, props, isStartup); addNode( parent, folder); getTree().startEditingAtPath( new TreePath( folder.getPath())); } } COM: <s> adds a folder node to the current selected folder project </s>
funcom_train/41160049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean recvFile(String filename){ // System.out.println("recv file:"+filename); File file = new File(filename); PrintWriter pwriter=null; String line=null; try { pwriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(file),"UTF-8")); line = br.readLine(); while(line!=null&&!line.equals(Command.FILE_END)) { pwriter.println(line); //System.out.println(line); line = br.readLine(); } pwriter.flush(); pwriter.close(); } catch (IOException e) { System.out.println(e.getMessage()); return false; } return true; } COM: <s> socket stream and file stream </s>
funcom_train/2023595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BuilderParameter getParameter(JComponent component) { int i; BuilderParameter result; BuilderParameter param; result = null; for (i = 0; i < parameters.size(); i++) { param = (BuilderParameter) parameters.get(i); if (param.getComponent() == component) { result = param; break; } } return result; } COM: <s> returns the parameter based on the gui component it represents can be </s>
funcom_train/44161656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateDataSource(DataSource ds) { Collection col = null; try { col = prepareCollection("datasources"); XMLResource document = (XMLResource)col.getResource("datasources"); Document doc = makeDocument(document); this.queryMethods.updateDataSource(doc, ds); document.setContentAsDOM(doc); col.storeResource(document); if (col != null) { col.close(); } } catch (Exception e) { e.printStackTrace(); } } COM: <s> update data source updates datasource </s>
funcom_train/652366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDoubleClickInIdentifierAfterDot() { mock.expectAndReturn("getDocument", new Document(".class")); mock.expectAndReturn("getSelectedRange", new Point(1, 0)); mock.expect("setSelectedRange", C.args(C.eq(1), C.eq(5))); strategy.doubleClicked((ITextViewer) mock.proxy()); } COM: <s> verifies that a double click on the first letter of the identifier </s>
funcom_train/17862300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJCheckBoxCurrent() { if (jCheckBoxCurrent == null) { jCheckBoxCurrent = new JCheckBox("Current"); // ToolTip must be set after action! jCheckBoxCurrent.setToolTipText("Make the new task the current one"); } return jCheckBoxCurrent; } COM: <s> this method initializes j check box current </s>
funcom_train/31985815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer textBuffer = new StringBuffer(); // faster than String and '+' java.util.Enumeration notes = eVector.elements(); // get all elements while (notes.hasMoreElements()) { // loop through all elements textBuffer.append("["); textBuffer.append((EventNote)notes.nextElement()); textBuffer.append("]"); // compose Note } return textBuffer.toString(); // return String representation of StringBuffer } COM: <s> returns a string representing the entries of this vector in a row </s>
funcom_train/8372504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int countLinks(FilterList fs) { int count = 0; try { Statement stmt = getStatement(); // count rows using the filter ResultSet rs = stmt.executeQuery("SELECT COUNT(*) FROM links" + fs.getWhereClause(true, Table.LINKS)); if (rs.next()) { count = rs.getInt(1); } rs.close(); freeStatement(stmt); } catch (SQLException e) { e.printStackTrace(); } return count; } COM: <s> counts the links matching a specific filter list </s>
funcom_train/32216734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GaWorkloadEventStub getWorkloadEventStub() { Stereotype stereotype = activity.getApplicableStereotype(GaWorkloadEventDecorator.QUALIFIED_NAME); GaWorkloadEventDecorator decorator = null; try { decorator = (GaWorkloadEventDecorator) getFactory().getDecorator(stereotype); } catch (ClassNotFoundException e) {} // cannot happen catch (InvalidContextException e) {} // cannot happen return (GaWorkloadEventStub) decorator.getStub(activity); } COM: <s> gets the stub for the ga workload event stereotype </s>