__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/9139100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeExternal(ObjectOutput objOut) throws IOException { objOut.writeInt(mSymbolTable.mSymbolToId.size()); Iterator it = mSymbolTable.mSymbolToId.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); objOut.writeUTF(entry.getKey().toString()); objOut.writeInt(((Integer) entry.getValue()).intValue()); } } COM: <s> serialize current symbol table object into the specified object </s>
funcom_train/8357633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getBtnE() { if (btnE == null) { btnE = new JRadioButton(); if(!entropy.isHammingDistance()) { btnE.setSelected(true); } btnE.addMouseListener(new java.awt.event.MouseAdapter() { @Override public void mouseClicked(java.awt.event.MouseEvent e) { btnE.setSelected(true); btnH.setSelected(false); } }); } return btnE; } COM: <s> this method initializes btn e </s>
funcom_train/18525553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse() throws IOException, SAXException { if (toolbar != null) { InputSource is = LanguageFileLoader.getReference().getLanguageInputStream( LanguageFileLoader.HEADINGTOOLBAR_XML_FILE); if (is != null) { getParser().setContentHandler(this); getParser().setErrorHandler(this); getParser().parse(is); } } } COM: <s> parse the headingtoolbar </s>
funcom_train/25326339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void breakloop(UUID traceID, Pcap pcap) { if (lockIndex.containsKey(traceID)) { try { lockIndex.get(traceID).writeLock().lock(); logger.debug("Trying to break pcap loop."); if (pcap != null) { pcap.breakloop(); } } finally { lockIndex.get(traceID).writeLock().unlock(); } } else { logger.error("Lock not registered for trace: " + traceID.toString()); } } COM: <s> sets a flag to indicate that the pcap loop should be terminated </s>
funcom_train/50221378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasAttributeEditor(int type) { switch (type) { case GraphType.atInteger: case GraphType.atReal: case GraphType.atString: case GraphType.atText: case GraphType.atColor: case GraphType.atType: case GraphType.atExpressionFrame: case GraphType.atExpression: case GraphType.atParameters: case GraphType.atGraph: return true; default : break; } return false; } COM: <s> return true if a type has an associated attribute editor </s>
funcom_train/15411460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkForWarningSize() { // the the total number of connections that we can add // to the pool before it hits the maximum int availableGrowth = (maxSize - totalConnections()); if (availableGrowth < warningSize) { closeBusyConnections(leakTimeMinutes); String msg = "DataSourcePool [" + name + "] is [" + availableGrowth+ "] connections from its maximum size."; pool.notifyWarning(msg); } } COM: <s> as the pool grows it gets closer to the max connections limit </s>
funcom_train/37401039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getBounds(double scale) { Rectangle b = null; for (int i = 0; i < childs.length; i++) { Rectangle r = childs[i].getBounds(scale); if (b == null) { b = new Rectangle(r); } else { enlargeBounds(r, b); } } bounds = b; return b; } COM: <s> returns the bounds of this object and all contained children </s>
funcom_train/45330129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assignToMenu (JMenu menu, JComponent before){ mnuParent = menu; mnuInsertBefore = before; Component[] items = mnuParent.getMenuComponents(); for (int i=0; i < items.length; i++ ) { if( items[i].equals(before) ) { mIndex = i; break; } } mnuParent.insertSeparator(mIndex); updateMenu(); } COM: <s> associate us with a specific menu </s>
funcom_train/39913412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetLabel1() { System.out.println("getLabel1"); Page1 instance = new Page1(); Label expResult = null; Label result = instance.getLabel1(); 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 label1 method of class timesheetmanagement </s>
funcom_train/19685547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init(SimulatorContext p_context) { /* Initialize the node constructor module */ m_nodeConstructor = NodeConstructor.getInstance(); NodeConstructor.setContext(m_context); /* Initialize the server module */ m_server = SimulatorServer.getInstance(); SimulatorServer.setContext(m_context); SimulatorServer.setConstructor(m_nodeConstructor); /* Initialize the node distributor module */ m_nodeDistributor = NodeDistributor.getInstance(); NodeDistributor.setContext(m_context); } COM: <s> initialize the modules of the simulator </s>
funcom_train/2023751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadJobs() { Vector lines; String line; int i; lines = TextFile.load(jobfile); // add " " for empty lines for (i = 0; i < lines.size(); i++) { line = (String) lines.get(i); if (line.equals("")) { line = " "; lines.set(i, line); } } listJobs.setListData(lines); } COM: <s> loads the jobfile into the gui </s>
funcom_train/5379896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private InputStream getStream() { InputStream is = null; if (location != null) { is = location.getResourceAsStream(name); } else { try { is = new FileInputStream(name); } catch (FileNotFoundException e) { return null; } } if (is == null) return null; else return new BufferedInputStream(is); } COM: <s> returns a stream on the image contents </s>
funcom_train/24120977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void read(InputStream in) throws IOException { // size and type already read this.rasterOperation = WMFConstants.readLittleEndianInt(in); this.height = WMFConstants.readLittleEndianShort(in); this.width = WMFConstants.readLittleEndianShort(in); this.y = WMFConstants.readLittleEndianShort(in); this.x = WMFConstants.readLittleEndianShort(in); } COM: <s> reads the patblt record from a stream </s>
funcom_train/18742661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean collectNodeNrs() { boolean result = this.usedNrs == null; if (result) { this.usedNrs = new HashSet<Integer>(); for (Object root : getRoots()) { if (root instanceof GraphJVertex) { this.usedNrs.add(((GraphJVertex) root).getNumber()); } } } return result; } COM: <s> initialises the set </s>
funcom_train/14660798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private AutoEnableMenu getEstMenu() { if (estMenu == null) { estMenu = new AutoEnableMenu(); estMenu.setText("Estimate"); estMenu.add(priorSpecAction); estMenu.add(initDrawSpecAction); estMenu.add(estimationAction); } return estMenu; } COM: <s> this method initializes est menu </s>
funcom_train/48406843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addClassKindPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ClassElement_classKind_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ClassElement_classKind_feature", "_UI_ClassElement_type"), SpemxtcompletePackage.eINSTANCE.getClassElement_ClassKind(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the class kind feature </s>
funcom_train/32763829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSymmetric() { int i,j; //loop control variables for (i=0; i<DIM; i++) for (j=i; j<DIM; j++) { if (getElem(i,j) != getElem(j,i) ) return false; } return true; } COM: <s> check if matrix is symmetric </s>
funcom_train/42822659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExpenseDetailsCommand() { if (expenseDetailsCommand == null) {//GEN-END:|112-getter|0|112-preInit // write pre-init user code here expenseDetailsCommand = new Command("Expense Details", Command.SCREEN, 0);//GEN-LINE:|112-getter|1|112-postInit // write post-init user code here }//GEN-BEGIN:|112-getter|2| return expenseDetailsCommand; } COM: <s> returns an initiliazed instance of expense details command component </s>
funcom_train/5857409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperty(String key, String value) throws HeroException { log.debug("setProperty: key="+key+ " value="+value); try { if (!this.getProperties().containsKey(key)) { ProjectDAO.createProperty(this.getName(),key,value); } this.getProperties().put(key,value); makeDirty(); } catch (java.sql.SQLException se) { throw new HeroException("Cannot create new property :"+se.getMessage()); } } COM: <s> describe code set property code method here </s>
funcom_train/48212347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPopupVisible() { ComponentListener[] componentListeners = owningFrame.getComponentListeners(); if (Arrays.asList(componentListeners).contains(resizeListener)) { return true; } MouseListener[] mouseListeners = glassPane.getMouseListeners(); if (Arrays.asList(mouseListeners).contains(clickListener)) { return true; } return false; } COM: <s> returns true if the </s>
funcom_train/39935029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect() throws IOException, InterruptedException { System.out.println("Robot: connect()"); System.out.println("Robot: connect(): Creating new connection"); connection = new Connection(this); System.out.println("Robot: connect(): Starting connection thread"); (new Thread(connection)).start(); } COM: <s> connects the robot </s>
funcom_train/10948632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReverseComparator() { assertEquals("equal", 0, reverse.compare(equalFile1, equalFile2)); assertTrue("less", reverse.compare(moreFile, lessFile) < 0); assertTrue("more", reverse.compare(lessFile, moreFile) > 0); } COM: <s> test the comparator reversed </s>
funcom_train/5863989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URIInfo setTimeoutURI(String deviceType, String timeoutURI, int type) { if (deviceType == null) deviceType = "ajax"; TimeoutURIInfo newi = new TimeoutURIInfo(timeoutURI, type); TimeoutURIInfo oldi = (TimeoutURIInfo)_timeoutURIs.put(deviceType, newi); if (oldi != null) newi.auto = oldi.auto; return oldi != null && oldi.uri != null ? oldi: null; } COM: <s> sets the timeout uri </s>
funcom_train/9941063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FlexTable createAttributesFlexTable() { FlexTable attributesFlexTable = new FlexTable(); FlexCellFormatter cellFormatter = attributesFlexTable.getFlexCellFormatter(); attributesFlexTable.addStyleName("cw-FlexTable"); attributesFlexTable.setWidth("32em"); attributesFlexTable.setCellSpacing(5); attributesFlexTable.setCellPadding(3); cellFormatter.setHorizontalAlignment(0, 1, HasHorizontalAlignment.ALIGN_LEFT); return attributesFlexTable; } COM: <s> creates the attributes flex table </s>
funcom_train/43894172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { final int PRIME = 1000003; int result = 0; if (fill != null) { result = (PRIME * result) + fill.hashCode(); } if (stroke != null) { result = (PRIME * result) + stroke.hashCode(); } if (geometryPropertyName != null) { result = (PRIME * result) + geometryPropertyName.hashCode(); } return result; } COM: <s> generates a hashcode for the polygon symbolizer impl </s>
funcom_train/44149358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (bindingKey!=null) { base.setAttribute("bindingKey", bindingKey); } parent.appendChild(base); } COM: <s> save object to dom tree </s>
funcom_train/16480976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void optimize() { for (Symbol s : nonterminals) { removeWrongLinebreaks(s.graph.l, null, s); if (optimizeGraph) { // remove redundant iter/opts removeRedundancy(s.graph.l, null, s); // remove eps nodes and redundant eps nodes in alternatives removeEps(s.graph.l, null, s); optimizeIter(s.graph.l, null, s); } } } COM: <s> calls all methods which optimize the graphs </s>
funcom_train/14093357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRunBareDebug() { Throwable t = null; try { Element e = m_fixture.getTestElement(); e.setAttribute("debug", "true"); m_xmlTestCase.runBare(); } catch (Throwable ex) { t = ex; } assertNull(t); } COM: <s> test run bare with debug </s>
funcom_train/18457138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isNextStylesheet(int aStartIndex, int aSizeOfList) { boolean isNextStylesheet; int loop; isNextStylesheet = false; for (loop = aStartIndex; loop < aSizeOfList; loop++) { if (((XSLRow)(xslRows.get(loop))).isOnAndNotEmpty()) { isNextStylesheet = true; break; } } return isNextStylesheet; } COM: <s> returns true if a stylesheet between the indexes of a start index </s>
funcom_train/12127538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setKeyboardFocus(PInputEventListener eventHandler) { PInputEvent focusEvent = new PInputEvent(this, null, null); if (keyboardFocus != null) { dispatchEventToListener(focusEvent, FocusEvent.FOCUS_LOST, keyboardFocus); } keyboardFocus = eventHandler; if (keyboardFocus != null) { dispatchEventToListener(focusEvent, FocusEvent.FOCUS_GAINED, keyboardFocus); } } COM: <s> set the node that should receive key events </s>
funcom_train/2766659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTickEvent(TickEvent te) throws IndexOutOfBoundsException { Tick t=te.getTick(); //adjust data t.setDuration(t.getDuration()*resolution/divs[t.getTrack()]); ticks[t.getTrack()][0]=ticks[t.getTrack()][1];//save history ticks[t.getTrack()][1]+=t.getDuration();//push tick } COM: <s> musicxml backup forward tick sequence </s>
funcom_train/39484417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Instruction getInstructionAt (int position) { if (code == null) { return null; } for (int i = 0, l = code.length; i < l; i++) { if ((code[i] != null) && (code[i].getPosition() == position)) { return code[i]; } } throw new JPFException("instruction not found"); } COM: <s> returns the instruction at a certain position </s>
funcom_train/46994279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HtmlInputHidden getHiddenSelectedFileType() { if (hiddenSelectedFileType != null) { dbgLog.fine("returning hiddenSelectedFileType"+hiddenSelectedFileType.getValue()); } else { dbgLog.fine("hiddenSelectedFileType is null"); } return hiddenSelectedFileType; } COM: <s> get the value of hidden selected file type </s>
funcom_train/12713633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getStep() { double min1=Double.valueOf(getValue(".min")); double min2=min1+Double.valueOf(getValue(".step")); return toSI(min2)-toSI(min1); //Double.valueOf(getValue(".step")); } COM: <s> returns the range step </s>
funcom_train/12300906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBluePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RGBType_blue_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RGBType_blue_feature", "_UI_RGBType_type"), SchemaPackage.Literals.RGB_TYPE__BLUE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the blue feature </s>
funcom_train/17788534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean readSignatureBox() throws ErrorException, EOFException, IOException { // Box length int length = in.readInt(); if (length != 12) { return false; } // Box type int boxType = in.readInt(); if (boxType != JPXBoxTypes.SIGNATURE_BOX_TYPE) { return false; } // Box content int boxContent = in.readInt(); if (boxContent != JPXBoxTypes.SIGNATURE_BOX_CONTENT) { return false; } return true; } COM: <s> reads the signature box and checks its conformity </s>
funcom_train/50926300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createUniqueAtomId() { String id = "a1"; if (molecule.getAtomCount() >= 0) { id = molecule.getAtom(0).getId(); if (id != null) { id = id.substring(0, 1); int i = 1; while (true) { String id0 = id + CMLConstants.S_EMPTY + (i); if (molecule.getAtomById(id0) == null) { id = id0; break; } else if (++i > 10000000) { break; } } } } return id; } COM: <s> create new unique id </s>
funcom_train/5379472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void editElement(Object element, int column) { if (cellEditor != null) applyEditorValue(); setSelection(new StructuredSelection(element), true); Item[] selection = getSelection(); if (selection.length != 1) return; treeItem = selection[0]; // Make sure selection is visible showSelection(); columnNumber = column; activateCellEditor(); } COM: <s> start editing the given element </s>
funcom_train/43245193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetEmpStreetAddr3() { System.out.println("setEmpStreetAddr3"); String empStreetAddr3 = ""; EmploymentDataDG1Object instance = new EmploymentDataDG1Object(); instance.setEmpStreetAddr3(empStreetAddr3); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set emp street addr3 method of class org </s>
funcom_train/44174438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeTreeItem(final TreeItem<E> item) { if (item == this.root) { poll(); return; } item.cutFromParent(); final PairingHeap<E> priorityQueue = new PairingHeap<E>(this.comparator); priorityQueue.size = 1; // may be WRONG!!! priorityQueue.root = item; priorityQueue.poll(); melt(priorityQueue); } COM: <s> removed the specified tree item from this tree </s>
funcom_train/21022276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void calculateFrequencies(List<GWTKeyword> keywordsList) { minFrequency = 1; maxFrequency = 1; for (Iterator<GWTKeyword> it = keywordsList.iterator(); it.hasNext();) { GWTKeyword keyword = it.next(); if (minFrequency>keyword.getFrequency()) { minFrequency = keyword.getFrequency(); } if (maxFrequency<keyword.getFrequency()) { maxFrequency = keyword.getFrequency(); } } } COM: <s> sets the frequencies </s>
funcom_train/50976007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNBNumber() { if (mNBNumber == null || mNBNumber.length() == 0) { mNBNumber = mApplet.getParameter("nb_number"); if (mNBNumber == null || mNBNumber.length() == 0) { System.err.println("Could not find nb_number applet parameter!"); } } return mNBNumber; } COM: <s> overloaded from samcommand processor so we dont try to access the eln </s>
funcom_train/50911247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(IntArray f) { boolean equal = false; try { checkConformable(f); equal = true; for (int i = 0; i < nelem; i++) { if (array[i] != f.array[i]) { equal = false; break; } } } catch (Exception e) { equal = false; } return equal; } COM: <s> are two arrays equal </s>
funcom_train/17084428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBotAtras() { if (botAtras == null) {//GEN-END:|43-getter|0|43-preInit // write pre-init user code here botAtras = new Command("Volver", Command.BACK, 0);//GEN-LINE:|43-getter|1|43-postInit configurarJuego(); // write post-init user code here }//GEN-BEGIN:|43-getter|2| return botAtras; } COM: <s> returns an initiliazed instance of bot atras component </s>
funcom_train/10805313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printMemoryInfo() { Runtime rt = Runtime.getRuntime(); long total = rt.totalMemory(); long free = rt.freeMemory(); long used = total - free; NumberFormat nf = NumberFormat.getInstance(); getLog().warn(_loc.get("mem-info", nf.format(used), nf.format(total), nf.format(free))); } COM: <s> print out information on memory usage </s>
funcom_train/41722399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String nextEvent() throws FeederException { try { String nextLine = file.readLine(); if (nextLine != null) { nextLine = nextLine.trim(); if (nextLine.length() > 0) return nextLine; else return null; } else return null; } catch (IOException e) { throw new FeederException("Error when reading line from file '" + fileName + "'"); } } COM: <s> provides the next event null if there are no more event </s>
funcom_train/13874866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addImportedModulePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ModuleImport_importedModule_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ModuleImport_importedModule_feature", "_UI_ModuleImport_type"), QvtoperationalPackage.Literals.MODULE_IMPORT__IMPORTED_MODULE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the imported module feature </s>
funcom_train/38535008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEarliestEndTime(int eet, boolean notify) throws PropagationFailureException { if ((!endTimes.isEmpty())&&(endTimes.getMin()<eet)) { if (notify) { ActDelta delta = new ActDelta(); delta.endTimes.add(endTimes.removeEndingBeforeGetDelta(eet)); makeBoundConsistent(delta); notifyDelta(delta); } else { endTimes.removeEndingBefore(eet); makeBoundConsistent(null); } } } COM: <s> set the earliest end time for this resource </s>
funcom_train/7720620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void askCallback(String command,String result) { if (command.equals("exit")) { handleExit(result); } else if (command.equals("force-exit")) { forceExit(result); } else if (command.equals("revert")) { handleRevert(result); } else if (command.equals("close")) { handleClose(result); } } COM: <s> handler the ask callback and finish the command started that </s>
funcom_train/23012267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getThematicMapName() { if (project != null) { Enumeration e2 = project.themes.keys(); for (Enumeration e = project.themes.elements(); e.hasMoreElements();) { String s = (String) e2.nextElement(); if (((String) e.nextElement()).equals(thematicMap)) { return s; } } } return Const.EMPTY; } COM: <s> returns the name of current thematic map </s>
funcom_train/9439811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CacheEntry getContactInfo(String numberOrEmail, boolean allowQuery) { if (Mms.isEmailAddress(numberOrEmail)) { return getContactInfoForEmailAddress(numberOrEmail, allowQuery); } else { return getContactInfoForPhoneNumber(numberOrEmail, allowQuery); } } COM: <s> returns the caller info in cache entry </s>
funcom_train/22346805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName() { // When dbms if (use_dbms) { // is so return dbms_StatsTable; } else { // When local if (use_local) { // is so return local_file; } else { // must be alt return alt_name; } // endif } // endif } // end-method COM: <s> return the name of the stats </s>
funcom_train/23869564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPin(Node switchMatrixSink, Pin pin){ StaticSink ss = new StaticSink(switchMatrixSink, pin); String wireName = we.getWireName(switchMatrixSink.wire); if(needHARD1.contains(wireName)){ useTIEOFF.addFirst(ss); } else if(needSLICESource.contains(wireName)){ useSLICE.add(ss); } else if(pin.getNet().getType().equals(NetType.GND)){ useTIEOFF.addLast(ss); } else { attemptTIEOFF.add(ss); } } COM: <s> this methods sorts the pins as they are added </s>
funcom_train/32716570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(IWorkbench workbench, IStructuredSelection selection) { this.workbench = workbench; this.selection = selection; setWindowTitle(TefkatConfigEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(TefkatConfigEditorPlugin.INSTANCE.getImage("full/wizban/NewTefkatConfig"))); } COM: <s> this just records the information </s>
funcom_train/1711464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupTree() { try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); db = dbf.newDocumentBuilder(); } catch (ParserConfigurationException e) { e.printStackTrace(); } doc = db.newDocument(); /**add Adobe comment*/ doc.appendChild(doc.createComment(" Created from JPedal ")); doc.appendChild(doc.createComment(" http://www.jpedal.org ")); } COM: <s> create a blank xml structure and a root </s>
funcom_train/9117232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ValidationReport validate(Customer customer) { ValidationReport report = reportFactory .createValidationReport(); StatelessKnowledgeSession session = knowledgeBase .newStatelessKnowledgeSession(); session.setGlobal("validationReport", report); session.setGlobal("reportFactory", reportFactory); session .setGlobal("inquiryService", bankingInquiryService); session.execute(getFacts(customer)); return report; } COM: <s> validates provided customer and returns validation report </s>
funcom_train/44011336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetEmployeeID() { System.out.println("setEmployeeID"); String EmployeeID = ""; EmployeeBO instance = new EmployeeBO(); instance.setEmployeeID(EmployeeID); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set employee id method of class edu </s>
funcom_train/36012092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getSelectedFile() { String file = ""; IFile selectedFile = FileResource.getSelectedIFile(); if (selectedFile != null) { IPath selectedPath = selectedFile.getLocation(); if (selectedPath != null) { file = selectedPath.toFile().toString(); } } return file; } COM: <s> gets the selected file path </s>
funcom_train/15906736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseExtension(PrintStream log) { String content = this.propertyValue(PROFILE_EXTENSION_CONTENTS); if (content == null || content.isEmpty()) { UmlCom.trace("<b>Error: no content for extension: " + name()); } else { try { ArrayList<String> providedClassStringList = parseExtensionContent( content, log); handleProvidedClasses(log, providedClassStringList); } catch (RuntimeException e) { log.append("Caught exception : " + e + "\n"); } } } COM: <s> generate an extension component and fill id and plugin xml path </s>
funcom_train/23719247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Expression toValue(String text) { if (text.trim().length() == 0) { return null; } else { try { return pf.createParser().parse(text, context); } catch (ExpressionSyntaxException ex) { throw new IllegalArgumentException( "Invalid expression text: " + ex.getMessage(), ex); } } } COM: <s> parse the supplied expression text as an expression </s>
funcom_train/3762135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initMessageListeners() { m_continueButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { handleContinueButton(); } }); addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { handleContinueButton(); } }); } COM: <s> initialize all listeners for the continue message box </s>
funcom_train/11590848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isShowImagesToolBox(){ if( isShowAllToolBoxes() ) return true; if (_showImagesToolBox != null) return _showImagesToolBox.booleanValue(); ValueBinding vb = getValueBinding("showImagesToolBox"); return vb != null ? ((Boolean)vb.getValue(getFacesContext())).booleanValue() : false; } COM: <s> show the images tool box next to the text </s>
funcom_train/32741676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get_char_Value(String fieldName, ResultSet rs, int i) throws SQLException { Object o = base_getValue(fieldName, rs, i); if (o instanceof byte[]) { String a = new String((byte[]) o); } if (o == null) { return o; } if (o instanceof byte[]) { return new String((byte[]) o); } return o; } COM: <s> get the java value of the record set column corresponding to this field </s>
funcom_train/26125588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean kill() { boolean done = false; try { super.input(Signal.getKillSignal(), 1000L); done = true; } catch (InterruptedException e) { //void } catch (TransitionActivityException e) { //void } catch (UnhandledConditionException e) { //void } return done; } COM: <s> brings this state machine to the terminated state and destroyes the dialog without </s>
funcom_train/49410693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate() { try { for (int i = 0; i < mandatory_list.length; i++) { if (tapeProperties.getProperty(mandatory_list[i]) == null) throw new Exception("mandatory property " + mandatory_list[i] + " is not defined"); } } catch (Exception e) { e.printStackTrace(); } } COM: <s> valididates properties objects against mandatory props list </s>
funcom_train/37090801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showPage(String urlStr) { if (applet == null || externalFrame == null) { System.out.println("No access to web via applet to show page " + urlStr); return; } URL url = getUrl(urlStr); AppletContext appletcontext = applet.getAppletContext(); appletcontext.showDocument(url, externalFrame); } COM: <s> this is currently not used </s>
funcom_train/39983345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNewProduct(boolean newProduct){ this.isNewProduct=newProduct; errorLabel.setVisible(false); image.setEditable(newProduct); qtityTxt.setEditable(newProduct); priceTxt.setEditable(newProduct); nameTxt.setEditable(newProduct); descrTxt.setEditable(newProduct); categorieListBox.setEditable(newProduct); commentPanel.setVisible(!newProduct); emptyfields(); btnPanel.setVisible(newProduct); rates.setVisible(!newProduct); updatePanel.setVisible(false); addCart.setVisible(!newProduct); canEdit(); } COM: <s> set editable fields if it is a new product </s>
funcom_train/26016111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() throws IOException { this.isRunning = true; Thread thread = new Thread(this); thread.setDaemon(true); // Issue #32 on java.net thread.setName("UDPMessageProcessorThread"); // Issue #184 thread.setPriority(Thread.MAX_PRIORITY); thread.start(); } COM: <s> start our processor thread </s>
funcom_train/20798119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void postTopOfQueue(final QueueItem item) { final SpeakableListener listener = item.getListener(); if (listener == null) { return; } final Object source = item.getSource(); final int id = item.getId(); final BaseSynthesizer synthesizer = queueManager.getSynthesizer(); synthesizer.postSpeakableEvent(new SpeakableEvent(source, SpeakableEvent.TOP_OF_QUEUE, id), listener); } COM: <s> posts an event that processing of the queue has started </s>
funcom_train/31104848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void haveFormattedPageSequence(PageSequence pageSequence) { this.pageCount += pageSequence.getPageCount(); if (this.pageSequences == null) { this.pageSequences = new java.util.ArrayList(); } this.pageSequences.add( new PageSequenceResults(pageSequence.getProperty("id").getString(), pageSequence.getPageCount())); } COM: <s> description of the method </s>
funcom_train/21296256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean compareCurrentCards() { // guard illegal call of this method. if (this.currentCard1 == null || this.currentCard2 == null || this.currentPlayer == null) { throw new IllegalStateException( "Cannot check for pairs if one card is null."); } // save uncovered pair to current user this.currentPlayer.addUncoveredPair(currentCard1, currentCard2); // check if we have a match if (currentCard1.isMatch(currentCard2)) { moveToUncoveredPair(); return true; } else { return false; } } COM: <s> checks for a pair and saves pair </s>
funcom_train/37242342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveXMLFile() { FileDialog fd = new FileDialog(new Frame(), "Save as a jMusic XML file...", FileDialog.SAVE); fd.setFile("FileName.xml"); fd.show(); if (fd.getFile() != null) { jm.util.Write.xml(score, fd.getDirectory() + fd.getFile()); } } COM: <s> save score as a j music xml file </s>
funcom_train/4521127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Usuario entity) { LogUtil.log("saving Usuario instance", Level.INFO, null); try { entityManager.persist(entity); LogUtil.log("save successful", Level.INFO, null); } catch (RuntimeException re) { LogUtil.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved usuario entity </s>
funcom_train/8498044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BufferedImage loadImage(String res) throws IOException { URL url = TextureLoader.class.getClassLoader().getResource(res); if (url == null) { throw new IOException("Cannot find: " + res); } BufferedImage bufferedImage = ImageIO.read(new BufferedInputStream(getClass().getClassLoader().getResourceAsStream(res))); return bufferedImage; } COM: <s> loads an image from file </s>
funcom_train/2292242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CmsWidgetDialogParameter getParameterDefinition(String name) { Iterator i = getWidgets().iterator(); while (i.hasNext()) { // check for all widget parameters CmsWidgetDialogParameter base = (CmsWidgetDialogParameter)i.next(); if (base.getName().equals(name)) { return base; } } return null; } COM: <s> returns the parameter widget definition for the given parameter name </s>
funcom_train/46694144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBadCheck_Parameter() { System.out.println("check"); ActorFactory instance = ActorFactory.newInstance(); Parameter parameter = instance.getParameter("ActorID"); boolean expResult = false; boolean result = instance.check(parameter); assertEquals(expResult, result); } COM: <s> test of check method of class actor factory </s>
funcom_train/14093522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testProcessElement1() throws XMLException { Element hasFocus = m_fixture.newElement("assertenabled", new String[] { "refid", "test" }); IXMLTestCase tc = m_fixture.getTestCase(); Component comp = getComponent(1); tc.addProperty("test", comp); m_tagHandler = new AssertEnabledTagHandler(hasFocus, tc); m_tagHandler.processElement(); } COM: <s> test with the label </s>
funcom_train/1940712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object processRow(ResultSet rs) throws SQLException { ResultSetMetaData metaData = rs.getMetaData(); Map map = new HashMap(); for (int i=1;i<=metaData.getColumnCount();i++) { map.put(metaData.getColumnName(i).toLowerCase(), rs.getObject(i)); } return map; } COM: <s> create a code java </s>
funcom_train/48212788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addJdbcJar(String jarPath) { logger.debug("Adding jar at path " + jarPath); int count = getJdbcJarCount(); properties.put(JDBC_JAR_BASE+"_"+count, jarPath); setJdbcJarCount(count + 1); classLoader = getClassLoaderFromCache(); } COM: <s> adds the jdbc driver jar path name to the internal list </s>
funcom_train/21178021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPartControl(Composite parent) { GridData data = new GridData(GridData.FILL_BOTH | SWT.H_SCROLL | SWT.V_SCROLL); data.grabExcessHorizontalSpace = true; data.grabExcessVerticalSpace = true; table = new MetricsTable(parent, SWT.FULL_SELECTION); table.setLayoutData(data); table.packColumns(); getViewSite().getPage().addSelectionListener(this); ResourcesPlugin.getWorkspace().addResourceChangeListener(this); } COM: <s> this is a callback that will allow us </s>
funcom_train/21437803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equalsStructure(Glycan og) { if( og==null ) return false; if( root==null ) return (og.root==null); if( !root.subtreeEquals(og.root) ) return false; if( bracket==null ) return og.bracket==null; return bracket.subtreeEquals(og.bracket); } COM: <s> return code true code if the two glycan structures have the </s>
funcom_train/32057264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRestoreComponentState() { System.out.println("testRestoreComponentState"); // Add your test code below by replacing the default call to fail. BasicGraphDropTargetListener x = new BasicGraphDropTargetListener(); JComponent j = new JLabel(); // JComponent is abstract and cannot be instantiated // this returns void, so there is no need for assertEquals() x.restoreComponentState(j); } COM: <s> test of restore component state method of class basic graph drop target listener </s>
funcom_train/23770570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toTokenTypeString() { reset(); StringBuffer buf = new StringBuffer(); Object o = LT(1); int type = adaptor.getType(o); while ( type!=Token.EOF ) { buf.append(" "); buf.append(type); consume(); o = LT(1); type = adaptor.getType(o); } return buf.toString(); } COM: <s> for debugging destructive moves tree iterator to end </s>
funcom_train/27905457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int createVar() { int ret = num_vars++; // we want to keep the work stack at least so large int need = 5 * num_vars + 3; if(work_stack.length < need) work_stack = Array.resize(work_stack, work_stack_tos, need); tree_depth_changed(num_vars); // MUST be called return ret; } COM: <s> create a new zdd variable </s>
funcom_train/3713530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readFromSSAP() { ssapController = null; // try { // ssapController = new SSAPDownloadController(this, "VO download"); // ssapController.getJFrame().setVisible(true); // // readFromInternalList(); // } catch (MalformedURLException e) { // handleException(e); // } catch (IOException e) { // handleException(e); // } catch (ParserConfigurationException e) { // handleException(e); // } catch (SAXException e) { // handleException(e); // } } COM: <s> reads from ssap servers </s>
funcom_train/10591281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SourceValidity getValidity(Source source) { AggregatedValidity validity = new AggregatedValidity(); SourceInspector inspector; final Iterator inspectors = m_inspectors.iterator(); while (inspectors.hasNext()) { inspector = (SourceInspector) inspectors.next(); SourceValidity sv = inspector.getValidity(source); if (sv == null) { return null; } validity.add(sv); } return validity; } COM: <s> returns an aggregate validity describing the validity of all the properties </s>
funcom_train/33717568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void transferAllAnchors(AxedChar dst) { for(AxedChar c = firstChar(); c != null; c = c.next()) { if (c.anchors == null) { continue; } for (Anchor a = (Anchor) c.anchors.first; a != null; a = a.next()) { if (!a.empty) { continue; } removeAnchor(a); dst.line.text.htmlText.addAnchor(a, dst, a.getText()); } } } COM: <s> transfers all empty anchors to destination char </s>
funcom_train/50498719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startPumps() { if (!inputStreamPump.running) { Thread thread = new Thread(inputStreamPump, "HPROF Data Pump"); thread.setPriority(Thread.NORM_PRIORITY - 1); thread.setDaemon(true); thread.start(); } if (!recordPump.running && headerHasBeenRead()) { Thread thread = new Thread(recordPump, "HPROF Record Pump"); thread.setPriority(Thread.NORM_PRIORITY - 1); thread.setDaemon(true); thread.start(); } } COM: <s> start the pumps to read and route records to </s>
funcom_train/3030409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double method() { double result; do { // Single line comment to start int index = 52; result = 12; for (int ndx = 0; ndx < index; ndx++) { result *= 1.5; // Increase the result } // End for } while (result < 50); // End While // This is an old outdated piece of code // That is commented here return result; } // End method COM: <s> again we have some more strangely formatted </s>
funcom_train/7683905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPreconditions() { assertNotNull(mToView); assertEquals(0, mToView.length()); assertNotNull(mSubjectView); assertEquals(0, mSubjectView.length()); assertNotNull(mMessageView); assertEquals(0, mMessageView.length()); } COM: <s> the name test preconditions is a convention to signal that if this </s>
funcom_train/16953641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attachDevice(Device device, PhysicalEntity<?> entity) { // device mag niet reeds aan andere physicalEntity zijn toegevoegd if (device == null || entity == null || device.hasPhysicalEntity()) { throw new IllegalArgumentException(); } entity.attachDevice(device); device.setPhysicalEntity(entity); devices.add(device); device.setStructure(this); deploymentLayer.getRegistry().register(device); EventBroker.getEventBroker().notifyAll(new DeviceAttachedEvent(device, entity)); } COM: <s> attach the given device to the given physical entity </s>
funcom_train/18436380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLegendEvents() { DefaultPieDataset dataset = new DefaultPieDataset(); JFreeChart chart = ChartFactory.createPieChart("title", dataset, true); chart.addChangeListener(this); this.lastChartChangeEvent = null; LegendTitle legend = chart.getLegend(); legend.setPosition(RectangleEdge.TOP); assertNotNull(this.lastChartChangeEvent); } COM: <s> some checks for the default legend firing change events </s>
funcom_train/45255844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireWindowClosed(final IWorkbenchWindow window) { if (activatedWindow == window) { // Do not hang onto it so it can be GC'ed activatedWindow = null; } Object list[] = getListeners(); for (int i = 0; i < list.length; i++) { final IWindowListener l = (IWindowListener) list[i]; SafeRunner.run(new SafeRunnable() { public void run() { l.windowClosed(window); } }); } } COM: <s> fire window closed event </s>
funcom_train/43233015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void isReleaseDoubleDefined(final String version, final Date releaseDate) throws DoubleDefinitionException { for (final Release current : this.getReleasePlan()) { if (current.getVersion().equals(version) && current.getReleaseDate().equals(releaseDate)) { throw new DoubleDefinitionException(TextConstants.RELEASE_ERROR); } } } COM: <s> check if a release already exist within the project </s>
funcom_train/45838563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean check() { boolean ret = true; if (componentConfig == null) { ret = false; logger.warn("ComponentConfig for " + this.getClass().getSimpleName() + " was not set "); } if (!init) { ret = false; logger.warn(componentConfig.getId() + " " + this.getClass().getSimpleName() + " was not initialized "); } return ret; } COM: <s> a simple check </s>
funcom_train/8774244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSendVideoEnabled() throws SkypeException { VideoEnabledStatus enabled = VideoEnabledStatus.valueOf(getProperty("VIDEO_STATUS")); switch (enabled) { case VIDEO_NONE: case VIDEO_RECV_ENABLED: return false; case VIDEO_SEND_ENABLED: case VIDEO_BOTH_ENABLED: return true; default: return false; } } COM: <s> check if video sending is enabled for this call </s>
funcom_train/12561636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long skip(long n) throws IOException { if (n < 0L) { throw new IllegalArgumentException("skip value is negative"); } /* see the stream has been reached to eof */ int c = get(); if (c == -1) { return 0; } put(c); return readNumOfChars(null, (int) n); } COM: <s> skip over a number of bytes in the input stream </s>
funcom_train/13847411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object setConstraints(Object proxy) { if (proxy == null) { throw new NullPointerException("Proxy cannot be null"); } else if (!methodConstraintsSpecified) { return proxy; } else if (!(proxy instanceof RemoteMethodControl)) { throw new SecurityException( "Proxy must implement RemoteMethodControl"); } else { return ((RemoteMethodControl) proxy).setConstraints( getMethodConstraints(proxy)); } } COM: <s> sets constraints on the proxy </s>
funcom_train/36046595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ScriptManager getScriptManager() { if (getSource() instanceof ScriptManager) { return (ScriptManager) getSource(); } if (context != null) { return context.getScriptManager(); } if (getInterpret() != null) { return getInterpret().getScriptManager(); } return null; } COM: <s> get script manager associated with this event </s>
funcom_train/5692484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object getter(String methodName) { Object ret = null; try { Method method = this.realTask.getClass().getDeclaredMethod(methodName, null); ret = method.invoke(this.realTask, null); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(e.getMessage()); } return ret; } COM: <s> internal support method that calls a getter in the real task </s>