__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/27934641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void andNot(Set s) { BitSet set = (BitSet) s; //*DBG*/util.Assert.isTrue(this.size ==set.size); //*DBG*/util.Assert.isTrue(this.unit.length==set.unit.length); for (int i = 0; i < unit.length; i++) { unit[i] &= ~set.unit[i]; } } COM: <s> clears all of the bits in this code bit set code whose corresponding </s>
funcom_train/17807992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PaletteContainer createComponentsandInterfaces1Group() { PaletteDrawer paletteContainer = new PaletteDrawer( Messages.ComponentsandInterfaces1Group_title); paletteContainer.add(createPhysicalComponent1CreationTool()); paletteContainer.add(createNetwork2CreationTool()); paletteContainer.add(createExecutionEnvironment3CreationTool()); paletteContainer.add(createTechnicalRuntimeComponent4CreationTool()); paletteContainer.add(createFunctionalRuntimeComponent5CreationTool()); paletteContainer.add(createApplication6CreationTool()); paletteContainer.add(createExternalSystem7CreationTool()); paletteContainer.add(createInterface8CreationTool()); return paletteContainer; } COM: <s> creates components and interfaces palette tool group </s>
funcom_train/14004349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt(Object value, int row, int col) { Lead f = null; f = (Lead)wholeList.get(row); switch (col) { case 0: //contact name break; case 1: //company break; case 2: //phone number break; case 3: //interest level break; case 4: //contacted by break; case 5: //contact date break; case 6: //converted flag break; default: System.out.println("oops its dorked"); break; } fireTableCellUpdated(row, col); } COM: <s> not implemented cuz this table is read only </s>
funcom_train/43349862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroyObject(NakedObject object) { LOG.info("destroyObject " + object); DestroyObjectCommand command = objectStore.createDestroyObjectCommand(object); getTransaction().addCommand(command); object.destroyed(); loader().start(object, ResolveState.UPDATING); clear(object); loader().end(object); // TODO need to do garbage collection instead // loader().unloaded(object); } COM: <s> removes the specified object from the system </s>
funcom_train/42277703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(final Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (!(obj instanceof GenericPersistentable)) { return false; } GenericPersistentable generic = (GenericPersistentable) obj; if (!generic.uid.equals(this.uid)) { return false; } return true; } COM: <s> the generic override of equals </s>
funcom_train/18058747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void categoryRefresh(UID objectId) throws RemoteException { synchronized(SO) { SO.rmcCount++; try { CategorySource cat = (CategorySource) SO.objectMap.get(objectId); cat.categoryRefresh(); } catch(PerformanceException e) { throw new RemoteException(e.getMessage()); } } } COM: <s> refresh the entire performance category at once </s>
funcom_train/15531872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCacheSizeForEventClass(Class eventClass, int cacheSize) { synchronized (cacheLock) { if (rawCacheSizesForEventClass == null) { rawCacheSizesForEventClass = new HashMap(); } rawCacheSizesForEventClass.put(eventClass, Integer.valueOf(cacheSize)); rawCacheSizesForEventClassChanged = true; } } COM: <s> set the number of events cached for a particular class of event </s>
funcom_train/22718044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setSize() { switch (sourceType) { case JavaGenerator.TYPE_BEAN: setSize(400, 400); return; case JavaGenerator.TYPE_DAO: setSize(450, 420); return; default: throw new IllegalArgumentException("Unrecognised code generation type: " + sourceType); } } COM: <s> sets the size of the dialog box depenedent </s>
funcom_train/3847200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String evaluateInsideParentisis(String expression) throws EvaluationException{ StringBuffer result = new StringBuffer(expression); int start; while( ( start = expression.lastIndexOf("(") ) > -1 ){ int end = expression.indexOf(")",start); if( end < start ) throw new EvaluationException("Unmatched parentisis on expression : " + expression); result.replace( start,end + 1, evaluate(result.substring(start + 1, end)) ); expression = result.toString(); } return result.toString(); } COM: <s> evaluates all expression inside parentisis and returns the result </s>
funcom_train/46581987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void dropTable(String pName) throws SQLProcessorException { String sql = getDropTableSQL() + " " + pName; try { logDebug("Attempting to drop table: " + pName); performSQL(sql); } catch (SQLProcessorException spe) { throw new SQLProcessorException( "Caught exception executing drop table statement \"" + sql + "\"", spe); } } COM: <s> this is a method that is used to execute a drop table call </s>
funcom_train/28208731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDBObjectFolderTypeName(String typeName) { if (typeName == null) { return null; } String folderTypeName = dbObjectFolderTypeMap.get(typeName); if (folderTypeName == null) { folderTypeName = generateFolderTypeName(typeName); addDBObjectFolderTypeName(typeName, folderTypeName); } return folderTypeName; } COM: <s> return an folder type name by an type name </s>
funcom_train/41163116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoTextualUnity entity) { EntityManagerHelper.log("saving CoTextualUnity instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved co textual unity entity </s>
funcom_train/18804002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean performOk() { PreferenceConverter.setValue(getPreferenceStore(), EHEP.PROPERTY_FONT, fontData); colorBgEditor.store(); colorFgEditor.store(); colorBgTable.store(); colorFgTable.store(); colorBgChangedRow.store(); colorFgChangedRow.store(); colorBgInsertedRow.store(); colorFgInsertedRow.store(); colorBgUndoedRow.store(); colorFgUndoedRow.store(); maxUndoSteps.store(); getPreferenceStore().setValue(EHEP.PROPERTY_DEBUG_MODE, debugModeButton.getSelection()); return super.performOk(); } COM: <s> save the preferences to the preference store </s>
funcom_train/35793521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TypeTable genTypeTable( List boundParams){ if(!doTypeParametersMatch(boundParams)) { throw new IllegalArgumentException("Type parameters do not match!"); } Map mappings = new HashMap(); //Map mappings = new LazyMap(); Iterator itB = boundParams.iterator(); Iterator itT = _typeParams.iterator(); while( itB.hasNext() ){ mappings.put( itT.next(), itB.next() ); } return new TypeTable(mappings); } COM: <s> given a list of bound paramters create a type table mapping this classs </s>
funcom_train/40735611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPrivName(String newVal) { if ((newVal != null && privName != null && (newVal.compareTo(privName) == 0)) || (newVal == null && privName == null && privNameIsInitialized)) { return; } privName = newVal; privNameIsModified = true; privNameIsInitialized = true; } COM: <s> setter method for priv name </s>
funcom_train/28756501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCouplingid(Long newVal) { if ((newVal != null && this.couplingid != null && (newVal.compareTo(this.couplingid) == 0)) || (newVal == null && this.couplingid == null && couplingid_is_initialized)) { return; } this.couplingid = newVal; couplingid_is_modified = true; couplingid_is_initialized = true; } COM: <s> setter method for couplingid </s>
funcom_train/51451948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextField1() { if (jTextField1 == null) { jTextField1 = new JTextField(); jTextField1.getDocument().addDocumentListener(new javax.swing.event.DocumentListener() { public void changedUpdate(DocumentEvent e) { } public void insertUpdate(DocumentEvent e) { updateAddButton(); } public void removeUpdate(DocumentEvent e) { updateAddButton(); } }); } return jTextField1; } COM: <s> this method initializes j text field1 </s>
funcom_train/41651057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean handleRcptToCommand() { String requestCommand; while (true) { requestCommand=fetch(); if (isQuitCommand(requestCommand)) return sayGoodbye(); else if (isCommand(requestCommand, "mailfrom")) analizeMailFromCommand(requestCommand); else if (isCommand(requestCommand, "rcptto")) return analizeRcptToCommand(requestCommand); else { reply(BAD_SYNTAX); break; } } return false; } COM: <s> handles rcpt to command sent to server </s>
funcom_train/1037683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getOK() { if (OK == null) { OK = new JButton(); OK.setText("OK"); OK.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { int newMap = ds.createVersion(map.getText(), version.getText()); if(copyCheck.isSelected()){ ds.copyMap(oldMap, newMap); } if(listener!=null) listener.actionPerformed(null); } }); } return OK; } COM: <s> this method initializes ok </s>
funcom_train/19426140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private void containsInEdge(ResourceEdge<? extends ResourceNodeManager, M> edge) { // for (int n = 0; n < inEdges.size(); n++) { // if (inEdges.get(n).equals(edge)) { // return true;n // } // } // return false; // } COM: <s> returns if this resource node already contains the given in </s>
funcom_train/4918425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnmarshall() throws Exception { // Unmarshall non-recursive FirstObject nonRecursive = (FirstObject) this.unmarshaller .unmarshall(this.findInputStream(this.packageClass, "NonRecursiveInputFile.xml")); assertNotNull("Non-recursive not obtained", nonRecursive); // Unmarshall recursive RecursiveObject recursive = (RecursiveObject) this.unmarshaller .unmarshall(this.findInputStream(this.packageClass, "RecursiveInputFile.xml")); assertNotNull("Recursive not obtained", recursive); } COM: <s> ensure able to unmarshall via the various delegates </s>
funcom_train/9866940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSystemLibraries() throws JavaModelException { IClasspathEntry[] oldEntries = this.javaProject.getRawClasspath(); IClasspathEntry[] newEntries = new IClasspathEntry[oldEntries.length + 1]; System.arraycopy(oldEntries, 0, newEntries, 0, oldEntries.length); newEntries[oldEntries.length] = JavaRuntime .getDefaultJREContainerEntry(); this.javaProject.setRawClasspath(newEntries, null); } COM: <s> adds system libraries </s>
funcom_train/1111034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cellViewsChanged(final CellView[] cellViews) { if (cellViews != null) { fireGraphLayoutCacheChanged(this, new GraphLayoutCacheEvent.GraphLayoutCacheChange() { public Object[] getInserted() { return null; } public Object[] getRemoved() { return null; } public Map getPreviousAttributes() { return null; } public Object getSource() { return this; } public Object[] getChanged() { return cellViews; } public Map getAttributes() { return null; } public Object[] getContext() { return null; } }); } } COM: <s> invoke this method after youve changed how the cells are to be </s>
funcom_train/2852906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIfUnmodifiedSince() throws Exception { String time = "Tue, 15 Nov 1994 16:12:31 GMT"; header = new IfUnmodifiedSinceHeader(time); assertTrue (header instanceof RequestHeader); assertEquals("If-Unmodified-Since: " + time + "\n", header.toString()); assertEquals("If-Unmodified-Since", header.getTag()); } COM: <s> if unmodified since 14 </s>
funcom_train/7284472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(Transaction txn, final String name) { if (txn != null) { txn.addTxn(this, new Txn() { public void commit(Transaction txn) { setNameP(txn, name); } }); } else { setNameP(txn, name); } } COM: <s> sets the name of this library </s>
funcom_train/13668454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRequest(Snac packet, RequestListener listener) { /* Add the new listener to the existing request */ if (containsRequest(packet.getRequestId())) { Request request = getRequest(packet.getRequestId()); request.addListener(listener); } /* Simply create a new request */ else { Request request = new Request(packet, listener); this.put(new Integer(packet.getRequestId()), request); } } COM: <s> this add a request in the monitoring system </s>
funcom_train/3369436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { Object[] lList = listenerList; String s = "EventListenerList: "; s += lList.length/2 + " listeners: "; for (int i = 0 ; i <= lList.length-2 ; i+=2) { s += " type " + ((Class)lList[i]).getName(); s += " listener " + lList[i+1]; } return s; } COM: <s> returns a string representation of the event listener list </s>
funcom_train/9824320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propagate() { tempresult = compute(in1.get(this), in2.get(this), width, expSize, mantSize); out.putL(this, tempresult[0]); flowError.putL(this, tempresult[1]); } COM: <s> propagate is used if the circuit is purely combinational logic </s>
funcom_train/31073876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInitializeInexistentMappingFile() { File _file = new File("target/test-classes/Inexistent.xml"); try { XlsToXmlMapper _mapper = new XlsToXmlMapper(_file); fail(); } catch (JAXBException e) { // force the test to fail, because the exception was thrown // and it shouldn't have fail(); } catch (IOException e) { assertTrue(true); } } COM: <s> test xls to xml mapper initialization from a inexistent xml file </s>
funcom_train/5457946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearUserPanels() { userListPanel = new JPanel(); userListPanel.setLayout(new javax.swing.BoxLayout(userListPanel, javax.swing.BoxLayout.Y_AXIS)); userListPanel.setBackground(new java.awt.Color(255, 255, 255)); userListPanel.setSize(150, 250); jScrollPane1.setViewportView(userListPanel); } COM: <s> clears all of the user panels from the user list frame </s>
funcom_train/34314356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TechnicalInformation getTechnicalInformation() { TechnicalInformation result = new TechnicalInformation(Type.INPROCEEDINGS); result.setValue(Field.AUTHOR, "David Lewis"); result.setValue(Field.TITLE, "Evaluating and optimizing autonomous text classification systems"); result .setValue( Field.BOOKTITLE, "Proceedings of the 18th annual international ACM SIGIR conference on Research and development in information retrieval (SIGIR 1995)"); result.setValue(Field.YEAR, "1995"); return result; } COM: <s> returns an instance of a technical information object containing detailed </s>
funcom_train/18739422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createMessage(Set<SwitchRelation> relations) { String message = "["; // for (SwitchRelation r : relations) { // message += r.toJSON()+","; // } message = message.substring(0, message.length() - 1) + "]"; return message; } COM: <s> creates the message to be sent to the remote server </s>
funcom_train/37840568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createFillColorMenu() { JMenu menu = new JMenu("Fillcolor"); menuBar.add(menu); menu.setMnemonic('f'); // add en entry for each standard color for (int i = 0; i < COLOR_OBJECTS.length; i++) { JMenuItem item = new JMenuItem(COLOR_NAMES[i]); item.addActionListener(new SelectFillColorActionListener(boardState, COLOR_OBJECTS[i])); menu.add(item); } } COM: <s> creates the fill color menu </s>
funcom_train/44385407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HookTask createCompileHook() { HookTask result = new HookTask(); result.setProject(this.getProject()); result.setAction(HookTask.APPEND_LAST); result.setName(COMPILE_HOOK); result.setTarget(INSTRUMENTATION_HOOK); if (switchAttribute != null) { result.setIf(switchAttribute); } return result; } COM: <s> create a instrumentation hook declaration for a module </s>
funcom_train/16544199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performFolding(Node node, boolean fold) { /* Graph g = this.model.get(this.currentIndex); // Erzeuge Copie des alten Graph this.foldingGraph = g.cloneGraph(); if (fold) node.setFolded(this.getCurrentGraph(), true); else node.setFolded(this.getCurrentGraph(), false); this.performGraphLayout(); this.model.add(this.foldingGraph, this.currentIndex); this.setSequenceNumber(this.currentIndex + 1); this.updateMetric(); */ } COM: <s> toggle folded mark of node </s>
funcom_train/47191831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Sheet pack(ArrayList files, int width, int height, int border, File out) throws IOException { ArrayList images = new ArrayList(); try { for (int i=0;i<files.size();i++) { File file = (File) files.get(i); Sprite sprite = new Sprite(file.getName(), ImageIO.read(file)); images.add(sprite); } } catch (Exception e) { e.printStackTrace(); } return packImages(images, width, height, border, out); } COM: <s> pack the images provided </s>
funcom_train/48878504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProductDAO getDAO(String type) { Map<String, ProductDAO> daos = new TreeMap<String, ProductDAO>(); daos.put("ConceptualProduct", ConceptualProductDAO.getInstance()); daos.put("PhysicalProduct", PhysicalProductDAO.getInstance()); return daos.get(type); } COM: <s> gets the dao </s>
funcom_train/28362919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void snapshotSelected(BrowserController controller, MachineSnapshot snapshot) { if ( snapshot != null ) { commentTextView.setText( snapshot.getComment() ); pvLogIdField.setText((new Long(snapshot.getId())).toString()); } else { commentTextView.setText(""); } } COM: <s> event indicating that a snapshot has been selected </s>
funcom_train/2938690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResourceBundle loadResourceBundle(Locale localeToLoad) { try { rb = ResourceBundle.getBundle(RESOURCE_BUNDLE, localeToLoad, getClass().getClassLoader()); } catch (Exception e) { logger.debug("Error while reading bundle:" + e.toString()); } return rb; } COM: <s> load the resource bundle with a given locale </s>
funcom_train/11089190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMXConnector getJMXConnector(JMXServiceURL url) throws IOException { String[] credentials = new String[]{getUsername(), getPassword()}; Map<String, Object> environment = new HashMap<String, Object>(); environment.put(JMXConnector.CREDENTIALS, credentials); return JMXConnectorFactory.connect(url, environment); } COM: <s> get a jmxconnector from a url </s>
funcom_train/29922477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAdministrator(UserDO user, ResourceDO resource, UserGroupDO newAdministrator) throws ResourceStoreAuthorisationException { //verify method attribute this.verifyAttribute(administerResourceAttr); //checking user is valid this.authenticatedCheck(user); this.administratorCheck(user,resource); //adding attribute to user or group this.grantAttribute(newAdministrator,administerResourceAttr,resource); }//end method COM: <s> adds an administrator to the resource </s>
funcom_train/38222306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean shoot(SeaPoint point) { Map ships = retrieveShips(); boolean result = false; try { Iterator items = ships.values().iterator(); while (items.hasNext()) { Ship ship = (Ship) items.next(); result |= ship.shoot(point); } } finally { releaseShips(ships); } return result; } COM: <s> shoots to specified point </s>
funcom_train/46327758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delete(Long eventID) { if (eventID == null) { throw new IllegalArgumentException("primary key null."); } // Set the whereArgs to null here. return database.delete(DATABASE_TABLE, KEY_EVENTID + "=" + eventID, null) > 0; } COM: <s> delete a registered event record </s>
funcom_train/28167936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Properties getAttributes() { Properties result = new Properties(); Iterator enm = this.attributes.iterator(); while (enm.hasNext()) { XMLAttribute attr = (XMLAttribute) enm.next(); result.put(attr.getFullName(), attr.getValue()); } return result; } COM: <s> returns all attributes as a properties object </s>
funcom_train/39971916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g, int panelHeight){ int amountOfVerticalBorders = 0; switch(size){ //Height: 100px case small: amountOfVerticalBorders = 2; break; //Height: 150px case medium: amountOfVerticalBorders = 3; break; //Height: 200px case large: amountOfVerticalBorders = 4; break; } paintBackground(g, panelHeight, amountOfVerticalBorders); paintBorder(g, panelHeight, amountOfVerticalBorders); paintText(g, panelHeight, amountOfVerticalBorders, name, description); paintCost(g, panelHeight, amountOfVerticalBorders); } COM: <s> this method calls different methods with the goal of painting the </s>
funcom_train/35727320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PixelPatternResource getPattern(int idx) { int o = getPatternOffset(idx); byte[] pat = new byte[data.length-o]; for (int j=0, k=o; j<pat.length && k<data.length; j++, k++) pat[j] = data[k]; return new PixelPatternResource(id, getAttributes(), name, pat); } COM: <s> returns a pattern in this pattern list as a pixel pattern resource </s>
funcom_train/24592807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void tryConstructNewTown(TownEntity town, Coordinates here) { if(town.isReady()) { // construct a town town.construct(); // notify the player SoundSystem.getInstance().playSound("townconstructed.wav"); Notification n = new Notification("You have a new town!", here, 10); NotificationSystem.getInstance().postNotification(n, NotificationSystem.MINIMAP_NAME); } else { // update (decrease) time needed to reconstruct the town town.decreaseWait(); } } COM: <s> try to construct the town if possible or update construction time </s>
funcom_train/11322380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getActionURL() { Context context = getContext(); HttpServletResponse response = context.getResponse(); if (actionURL == null) { HttpServletRequest request = context.getRequest(); return response.encodeURL(ClickUtils.getRequestURI(request)); } else { return response.encodeURL(actionURL); } } COM: <s> return the form action attribute url value </s>
funcom_train/50916036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeHTML(Writer w) throws IOException { w.write("\n<tr>"); CMLElements<CMLTableCell> tableCells = this.getTableCellElements(); for (CMLTableCell tableCell : tableCells) { tableCell.writeHTML(w); } w.write("</tr>"); } COM: <s> write row to html table </s>
funcom_train/34342017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCargaNueva() { if (CargaNueva == null) {//GEN-END:|27-getter|0|27-preInit // write pre-init user code here CargaNueva = new Command("Carga Nueva", Command.ITEM, 0);//GEN-LINE:|27-getter|1|27-postInit // write post-init user code here }//GEN-BEGIN:|27-getter|2| return CargaNueva; } COM: <s> returns an initiliazed instance of carga nueva component </s>
funcom_train/18358271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel setupInfoAndButtons(JPanel infoPanel, String[] operations) { JPanel retVal = new JPanel(); // set up a vertical layout manager retVal.setLayout(new BoxLayout(retVal, BoxLayout.Y_AXIS)); retVal.add(infoPanel); infoButtons = new MEVAButtonPanel(infoButtonPanelName, operations,false); infoButtons.addButtonListener(this); retVal.add(infoButtons); return retVal; } COM: <s> sets up the information and buttons panel </s>
funcom_train/15608466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String substituteEntityReferences(char ch) { switch (ch) { case '&' : return "&amp;"; case '\'' : return "&quot;"; case '<' : return "&lt;"; case '>' : return "&gt;"; default : return new String(new char[] { ch }); } } // End method COM: <s> back subs ref for translated special characters </s>
funcom_train/17157556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupContextMenu() { this.ui.attachmentsTableWidget .setContextMenuPolicy(ContextMenuPolicy.CustomContextMenu); contextMenu.addAction(this.ui.actionNewAttachment); contextMenu.addAction(this.ui.actionEditAttachment); contextMenu.addAction(this.ui.actionRemoveAttachment); contextMenu.addAction(this.ui.actionManageAssociations); } COM: <s> setup a context menu for attachment table widget </s>
funcom_train/40945268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String retval = "["; int pos = 0; for (final Iterator i = errors.iterator(); i.hasNext();) { if (pos > 0) { retval += ","; } pos++; retval += i.next().toString(); } retval += "]"; return retval; } COM: <s> returns a comma separated list of the error messages </s>
funcom_train/870376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testGetSchema() { try { List<Concept> concepts = store.<Concept>getXMLResources("Concept"); AssertJUnit.assertTrue(concepts.size() > 0); for (Concept concept: concepts) { AssertJUnit.assertEquals(concept.getParent().getIndex(), concept.getSchema().getIndex()); } } catch (XBRLException e) { Assert.fail(e.getMessage()); } } COM: <s> test getting the schema fragment </s>
funcom_train/33705244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkIfResourceIsUsedForBuild(IResource resource) { if (null == this.triggerPatterns || 0 == this.triggerPatterns.length) { return true; } else { for (String pattern : this.triggerPatterns) { if (resource.getFullPath().toString().matches(pattern)) { return true; } } } return false; } COM: <s> checks if the given code iresource code triggers a new build </s>
funcom_train/49456693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void deleteEmptyReport(Db db) throws Exception { try { db.enter(); _logger.debug("Deleting empty report"); PreparedStatement pst = db.prepareStatement("DELETE FROM e_report WHERE e_report_id = ?"); pst.setInt(1, report_id.intValue()); db.executeUpdate(pst); } finally { db.exit(); } } COM: <s> deletes empty reports </s>
funcom_train/3811235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(File pBaseDir) throws IOException { for (Iterator iter = getJavaSources(); iter.hasNext(); ) { write(pBaseDir, (JavaSource) iter.next()); } for (Iterator iter = getTextFiles(); iter.hasNext(); ) { write(pBaseDir, (TextFile) iter.next()); } } COM: <s> p writes all java source classes to the file system relative to the </s>
funcom_train/12661485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static UndeployActionArgs parseUndeployActionCommandLine(final CommandLine cli) { final String deploy = cli.getOptionValue('f'); final String namePattern = cli.getOptionValue('n'); return new UndeployActionArgs() { public String getDeploymentsFile() { return deploy; } public String getNamePattern() { return namePattern; } }; } COM: <s> create an undeploy action args from command line arguments </s>
funcom_train/23950343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Node findNode(E e) { Node node = root; while (node != null) { int c = compare(e, node.value); if (c == 0) return node; else if (c < 0) node = node.left; else // c > 0 node = node.right; } return node; } COM: <s> find element node in the tree </s>
funcom_train/49756775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UPBLinkDevice getLinkedDeviceById(int deviceID, int theChannel) { for (UPBLinkDevice theLinkedDevice: linkedDevices) { if (theLinkedDevice.getDevice().getDeviceID() != deviceID) continue; if ((theChannel != -1) && (theChannel != theLinkedDevice.getChannel())) continue; return theLinkedDevice; } return null; } COM: <s> scan the devices associated with link and if one of them matches </s>
funcom_train/48498434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getActiveDirectory () { PropertiesDAO dao = new PropertiesDAO(); String active = dao.select("application.issue.index.location.active"); if (active == null || active.length() == 0) { // Not specified yet active = "data1"; // Put this in the properties table dao.insert("application.issue.index.location.active", active); } // Now complete the path, to get the final active directory String location = getLocation(); String separator = System.getProperty("file.separator"); if (!location.endsWith(separator)) location += separator; return location += active; } COM: <s> within the location specified by the stad administrator 2 subdirectories </s>
funcom_train/4717573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBaseFreqPureData() { SynMessage msg = new SYN(SYN.PUREDATA).synth(1).tuning(261.6256); assertEquals("/SYN/ID1/TUNING", msg.getAddress()); assertEquals("FTi", msg.getTypetag()); assertEquals(new Integer(66976), msg.getArguments()[2]); } COM: <s> base frequency for pure data </s>
funcom_train/13321354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void changeBuddyAvailability(Element bd, String avail, String reason) { if (!IMMonitor.goingDown) { bd.setAttribute(Contact.PRESENCE, avail); bd.setAttribute(Contact.REASON, reason); bd.save(); Account.buddyStateListener.buddyAvailabilityChanged(bd); /* This needs to be externally synchronized */ } } COM: <s> this is called by the implemented protocol </s>
funcom_train/22571407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setAttainedLabel() { fLinkAttained.setText(fCompetenceProfile.isCompleted() ? Messages.CompetenceProfileEditor_6 : Messages.CompetenceProfileEditor_7); fLinkAttained.setUnderlined(!fCompetenceProfile.isCompleted()); fLinkAttained.setEnabled(!fCompetenceProfile.isCompleted()); fLinkAttained.getParent().layout(); } COM: <s> set the text of the attained link </s>
funcom_train/21057943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getOutputIndexOf(String name) throws InvalidOutputException { Integer idx = outputNamesMap.get(name); if (idx == null) { throw new InvalidOutputException("Invalid output '" + name + "' of this gate cannot be found. There is no such output name"); } return idx; } COM: <s> gets the index of the output associated with the given name </s>
funcom_train/14121671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(PACEvent left, PACEvent right) { int result = 0; if (left == null) { result = (right == null ? 0 : -1); } else if (right == null) { result = 1; } else { result = left.getTitle().compareToIgnoreCase(right.getTitle()); } return result; } COM: <s> compares two pac event by title </s>
funcom_train/43895583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getMedian() { if (median != null) { //median was overwritten by an optimization return median; } else { //we're got a list of items, determine the median... Object newMedian = findMedian(list); if (newMedian == null) { throw new IllegalStateException("Must visit before median value is ready!"); } return newMedian; } } COM: <s> return the median of all features in the collection </s>
funcom_train/5348670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDisconnected() throws Exception { cmStub.setConnected(false); ConnectionSettings.LAST_FWT_STATE.setValue(false); assertTrue(UDPService.instance().canDoFWT()); ConnectionSettings.LAST_FWT_STATE.setValue(true); assertFalse(UDPService.instance().canDoFWT()); } COM: <s> tests the scenario where we are not connected </s>
funcom_train/50926424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pruneRtoH() { List<Node> ratoms = CMLUtil.getQueryNodes(rootFragment, ".//" + CMLAtom.NS + "//@" + "elementType", CMLConstants.CML_XPATH); if (ratoms.size() == 0) { return; } for (Node node : ratoms) { if ("R".equals(node.getValue())) { Attribute a = (Attribute) node; a.setValue(AS.H.value); } } } COM: <s> prune rto h </s>
funcom_train/13995028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFind() throws Exception { container.addProperty(property); container.setPrototype(new ValueObject(container)); ValueObject vo = createValueObject("someValue", "test"); ValueObject vo2 = createValueObject("someValue2", "test"); vo2.setDeleted(true); List result = container.find(new HashMap()); assertEquals("invalid result size", 1, result.size()); assertEquals("invalid result entry", vo, result.get(0)); } COM: <s> tests the find method </s>
funcom_train/1150717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PortletURL createActionUrl() throws PortletException { PortletURL portletUrl; if (response instanceof RenderResponse) { portletUrl = ((RenderResponse) response).createActionURL(); } else { throw new PortletException( "Chances are you are seeing this error because you are trying to get a URL in an action request. " + "Don't do that, it is not allowed"); } return portletUrl; } COM: <s> convenience method to get a raw portlet url </s>
funcom_train/44505670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddAnswer() throws Exception { AnswerVO answer = new AnswerVO(1008, "Cuenca", false); int size = getAnswerDAO().getAnswers(question1000).size(); getAnswerDAO().addAnswer(answer, question1000); Assert.assertEquals(size + 1, getAnswerDAO().getAnswers(question1000).size()); Assert.assertEquals(answer, getAnswerDAO().getAnswer(answer)); } COM: <s> pruebas de insert </s>
funcom_train/12069297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPa_buttonfield() { if (pa_buttonfield == null) { pa_buttonfield = new JPanel(); GameField(); pa_buttonfield.setLayout(new GridLayout(gamesize, gamesize, 1, 1)); pa_buttonfield.setBounds(new Rectangle(135, 80, 370, 370)); getBt(); for (int i = 0; i < bt.length; i++) { pa_buttonfield.add(getBt()[i], null); } } return pa_buttonfield; } COM: <s> this method initializes pa buttonfield </s>
funcom_train/25187113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetReflectiveBuilder() { System.out.println("getReflectiveBuilder"); ReflectiveBuilder rb = new JSONSchemaReflectiveBuilder(); BigFactory instance = BigFactory.getInstance(null, null, rb); assertSame(rb, instance.getReflectiveBuilder()); } COM: <s> test of get reflective builder method of class big factory </s>
funcom_train/14369629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TimeZone getTimeZoneInstance() { if (timeZone == null) { if (TimeZone.getDefault() != null) { this.setTimeZone( TimeZone.getDefault().getID() ); } else { this.setTimeZone("America/New_York"); } } return TimeZone.getTimeZone(timeZone); } COM: <s> return time zone instance for value of time zone </s>
funcom_train/29697295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { if (this == object) { return true; } else if (object == null || getClass() != object.getClass()) { return false; } Coords other = (Coords)object; return other.x == this.x && other.y == this.y; } COM: <s> coords are equal if their x and y components are equal </s>
funcom_train/37587154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void _prepareRequest(T request) { // the request must be disabled to be edited request.setEnabled(false); if (_countFilter != -1) { request.addCountFilter(_countFilter); } request.setSuspendPolicy(_suspendPolicy); request.setEnabled(_isEnabled); // Add properties request.putProperty("debugAction", this); } COM: <s> prepares this event request with the current stored values </s>
funcom_train/19372117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvalidTopic() { logger.debug("testInvalidTopic() - start"); try { this.topicManager.delete(-1); fail("Deletion of invalid Topic permitted."); } catch (NotFoundException ignore) { logger.error(ignore); } catch (Exception e) { logger.error(e); fail(e.getMessage()); } logger.debug("testInvalidTopic() - end"); } COM: <s> delete an invalid code topic code and ensure an exception is thrown </s>
funcom_train/41163166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoSequence entity) { EntityManagerHelper.log("saving CoSequence instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved co sequence entity </s>
funcom_train/17506970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void switchOn() { if (currentMutation != null) { logger.info("enabling mutation: " + currentMutation.getMutationVariable() + " in line " + currentMutation.getLineNumber() + " - " + currentMutation.toString()); stopWatch.reset(); stopWatch.start(); System.setProperty(currentMutation.getMutationVariable(), "1"); System.setProperty(MutationProperties.CURRENT_MUTATION_KEY, currentMutation.getId() + ""); } } COM: <s> turns the current mutation on </s>
funcom_train/28756446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLabonly(Long newVal) { if ((newVal != null && this.labonly != null && (newVal.compareTo(this.labonly) == 0)) || (newVal == null && this.labonly == null && labonly_is_initialized)) { return; } this.labonly = newVal; labonly_is_modified = true; labonly_is_initialized = true; } COM: <s> setter method for labonly </s>
funcom_train/39817250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onFlush(FlushEvent event) throws HibernateException { final SessionImplementor source = event.getSession(); if ( source.getPersistenceContext().hasNonReadOnlyEntities() ) { flushEverythingToExecutions(event); performExecutions(source); postFlush(source); if ( source.getFactory().getStatistics().isStatisticsEnabled() ) { source.getFactory().getStatisticsImplementor().flush(); } } } COM: <s> handle the given flush event </s>
funcom_train/25665125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean epsilonEquals(final ThreeDLocation loc, final double epsilon) { double err = this.x - loc.x; if (err > epsilon || err < -epsilon) { return false; } err = this.y - loc.y; if (err > epsilon || err < -epsilon) { return false; } err = this.z - loc.z; if (err > epsilon || err < -epsilon) { return false; } return true; } COM: <s> tests if this point is equal to another point allowing for rounding errors </s>
funcom_train/30217977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName() { if ( destination == null ) return null; try { if (isqueue) { return ((Queue) destination).getQueueName(); } else { return ((Topic) destination).getTopicName(); } } catch (JMSException e) { return new String("error getting JmsSocketAddress name"); } } COM: <s> return the address name </s>
funcom_train/22396995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown(boolean wait) { if(!connectionThread.isAlive()) { return; } synchronized(requestQueue) { shutdownInProgress = true; } if(wait) { Object element; synchronized(requestQueue) { element = requestQueue.element(); } while(element != null) { synchronized(requestQueue) { element = requestQueue.element(); } Thread.yield(); } } setConnectionState(STATE_CLOSING); connectionThread.shutdown(); try { connectionThread.join(); } catch (InterruptedException e) { } synchronized(requestQueue) { shutdownInProgress = false; } MailConnectionManager.getInstance().fireMailConnectionStateChanged( client.getConnectionConfig(), MailConnectionStateEvent.STATE_DISCONNECTED); } COM: <s> shutdown the mail connection handler thread </s>
funcom_train/20334115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj instanceof Bedroom) { Bedroom cmp=(Bedroom)obj; if (getInstanceName()!=cmp.getInstanceName() && (getInstanceName()==null || !getInstanceName().equals(cmp.getInstanceName())) ) return false; return true; } return false; } COM: <s> test the equality of this code bedroom code </s>
funcom_train/17845891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void cancelPressed() { mText.setText(""); SearchFilter.getInstance().deactivateSearch(); MainFrame.getInstance().setProgramFilter(FilterManagerImpl.getInstance().getDefaultFilter()); setSearchButton(); mGoOrCancelButton.setVisible(false); mText.focusLost(null); } COM: <s> cancel the search </s>
funcom_train/14462371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getRowNums(){ Set e = rows.keySet(); Iterator iter = e.iterator(); FastAddVector rownames = new FastAddVector(); while(iter.hasNext()){rownames.add(rownames.size(),(Integer)iter.next());} return rownames; } COM: <s> get the fast add vector of rows defined on this sheet </s>
funcom_train/45018417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCommandLinePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NXentry_commandLine_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NXentry_commandLine_feature", "_UI_NXentry_type"), NexusPackageImpl.Literals.NXENTRY__COMMAND_LINE, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the command line feature </s>
funcom_train/39117009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LocalDevice getDiscoverableLocalDevice() { LocalDevice local; try { local = LocalDevice.getLocalDevice(); if (!local.setDiscoverable(DiscoveryAgent.GIAC)) { System.out.println("Failed to change to the " + "discoverable mode"); } } catch (BluetoothStateException bse) { throw new IllegalStateException( "Failed to init the Bluetooth connection. " + bse); } return local; } COM: <s> try to make the device discoverable </s>
funcom_train/24642344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ClauseNetwork removeUnsatisfiedClauses(ClauseNetwork clauseNetwork, List<AtomExpression> data){ Set<ClauseNetworkNode> toBeRemoved = new HashSet<ClauseNetworkNode>(); for(ClauseNetworkNode node: clauseNetwork){ BayesianClause clause = (BayesianClause) node.getClause(); if(!clause.isLogicallyApplicable(data)) toBeRemoved.add(node); } for(ClauseNetworkNode node: toBeRemoved) clauseNetwork.removeDownwardsRecursively(node); return clauseNetwork; } COM: <s> removes all clauses and their descendents from the given clause network that </s>
funcom_train/50334812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static protected Element rootFromFile(File file) { try { return new jmri.jmrit.XmlFile(){}.rootFromFile(file); } catch (Exception e) { log.error("Could not parse file \""+file.getName()+"\" due to: "+e); return null; } } COM: <s> get root element from xml file handling errors locally </s>
funcom_train/25331438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPhaseGetPhase() { assertSame(Phase.ZERO, Phase.getPhase(0)); assertSame(Phase.ONE, Phase.getPhase(1)); assertSame(Phase.TWO, Phase.getPhase(2)); assertSame(Phase.NONE, Phase.getPhase(3)); } COM: <s> test of get phase method of class exon </s>
funcom_train/8074771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addChildNode(CNode child) { for (int i = 0; i < child.m_clusterInstances.numInstances(); i++) { Instance temp = child.m_clusterInstances.instance(i); m_clusterInstances.add(temp); updateStats(temp, false); } if (m_children == null) { m_children = new FastVector(); } m_children.addElement(child); } COM: <s> adds the supplied node as a child of this node </s>
funcom_train/31729757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection stepChildrenOf(Person p) { Collection children = childrenOf(p); Set step = new HashSet(); for(Iterator s=spousesOf(p).iterator(); s.hasNext();) { Person spouse = (Person)s.next(); for (Iterator c=childrenOf(spouse).iterator(); c.hasNext();) { Person child = (Person)c.next(); if(!children.contains(child) && !getMarriage(p, spouse).isDivorced()) step.add(child); } } return step; } COM: <s> returns only step children of a person </s>
funcom_train/3118341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void toggleExpanded() { if (contentPanel.isVisible()) { contentPanel.setVisible(false); expanderButton.setIcon(SHOW_ICON); expanderButton.setToolTipText("Shows this panel"); } else { contentPanel.setVisible(true); expanderButton.setIcon(HIDE_ICON); expanderButton.setToolTipText("Hides this panel"); } } COM: <s> expand or contract this info panel </s>
funcom_train/44433128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flush() { for (Iterator i=listeners.iterator(); i.hasNext();) { try { ((Flushable) i.next()).flush(); } catch (ClassCastException e) { // do nothing; object is no instance of Flushable } } listeners.clear(); // remove listeners to help the gc } COM: <s> calls flush method of all listener which are flushable </s>
funcom_train/7508565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMakeNoSuchClass() throws ConfigurationException { Object obj = null; try { obj = ObjFactory.make("kevin.wall.HasNoClass", "Object"); assertFalse("Should not be reached - no such class", obj != null); } catch(ConfigurationException ex) { Throwable cause = ex.getCause(); assertTrue( cause instanceof ClassNotFoundException); } } COM: <s> test that class not found exception is thrown as the root cause when </s>
funcom_train/20771573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init_neuron_array() { horizontal_cells = new LIFNeuron[dim_pixels]; vertical_cells = new LIFNeuron[dim_pixels]; for (int i=0; i<(dim_pixels); i++) { horizontal_cells[i] = new LIFNeuron(tau, vreset, vreset, thresh); vertical_cells[i] = new LIFNeuron(tau, vreset, vreset, thresh); } } COM: <s> create array of orientation selective neurons </s>