__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/18508991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { try { // Must wait for the socket to be closed. ioThread.invokeAndWait(new Runnable() { public void run() { if (ssc != null) { try { ssc.close(); } catch (IOException e) { // Ignore } } } }); } catch (InterruptedException e) { // Ignore } } COM: <s> closes the socket </s>
funcom_train/12185176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTransparentGIFtoJPEG() throws Throwable { // This in itself will not cause the failure if the transparency is // left in. But the image stream returned will be corrupted and the // asserts will fail. doConversion(OutputImageRules.COLOURJPEG24, "trans-test.gif", "tc"); } COM: <s> this test is necessary to ensure that a valid jpeg image is created </s>
funcom_train/23328474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getProperties() { reloadIfModified(); Map map = new HashMap(); Enumeration e = properties.keys(); while(e.hasMoreElements()) { String key = (String)e.nextElement(); String val = (String)properties.get(key); map.put(key,val); } return map; } COM: <s> gets all properties as map </s>
funcom_train/49049989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getContactAsVCard() { if (contact != null) { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); vCardMarshaller marshaller = new vCardMarshaller(); marshaller.marshallContact(outputStream, contact); return outputStream.toString(); } else { return null; } } COM: <s> get the users code contact code as a v card </s>
funcom_train/36874525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel() { if (jPanel == null) { jPanel = new JPanel(); jPanel.setLayout(null); jPanel.add(getMsgTabbedPane(), null); jPanel.add(getUsersScrollPane(), null); jPanel.add(getSendButton(), null); jPanel.add(getLeaveButton(), null); jPanel.add(getStartButton(), null); jPanel.add(getCloseButton(), null); } return jPanel; } COM: <s> this method initializes j panel </s>
funcom_train/46746222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIpAddress(String ipAddress) { if (Converter.isDifferent(this.ipAddress, ipAddress)) { String oldipAddress= null; oldipAddress = this.ipAddress; this.ipAddress = ipAddress; setModified("ipAddress"); firePropertyChange(String.valueOf(ENVIRONMENTNODES_IPADDRESS), oldipAddress, ipAddress); } } COM: <s> ip address used if the hostname is not available </s>
funcom_train/43245356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetECTwoState() { System.out.println("getECTwoState"); EmergencyContactDG4Object instance = new EmergencyContactDG4Object(); String expResult = ""; String result = instance.getECTwoState(); 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 ectwo state method of class org </s>
funcom_train/3772063
/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 != null) && (obj instanceof Cookie)) { Cookie other = (Cookie) obj; return (this.getName().equals(other.getName()) && this.m_path.equals(other.m_path) && this.m_domain.equals(other.m_domain)); } return false; } COM: <s> two cookies match if the name path and domain match </s>
funcom_train/28268970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName() { StringBuffer sb = new StringBuffer(); sb.append("{"); for (Iterator<GraphElement> it = getMembers().iterator(); it.hasNext(); ) { if (sb.length() > 1) { if (type == ANDSet) sb.append(","); else sb.append(";"); } sb.append(it.next().getName()); } sb.append("}"); return sb.toString(); } COM: <s> returns the name of the set </s>
funcom_train/50880345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notify(String inFile, int inResolution, int inX, int inY){ String tempFile = inFile; if (tempFile == null) tempFile = lastFile; else lastFile = tempFile; if (myRasterCatalogCreatorApplication != null){ myRasterCatalogCreatorApplication.setStatus(tempFile, inResolution, inX, inY); } } COM: <s> notify the application of a status change </s>
funcom_train/48669364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleMouseMoved(MouseEvent e) { try { if(e.getSource() == list) { int idx = list.locationToIndex(e.getPoint()); if(idx != list.getSelectedIndex()) { list.setSelectedIndex(idx); } } } catch(Exception ex) { UIExceptionMgr.userException(ex); } } COM: <s> handles mouse moved events on the list </s>
funcom_train/31662429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAssignments(Assignment[] newAssignments) { if (assignments != newAssignments) { assignments = newAssignments; if (assignments != null) { for (int i = 0; i < assignments.length; i++) assignments[i].setSpectrum(this); Arrays.sort(newAssignments); } } } COM: <s> sets assignment array </s>
funcom_train/18429692
/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 (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } Library library = (Library) obj; if (this.name != null ? !this.name.equals(library.name) : library.name != null) { return false; } return true; } COM: <s> tests this instance for equality with an arbitrary object </s>
funcom_train/36958271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doPropertyChange(PropertyChangeEvent event) { String property= event.getProperty(); if (fMethodsViewer != null) { if (MembersOrderPreferenceCache.isMemberOrderProperty(event.getProperty())) { fMethodsViewer.refresh(); } } if (IWorkingSetManager.CHANGE_WORKING_SET_CONTENT_CHANGE.equals(property)) { updateHierarchyViewer(true); updateTitle(); } } COM: <s> method do property change </s>
funcom_train/12181088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireValidationNotification() { Object listeners [] = listenerList.getListeners(); if (listeners != null && listeners.length > 0) { for (int i = 0; i < listeners.length; i++) { ((ValidationListener) listeners[0]).validated(); } } } COM: <s> fires the validation notification to all registered listeners </s>
funcom_train/45719226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getTime() { if (time == -1L) { if (offset == -1) { return TIME_BEGIN_VALUE; } else if (offset == -2) { return TIME_END_VALUE; } else { throw new Error("The watch is not a time, no time available"); } } return time; } COM: <s> retrieve the universal time </s>
funcom_train/25205067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String readBCPL(RandomAccessR rar, int size) throws IOException { int len = rar.readByte(); StringBuilder buf = new StringBuilder(); for (int i = 0; i < size - 1; i++) { char c = Character.toUpperCase((char) rar.readByte()); if (i < len) { buf.append(c); } } return buf.toString(); } COM: <s> reads a character string from the header </s>
funcom_train/17592387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getComparisonRelations() { Collection set = new LinkedList(); addAllValues(set, equivalenceRelations); addAllValues(set, lessThanRelations); addAllValues(set, greaterThanRelations); set.addAll(mapRelations.values()); return set; } COM: <s> get all the equivalence relations </s>
funcom_train/13978130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initVideo() throws Exception, LWJGLException { video.setFullscreen(fullscreen); timestamp = System.currentTimeMillis(); video.setWindowTitle(getGamename()+" v"); video.setVersion(getGameversion()); video.createWindow(); video.createIL(); video.loadTextures(); video.initGL(); video.initVariables(false); } COM: <s> initialize the graphics processor </s>
funcom_train/28639467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { // note you don't change enabled status although you can still reset. // don't change isPrimary hits = total = sumOfSquares = lastValue = 0.0; firstAccess = lastAccess = 0; min = MIN_DOUBLE; max = MAX_DOUBLE; startHasBeenCalled = false; trackActivity = false; listeners=null; // added from mon class maxActive = totalActive = 0.0; activityStats.thisActive.setCount(0); // added from frequencydistbase allActiveTotal = primaryActiveTotal = thisActiveTotal = 0; if (range != null) range.reset(); } COM: <s> this is called from monmanage </s>
funcom_train/49064242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void error(SAXParseException exception) throws SAXException { String message = "**Parsing Error**" + LINE_SEPARATOR + " Line: " + exception.getLineNumber() + LINE_SEPARATOR + " URI: " + exception.getSystemId() + LINE_SEPARATOR + " Message: " + exception.getMessage(); throw new SAXException(message); } COM: <s> this method handles errors from the code document builder code </s>
funcom_train/5376901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void publishServiceEvent(int type, org.osgi.framework.ServiceReference reference) { if (serviceEvent != null) { final ServiceEvent event = new ServiceEvent(type, reference); if (System.getSecurityManager() == null) { publishServiceEventPrivileged(event); } else { AccessController.doPrivileged(new PrivilegedAction() { public Object run() { publishServiceEventPrivileged(event); return null; } }); } } } COM: <s> deliver a service event </s>
funcom_train/443450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAttribute(SchemaAttribute attr) { if (_name_map.containsKey(attr.getName())) { return; } String group = attr.getGroup(); if (_group_map.containsKey(group)) { Vector<SchemaAttribute> vec = _group_map.get(group); vec.add(attr); } else { Vector<SchemaAttribute> vec = new Vector<SchemaAttribute>(); vec.add(attr); _group_map.put(group, vec); _groups.add(group); } _name_map.put(attr.getName(), attr); _attributes.add(attr); } COM: <s> add an attribute </s>
funcom_train/40867169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateExpirationDate() { int expMonth = expirationMonth; // if customer did not select a month in the dropdown if(expMonth < 1){ expMonth = 1; } Calendar dt = new GregorianCalendar(expirationYear, expMonth - 1, 1); dt.set(Calendar.DAY_OF_MONTH, dt.getActualMaximum(Calendar.DAY_OF_MONTH)); this.expirationDate = dt; } COM: <s> updates the credit cards expiration date from its expiration </s>
funcom_train/42874331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int readCard32() throws Throwable { return (((byte) sin.read() << 24) & 0xff000000) | (((byte) sin.read() << 16) & 0x00ff0000) | (((byte) sin.read() << 8) & 0x0000ff00) | ((byte) sin.read() & 0x000000ff); } COM: <s> reads a 32bit card as defined by the rfb protocol </s>
funcom_train/8367476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand() { if (exitCommand == null) {//GEN-END:|18-getter|0|18-preInit // write pre-init user code here exitCommand = new Command("Beenden", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit // write post-init user code here }//GEN-BEGIN:|18-getter|2| return exitCommand; } COM: <s> returns an initiliazed instance of exit command component </s>
funcom_train/39535026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void applyXPosition(){ if(posResAttribute!=null && arrowsPanelSize!=null){ double percent=100*(xPosition-itemWidth/2)/(arrowsPanelSize.width-itemWidth); posResAttribute.setValue(format.format((int)percent)+"%"); } } COM: <s> sets the value of the offset in the attribute </s>
funcom_train/17963833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateChartProperties(JFreeChart chart) { this.titlePropertiesPanel.setTitleProperties(chart); this.legendPropertiesPanel.setLegendProperties(chart); this.plotPropertiesPanel.updatePlotProperties(chart.getPlot()); chart.setAntiAlias(getAntiAlias()); chart.setBackgroundPaint(getBackgroundPaint()); } COM: <s> updates the properties of a chart to match the properties defined on the </s>
funcom_train/36656395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPasswordProtected() { // Searches directory tree from current directory up, looking // first for AuthFileName, and if none found, then for // <directory> directive for that directory. If clear all the // way up to the document root, then there is no password protection // on the directory. if (AccessFileProtected || DirectoryProtected) { return true; } else { return false; } } COM: <s> tells if the directory specified at instatiation or with change directory </s>
funcom_train/34907954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPricinnaPravidlaPropertyDescriptor(Object object) { itemPropertyDescriptors .add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_AtribalniVyrok_pricinnaPravidla_feature"), getString("_UI_AtribalniVyrok_pricinnaPravidla_description"), GebzPackage.Literals.ATRIBALNI_VYROK__PRICINNA_PRAVIDLA, true, false, true, null, getString("_UI_SpojePropertyCategory"), null)); } COM: <s> this adds a property descriptor for the pricinna pravidla feature </s>
funcom_train/29413930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteMarker(String id, IFile resource) { Vector<IMarker> indizes = new Vector<IMarker>(); if (createdMarkers.get(id) == null) return; for (IMarker marker : createdMarkers.get(id)) try { if (marker.getResource().getLocation().toString().equals( resource.getLocation().toString())) { marker.delete(); indizes.add(marker); } } catch (CoreException e) { e.printStackTrace(); } for (IMarker marker : indizes) createdMarkers.get(id).remove(marker); } COM: <s> use this method to delete logged markers </s>
funcom_train/17773840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOptionEnabled(int option, boolean enabled){ switch (option){ case MATCH_WORD:matchWord.setVisible(enabled);break; case MATCH_CASE:matchCase.setVisible(enabled);break; case REG_EXP:regExp.setVisible(enabled);break; default: throw new IllegalArgumentException("Unknown option " + option); } } COM: <s> hides or shows an option </s>
funcom_train/48497810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TestSetDTO selectTestSet (String name) { SelectTestSetQuery query = new SelectTestSetQuery (super.getDataSource(), selectTestSetSQL, 2); List sets = query.execute(new Object[] {name}); if (sets != null && sets.size() == 1) return (TestSetDTO)sets.get(0); else return null; } COM: <s> get a testset given its name </s>
funcom_train/28200598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static final AnchorShape CIRCLE = new AnchorShape() { public boolean isLineOriented () { return false; } public int getRadius () { return 5; } public double getCutDistance () { return 9; } public void paint (Graphics2D graphics, boolean source) {graphics.drawOval(-5,-5,10,10); } }; COM: <s> circle anchor shape </s>
funcom_train/7758717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int available() throws IOException { checkState(); if (isStream) { return ris.available(); } int result = 0; // if currentMsgStream is null, then next read call will block // so we return 0 to indicate this. InputStream in = getCurrentStream(); if(in != null) { result = in.available(); } return result; } COM: <s> returns the number of bytes that can be read </s>
funcom_train/3749034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer getSettingType(final String key) { if (logger.isDebugEnabled()) { logger.debug("getSettingType(String key = " + key + ") - start"); } Integer returnInteger = (Integer) settingTypes.get(key); if (logger.isDebugEnabled()) { logger.debug("getSettingType(String) - end - return value = " + returnInteger); } return returnInteger; } COM: <s> p get the type of a setting </s>
funcom_train/11037648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AxisModule getModule(String moduleName, String moduleVersion) { if (moduleVersion == null || moduleVersion.trim().length() == 0) { moduleVersion = getDefaultModuleVersion(moduleName); } return allModules.get(Utils.getModuleName(moduleName, moduleVersion)); } COM: <s> return the module having name module name version module version </s>
funcom_train/39528670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String normalize(String mdc) throws MDCSyntaxError { // Get the representation MDCParserModelGenerator mdcParser = new MDCParserModelGenerator(); TopItemList result = mdcParser.parse(new StringReader(mdc)); normalize(result); MdCModelWriter mdCModelWriter = new MdCModelWriter(); StringWriter out = new StringWriter(); mdCModelWriter.write(out, result); return out.toString(); } COM: <s> build a normalized text representation </s>
funcom_train/40412916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onClose(CloseEvent event) { lastMoveElement = null; if (parent != null) { PopupPanel p = parent; parent = null; p.hide(); } if (active != null) { PopupPanel p = active; active = null; p.hide(); if (handlerRegistration != null) { handlerRegistration.removeHandler(); handlerRegistration = null; } } } COM: <s> our parent or active popup has been closed </s>
funcom_train/44892669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moduleDeleted(final Module module) { //Stupid Java compiler! It needs a final variable below. final Class classToShow = this.targetClass; //Avoid "Invalid thread access" exception Display.getDefault().asyncExec(new Runnable() { public void run() { if (classToShow.getModule() == module) clearHierarhy(); else showHierarchy(classToShow); } }); } COM: <s> the given module has been deleted from the model </s>
funcom_train/49873699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addMessage(String field, String messageKey, String messageTitle, Severity severity, Object... messageArgs) { FacesMessage facesMessage = new FacesMessage(); facesMessage.setSeverity(severity); facesMessage.setSummary(MessageResource.get(messageTitle, messageArgs)); facesMessage.setDetail(MessageResource.get(messageKey, messageArgs)); FacesContext.getCurrentInstance().addMessage(field, facesMessage); } COM: <s> add a message of a type into the faces context </s>
funcom_train/50532160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void HandleViewChange(View new_view, Digest digest) { Vector mbrs=new_view.GetMembers(); if(Trace.trace) Trace.info("CoordGmsImpl.HandleViewChange()", "view=" + new_view); if(leaving && !mbrs.contains(gms.local_addr)) { if(leave_promise != null) { leave_promise.SetResult(new Boolean(true)); } return; } gms.InstallView(new_view, digest); } COM: <s> called by the gms when a view is received </s>
funcom_train/1248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public byte orAt(long lax, byte val) { if (lax < blocksize) { // the simple case: one flat array return (arrvec[0][ (int)lax ] |= val); } long blockno = lax / blocksize; long eleminx = lax % blocksize; // FFS/hm: index out of range return (arrvec[(int)blockno][(int)eleminx] |= val); } COM: <s> modifies the byte at the specified large array index </s>
funcom_train/42718947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getVarValue(String varName, String line) { //if line is in the right format, return the value if(Pattern.matches("^"+varName+": *.*$", line)) { String[] varArray=line.split("^"+varName+":"); return varArray[1].trim(); } return null; } COM: <s> finds and returns the value of a key phrase variable </s>
funcom_train/29617683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJAccessionNumberField() { if (jAccessionNumberField == null) { jAccessionNumberField = new MgisTextField(); jAccessionNumberField.setFieldType(MgisTextField.FIELDTYPE_NUMERIC); jAccessionNumberField.setDocument(jAccessionNumberField.new JTextFieldLimit(4, false)); jAccessionNumberField.setBounds(197, 61, 33, 20); } return jAccessionNumberField; } COM: <s> this method initializes j collecting site number field </s>
funcom_train/35092998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getGroupID(String groupname) throws Exception{ String escapedName = escapeSQL(groupname); lrr(); try { result = resultStatement.executeQuery("SELECT id FROM groups WHERE group_name='"+escapedName+"'"); if (!result.next()) throw new Exception("Group of given name does not exist"); } finally { urr(); } return result.getLong("id"); } COM: <s> finds the first group with the given name and returns it id number </s>
funcom_train/45186870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveCurrentEntryDown() { int selectedRow = jTable.getSelectedRow(); if (selectedRow != (jTable.getRowCount() - 1)) { try { archive.moveEntryDown(selectedRow); jTable.changeSelection(selectedRow + 1, 0, false, false); } catch (IndexOutOfBoundsException e) { e.printStackTrace(); } } } COM: <s> move currently selected spectrum file down if possible </s>
funcom_train/31022377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getNewInputObject() { InputDialog dialog = new InputDialog(getShell(), "New Tomcat JVM paramater", "Enter a JVM parameter", "", null); String param = null; int dialogCode = dialog.open(); if(dialogCode == InputDialog.OK) { param = dialog.getValue(); if (param != null) { param = param.trim(); if (param.length() == 0) return null; } } return param; } COM: <s> creates and returns a new item for the list </s>
funcom_train/9185813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void genArgs(List<JCExpression> trees, List<Type> pts) { for (List<JCExpression> l = trees; l.nonEmpty(); l = l.tail) { genExpr(l.head, pts.head).load(); pts = pts.tail; } // require lists be of same length Assert.check(pts.isEmpty()); } COM: <s> derived visitor method generate code for a list of method arguments </s>
funcom_train/35607570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void performAddRecursive(Reminder reminder){ SimpleDateFormat shf = new SimpleDateFormat("HH"); SimpleDateFormat smf = new SimpleDateFormat("mm"); String hour = shf.format(reminder.getTime()); String minute = smf.format(reminder.getTime()); pnReminderTask[Integer.parseInt(hour)].addRecursiveLabel(getTaskRow(minute)); } COM: <s> add r label in current textfield to indicate its recursive task </s>
funcom_train/22945974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setListOfMethods(ArrayList methodTreePaths) { ArrayList SignalProcessingMethods = new ArrayList(); for (int i = 0; i < methodTreePaths.size(); i++) if (methodTreePaths.get(i).toString().contains("Signal processing")) SignalProcessingMethods.add(methodTreePaths.get(i)); super.setListOfMethods(SignalProcessingMethods); } COM: <s> implementation of method inherited from preprocessing panel skeleton </s>
funcom_train/11730618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void evictItems(ItemId id) { if (log.isDebugEnabled()) { log.debug("removing items " + id + " from cache"); } synchronized (itemCache) { itemCache.remove(id); if (id.denotesNode()) { shareableNodesCache.evictAll((NodeId) id); } } } COM: <s> removes all cache entries with the given item id </s>
funcom_train/36821342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getPath(String goal, boolean cancel) { if (nodeExists(goal) && !cancel) { globalBestNode = null; localBestNode = null; localDist = Double.MAX_VALUE; globalDist = Double.MAX_VALUE; velocity = new int[2]; targetNode = robot.getArena().nodeMap.get(goal); if (targetNode != null) { targetExists = true; } } } COM: <s> initializes the variables necessary for calculation of velocity </s>
funcom_train/4363708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getInterned (String key) { Entry tab[] = table; int hash = key.hashCode(); int index = (hash & 0x7FFFFFFF) % tab.length; for (Entry e = tab[index] ; e != null ; e = e.next) { if ((e.hash == hash) && (e.key == key)) return e.value; } return null; } COM: <s> returns the value to which the specified key is mapped in this hashtable </s>
funcom_train/11731337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { synchronized (this) { running = true; } try { if (stopRequested) { // immediately return when stop is requested return; } initializeParents(reader); } catch (Exception e) { // only log warn message during regular operation if (!stopRequested) { log.warn("Error initializing parents cache.", e); } } finally { synchronized (this) { running = false; notifyAll(); } } } COM: <s> initializes the cache </s>
funcom_train/11009857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHeight(short height) { if (height == -1) { if (_row.isSetHt()) _row.unsetHt(); if (_row.isSetCustomHeight()) _row.unsetCustomHeight(); } else { _row.setHt((double) height / 20); _row.setCustomHeight(true); } } COM: <s> set the height in twips or 1 20th of a point </s>
funcom_train/5457870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePeer(String name) { if (peers.get(name) != null) { Peer peer = (Peer) peers.get(name); try { peer.getOutputStream().close(); peer.getInputStream().close(); } catch (IOException ex) { System.out.println("Log exception (doesn't matter)"); } } peers.remove(name); } COM: <s> removes a code peer code of the given identity from the session </s>
funcom_train/46337199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetReTryableErrorCodes() { System.out.println("getReTryableErrorCodes"); Set<Integer> result = OpbSqlHelper.getReTryableErrorCodes(); assertEquals(2, result.size()); assertTrue(result.contains(4061)); assertTrue(result.contains(4068)); } COM: <s> test of get re tryable error codes method of class com </s>
funcom_train/18847355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createServiceGroundingNotFoundException(String tscToken, String groundingID) { PropertyMap propertyMap = new PropertyMap(); DiagnosticsListCreator edg; edg = new DiagnosticsListCreator(); String severityType = DiagnosticsCodes.getErrorDiagnosticsCode(); String exceptionID = "80212"; propertyMap.addPropertyValuePair("groundingID", groundingID); String serExMsg = edg.constructErrorDocOneItemParam(tscToken, componentID, severityType, subSystemCode, exceptionID, propertyMap); return serExMsg; } COM: <s> construct service grounding not found exception message </s>
funcom_train/47897416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SimpleDataObject getDataObject(int x){ try{ if(this.getNumRows()>=x){ JSONDataObject dbj = new JSONDataObject(delegate.getJSONArray(x)); this.initNode(x,dbj); return dbj; } }catch(Exception e){ Logger.logErr("JSONDataObject init error.",e); } return null; } COM: <s> get a new data object from this </s>
funcom_train/5362440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(KeyObject key) { if (key instanceof IntegerKey) { long comp = m_key - ((IntegerKey) key).m_key; if (comp == 0) { return KEY_EQUAL; } else if (comp < 0) { return KEY_LESS; } else { return KEY_MORE; } } else { return KEY_ERROR; } } COM: <s> compares the invoking code integer key code to code key code </s>
funcom_train/598440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean hasMagic() { if (buffer[offset + 4] == zrtpMagic[0] && buffer[offset + 5] == zrtpMagic[1] && buffer[offset + 6] == zrtpMagic[2] && buffer[offset + 7] == zrtpMagic[3]) { return true; } return false; } COM: <s> check if it is really a zrtp packet </s>
funcom_train/7980016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean useWakeUpTimeSlot(){ for(int i=0 ; i < valence ; i++){ if(wakeUpTime[i]>-1 && wakeUpTime[i]<=System.currentTimeMillis()){ wakeUpTime[i]=-1; return true; } } reorder(); return false; } COM: <s> a new uri is being issued </s>
funcom_train/11658508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() throws ServletException { super.init(); Log log = LogFactory.getLog(ExampleServlet.class); servletName = getServletConfig().getServletName(); if (log.isInfoEnabled()) { log.info("Initializing chain example servlet '" + servletName + "'"); } } COM: <s> p cache the name of the servlet </s>
funcom_train/46997216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getEdtHeight() { if (edtHeight == null) { edtHeight = new JTextField(); edtHeight.setBounds(new Rectangle(240, 20, 60, 22)); edtHeight.setVisible(false); edtHeight.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent e) { //Only allow numbers if (e.getKeyChar()>':'||e.getKeyChar()<'/'){ e.consume(); } } }); } return edtHeight; } COM: <s> this method initializes edt height </s>
funcom_train/41178824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deletetype(AnalysisType anatype) { // Bouml preserved body begin 0002290C boolean trouve = false; for (int i = 0; i < listOfBatch.size(); i++) { if (anatype.equals(listOfBatch.get(i).getTypeOfAnalysis())) { trouve = true; listOfBatch.remove(i); } } return trouve; // Bouml preserved body end 0002290C } COM: <s> delete a type of analysis and the associated batch </s>
funcom_train/4780375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String cloneUser(Document document, String userName, String cloneName) throws AppException, AppException { if (userName == null) { throw new AppException("application.error.userrequired"); } if (cloneName == null) { throw new AppException("application.error.clonerequired"); } User user = document.findUser(userName); if (user == null) { throw new AppException("application.error.unabletofinduser", userName); } document.cloneUser(user, cloneName); return new FileGenerator(document).generate(true); } COM: <s> clone existing user </s>
funcom_train/29919466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void eraseDatabase() throws CommandException { new MessageHandler("edt").execute(); String[] sqlTemp = { "", "" }; GUIFactory.getInstance().getWriteableBox().executeAction("updatevalues", sqlTemp); refreshDetails(sqlTemp); GUIFactory.getInstance().getWriteableTable().executeAction("reset", null); } COM: <s> send command to erase data in database </s>
funcom_train/4124513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canSaveCurrentGame(){ if (getFreeColServer() == null) { return false; } else if (getMyPlayer() == null) { return false; } else if (getFreeColServer().getGameState() == GameState.IN_GAME && !getMyPlayer().isAdmin()) { return false; } return true; } COM: <s> verifies if this client can save the current game </s>
funcom_train/37037578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open(MsgContext ep) throws IOException { // Will associate a jk_endpoint with ep and call open() on it. // jk_channel_un will accept a connection and set the socket info // in the endpoint. MsgContext will represent an active connection. super.nativeDispatch( ep.getMsg(0), ep, CH_OPEN, 1 ); } COM: <s> open a connection since were listening that will block in </s>
funcom_train/31251026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ArrayList getDbIdList(Properties props) { ArrayList idList = new ArrayList(); Enumeration keys = props.propertyNames(); String dbId; while (keys.hasMoreElements()) { String key = (String)keys.nextElement(); if (key.startsWith("app.db.id.")) { dbId = key.substring("app.db.id.".length()); idList.add(dbId); } } return idList; } COM: <s> gets the property files representation of a </s>
funcom_train/14359718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Configuration getConfiguration(String name) throws ConfigurationException { Iterator it = configs.iterator(); while (it.hasNext()) { Configuration c = (Configuration) it.next(); if (c.getName().equalsIgnoreCase(name)) { return c; } } // We haven't found the configuration, return null. throw new ConfigurationException("Could not find a configuration with the name " + name); } COM: <s> get the configuration with a given name </s>
funcom_train/12563020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean waitForUser() { boolean temp; synchronized (this) { try { this.wait(); } catch (InterruptedException ie) { if (Logging.REPORT_LEVEL <= Logging.WARNING) { Logging.report(Logging.WARNING, LogChannels.LC_AMS, "wait threw an InterruptedException"); } } } installState = null; temp = continueInstall; continueInstall = false; return temp; } COM: <s> wait for the user to respond to current dialog </s>
funcom_train/16300772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFireItemCommand() { convenienceFireItemCommand(new StringItemWrapper("item", "text")); convenienceFireItemCommand( new DateFieldWrapper("label", DateField.DATE_TIME)); convenienceFireItemCommand( new TextFieldWrapper("label", "", 12, TextField.PASSWORD)); } COM: <s> p this test sequentially creates different item wrapper and tries to fire </s>
funcom_train/9712474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SubmissionEndpointReferenceBuilder referenceProperty(Element referenceProperty) { if (referenceProperty == null) { throw new IllegalArgumentException(Messages.getMessage("referencePropertyNullErr")); } if (this.referenceParameters == null) { this.referenceParameters = new ArrayList<Element>(); } this.referenceParameters.add(referenceProperty); return this; } COM: <s> add reference properties </s>
funcom_train/50151030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFlowOut(String c) { flowOut="None"; if (c!=null) { if (c.compareToIgnoreCase("RTS/CTS Out")==0) flowOut="RTS/CTS Out"; if (c.compareToIgnoreCase("Xon/Xoff Out")==0) flowOut="Xon/Xoff Out"; } } COM: <s> set control flow out </s>
funcom_train/21017815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isTextLineHit(IEditManager locator, IMouseEvent event) { boolean result = false; ElementPath path = locator.getElementAt(event.getX(), event.getY(), 1); if (path != null) { result = path.findSubPath(Line.TYPE, true) != null; } return result; } COM: <s> checks whether a text line is hit </s>
funcom_train/50080082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getHydrogenCount(Connection dbconn) throws Exception { int hcount = 0; Vector v = getConnectedAtoms(dbconn); for (int i = 0; i < v.size(); i++) { if (((DBAtom) v.get(i)).getSymbol().equals("H")) { hcount++; } } return (hcount); } COM: <s> gets the nubmer of hydrogens connected to the dbatom </s>
funcom_train/49421079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getCommandTextField() { if (commandTextField == null) { commandTextField = new JTextField(); commandTextField.setFont(new java.awt.Font("Courier New", java.awt.Font.PLAIN, 12)); } return commandTextField; } COM: <s> this method initializes command text field </s>
funcom_train/46436051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected XComponent getActivitySet() { if (activitySet == null) { activitySet = new XComponent(XComponent.DATA_SET); XComponent form = data_set.getForm(); if (form != null) { activitySet = form.findComponent(ACTIVITY_SET); } } return activitySet; } COM: <s> gets the activity choice set </s>
funcom_train/16758438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getBody2DivGoodFormat(String htmlStr){ htmlStr = getGoodFormatContent(htmlStr); String []tags = {"style", "script", "head"}; htmlStr = removeTagsAndContent(tags, htmlStr); String []tags2 = {"html"}; htmlStr = removeTags(tags2, htmlStr); htmlStr = htmlStr.replaceAll("<body", "<div").replaceAll("</body>", "</div>"); return htmlStr; } COM: <s> body body div </s>
funcom_train/28262062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() { // Push extra register first, if 32 bit instruction if (cpu.doubleWord) { logger.log(Level.WARNING, "[" + cpu.getType() + "] Instruction PUSH_ES: 32-bits not supported"); } // Get word at ES and assign to SS:SP cpu.setWordToStack(cpu.es); } COM: <s> this pushes the word in es onto stack top ss sp </s>
funcom_train/35273201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close(){ try { if (skt != null){ skt.close(); is = null; ois = null; os = null; oos = null; }//if }//try catch (Exception e){ System.out.println("NwClient.close():\n" + e.getMessage()); }//catch }//close() COM: <s> close the current connection socket to the server </s>
funcom_train/14092824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFailFromAnotherThread() { Thread th = new Thread(new Runnable() { public void run() { try { fail("This fails from another thread"); } catch (Throwable throwable) { setError(throwable); } m_done = true; } }, "Fail from this thread."); th.start(); while (!m_done) { sleep(25); } } COM: <s> test failing from another thread </s>
funcom_train/29567554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Method resolveMethod(Class clazz, String methodName) { Method m = null; try { m = clazz.getMethod(methodName,new Class[] { }); } catch(NoSuchMethodException e) { throw new JavalidException("Failed finding method=" + methodName + " for class=" + clazz.getName()); } return m; } COM: <s> resolves single method from given class </s>
funcom_train/28956118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void completeRun() { DotplotContext context = ContextFactory.getContext(); // DotplotCreator dp = new DotplotCreator(); IDotplot plot; context.setSourceList(testFileList); try { context.executeJob("org.dotplot.jobs.PlotterJob"); plot = context.getCurrentDotplot(); plot.getImage(ImageData.class); } catch (TokenizerException te) { te.printStackTrace(); } catch (UnknownIDException e) { e.printStackTrace(); } } COM: <s> code complete run code builds a dotplot from provided files </s>
funcom_train/14455647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void requiresHelp() { if (clas.isAnnotationPresent(HelpFlag.class)) { HelpFlag help = (HelpFlag)clas.getAnnotation(HelpFlag.class); if (list.contains(help.value())) { JClipProperties.getHelp().help(object); System.exit(0); } } } COM: <s> is the caller just looking for help </s>
funcom_train/40377452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finalizeRect(MapPane pane, MapImagePane imgPane){ tiley=0; tilex=0; for(int i = 0;i<rect.height;i++){ for(int j = 0;j<rect.width;j++){ pane.currentLayer[rect.y+i][rect.x+j]=imgPane.selectedTiles[tiley][tilex]; tilex=tilex+1<imgPane.selectedTiles[0].length?tilex+1:0; } tilex=0; tiley=tiley+1<imgPane.selectedTiles.length?tiley+1:0; } pane.rectStart=null; rect.setFrame(0,0,0,0); } COM: <s> places the current rectangle values into the current layer </s>
funcom_train/40361452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean gsaAdminRequiresPrefix() { initApplicationContext(); if (gsaAdminRequiresPrefix == null) { String prop = getProperty( GSA_ADMIN_REQUIRES_PREFIX_KEY, GSA_ADMIN_REQUIRES_PREFIX_DEFAULT.toString()); gsaAdminRequiresPrefix = Boolean.valueOf(prop); } return gsaAdminRequiresPrefix; } COM: <s> whether or not the gsa requires the connector manager to prepend a </s>
funcom_train/43646013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaxLength(){ if(dataSets == null){ return 0; } int len = 0; Iterator<double[]> it = dataSets.values().iterator(); double[] dataset; while(it.hasNext()){ dataset = it.next(); if(dataset.length > len){ len = dataset.length; } } return len; } COM: <s> returns the length of the longest data set </s>
funcom_train/51386749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node addNode( String id, String label ) throws TGException { Node node; if (label==null) node = nodeFactory.createNode(id); else node = nodeFactory.createNode(id, label); updateDrawPos(node); // The addNode() call should probably take a position, this just sets it at 0,0 addNode(node); return node; } COM: <s> adds a node provided its id and label </s>
funcom_train/33606730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAllComponents() { System.out.println("getAllComponents"); ArrayList<Integer> vertices=new ArrayList<Integer>(); for(GraphE g:instance.getAllComponents()){vertices.add(g.getNumVertices());} assertEquals("[0, 8, 1, 2]",vertices.toString()); } COM: <s> test of get all components method of class scio </s>
funcom_train/7655996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { try { byte[] encoded = getEncoded(); int hash = 0; for (int i=0; i<encoded.length; i++) { hash += i*encoded[i]; } return hash; } catch (CertificateEncodingException e) { throw new RuntimeException(e); } } COM: <s> returns an integer hash code for the certificate </s>
funcom_train/22429382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnDisableAll() { if (btnDisableAll == null) { btnDisableAll = new JButton(); btnDisableAll.setText("Disable All"); btnDisableAll.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { getAllCategoryTableModel().setAllCategoryEnabled(false); } }); } return btnDisableAll; } COM: <s> this method initializes btn disable all </s>
funcom_train/29655374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double calculateAngle(double speed, int timeStep) { if (!xIndex.hasPrev()) { predictPrevious(speed, timeStep); } if (!yIndex.hasPrev()) { predictPrevious(speed, timeStep); } return Transition.calculateRadianAngle(x - xIndex.getPrev(), y - yIndex.getPrev()); } COM: <s> calculates angle of moving according to previous and current position </s>
funcom_train/44694909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void curvetoCubicRel(float x1, float y1, float x2, float y2, float x, float y) { posX += x; posY += y; emit("c" + x1 + " " + y1 + " " +x2 + " " + y2 + " "+ x + " " + y); last = OTHER; } COM: <s> invoked when a relative cubic bezier curve command has been parsed </s>
funcom_train/50339148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean confirmPaneChanges() { if (log.isDebugEnabled()) log.debug("confirmPane starts with " +varList.size()+" vars, " +cvList.size()+" cvs " +indexedCvList.size()+" indexed cvs" ); prepConfirmPane(true); return nextConfirm(); } COM: <s> invoked by compare changes on sheet button this sets in motion a </s>
funcom_train/9851547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String removeHtmlTags(String text){ text = Pattern.compile("<(.*?)>",Pattern.MULTILINE | Pattern.DOTALL).matcher(text).replaceAll(""); text = text.replaceAll("&nbsp;", ""); text = text.replaceAll("&lt;", ""); text = text.replaceAll("&gt;", ""); return text; } COM: <s> remove html tags from message </s>
funcom_train/39103990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sortInsert(String s[], String match_pattern) { if (s == null) { return; } for (int i = 0; i < s.length; ++i) { if (XString.match(match_pattern, s[i])) { sortInsert(s[i]); } } } COM: <s> alphabetically insert s elements into this only if the match the pattern </s>
funcom_train/36994534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Interval merge(final Interval otherInt) { if (!canMergeWith(otherInt)) { throw new IllegalArgumentException("These Intervals cannot be merged"); } final int min = Math.min(getMin(), otherInt.getMin()); final int max = Math.max(getMax(), otherInt.getMax()); return new Interval(min, max); } COM: <s> returns the code interval code that results from merging this one </s>