__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/26533166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void analyze(String path, Defect d) { int [] row = getRow(d.defect_type); for (int i = categories.size(); i-- > 0; ) { Category c = (Category) categories.get(i); if (c.matches(d)) increment(row, i, d.fix_count); } } COM: <s> implement defect analyzer </s>
funcom_train/3926138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getBoolean( String fieldName ) { FieldValue fv = getFieldValue( fieldName ); if ( fv == null ) { return( VRML97.getDefaultBoolValue( getNodeName(), fieldName )); } else if ( fv instanceof SFBoolValue ) { SFBoolValue sfbv = (SFBoolValue)fv; return( sfbv.getValue() ); } else { return( false ); } } COM: <s> get a boolean field value returns false if object structure not what is </s>
funcom_train/47163782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setList(NodeList list) { /* //check list int length = list.getLength(); for (int i = 0; i < length; i++) if (list.item(i) == null) throw new InvalidParameterException("the nodelist contains a null element at index " + i); */ this.list = list; index = 0; } COM: <s> setter of the corresponding property </s>
funcom_train/28658728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void syncShapesAfterPaint(Graphics gc) { if (gc == null) throw new IllegalArgumentException(); // a cursorPlaceHolder is bounded always to the same shape retrieveShapes(); if (ivCursorDrawed) { ivCursorShape.drawCursorShape(gc, getBoundingRect()); } if (ivFixedCursorDrawed) { ivFixedCursorShape.drawCursorShape(gc, getBoundingRect()); } } COM: <s> must be called always in the paint event </s>
funcom_train/32057923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testActionPerformed() { System.out.println("testActionPerformed"); GPGraphpad graphpad = new GPGraphpad(); ViewFit bottom = new ViewFit(graphpad); ActionEvent action = new ActionEvent(new Object(),ActionEvent.ACTION_PERFORMED,"command"); bottom.actionPerformed(action); //graphpad.getFrame().dispose(); } COM: <s> tests action performed method of class view fit </s>
funcom_train/48909158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTxfNumero() { if (txfNumero == null) { txfNumero = new JTextField(); txfNumero.setBounds(new Rectangle(71, 31, 113, 22)); txfNumero.addKeyListener(new KeyAdapter(){ public void keyPressed(KeyEvent e) { if(e.getKeyCode()==KeyEvent.VK_ENTER) comboTipoConexiones.grabFocus(); } }); } return txfNumero; } COM: <s> this method initializes txf numero </s>
funcom_train/44733417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAppLanguage(Locale newAppLocaleName) { // Update the translator with new locale name Translator.setCurrentTranslator(newAppLocaleName); logger.config("Application locale is " + Translator.getCurrentTranslator().getTrueLocaleName()); // update translations and font in tui // ui.localizeTui(); // TODO: GUI needs to be reinitialized to load new translations and/or fonts } COM: <s> set the application language </s>
funcom_train/7725386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDownloadName() { // Find the prefix and suffix of the file String suffix = ""; String prefix = name; int index = name.lastIndexOf('.'); if(index > -1) { suffix = name.substring(index); prefix = name.substring(0,index); } // Find a filename that doesn't already exist int i = 0; File f = new File(prefix+suffix); while(f.exists()) { i++; f = new File(prefix+"_"+i+suffix); } return f.getName(); } COM: <s> gets a name that this file can be stored as when </s>
funcom_train/38531878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireMemberAdded(ProjectMember member) { ArrayList temp; temp = (ArrayList)listListeners.clone(); for ( int x = 0; x < temp.size(); x++ ) { ((ListenerProject)temp.get(x)).memberAdded(this, member); } } COM: <s> gets called when a member is added to this project </s>
funcom_train/18346701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAllConceptRels() throws CapServiceException { if(myAllConceptRelsList == null) { myAllConceptRelsList = new ArrayList(); List types = getTypes(); for (int i = 0; i < types.size(); i++) { CapCommonClass type = (CapCommonClass) types.get(i); myAllConceptRelsList.addAll(type.getConceptRels()); } myAllConceptRelsList = Collections.unmodifiableList(myAllConceptRelsList); } return myAllConceptRelsList; } COM: <s> get the list of all rels from all types </s>
funcom_train/20612373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addValuePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BodyType_value_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BodyType_value_feature", "_UI_BodyType_type"), GCLACSPackage.Literals.BODY_TYPE__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the value feature </s>
funcom_train/8048387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector3D getMiddlePointBetweenFingers(Vector3D firstFinger, Vector3D secondFinger){ Vector3D bla = secondFinger.getSubtracted(firstFinger); //= Richtungsvektor vom 1. zum 2. finger bla.scaleLocal(0.5f); //take the half return (new Vector3D(firstFinger.getX() + bla.getX(), firstFinger.getY() + bla.getY(), firstFinger.getZ() + bla.getZ())); } COM: <s> gets the middle point between fingers </s>
funcom_train/7524613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void suspect(Address suspected_member) { if(suspected_member == null) return; lock.lock(); try { addSuspect(suspected_member); Rsp rsp=requests.get(suspected_member); if(rsp != null) { rsp.setSuspected(true); rsp.setValue(null); completed.signalAll(); } } finally { lock.unlock(); } } COM: <s> b callback b called by request correlator or transport </s>
funcom_train/48189371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void chooseTag(String[] myTags) { tagList = myTags; AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("Choose a Tag"); builder.setItems(tagList, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item) { addToTagText(tagList[item]); } }); AlertDialog roomchooser = builder.create(); roomchooser.show(); } COM: <s> shows the actual dialog and redirects choices to the add tag method </s>
funcom_train/31912447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getClientAreaLocationOnScreen() { if (EventQueue.isDispatchThread()) { return userAgent.getClientAreaLocationOnScreen(); } else { class Query implements Runnable { Point result; public void run() { result = userAgent.getClientAreaLocationOnScreen(); } } Query q = new Query(); invokeAndWait(q); return q.result; } } COM: <s> returns the location on the screen of the </s>
funcom_train/31890879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String sizeString; if (data.length < 1024) sizeString = String.valueOf(data.length) + " B"; else sizeString = String.valueOf(Math.round(data.length / 1024)) + " KiB"; return fileName + " (" + sizeString + ", " + MIMEType.split(";")[0] + ")"; } COM: <s> converts this attachments name to string </s>
funcom_train/21742197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void out() { String tmpKeyOut = new String(); for (Iterator<String> i = attributes.iterator(); i.hasNext();) { String tmpKeyAttribute = i.next(); tmpKeyOut += tmpKeyAttribute; if (i.hasNext()) { tmpKeyOut += ", "; } } System.out.println("(" + tmpKeyOut + ")"); } COM: <s> prints the key on console </s>
funcom_train/48496366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(long stateId, long studioId){ Connection conn =null; try{ conn = ResourceManager.getConnection(TRACE_ID); PreparedStatement stmt = conn.prepareStatement("Delete from PrintSizeForStudio where PrintSizeId = ? and studioid=?" ); stmt.setLong(1, stateId); stmt.setLong(2, studioId); stmt.execute(); }catch (Exception e) { e.printStackTrace(); }finally{ ResourceManager.freeConnection(conn,TRACE_ID); } } COM: <s> deletes a single row in the city table </s>
funcom_train/40452214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdAgregarProducto1() { if (cmdAgregarProducto1 == null) {//GEN-END:|152-getter|0|152-preInit // write pre-init user code here cmdAgregarProducto1 = new Command("Ok", Command.OK, 0);//GEN-LINE:|152-getter|1|152-postInit // write post-init user code here }//GEN-BEGIN:|152-getter|2| return cmdAgregarProducto1; } COM: <s> returns an initiliazed instance of cmd agregar producto1 component </s>
funcom_train/40505970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFrameTitle(String title) { StringBuilder newTitle = new StringBuilder(); newTitle.append("Robot Level Editor"); if (title != null) { newTitle.append(" - ").append(title); } frame.setTitle(newTitle.toString()); } COM: <s> changes the title of the frame to include the given string </s>
funcom_train/17024703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JSONObject parseProperties(GenericShape<?, ?> shape) throws JSONException { if(shape != null) { JSONObject propertiesObject = new JSONObject(); for (String name: shape.getPropertyNames()){ Object value = shape.getPropertyObject(name); if (value instanceof Float) value = ((Float)value).doubleValue(); propertiesObject.put(name, value); } return propertiesObject; }else return new JSONObject(); } COM: <s> delivers the correct json object for properties </s>
funcom_train/48401323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Connection connect() throws SQLException, ClassNotFoundException { try { Class.forName(driver); } catch(ClassNotFoundException e) { ClassNotFoundException f = new ClassNotFoundException("Invalid database driver class.", e); throw(f); } Connection connection = DriverManager.getConnection(connectionUrl); // TODO: Make this user configurable? connection.setAutoCommit(false); return connection; } COM: <s> connects to the database </s>
funcom_train/32631725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetName() { System.out.println("-> ViewProxy.testGetName"); String result = view.getName(); assertTrue("View name should be '" + viewName + "' not '" + result + "'", viewName.equals(result)); } COM: <s> tests the method get name </s>
funcom_train/31873488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void start(){ Interpreter interp; if(FILE.equals("#")){ interp = new Interpreter(); interp.setInteractiveMode(); }else{ interp = new Interpreter(FILE); if(quiet) interp.setQuietMode(); } if(this.debug) interp.Debug(); interp.run(); } COM: <s> runs the interpreter </s>
funcom_train/10628588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstrStringWithExponentWithoutPoint4() { String a = "238768787678287e+214"; int aScale = -214; BigInteger bA = new BigInteger("238768787678287"); BigDecimal aNumber = new BigDecimal(a); assertEquals("incorrect value", bA, aNumber.unscaledValue()); assertEquals("incorrect scale", aScale, aNumber.scale()); } COM: <s> new big decimal string value value contains exponent </s>
funcom_train/14141551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void renameCurrentNode() { // Have to do this using invokeLater() because otherwise it doesn't work // using keyPressed() and F2 (see below)... Runnable r = new Runnable() { public void run() { TreePath path = STree.this.getSelectionPath(); if( path != null ) { SharedNodeEditor.allowNextEdit(); STree.this.setSelectionPath( path ); STree.this.startEditingAtPath( path ); } } }; SwingUtilities.invokeLater( r ); } COM: <s> allows the user to rename the currently selected tree node </s>
funcom_train/18149446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMessageWaitingPriorityCode(CE messageWaitingPriorityCode) { if(messageWaitingPriorityCode instanceof org.hl7.hibernate.ClonableCollection) messageWaitingPriorityCode = ((org.hl7.hibernate.ClonableCollection<CE>) messageWaitingPriorityCode).cloneHibernateCollectionIfNecessary(); _messageWaitingPriorityCode = messageWaitingPriorityCode; } COM: <s> sets the property message waiting priority code </s>
funcom_train/13593738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void cleanUpNetwork() { for (Link l : this.redundantLinks) { this.network.removeLink(l.getId()); } log.info(this.redundantLinks.size() + " links outside the evacuation area have been removed."); this.redundantLinks.clear(); for (Node n : this.redundantNodes) { this.network.removeNode(n.getId()); } log.info(this.redundantNodes.size() + " nodes outside the evacuation area have been removed."); this.redundantNodes.clear(); new NetworkCleaner().run(this.network); } COM: <s> removes all links and nodes outside the evacuation area except the nodes </s>
funcom_train/37004092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNonJavaResource(IPackageFragmentRoot packFragRoot, String filename, String packageName) throws IOException, URISyntaxException, CoreException { IPackageFragment packFrag = packFragRoot.createPackageFragment(packageName, true, null); CopyFilesAndFoldersOperation copyOperation = new CopyFilesAndFoldersOperation(new Shell()); String filenames[] = {filename}; copyOperation.copyFiles(filenames, (IContainer)packFrag.getResource()); } COM: <s> adds a non java resource i </s>
funcom_train/3425235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SAXParser createSAXParser() { SymbolTable symbolTable = fShadowSymbolTable ? new ShadowedSymbolTable(fSynchronizedSymbolTable) : fSynchronizedSymbolTable; XMLGrammarPool grammarPool = fShadowGrammarPool ? new ShadowedGrammarPool(fSynchronizedGrammarPool) : fSynchronizedGrammarPool; return new SAXParser(symbolTable, grammarPool); } // createSAXParser():SAXParser COM: <s> creates a new sax parser </s>
funcom_train/28473421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getMacroScrollPane() { if (macroScrollPane == null) { macroScrollPane = new JScrollPane(); macroScrollPane.setBounds(new Rectangle(17, 38, 145, 261)); macroScrollPane.setViewportView(getSnaggingList()); macroScrollPane.setBorder(BorderFactory.createLineBorder(Color.lightGray)); } return macroScrollPane; } COM: <s> this method initializes macro scroll pane </s>
funcom_train/16335883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void terminateSpaces() { // Terminate All ActiveObjects for (int i = 0; i < workerList.size(); i++) { System.out.println( "Terminating ActiveObject " + i ); PAActiveObject.terminateActiveObject( getWorker( i ), true ); try { pad.killall( false ); } catch (final ProActiveException e) { e.printStackTrace(); } } } COM: <s> terminate and kill active objects </s>
funcom_train/26327879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColumnName(int column) { String alias ; try { if ((alias =(String) col_alias.get((String) col_names.elementAt(column)))!= null) { return alias; } else return(String) col_names.elementAt(column) ; } catch (Exception e) { return " "; } } COM: <s> returns the string name of a table column to the associated table or </s>
funcom_train/14093335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddProcedure() { Element suite = m_fixture.getSuiteElement(); Element procedure = m_fixture.newChild(suite, "procedure", new String[] { "name", "abc" }); XMLProcedure proc = new XMLProcedure(procedure); m_xmlTestCase.addProcedure(proc); } COM: <s> test adding a procedure </s>
funcom_train/10928029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object getFirstValue(String id) { if ((properties == null) || (properties.getProperties() == null)) { return null; } PropertyData<?> property = properties.getProperties().get(id); if (property == null) { return null; } return property.getFirstValue(); } COM: <s> returns the first value of a property or code null code if the </s>
funcom_train/32057088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testActionPerformed() { System.out.println("testActionPerformed"); // Add your test code below by replacing the default call to fail. //fail("The test case is empty."); GPGraphpad graphpad = new GPGraphpad(); ToolsStatusbar bottom = new ToolsStatusbar(graphpad); ActionEvent action = null; bottom.actionPerformed(action); //graphpad.getFrame().dispose(); } COM: <s> test of action performed method of class tools statusbar </s>
funcom_train/35313678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModel(ComboBoxModel<E> aModel) { ComboBoxModel<E> oldModel = dataModel; if (oldModel != null) { oldModel.removeListDataListener(this); } dataModel = aModel; dataModel.addListDataListener(this); // set the current selected item. selectedItemReminder = dataModel.getSelectedItem(); firePropertyChange( "model", oldModel, dataModel); } COM: <s> sets the data model that the code jcombo box code uses to obtain </s>
funcom_train/47139686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Value sumBasket (DataBasketCondition dbc, BasketEntryValue bev, Value vInit) { synchronized (getChildrenLock()) { for (Iterator i = m_mpsdbChildren.values().iterator(); i.hasNext();) { SubDataBasket sdb = (SubDataBasket) i.next(); sdb.sumSubBasket (dbc, bev, vInit); } } return vInit; } COM: <s> sum up all entries in the data basket that match the given condition </s>
funcom_train/1886268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processChatMessage(Message msg) { String buddy = jabberClient.filterAddressResource(msg.getFrom()); openUserChat(buddy).addText(msg.getBody()); log.addDebugLog("Received chat msg from: " + buddy + ", Text: " + msg.getBody()); } COM: <s> processes a received chat message </s>
funcom_train/22277977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cancelEditing() { if (!isBeingEdited()) { return; } if (_oldContents != null) { _contents = _oldContents; _oldContents = null; } /* cause stopFocus() to get called */ _editing = false; if (_superview != null) { _ignoreWillBecomeSelected = true; _superview.setFocusedView(null); _ignoreWillBecomeSelected = false; } } COM: <s> causes the text field to cancel editing by discarding any changes </s>
funcom_train/13209326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintDecoration(Graphics g) { Part deco = getGameConfig().getActivePart("sample.decoration"); int x = getGameConfig().getFieldWidth()/2-30; int y = getGameConfig().getFieldHeight()/2-25; drawPart(x, y, deco, g); } COM: <s> paint the decoration for testing </s>
funcom_train/22951522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkLearned() { if (learned) return; ModelLearnable LearnableModel; for(int i=0;i<numModels;i++) { if (classifierModels.get(i) instanceof ModelLearnable) { LearnableModel = (ModelLearnable)classifierModels.get(i); //if there is a non learned model return if (!LearnableModel.isLearned()) return; } } learned=true; } COM: <s> check if all models are learned if so set learned true </s>
funcom_train/17677247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void returnPS(PooledPreparedStatement ps) { Key key = ps.getKey(); key.addPsToList(ps); --key.activeCount; ++numIdle; --numActive; if (max > 0) { closeExcessStatements(); } if (Debug.DEBUG) { check(); } } COM: <s> return a ps to the pool </s>
funcom_train/36547563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveFileInsert( Map<String, Object> fileDetails ) throws ExceptionWriteDocument, SQLException, ExceptionDuplicateDocumentTitleForProject { if ( fileDetails.get( "is_template" ).equals( true ) ) { System.out.println( "SAVING NEW TEMPLATE" ); insertTemplate( fileDetails ); } else { insertDocument( fileDetails ); } } COM: <s> save file insert </s>
funcom_train/44714986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printSummary(java.io.PrintStream out) throws Exception { out.print("Start Date: "+getStartDate()+"\n"); out.print("Duration : "+getDuration() +" [m_duration]\n"); out.print("Due Date: "+getDueDate() +"\n"); } COM: <s> prints a summary to a java </s>
funcom_train/21916800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private void printSubPackNames(IPackage pack) { // Iterator it = pack.getSubpackages().iterator(); // while (it.hasNext()) { // IPackage sub = (IPackage) it.next(); // System.out.println(sub.getPathName().toString() ); // printSubPackNames(sub); // printIncludingClassNames(sub); // } // } COM: <s> method print sub pack names </s>
funcom_train/42181189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTexture(TextureImage texture) { if (texture != this.texture || (texture != null && !texture.equals(this.texture))) { TextureImage oldTexture = this.texture; this.texture = texture; firePropertyChange("texture", oldTexture, texture); repaint(); } } COM: <s> sets the texture displayed by this button </s>
funcom_train/44852559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fillHistory(DomainObject inHistory) throws BOMChangeValueException { try { for (Iterator<String> lNames = getPropertyNames(); lNames.hasNext();) { String lPropertyName = (String)lNames.next(); inHistory.set(lPropertyName, this.get(lPropertyName)); } } catch (Exception exc){ throw new BOMChangeValueException("HistorizableDomainObject.fillHistory: " + exc.getMessage()); } } COM: <s> fills the specified history with the values of the actual domain object </s>
funcom_train/4440474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSubRelation(IRelation subRelation, IRelation exisingRelation) { super.checkClosed(); if (subRelation == null) throw new IllegalArgumentException("subRelation was null"); if (exisingRelation == null) throw new IllegalArgumentException("exisingRelation was null"); super.createStatement(exisingRelation, hasSubRelation, subRelation, IModel.UNKNOWN_AUTHOR, IModel.UNKNOWN_AUTHOR); } COM: <s> states that sub relation is a sub relation of existing relation in other </s>
funcom_train/3544790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isValidNode(Node node) { if (node == null) { /* Not valid node */ return false; } Integer type = (Integer) node.getType(); if (type != BanksConstants.NODETYPE_NODE && type != BanksConstants.NODETYPE_BANK_TYPE) { /* Not the root and bank type node. Not valid node. */ return false; } /* Valid node */ return true; } COM: <s> checks whether a given node is valid not null is bank type </s>
funcom_train/46335895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetJavaPackageName() { System.out.println("setJavaPackageName"); String javaPackageName = "com.butterfill"; PlsqlPackage instance = new PlsqlPackage(); instance.setJavaPackageName(javaPackageName); assertEquals(javaPackageName, instance.getJavaPackageName()); } COM: <s> test of set java package name method of class plsql package </s>
funcom_train/593407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSilent(boolean silent, PageContext pageContext) throws IOException { if (silent != this.silent) { pageContext.getOut().write(TOGGLE); this.silent = silent; log.trace("Output is ", (silent ? "DISABLED" : "ENABLED")); } } COM: <s> enable or disable silent mode </s>
funcom_train/18738301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_overriddenMethodsCantHaveIncompatibleReturnTypes() { runSourceAndBinaryTestcase(new File(baseDir, "TestB"), new String[] { "Top2.java", "Middle2.java", "Super.java", "Sub.java" }, new String[] { "Aspect2.java" }, true); } COM: <s> if you inherit methods you cannot have incompatible return types java1 </s>
funcom_train/31825701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUrl() { checkWidget(); int[] rgdispid = auto.getIDsOfNames(new String[] { "LocationURL" }); //$NON-NLS-1$ Variant pVarResult = auto.getProperty(rgdispid[0]); if (pVarResult == null || pVarResult.getType() != OLE.VT_BSTR) return ""; String result = pVarResult.getString(); pVarResult.dispose(); return result; } COM: <s> returns the current url </s>
funcom_train/16792350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendRelocation(String original, String relocated) throws IllegalArgumentException { if (!original.startsWith(this.base)) throw new IllegalArgumentException(original + " must start with " + this.base); int tail = original.length() - this.base.length(); relocated = relocated.substring(0, relocated.length() - tail); this.relocations.addFirst(relocated); } COM: <s> append a relocation onto the end of the relocation list </s>
funcom_train/37448916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initNodes() { BasicGraphI aNode; HashMap someNodes = super.getNodes(); Set keys = someNodes.keySet(); Iterator iterator = keys.iterator(); while ( iterator.hasNext() ) { aNode = (BasicGraphI) someNodes.get( iterator.next() ); initNodeDisplay( aNode ); } } // initNodes COM: <s> allow to put the default color and default visibility for each protein of </s>
funcom_train/11702839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private VinciServiceInfo getServiceInfo(VinciFrame aServiceFrame) { String serviceName = aServiceFrame.fgetString("NAME"); String service_host_IP = aServiceFrame.fgetString("IP"); int service_port = aServiceFrame.fgetInt("PORT"); VinciServiceInfo serviceInfo = new VinciServiceInfo(serviceName, service_host_IP, service_port); return serviceInfo; } COM: <s> copy service information from vinci frame </s>
funcom_train/15625521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndex(@NotNull final R archetype) { for (int i = 0; i < SIZE; i++) { if (archetypes.get(i).contains(archetype)) { return i; } } log.warn("Error in AutojoinList.get_index: index not found"); return 0; } COM: <s> looks up the given node in the archetype array of this class </s>
funcom_train/10590844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toSAX(ContentHandler handler) throws SAXException { MailContentHandlerDelegate mailContentHandlerDelegate = new MailContentHandlerDelegate(handler); mailContentHandlerDelegate.setSimpleDateFormat(sdf); mailContentHandlerDelegate.startDocumentXMLizer(); mailContentHandlerDelegate.marshalMessageToSAX(message); mailContentHandlerDelegate.endDocumentXMLizer(); } COM: <s> generate sax events from a message </s>
funcom_train/4123518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setData(HashMap<String,Long> statsData) { this.data = new Object[2][statsData.size()]; int i=0; for (String s : statsData.keySet()) { data[NAME_COLUMN][i] = s; data[VALUE_COLUMN][i] = statsData.get(s); i++; } } COM: <s> gives this table model the data that is being used in the table </s>
funcom_train/19685792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prepareData() { addInt(HOP_COUNT); addInt(DestOfRREQseqnb); addInt(SrcOfRREQseqnb); addInt(IDandSEQNBpairs.size()); for (int i=0;i<IDandSEQNBpairs.size();i++){ IDandSEQNBpair objIDandSEQNBpair=(IDandSEQNBpair)IDandSEQNBpairs.get(i); addLong(objIDandSEQNBpair.getNODE_ID()); addInt(objIDandSEQNBpair.getNODE_SEQNB()); }//for } COM: <s> serialize the data in the rrep message </s>
funcom_train/13995323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateValue() { getContainer().getModel().setValue(getID(), getPropertyName(), getValue()); setBorder(getContainer().getModel().getValidationMessages(getID(), getPropertyName())); } COM: <s> updates the value and sets the border </s>
funcom_train/23704310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Double getMaxMinTimePeriod(int maxMin){ Double value = 0.0; if (maxMin == 1){ // Begin value = dao.getAshCalcSumByEventById115Sec().sortedMap().firstKey(); } else { // End value = dao.getAshCalcSumByEventById115Sec().sortedMap().lastKey(); } return value; } COM: <s> gets the max min value of time period bdb </s>
funcom_train/3168451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XnRegion minus(XnRegion other) { if (other.isEmpty()) { return this; } else { return intersect(other.complement()); } /* udanax-top.st:65231:XnRegion methodsFor: 'operations'! {XnRegion CLIENT} minus: other {XnRegion} "The region containing all my position which aren't in other." other isEmpty ifTrue: [^self ] ifFalse: [ ^self intersect: other complement ]! */ } COM: <s> the region containing all my position which arent in other </s>
funcom_train/49026725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getTestoB() { if (testoB == null) { testoB = new JButton(); testoB.setText("Inserisci"); testoB.setFont(new Font("Dialog", Font.BOLD, 12)); testoB.setIcon(new ImageIcon(getClass().getResource("/icone/folder-full-add-icon.png"))); testoB.setEnabled(false); testoB.addActionListener(this); } return testoB; } COM: <s> this method initializes testo b </s>
funcom_train/22942512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(double value) { boolean t = 2.0 * Math.abs(value - previousValue) <= tolerance * (Math.abs(value) + Math.abs(previousValue) + epsilon); if (t) { if (repeats == maxRepeats) { isMet = true; } else { repeats++; previousValue = value; } } else { repeats = 0; previousValue = value; } previousValue = value; } COM: <s> set the current value of the optimization process and calculate whether </s>
funcom_train/20042723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _getMaxTextLen() { oObj.setMaxTextLen((short)15); log.println("getMaxTextLen() returns: "+oObj.getMaxTextLen()); tRes.tested("getMaxTextLen()",oObj.getMaxTextLen()==15); } COM: <s> at first we set max text len then test calls the method </s>
funcom_train/49338275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFixTypeString() { String val = null; switch (type) { case NONE: val = "none"; break; case _2D: val = "2d"; break; case _3D: val = "3d"; break; case DGPS: val = "dgps"; break; case PPS: val = "pps"; } return val; } COM: <s> returns a string value based on the curren type </s>
funcom_train/43245282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetNOKOneStreetAddr3() { System.out.println("getNOKOneStreetAddr3"); EmergencyContactObject instance = new EmergencyContactObject(); String expResult = ""; String result = instance.getNOKOneStreetAddr3(); 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 nokone street addr3 method of class org </s>
funcom_train/14229040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connectionAddressAnalyse(final CallId id, final String address, final int cause) { // define action block EventHandler eh = new EventHandler() { public void process(Object o) { // Forward to real delegate in a separate thread getDelegate().connectionAddressAnalyse(id, address, cause); } }; // dispatch for processing this.getEventPool().put(eh); } COM: <s> forward on in own thread </s>
funcom_train/46382316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyModelTransform(Node modelBG) { if (getModelScale()!=null) modelBG.setLocalScale(getModelScale()); if (getModelTranslation()!=null) modelBG.setLocalTranslation(getModelTranslation()); if (getModelRotation()!=null) modelBG.setLocalRotation(getModelRotation()); } COM: <s> apply the model transform the model bg node </s>
funcom_train/8011156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setControlBreakHeadingComponentAt(int column, HtmlComponent comp, HtmlTableCellProperties props) { if (column < 0) return; if (column >= _controlBreakHeadingComponents.size()) _controlBreakHeadingComponents.setSize(column + 1); TwoObjectContainer cont = new TwoObjectContainer(comp, props); _controlBreakHeadingComponents.setElementAt(cont, column); comp.setParent(this); } COM: <s> sets a control break heading component at a particular column position in </s>
funcom_train/45454227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createProjectAuthorGroup(Composite parent) { projectAuthorGroup = new Group(parent, SWT.NONE); projectAuthorGroup.setLayout(new GridLayout()); GridData gd = new GridData(GridData.FILL_HORIZONTAL); projectAuthorGroup.setLayoutData(gd); projectAuthorGroup.setText("Project author:"); projectAuthor = new Text(projectAuthorGroup, SWT.BORDER); projectAuthor.setLayoutData(gd); projectAuthor.setText(System.getProperty("user.name", "Symfony developer")); synchHelper.synchText(projectAuthor, SfProjectDataModelProvider.SYMFONY_AUTHOR, null); } COM: <s> this method initializes project author group </s>
funcom_train/3391129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayChanged() { // notify screens in device array to do display update stuff for (GraphicsDevice gd : getScreenDevices()) { if (gd instanceof DisplayChangedListener) { ((DisplayChangedListener) gd).displayChanged(); } } // notify SunDisplayChanger list (e.g. VolatileSurfaceManagers and // SurfaceDataProxies) about the display change event displayChanger.notifyListeners(); } COM: <s> from the display changed listener interface called </s>
funcom_train/10212311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int projectedComponents(boolean constrained) { int comp; if (constrained) { comp = ((SDArray)arrayVar).isProject() ? 1: 0; Enumeration e = mapVars.elements(); while(e.hasMoreElements()){ if ( ((SDArray)e.nextElement()).isProject() ) comp++; } } else { comp = 1 + mapVars.size(); } return comp; } COM: <s> how many prohected components of this grid object </s>
funcom_train/14300994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeClient(FlashSocket fs){ sendMessage("Removing client: "+fs.getIP()+ " at: "+ new java.util.Date()); // Un-hook the client socket from the data model (HVAC Sim) dataModel.deleteObserver(fs); // Remove the client socket from the master list clients.removeElement(fs); // kill client socket's internal thread fs.stopRequest(); }// removeClient COM: <s> removes and kills a client from the servers list of clients </s>
funcom_train/42225649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copy(Fleet sourceFleet) { for (int index = 0; index < shipCount.length; index++) { shipCount[index] = sourceFleet.shipCount[index]; } owner = sourceFleet.owner; warpSpeed = sourceFleet.warpSpeed; maxRange = sourceFleet.maxRange; distanceToDestination = sourceFleet.distanceToDestination; turnsToArrive = sourceFleet.turnsToArrive; } COM: <s> copy the fields from the given fleet to this fleet </s>
funcom_train/50863229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getUnitTotalMass() { // try { double totalMass = 0D; if (containedUnits != null) { Iterator<Unit> unitIt = containedUnits.iterator(); while (unitIt.hasNext()) { totalMass += unitIt.next().getMass(); } } return totalMass; // } // catch (Exception e) { // throw new IllegalStateException(e); // } } COM: <s> gets the total unit mass in storage </s>
funcom_train/44162150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String saveFile(String name, InputStream is) { String path = ReportConfigProps.get("report.engine.upload.folder") + getReportName() + "/" + name; File ftmp = new File(ReportConfigProps.get("report.engine.upload.folder") + getReportName()); saveFile(path, ftmp, is); return name; } COM: <s> save file saves file to report folder </s>
funcom_train/40619843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertDataRows(int beforeRow, int numRows) { boolean paging = PagingScrollTableDemo.get() != null; for (int i = beforeRow; i < beforeRow + numRows; i++) { if (paging) { PagingScrollTableDemo.get().insertDataRow(i); } else { ScrollTableDemo.get().insertDataRow(i); } } } COM: <s> insert rows at the specified index </s>
funcom_train/9979248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void transfertFromEditor() { try { if (xmlEditorChanged) { byte [] data = xmlDocument.get().getBytes(encoding); // Re-parse data and update Project... Project p = Project.loadProject(packageNavigator.getProjectContext(), new ByteArrayInputStream(data)); packageNavigator.setProject(p); packageNavigator.getNavigatorModel().setDirty(true); } xmlEditorChanged = false; } catch (Exception e) { } } COM: <s> transfer data from xmleditor to package navigator </s>
funcom_train/19807022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changePassword(String oldPassword, String newPassword) { UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext() .getAuthentication() .getPrincipal(); String username = userDetails.getUsername(); String encodedOldPassword = passwordEncoder.encodePassword(oldPassword, username); String encodedNewPassword = passwordEncoder.encodePassword(newPassword, username); userDetailsManager.changePassword(encodedOldPassword, encodedNewPassword); } COM: <s> let current user change password </s>
funcom_train/13275204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FurnitureCatalogController getFurnitureCatalogController() { // Create sub controller lazily only once it's needed if (this.furnitureCatalogController == null) { this.furnitureCatalogController = new FurnitureCatalogController( this.preferences.getFurnitureCatalog(), this.preferences, this.viewFactory, this.contentManager); } return this.furnitureCatalogController; } COM: <s> returns the furniture catalog controller managed by this controller </s>
funcom_train/48145946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JFreeChart getCompassChart(String title, JTable table, int numberOfSeries, int[][] pairs, String other){ dataTable = table; columnModel = dataTable.getColumnModel(); no_series = numberOfSeries; setOtherCondition(other); ValueDataset dataset = createValueDatasetFromTable(numberOfSeries, pairs); JFreeChart chart = createCompassChart(title, dataset); return chart; } COM: <s> given a sigle data this method will generate a compass chart </s>
funcom_train/39892376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String deleteVMail(String messageId, String type) { String method = "POST"; String url = "/vmail/delete"; Map <String, String> paramList = new HashMap<String, String>(); paramList.put("messageId", messageId); paramList.put("type", type); return TB_Request(method, url, paramList); } COM: <s> removes a vmail from the feed inbox </s>
funcom_train/4786751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void adjustDays(int field, int amount) { for(int day = 0; day < dayButtons.length; day++) { tmpcal.setTime((Date) dayButtons[day].getData(DATE)); tmpcal.add(field, amount); dayButtons[day].setData(DATE, tmpcal.getTime()); } selection = (Date) dayButtons[selDayButton].getData(DATE); } COM: <s> modifies the given calendar field by the given amount for every day button </s>
funcom_train/20612440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addWidthPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ComponentInstance_width_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ComponentInstance_width_feature", "_UI_ComponentInstance_type"), GCLACSPackage.Literals.COMPONENT_INSTANCE__WIDTH, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the width feature </s>
funcom_train/18956537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element resolveElement(String uri) { String id = uri.substring(uri.indexOf(":") + 1); LOGGER.debug("Reading MCRObject with ID " + id); MCRObjectID mcrid = new MCRObjectID(id); Document doc = MCRXMLTableManager.instance().readDocument(mcrid); LOGGER.debug("end resolving " + uri); return doc.getRootElement(); } COM: <s> reads local mcrobject with a given id from the store </s>
funcom_train/43876337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WindowElement findWindow( final String windowId, final boolean wait ) { final String fullId = getIdPrefix() + "_" + windowId; if ( wait ) { webDriverWait.until( new VisibilityOfElementLocated( By.id( fullId ) ) ); } return new WindowElement( this, null, findElement( By.id( fullId ) ), windowId ); } COM: <s> lookup window component by zk page id and window id </s>
funcom_train/14655427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { super.paint(g); Graphics2D g2 = (Graphics2D) g; Dimension dim = getSize(); int width = dim.width; Stroke lineStroke = new BasicStroke((float) borderWidth); g2.setStroke(lineStroke); g.setColor(bordercolor); g.drawLine(0, TableView.TITLE_OFFSET, width, TableView.TITLE_OFFSET); } COM: <s> paint the renderer </s>
funcom_train/8059881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Blip appendBlipToWavelet(Wavelet wavelet, String initialContent) { Blip newBlip = newBlip(wavelet, initialContent, null, generateTempBlipId(wavelet), wavelet.getRootThread().getId()); appendOperation(OperationType.WAVELET_APPEND_BLIP, wavelet, Parameter.of(ParamsProperty.BLIP_DATA, newBlip.serialize())); return newBlip; } COM: <s> appends a blip to a wavelet </s>
funcom_train/42509958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private URL getHelpIndexPageURL() { String helpIndex = this.preferences.getLocalizedString(HelpController.class, "helpIndex"); // Build URL of index page with ResourceURLContent because of bug #6746185 return new ResourceURLContent(HelpController.class, helpIndex).getURL(); } COM: <s> returns the url of the help index page </s>
funcom_train/22571662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fillContextMenu(IMenuManager manager) { manager.add(fActionOpen); manager.add(new Separator(IWorkbenchActionConstants.EDIT_START)); manager.add(fActionUp); manager.add(fActionDown); manager.add(fActionAdd); manager.add(fActionRemove); manager.add(new Separator(IWorkbenchActionConstants.EDIT_END)); // Other plug-ins can contribute their actions here manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); } COM: <s> fill the context meny on a right click </s>
funcom_train/15923072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node buildTypes(TypeBuilder tb) { Formal_c n = (Formal_c) super.buildTypes(tb); TypeSystem ts = tb.typeSystem(); LocalDef li = ts.localDef(position(), flags().flags(), type.typeRef(), name.id()); // Formal parameters are never compile-time constants. li.setNotConstant(); return n.localDef(li); } COM: <s> build type objects for the formal </s>
funcom_train/41721572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MiGenUserGrouping getClassGrouping() { if (this.userModelMap == null) return null; HeuristicPairMaker pairMaker = getPairMaker(this.userModelMap); List<Set<String>> studentNameGroupList = pairMaker.getGroups(true); List<Set<UserSet>> studentGroupList = getUserListFromNameList(studentNameGroupList); StudentDistanceMatrix distanceMatrix = pairMaker.getStudentDistanceMatrix(); return new MiGenUserGrouping(studentGroupList, distanceMatrix); } COM: <s> returns the groups of students with a matrix of relative similarities </s>
funcom_train/8022182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDelMessage() { System.out.println("delMessage"); Message message = null; boolean expResult = true; boolean result = MessageManager.delMessage(message); 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 del message method of class vgrabber </s>
funcom_train/25761933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTxtPort() { if (txtPort == null) { txtPort = new JTextField(); txtPort.setBounds(new Rectangle(138, 61, 140, 35)); txtPort.setText(StateSaver.getInstance().getDatabaseSettings().getPort().toString()); } return txtPort; } COM: <s> this method initializes txt port </s>
funcom_train/10687614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unread(int oneByte) throws IOException { if (buf == null) { throw new IOException(); } if (pos == 0) { throw new IOException(Messages.getString("luni.D3")); //$NON-NLS-1$ } buf[--pos] = (byte) oneByte; } COM: <s> pushes the specified byte </s>
funcom_train/9266752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MailMessage receive(int port) { Lib.assertTrue(port >= 0 && port < queues.length); Lib.debug(dbgNet, "waiting for mail on port " + port); MailMessage mail = (MailMessage) queues[port].removeFirst(); if (Lib.test(dbgNet)) System.out.println("got mail on port " + port + ": " + mail); return mail; } COM: <s> retrieve a message on the specified port waiting if necessary </s>
funcom_train/44220705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DataConsolidator createDataConsolidator() { DataConsolidator dc = null; try { Class cls = Class.forName(this.get_baseClass()); Class[] param = new Class[1]; param[0] = this.getClass(); Object[] obj = new Object[1]; obj[0] = this; dc = (DataConsolidator) cls.getConstructor(param).newInstance(obj); } catch (Exception ex) { ex.printStackTrace(); } return dc; } COM: <s> p create a new data consolidator object </s>