__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/35677805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testZonedDecimalToBigDecimal() { try { BigDecimal javaDecimal = CobolZonedDecimalSimpleConverter .fromHostSingle(17, 17, 2, true, false, false, ZONED_DECIMAL_HOST_BYTES, 0, STRING_FRENCH_CHARSET); assertEquals(0, javaDecimal.compareTo(DECIMAL_JAVA)); } catch (CobolConversionException e) { fail(e.getMessage()); } } COM: <s> convert from cobol zoned decimal to big decimal </s>
funcom_train/49502888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ String strString=""; strString="AndOrValue="+getAndOrValue()+ "\tCriteria="+getCriteria()+ "\tfieldIdList="+getFieldIdList()+ "\tcriteriaIdList="+getCriteriaIdList()+ "\tcriteriaValue="+getCriteriaValue(); return strString; } COM: <s> sets string representation of </s>
funcom_train/23216801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEndingDatePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Contract_endingDate_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Contract_endingDate_feature", "_UI_Contract_type"), ContractPackage.Literals.CONTRACT__ENDING_DATE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the ending date feature </s>
funcom_train/16358338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIdxUnit(String unit) throws IllegalArgumentException { int idx = 0; if ( Test.isNoNull(unit) ) { boolean ok = false; while((idx < unitList.length) && (!ok)) { ok = unit.equalsIgnoreCase(unitList[idx]); idx++; } if (!ok) throw new IllegalArgumentException("Unknown time unit: " + unit); idx = idx - 1; } else throw new IllegalArgumentException("No index: the string is null."); return idx; } COM: <s> get the idx coresponding to unit </s>
funcom_train/38537677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String nodesDescription() { StringBuffer buf = new StringBuffer(); Iterator<Node> iterator = nodes.keySet().iterator(); while (iterator.hasNext()) { if (buf.length()>0) buf.append("\n"); buf.append(iterator.next()); } return buf.toString(); } COM: <s> returns string with node information that </s>
funcom_train/15874530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUpdateNeeded(UpdateWindow updateWindow) { this.updateWindow = updateWindow; if(updateWindow != null) { statusText.setCursor(Cursors.handCursor); statusText.setForeground(Colors.colorWarning); updateStatusText(); } else { statusText.setCursor(null); statusText.setForeground(null); updateStatusText(); } } COM: <s> must be called by the swt thread </s>
funcom_train/25738093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String nextBlock() { String block = null; if (filter != null) { if (!consumeBlock) { if (!hasNext()) { throw new NoSuchElementException("no more fasta entry"); } } block = lastBlock; lastBlock = null; consumeBlock = false; } else { block = scanner.next(); } if (block.charAt(0) == '>') { return block.substring(1); } return block; } COM: <s> get the next fasta entry </s>
funcom_train/21170789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFreeVC() { for (int i = 0; i < numVCCount; i++) { if ((buffAssignedStatus[i] == false) && (flitCounter[i] == 0)) { buffAssignedStatus[i] = true; return i; } } return -1; } COM: <s> returns a free virtual channel on the physical link </s>
funcom_train/18551964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReturnType(String pReturnType) { if (pReturnType != null) { if (pReturnType.indexOf("class") == 0) { gReturnType = pReturnType.substring(6, pReturnType.length()); } else { gReturnType = pReturnType; } } else { gReturnType = pReturnType; } } COM: <s> sets the return type </s>
funcom_train/48366938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int generateRandomInteger(int startRange, int stopRange) { Random random = new Random(); { if (startRange > stopRange) { throw new IllegalArgumentException("Start cannot exceed End."); } long range = (long) stopRange - (long) startRange + 1; long fraction = (long) (range * random.nextDouble()); return (int) (fraction + startRange); } } COM: <s> generates a random integer between the start range and stop range </s>
funcom_train/33622144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton1() { if (jButton1 == null) { jButton1 = new JButton(); jButton1.setBounds(new Rectangle(136, 533, 80, 35)); jButton1.setText("Stop"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ControllerLab.getInstance().getTimecontroller().setRunning(false); } }); } return jButton1; } COM: <s> this method initializes j button1 </s>
funcom_train/33550102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fill(double x) { // use findBin method to work out which bin x falls in BinInfo bin = findBin(x); // check the result of findBin in case it was an overflow or underflow if (bin.isUnderflow) { m_underflow++; } if (bin.isOverflow) { m_overflow++; } if (bin.isInRange) { m_hist[bin.index]++; } // count the number of entries made by the fill method m_entries++; } COM: <s> enter data into the histogram </s>
funcom_train/39911729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetRh4() { System.out.println("setRh4"); TextField tf = null; Page1 instance = new Page1(); instance.setRh4(tf); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set rh4 method of class timesheetmanagement </s>
funcom_train/1715519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttrValueTable(int page, String[] attrValueTable) { // clear entries in this.table! for (int i = 0; i < attrValueTable.length; i++) { if (attrValueTable[i] != null) { Object idx = new int[]{page, i + 0x085}; this.attrValueTable.put(attrValueTable[i], idx); } } } COM: <s> sets the attribute value table for a given page </s>
funcom_train/37228001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Message readGetMeetingMessage() throws IOException, XmlPullParserException { // Create the message GetMeetingMessage message = new GetMeetingMessage(); // Now read the MeetingId message.setMeetingId(parser.getRequiredElementText(MSG_NS, "meeting-id")); // Consume </message> parser.nextEndTag(MSG_NS, "message"); return message; } COM: <s> reads a get meeting message </s>
funcom_train/45026516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDirectReadOnScope() { Object local = getObject("local"); addObjectToAssert("expectedLocal", local); Object global = getGlobalObject("global"); addObjectToAssert("expectedGlobal", global); Object resource = getResourceObject("resource"); addObjectToAssert("expectedResource", resource); } COM: <s> read object information from class global scope of xml test resource </s>
funcom_train/25637963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean hasSerializationOverviewTags(FieldDoc field) { TagletOutputImpl output = new TagletOutputImpl(""); TagletWriter.genTagOuput(configuration.tagletManager, field, configuration.tagletManager.getCustomTags(field), getTagletWriterInstance(false), output); return (!output.toString().trim().isEmpty()); } COM: <s> check whether there are any tags for serialization overview </s>
funcom_train/21172181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean loadApplicationPreferences() { preferences = client.retrieveApplicationPrefs(userName); boolean hadPreferences = true; if(preferences == null) { preferences = new Hashtable<ApplicationPreferences, Object>(); hadPreferences = false; } for (ApplicationPreferences preference : ApplicationPreferences.values()) { if (!preferences.containsKey(preference)) { preferences.put(preference, preference.getDefaultValue()); } } return hadPreferences; } COM: <s> loads the users application preferences from the database keys </s>
funcom_train/9769571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void checkSuitHonorMhing() { Card c = new Card(17, Card.TYPE_BAMBOO, 5, true); assertTrue(c.isSuit()); assertFalse(c.isHonor()); c = new Card(18, Card.TYPE_WIND, Card.VALUE_WIND_NORTH, true); assertFalse(c.isSuit()); assertTrue(c.isHonor()); } COM: <s> check if used mhing cards are suit honor cards </s>
funcom_train/35020095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadParameters(Breakpoint bp) { BreakpointType type = BreakpointType.getType(bp); String label = labelsMap.get(type); if (label != null) { EditorPanel editor = panelsMap.get(label); editor.loadParameters(bp); typeComboBox.setSelectedItem(label); } // Else not a supported breakpoint type. } COM: <s> take the already created breakpoint which may be partially </s>
funcom_train/8483481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void event_objectReconnected(final ATObjectID objId) { this.receive( new Event("objectReconnected(" + objId +")") { public void process(Object myself){ //notify myself in case local remote references in this machine register a listener connectionManager_.notifyObjectReconnected(objId); //broadcast to other virtual machines that an object has reconnected. new CMDObjectReconnected(objId).broadcast(communicationBus_); } }); } COM: <s> event that signals the manual reconnect of a previously exported and </s>
funcom_train/3102879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setViewerBackground(final StyleRange[] styles) { if (styles == null) { return; } if (fInput == null) { return; } StyledText text= fInput.getSourceViewer().getTextWidget(); if (text == null || text.isDisposed()) { return; } for (int index= 0; index < styles.length; index++) { text.setStyleRange(styles[index]); } } COM: <s> sets the viewer background </s>
funcom_train/48703614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isRecognizedFormat(InputStream stream) throws IOException { BufferedReader in = new BufferedReader(ImportFormatReader.getReaderDefaultEncoding(stream)); String str; int i=0; while (((str = in.readLine()) != null) && (i < 50)) { if (str.indexOf(SEPARATOR) >= 0) return true; i++; } return false; } COM: <s> check whether the source is in the correct format for this importer </s>
funcom_train/20292080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean clearObjectMapping(int thisSystemId) { Iterator iList = this.iterator(); while (iList.hasNext()) { SyncTable thisTable = (SyncTable) iList.next(); if (thisTable.getSystemId() == thisSystemId) { iList.remove(); return true; } } return false; } COM: <s> removes a specific system id from the cached list </s>
funcom_train/41026044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getStopServiceButton() { if (stopServiceButton == null) { stopServiceButton = new JButton(); stopServiceButton.setAction(new ServiceStopAction(this)); stopServiceButton.setText(Messages.getString("ServiceMonitorPanel.stopIcon")); stopServiceButton.setToolTipText(Messages.getString("ServiceMonitorPanel.stop")); stopServiceButton.setEnabled(false); } return stopServiceButton; } COM: <s> this method initializes stop service button </s>
funcom_train/10237721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { taskMonitor.setStatus("Reading Vizmap File..."); taskMonitor.setPercentCompleted(-1); // this even will load the file Cytoscape.firePropertyChange(Cytoscape.VIZMAP_LOADED, null, file.getAbsolutePath()); taskMonitor.setStatus("Vizmapper updated by the file: " + file.getName()); Cytoscape.getVisualMappingManager().setVisualStyle("cytoprophet"); taskMonitor.setPercentCompleted(100); } COM: <s> implements the task class run function </s>
funcom_train/33886098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendInternalNewickNodeName(StringBuffer buf) { Integer clusteringIteration = getClusterIteration(); if (clusteringIteration > 0) { buf.append("it").append(clusteringIteration.intValue()); buf.append("-").append(String.format("%.2f", distance)); } else { buf.append(getClusterName()); } } COM: <s> label the internal node with the distance appended with the iteration </s>
funcom_train/21172238
/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 OEBItem) { OEBItem item = (OEBItem) obj; if(item.ID.equals(this.ID) && item.fallbackID.equals(this.fallbackID) && item.mediaType.equals(this.mediaType) && item.href.equals(this.href) && item.urlBase.equals(this.urlBase)) { return true; } } return false; } COM: <s> two oebitems are equal if all of their fields are equal </s>
funcom_train/2388066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(final PwsRecord rec ) throws PasswordSafeException { LOG.enterMethod( "PwsFile.add" ); if (isReadOnly()) LOG.error("Illegal add on read only file - saving won't be possible"); this.add(rec, getCipher(true)); //recordSet.add( rec ); setModified(); LOG.leaveMethod( "PwsFile.add" ); } COM: <s> adds a record to the file </s>
funcom_train/31046043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void activateEditor(IEditorPart part) { IEditorPart oldEditor = getActiveEditor(); activeEditorIndex = getIndex(part); IEditorPart e = getActiveEditor(); EditorSite innerSite = (EditorSite) e.getEditorSite(); ((WorkbenchPage) innerSite.getPage()).requestActivation(e); updateGradient(oldEditor); } COM: <s> set the active editor </s>
funcom_train/18876705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element createElement(String key) { Element res = null; if ((key != null) && (key.trim().length() > 0)) { String upKey = key.substring(0, key.lastIndexOf("/")); //$NON-NLS-1$ String newKey = key.substring(key.lastIndexOf("/") + 1, key //$NON-NLS-1$ .length()); res = createChildInElement(upKey, newKey); } return res; } COM: <s> create an element based on the key </s>
funcom_train/26024738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addEdge(ElementGraphCell from, ElementGraphCell to) { DefaultPort source = getFirstDefaultPortChild(from); DefaultPort target = getFirstDefaultPortChild(to); DefaultEdge edge = (DefaultEdge) DefaultGraphModel.cloneCell( mGraphLayoutCache.getModel(), sRegoinEdgePrototype); mGraphLayoutCache.insertEdge(edge, source, target); mGraphLayoutCache.setVisible(edge, false); } COM: <s> adds an edge between two </s>
funcom_train/42068248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNumberOfCuePointsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ChunkCue_numberOfCuePoints_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ChunkCue_numberOfCuePoints_feature", "_UI_ChunkCue_type"), WavPackage.Literals.CHUNK_CUE__NUMBER_OF_CUE_POINTS, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the number of cue points feature </s>
funcom_train/10648383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddRule07() throws Exception { assertNull(ss.getStyle("ol")); assertNull(ss.getStyle("ul")); ss.addRule("ol, ul { margin-left: 3pt }"); Style ol = ss.getStyle("ol"); assertNotNull(ol.getAttribute(Attribute.MARGIN_LEFT)); Style ul = ss.getStyle("ul"); assertNotNull(ul.getAttribute(Attribute.MARGIN_LEFT)); } COM: <s> adding a property with several selectors </s>
funcom_train/2359589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FeatureForest riskAnnotationOnHG(HyperGraph hg, String[] referenceSentences){ processedHGNodesTbl.clear(); if(doRiskAnnotation){ HashMap<String, Integer> refereceNgramTable = BLEU.constructMaxRefCountTable(referenceSentences, endNgramOrder); annotateNode(hg.goalNode, refereceNgramTable); }else{ annotateNode(hg.goalNode, null); } releaseNodesStateMemroy(); return new FeatureForest(hg); } COM: <s> input a hypergraph return </s>
funcom_train/21644388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getHelpCheckForNewVersionMenuItem() { if (helpCheckForNewVersionMenuItem == null) { helpCheckForNewVersionMenuItem = new JMenuItem(); helpCheckForNewVersionMenuItem.setText("Check for new version"); helpCheckForNewVersionMenuItem.setMnemonic('C'); helpCheckForNewVersionMenuItem.setDisplayedMnemonicIndex(0); helpCheckForNewVersionMenuItem.addActionListener(eventHandler); } return helpCheckForNewVersionMenuItem; } COM: <s> return the help check for new version menu item </s>
funcom_train/29773770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RequestAnswer insertCalendar(CalendarModel calendar)throws RequestException{ if (log.isInfoEnabled()) log.info("insert calendar on yahoo..."); try { java.lang.String insertText = foundationCalendar2yahooCalendarInsert(calendar); return postXml(getYahooProperty(Def.LINKTOINSERTEVENT), insertText); } catch (EventCreationException ex) { throw new RequestException(ex.getMessage()); } } COM: <s> insert a event on yahoo server </s>
funcom_train/21913245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOperationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_OperationAction_operation_feature"), getString("_UI_PropertyDescriptor_description", "_UI_OperationAction_operation_feature", "_UI_OperationAction_type"), UIMPackage.Literals.OPERATION_ACTION__OPERATION, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the operation feature </s>
funcom_train/23356305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String UserCapCalculator_GivenGOS(double GOS, double trafficIntensityPerUser, int numberOfChannels, char Erlang) { UserCapHandler handler = new UserCapHandler(GOS, trafficIntensityPerUser, numberOfChannels,Erlang); return handler.calculateUserCapacity(); } COM: <s> creates a new instance of user cap controller </s>
funcom_train/3651499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setCallProperties(LogEvent evt) { Caller caller = Caller.currentCaller(); evt.setProperty("source.class", caller.getCallingClassName()); evt.setProperty("source.method", caller.getCallingMethodName()); if (caller.hasSourceInfo()) { evt.setProperty("source.line", new Integer(caller.getCallingLine())); } } COM: <s> uses caller to discern the call origin </s>
funcom_train/49454628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean updatePI() { if (getCurrentRoute() == null) return false; if (distanceNextPM < distUPI) { // If it's the end if (goingToPlacemarkIndex == getCurrentRoute().getPlacemarks().size()-1) { if (flagEndRide) { goingToPlacemarkIndex = -1; flagEndRide = false; finishCurrentRide(); } else flagEndRide = true; } else { goingToPlacemarkIndex = goingToPlacemarkIndex + 1; distanceNextPM = getDistanceNextPlacemark(); } } else return false; return true; } COM: <s> updates the next placemark index </s>
funcom_train/20081489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PopupMenu createTrayPopup() { PopupMenu trayPopup = new PopupMenu(); // About MenuItem aboutItem = new MenuItem("About"); aboutItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { showAbout(); } }); trayPopup.add(aboutItem); trayPopup.addSeparator(); // Shutdown Node MenuItem shutdownItem = new MenuItem("Shutdown"); shutdownItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doShutdownNode(); } }); trayPopup.add(shutdownItem); return trayPopup; } COM: <s> system tray icon pop up menu </s>
funcom_train/28756927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPartvendor(String newVal) { if ((newVal != null && this.partvendor != null && (newVal.compareTo(this.partvendor) == 0)) || (newVal == null && this.partvendor == null && partvendor_is_initialized)) { return; } this.partvendor = newVal; partvendor_is_modified = true; partvendor_is_initialized = true; } COM: <s> setter method for partvendor </s>
funcom_train/18661350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setPageStats() { Tools.checkEDT(); final int total = mySetOfNodes.getNumberOfNodes(); final int lastOnPage = Math.min(startIndex + Settings.maxThumbnails, total); titleJPanel.lblPage.setText(String.format("Thumbnails %d to %d of %d", startIndex + 1, lastOnPage, total)); } COM: <s> sets the text in the title for displaying page count information </s>
funcom_train/49029673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getSeparatorIndex(String arg) { int idxA = arg.indexOf('='); int idxB = arg.indexOf(':'); if (idxA == -1) // key:value return idxB; if (idxB == -1) // key=value return idxA; if (idxA < idxB) // key=value with : return idxA; else // key:value with = return idxB; } COM: <s> used by is candidate isolate key and isolate value to determine </s>
funcom_train/28720494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getCaretPosition() { Point p = new Point(0,0); if (isEnabled()) { int offset = getCanvas().getTextWidget().getCaretOffset(); try { p.x = fDocument.getLineOfOffset(offset); p.y = offset - fDocument.getLineOffset(p.x); } catch (BadLocationException e) { //e.printStackTrace(); } } return p; } COM: <s> returns the current caret position </s>
funcom_train/3133306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(Set set) { Object[] list = set.toArray(); String text = ""; for(int i = 0; i < list.length; i++){ String name = list[i].toString(); String value = get(name); if(i > 0) { text += "&"; } text += encode(name, value); } return text; } COM: <s> this code to string code method is used to compose an string </s>
funcom_train/43202612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean allFree() { if (c_resource == null) // function is empty return true; int numFlows = getNumberOfFlows(); int maxTimestep = getTimesteplevel().timestepDifference(null); for (int flow = 0; flow < numFlows; ++flow) { for (int timestep = 0; timestep < maxTimestep; ++timestep) if (getOperator(timestep, flow) != FREE) return false; } return true; } COM: <s> returns true if all flows for the current timestep and current resource </s>
funcom_train/20291822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getMultiplier() { double multiplier = 1; if (type == Option.TYPE_LOOKUPLIST) { multiplier = multiplier * priceList.findMultiplier(Integer.parseInt(defaultValue)); } if (type == Option.TYPE_INTEGER) { multiplier = multiplier * priceList.getQtyMultiplier(Double.parseDouble(defaultValue)); } return multiplier; } COM: <s> gets the multiplier attribute of the option object </s>
funcom_train/23777619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAircraftToBeUsed() { AircraftTypeBO type = (AircraftTypeBO) aircraftToBeUsedCB.getSelectedItem(); if (type.getAbbreviation() == null) { return ""; } return type.getManufacturer() + "/" + trimModelVersion(type.getModel()); } COM: <s> the aircraft to be used in manufacture model format for example </s>
funcom_train/18525525
/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 (props != null) { InputSource is = LanguageFileLoader.getReference().getLanguageInputStream(LanguageFileLoader.FILEFILTER_XML_FILE); if (is != null) { getParser().setContentHandler(this); getParser().setErrorHandler(this); getParser().parse(is); } } } COM: <s> parse the filefilter </s>
funcom_train/40792554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Gauge getIndicator() { if (indicator == null) {//GEN-END:|68-getter|0|68-preInit // write pre-init user code here indicator = new Gauge(null, false, 100, 50);//GEN-LINE:|68-getter|1|68-postInit // write post-init user code here }//GEN-BEGIN:|68-getter|2| return indicator; } COM: <s> returns an initiliazed instance of indicator component </s>
funcom_train/9394384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resolveProperties() { if (arePropertiesResolved) { return; } Class<?> cl = forClass(); isProxy = Proxy.isProxyClass(cl); isEnum = Enum.class.isAssignableFrom(cl); isSerializable = isSerializable(cl); isExternalizable = isExternalizable(cl); arePropertiesResolved = true; } COM: <s> resolves the class properties if they werent already </s>
funcom_train/36032608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSubpath(List<String> path, List<String> otherPath) { if (path.size() > otherPath.size()) { return false; } for (int i = 0; i < path.size(); i++) { if (!path.get(i).equals(otherPath.get(i))) { return false; } } return true; } COM: <s> check wether path is a subpath of other path </s>
funcom_train/927546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ASDNEdge addEdge(VisualItem visource, VisualItem vitarget) { //return if VisualItem is an Edge if (!ItemUtil.isNode(visource) || !ItemUtil.isNode(vitarget) ) { return null; } ASDNNode source=(ASDNNode)visource.getSourceTuple(); ASDNNode target=(ASDNNode)vitarget.getSourceTuple(); return addEdge(source,target); } COM: <s> adds new edge to graph </s>
funcom_train/16218614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBackground(Background backgr) { this.background = backgr; if (this.background == null) { this.background = Background.getDefaultBackground(); } // force all sprites to use same background for (int i = 0; i < this.groups.length; i++) { this.groups[i].setBackground(backgr); } } COM: <s> associates specified background to this playfield </s>
funcom_train/795369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelAllColors() { if (jPanelAllColors == null) { jPanelAllColors = new JPanel(); jPanelAllColors.setLayout( new FlowLayout() ); jPanelAllColors.add(getJCSAppointment(), null); jPanelAllColors.add(getJCSTask(), null); jPanelAllColors.add(getJCSUdienze(), null); jPanelAllColors.add(getJCSCancelleria(), null); } return jPanelAllColors; } COM: <s> this method initializes j panel colors </s>
funcom_train/27793039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String convertFolderRelatedPath(String aPath) { IResource resource = fFile.getParent().findMember( aPath.toString()); if (resource == null) { createProblemMarker(0, AntlrCorePlugin.getFormattedMessage( "AntlrTool.error.noGrammarFile", aPath), IMarker.SEVERITY_ERROR); } return (resource != null ? resource.getLocation().toOSString() : null); } COM: <s> converts given path related to folder of grammar file to an absolute </s>
funcom_train/34628662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T remove() { T o = elementAt(0); p++; // have we hit end of buffer and not backtracking? if ( p == data.size() && markDepth==0 ) { // if so, it's an opportunity to start filling at index 0 again clear(); // size goes to 0, but retains memory } return o; } COM: <s> get and remove first element in queue override fast queue </s>
funcom_train/1763844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invalidateAll() { for (int x = 0; x < mTextureHash.length; x++) { if (mTextureHash[x].resource != -1 && mTextureHash[x].loaded) { mTextureHash[x].name = -1; mTextureHash[x].loaded = false; } } } COM: <s> marks all textures as unloaded </s>
funcom_train/48338897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String test(Harness h, int n, String url, String result) { h.enterTest(n, url, result); String r; try { r = (new SioResource(url)).toString(); } catch (IllegalArgumentException x) { return null; } return r; } COM: <s> create a new structured i o resource descriptor from the </s>
funcom_train/550087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open() { int returnVal = fc.showOpenDialog(toolbar.getRootPane().getParent()); if (returnVal == JFileChooser.APPROVE_OPTION) { file = fc.getSelectedFile(); saveBit.setEnabled(true); closeBit.setEnabled(true); main.open(file); } } COM: <s> code open code shows a file selection dialog and calls its </s>
funcom_train/3290299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removedir(String path) { String res; res=exec.execute(sshpath+"/ssh -q -l "+dstuser+" "+dsthost+" rmdir "+path); log.debug("SCPcopy -> removedir "+path+" : "+res); return res.length()<=0; } COM: <s> removes a directory at the host </s>
funcom_train/42262366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void goToLineAndPass(int robotNumber, Point2d outBallPosition) { if (!isCloseToLine(robotNumber, outBallPosition)) return; int nearest = nearestToPosition(Camera.getInstance().getRobotPosition(robotNumber), robotNumber); if (pass(robotNumber, nearest)) { GameEngine.getInstance().setInformationUsed(); } } COM: <s> goes to out ball and passes ball to nearest team mate </s>
funcom_train/24187329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrentAssignmentSingleton() { U min = zero.getPlusInfinity(); Val minD = null; for (Map.Entry<Val, Integer> entry : valuePointer.entrySet()) { U myDelta = delta.get(entry.getValue()); if (min.compareTo(myDelta) > 0) { min = myDelta; minD = entry.getKey(); } } if (minD == null) { currentAssignment = valuePointer.keySet().iterator().next(); } else { currentAssignment = minD; } } COM: <s> this function is used to find the optimal decision of a singleton </s>
funcom_train/39536640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void storeNewValue() { //building the value of the attribute to set String newValue=""; for(String name : columnNames) { newValue+=name+columnNamesSeparator; } //setting the new value for the attribute setProperty(getElement(), propertiesList.get(1), newValue, true); //refreshes the source choosers refreshSourceChoosers(); } COM: <s> sets the value buit from the model to the jwidget element </s>
funcom_train/17528962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIndex(E e, V v) { if (e == null || v == null) return; if (!this.edges.containsKey(e)) this.edges.put((E) e,new HashSet<V>()); this.edges.get(e).add(v); if (!this.vertices.containsKey(v)) this.vertices.put(v,new HashSet<E>()); this.vertices.get(v).add((E) e); } COM: <s> index vertex in the edge </s>
funcom_train/4149200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFieldNameWithAnnotation(Class<?> elementClass, Class<? extends Annotation> annotationClass) { String fieldName = null; if (annotationClass == null) { throw new IllegalArgumentException("the annotationClass must not be null"); } ClassFields<?> cf = getFieldUtils().analyzeClass(elementClass); fieldName = cf.getFieldNameByAnnotation(annotationClass); return fieldName; } COM: <s> find the getter field on a class which has the given annotation </s>
funcom_train/29018502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSelected (int index) { checkWidget (); LVITEM lvItem = new LVITEM (); lvItem.mask = OS.LVIF_STATE; lvItem.stateMask = OS.LVIS_SELECTED; lvItem.iItem = index; int /*long*/ result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem); return (result != 0) && ((lvItem.state & OS.LVIS_SELECTED) != 0); } COM: <s> returns code true code if the item is selected </s>
funcom_train/10009436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getClassOrder(Class<? extends Event> type) { int value = EventFactory.valueOf(type.getSimpleName()).ordinal(); if (value < 0) { // help spot errors if a new Event class is created throw new IllegalArgumentException("Invalid class " + type); } return value; } COM: <s> returns the index that defines the order for the given class </s>
funcom_train/33352311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SkyObject getSkyObjectAtMousePosition() throws OffScreenException { Point vc = getPanelCenter(); Coordinate clickPos = skyMap.screenToSphere(lastMouseMovedEvent.getPoint(), vc); System.out.println(clickPos.toRADecString()); return skyMap.find(clickPos, new Angle.DegreeAngle(10), new TrueFilter()); } COM: <s> wrap sky map </s>
funcom_train/21108975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkIPType(int size1){ if (size1 == 31) { isIPv4 = true; lengthOfToken = 8; DELIMITER = "."; MAXPREFIX = 32; } else if (size1 == 127) { isIPv6 = true; lengthOfToken = 16; DELIMITER = ":"; MAXPREFIX = 128; } semiCol = lengthOfToken - 1; } COM: <s> determines whether an ip address provided in binary form is an ipv4 or </s>
funcom_train/44868904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WCMDisplayCanvasBean getCanvas() { if (canvas == null) { canvas = new WCMDisplayCanvasBean(); canvas.setHandleMouseZooms(true); canvas.add(getAxes(), null); canvas.add(getPanner(), null); canvas.add(getSequence(), null); canvas.add(getDs(), null); } return canvas; } COM: <s> this method initializes canvas </s>
funcom_train/29935439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GamePanel () { addMouseListener (this); addMouseMotionListener (this); popupmenu = new JPopupMenu (); JMenuItem mi = new JMenuItem ("Add card to hand"); mi.addActionListener (new ActionListener() { public void actionPerformed(ActionEvent e) { addCardToHand (); } }); popupmenu.add (mi); } COM: <s> creates a new vcardtable game panel </s>
funcom_train/5322495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean findInIteration(String needle, Iterator haystack) { boolean matched = false; while (haystack.hasNext()) { String x = haystack.next().toString(); if (x == null) { // FIXME: This requires synchronization haystack.remove(); continue; } if (needle.equals(x) == true) { matched = true; break; } } return matched; } COM: <s> tries to find a name adjective within an iterator </s>
funcom_train/51752619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public double getScaled(double value, int scale) { double result = value; //default: unscaled //use BigDecimal String constructor as this is the only exact way for double values result = new BigDecimal(value).setScale(scale, BigDecimal.ROUND_HALF_UP).doubleValue(); return result; }//getScaled() COM: <s> scale decimal number via the rounding mode big decimal </s>
funcom_train/50846533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCatalogName() throws Exception { JDBCResultSetMetaData rsmd = newJdbcResultSetMetaData(); int columnCount = rsmd.getColumnCount(); for (int i = 1; i <= columnCount; i++) { assertEquals("column: " + i, "", rsmd.getCatalogName(i)); } } COM: <s> test of get catalog name method of class org </s>
funcom_train/37824497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateModule(Configuration config,boolean all){ DataUnit data = new DataUnit(); if( all ){ data.packString(config.toXMLString(false)); } else{ // make the change of the system configuration by the user visible. gui.menu.markAsLoaded(null,true); try{ // calc the difference between this.configuration and config String diffString = configuration.diff(config); if( diffString == null ) return; data.packString(diffString); } catch(ConfigurationException e){ new GUIError(e); } catch(NullPointerException e){ return; } } data.packInt(Communication.session,true); Communication.send(configurationPool,data); } COM: <s> update the task </s>
funcom_train/4925308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSrcMainWebappConfiguredResource() throws Exception { // Obtain webapp configuration location String alternateConfigurationLocation = this .getPackageRelativePath(this.getClass()) + "/webapp.woof"; // Run the application for woof resource WoofOfficeFloorSource.main("-" + WoofOfficeFloorSource.PROPERTY_WOOF_CONFIGURATION_LOCATION, alternateConfigurationLocation); // Test String response = this.doRequest("/resource"); assertEquals( "Incorrect response", "Configured resource for testing that should not be included in built jar for project", response); } COM: <s> ensure can retrieve configured resource from the </s>
funcom_train/24134885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveValues() { _isOk = true; _actionHolder.setTitle(_titleField.getText()); _actionHolder.setAction(_actionField.getText()); if (_pythonRadio.isSelected()) _actionHolder.setType(CustomAction.JPYTHON_SCRIPT); else if (_javaRadio.isSelected()) _actionHolder.setType(CustomAction.JAVA_CLASS); else if (_commandRadio.isSelected()) _actionHolder.setType(CustomAction.IRC_COMMAND); } COM: <s> saves values from this tabs gui </s>
funcom_train/20205892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeIndexFromControlNames(final Container container) { List localControls = container.getControls(); for (int i = 0; i < localControls.size(); i++) { Control control = (Control) localControls.get(i); removeIndex(control); if (control instanceof Container) { Container childContainer = (Container) control; removeIndexFromControlNames(childContainer); } } } COM: <s> remove the index from the child controls contained in the given </s>
funcom_train/887244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processOOpaths(Element configNode) { // extract all relative OOo paths List<String> pathList = new ArrayList<String>(); for (Element child : new ElemIterator(configNode)) { if (child.getNodeName().equals("path")) { pathList.add(child.getTextContent()); } } // store it for later... openOfficeRelativePath = pathList.toArray(new String[0]); } COM: <s> processes the provided ooo live version paths </s>
funcom_train/49964656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean keyDown(int keycode, int time) { switch (Keypad.key(keycode)) { case Keypad.KEY_SPACE: UiApplication.getUiApplication().pushScreen(new GenerateScreen()); return true; case Keypad.KEY_MENU: case Keypad.KEY_ESCAPE: return true; } return false; } COM: <s> invoked when a key has been pressed </s>
funcom_train/19429471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dump(PrintStream s, int depth) { for (Enumeration e = signatures.elements(); e.hasMoreElements();) { Signature sig = (Signature) e.nextElement(); pad(s, depth); s.println("method: " + sig.fqn()); } } COM: <s> dump the contents of this method to standard output </s>
funcom_train/41761621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildXML(StringBuilder sb) { sb.append("<Element type=\"" + getType().name() + "\" id=\"" + id); sb.append("\" answer=\"" + getAnswer()); sb.append("\" concept=\"" + getConcept()); sb.append("\"/>\n"); } COM: <s> make question and answer sound if sound was recorded into an xml string </s>
funcom_train/48425438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToString() { /*System.out.println("toString"); int sid = 1; Sensor instance = new Sensor(sid); String expResult = "Sensor" + "\t" + "{" + sid + "}"; String result = instance.toString(); assertEquals(expResult, result);*/ } COM: <s> test of to string method of class sbc </s>
funcom_train/45064124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getNewButton() { if (newButton == null) { newButton = new JButton(); newButton.setIcon(new ImageIcon(Tools.loadBufferedImage(iconsPath + "empty.png"))); newButton.setToolTipText("New"); newButton.addMouseListener(new MouseAdapter() { public void mouseExited(MouseEvent e) { statusBar.setText(""); } public void mouseEntered(MouseEvent e) { statusBar.setText("Create a new model"); } }); } return newButton; } COM: <s> this method initializes new button </s>
funcom_train/20109039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Program getRecording(final String basename) throws IOException { if (basename.equalsIgnoreCase("Unknown")) { //$NON-NLS-1$ Program prog = new Program(); prog.Title = "Unknown"; //$NON-NLS-1$ return prog; } cmgr.sendString("QUERY_RECORDING BASENAME " + basename); //$NON-NLS-1$ return new Program(cmgr.readStringList(), 1); } COM: <s> get a program from a recording filename </s>
funcom_train/46294053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startRead() throws MalformedHeaderException { try { String s = readOpenEXRStringWithinMaxLenghth(stream); while(s.length() > 0) { onRead(s); s = readOpenEXRStringWithinMaxLenghth(stream); } } catch(MalformedHeaderException mhe) { throw mhe; } catch(Exception e) { throw new MalformedHeaderException(String.format("Error reading header."), e); } } COM: <s> starts to perform the repetitive read </s>
funcom_train/4883106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String _getRanks(ModelMap model, Player player, String groupId) { Collection<Object[]> ranks = new ArrayList<Object[]>(); Group g = null; if(StringUtils.hasLength(groupId)){ daoUtility.getGroup(Long.parseLong(groupId)); } if(g!=null){ ranks = daoUtility.getAllRanks(player, g, 100); } else { ranks = daoUtility.getAllRanks(player, 100); } model.addAttribute("rank", ranks); return "extendedRank"; } COM: <s> this method adds a list of ranking information to the response model </s>
funcom_train/28757850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMethodofanalysisid(Long newVal) { if ((newVal != null && this.methodofanalysisid != null && (newVal.compareTo(this.methodofanalysisid) == 0)) || (newVal == null && this.methodofanalysisid == null && methodofanalysisid_is_initialized)) { return; } this.methodofanalysisid = newVal; methodofanalysisid_is_modified = true; methodofanalysisid_is_initialized = true; } COM: <s> setter method for methodofanalysisid </s>
funcom_train/45714975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean addLocationToClone(double x, double y, double z) { if (!isClosed()) {//will it accept one more point? pointCount += 1; OJ.getDataProcessor().addLocation(ytem, new LocationOJ(x, y, z)); return true; } else { return false; } } COM: <s> checks if clone can accept one more point via is closed </s>
funcom_train/43607023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node buildTypes(TypeBuilder tb) throws SemanticException { Formal_c n = (Formal_c) super.buildTypes(tb); TypeSystem ts = tb.typeSystem(); LocalInstance li = ts.localInstance(position(), Flags.NONE, ts.unknownType(position()), name()); return n.localInstance(li); } COM: <s> build type objects for the formal </s>
funcom_train/125605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print(PrintStream p) { String[] timeIndex = range().timeAxisStringArray(); p.println(name + " " + range()); for (int i = 0; i < timeIndex.length; i++) p.println(printfFormat.sprintf(timeIndex[i]) + " " + valueAt(i)); } COM: <s> prints this object to the argument print stream with the time index and </s>
funcom_train/3561562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContainer(java.awt.Container cont, Dimension initialDims, Dimension minDims) { if (cont != null && initialDims != null && minDims != null) { managedContainer = cont; containerInitialDimension = new Dimension(initialDims); containerMinDimension = new Dimension(minDims); } } COM: <s> sets the container whose dimension will be checked </s>
funcom_train/48488344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate(OCLExpression<C> expression) throws SemanticException { // clear out old diagnostics ProblemHandler ph = OCLUtil.getAdapter(rootEnvironment, ProblemHandler.class); if (ph != null) { ph.beginValidation(); } expression.accept(ValidationVisitor.getInstance(rootEnvironment)); if (ph != null) { ph.endValidation(); try { OCLUtil.checkForErrors(ph); } catch (SyntaxException e) { // shouldn't actually be able to get this from validation throw new SemanticException(e.getDiagnostic()); } } } COM: <s> validates an ocl expression which may have been loaded from some </s>
funcom_train/46764880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendThreadedMessage(String text) { ThreadedMessage parent = conversation.getSelection(); if (parent==null) try { roomconnection.sendMessage(text); } catch (Exception e) { MainWindow.getInstance().displayMessage(e.getMessage()); //TODO: muss noch was anderes passieren ? Fenster zu etc. } else { try { roomconnection.sendThreadedMessage(text, parent); } catch (Exception e) { MainWindow.getInstance().displayMessage(e.getMessage()); //TODO: muss noch was anderes passieren ? } resetSelection(); } } COM: <s> sends a message </s>
funcom_train/28266346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void push(ChatMessage cm) { synchronized(queue) { while (queue.size()>=MAX_SIZE) { try { queue.wait(); } catch (InterruptedException e) { System.err.println(e); } } queue.add(cm); // might throw shit if full... queue.notifyAll(); } } COM: <s> push a new jms reply </s>
funcom_train/3369399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setCurrentAccessibleValue(Number n) { // TIGER - 4422535 if (n == null) { return false; } AccessibleContext a = JDesktopIcon.this.getInternalFrame().getAccessibleContext(); AccessibleValue v = a.getAccessibleValue(); if (v != null) { return v.setCurrentAccessibleValue(n); } else { return false; } } COM: <s> sets the value of this object as a code number code </s>
funcom_train/16641432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String create(List<JComponent> components) { StringBuilder builder = new StringBuilder(); for (JComponent component : components) { appendTextFromComponent(builder, component); } builder.delete(builder.length()-1, builder.length()); return builder.toString(); } COM: <s> creates string from given components </s>