__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/21611639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testString() throws InterpreterException { checkResult( "klmno" , interpreter.process("SubString('abcdefghijklmnopqrstuvwxyz', 10, 15);") ); checkResult( 10 , interpreter.process("SIndexOf('abcdefghijklmnopqrstuvwxyz', 'k');" ) ); } COM: <s> tests the string support </s>
funcom_train/24503721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeCumulativeBand(File cumFreqFile, int band) { try { FileWriter writer = new FileWriter(cumFreqFile); for (int i = 0; i < 256; i++) writer.write(Long.toString(cumulativeBins[band][i]) + "\r\n"); writer.flush(); writer.close(); } catch (java.io.IOException e) { System.err.println(e); } } COM: <s> write cumulative frequencies for a given colour band </s>
funcom_train/3411123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getCenterPoint() throws HeadlessException { // Default implementation: return the center of the usable bounds of the // default screen device. Rectangle usableBounds = SunGraphicsEnvironment.getUsableBounds(getDefaultScreenDevice()); return new Point((usableBounds.width / 2) + usableBounds.x, (usableBounds.height / 2) + usableBounds.y); } COM: <s> returns the point where windows should be centered </s>
funcom_train/25048926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PersonalTenderStatus getTenderStatus() { Resource resource = getResourceModel().getObject(); ResourceTender userTender = resourceInformant.getUserTender(resource, authorizedUserService.getCurrentUserId()); if(userTender != null) { return userTender.getAcceptDate() != null ? PersonalTenderStatus.APPROVED : PersonalTenderStatus.WAITING; } return PersonalTenderStatus.UNSAVED; } COM: <s> returns status of the tender </s>
funcom_train/33839253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(int pos, Object key, Object reference) { if (keyed.containsKey(key)) { int oldPos = ordered.indexOf(key); removeKey(key); if (oldPos < pos) { pos -= 1; } } keyed.put(key, reference); if (pos >= ordered.size()) { ordered.add(key); } else { ordered.add(pos, key); } return true; } COM: <s> add an element to the list </s>
funcom_train/33125252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int get_qscale() { int qscale; if (mpeg2) { if (q_scale_type) { qscale = non_linear_qscale[in.getBits(5)]; } else { qscale = in.getBits(5) << 1; } } else { /* for mpeg1, we use the generic unquant code */ qscale = in.getBits(5); } return qscale; } COM: <s> read the quantization scale </s>
funcom_train/22232691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPlane(int planeNum, Vector4d plane) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_PLANE_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("ModelClip2")); if (isLive()) ((ModelClipRetained)this.retained).setPlane(planeNum, plane); else ((ModelClipRetained)this.retained).initPlane(planeNum, plane); } COM: <s> sets the specified clipping plane of this model clip node </s>
funcom_train/4528809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValidToCreate(String src) { String srcs = normalizePath(src); synchronized (rootDir) { if (srcs.startsWith("/") && !srcs.endsWith("/") && rootDir.getNode(srcs) == null) { return true; } else { return false; } } } COM: <s> check whether the filepath could be created </s>
funcom_train/41594799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRowspanPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_StrucDocTd_rowspan_feature"), getString("_UI_PropertyDescriptor_description", "_UI_StrucDocTd_rowspan_feature", "_UI_StrucDocTd_type"), V3Package.eINSTANCE.getStrucDocTd_Rowspan(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the rowspan feature </s>
funcom_train/24934503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public I_DirectedLine rotateInQuadrant(final double rotationAngle) { final double length = calculateLength(); final double deltaX = Math.cos(Math.toRadians(rotationAngle)) * length; final double deltaY = Math.sin(Math.toRadians(rotationAngle)) * length; return doCreateDirectedLine(sourceX, sourceY, sourceX + deltaX, sourceY + deltaY); } COM: <s> rotates the line counter clockwise by the given rotation </s>
funcom_train/21020685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkBoxesChanged() { double currState=0; if (newAttrib != null) { for(int i=0; i<newAttrib.length; i++) { if (newAttrib[i].isSelected()) currState=currState + Math.pow(2, i); System.out.println(currState); } } return (currState!=attribChangeCheckSum); } COM: <s> the method notice if the chebox is change </s>
funcom_train/18898509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList createExclusionList() { // Create a file which represents the filesystem to exclude File fileSystem = new File(System.getProperty("java.io.tmpdir") + File.separator + "filesystem" + File.separator + "mp3"); // Create a list for the exclusion files ArrayList excludeList = new ArrayList(); // Add the file to the list excludeList.add(fileSystem); return excludeList; } COM: <s> creates a list of files to exclude </s>
funcom_train/29680317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void serverConnectionClosing(ServerConnection scon) { for (Iterator iter = openFiles.iterator(); iter.hasNext();) { OpenFile element = (OpenFile) iter.next(); if (element.getRemoteFile().getServerConnection().equals(scon)) { iter.remove(); } } } COM: <s> removes from the synchronizer all the open files from the given server connection </s>
funcom_train/36854283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static private int getLineCount( Document d ) { Element map = d.getDefaultRootElement(); int n = map.getElementCount(); Element lastLine = map.getElement( n - 1 ); if ( ( lastLine.getEndOffset() - lastLine.getStartOffset() ) <= 1 ) { n--; } return n; } COM: <s> retrieve the number of lines contained with in the specified document </s>
funcom_train/41033423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case GlobalPackage.GLOBAL_SETTING: return createGlobalSetting(); case GlobalPackage.SERVERS: return createServers(); case GlobalPackage.ROBOT: return createRobot(); case GlobalPackage.ROBOTS: return createRobots(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } COM: <s> begin user doc </s>
funcom_train/4515170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2 = (Graphics2D) g; g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); parts.paintComponent(g); if (msg != null && layout != null) { g2.drawString(msg.getIterator(), 0, (int) (parts.getSize().height + layout.getDescent() + MARGIN)); } } COM: <s> draws this clock </s>
funcom_train/15673893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Text buildNameText(Composite parent) { Text text = new Text(parent, SWT.SINGLE | SWT.BORDER); if (mode == MODE_ADD) { text.setFocus(); } if (mode == MODE_EDIT) { text.setText(config.getAppName()); text.setEnabled(false); } if (mode == MODE_VIEW) { text.setEditable(false); // text.setText(editedRule.getName()); } return text; } COM: <s> build the rule name text </s>
funcom_train/15475740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isHubLocationPresent() { String hubIP = System.getProperty(CaTIES_Constants.PROPERTY_KEY_HUB_IP); String hubPort = System.getProperty(CaTIES_Constants.PROPERTY_KEY_HUB_PORT); String hubLocation = ClientConfiguration.buildHubLocation(hubIP, hubPort); URL hubURL = null; try { hubURL = new URL(hubLocation); } catch (MalformedURLException e) { e.printStackTrace(); return false; } return (hubLocation != null && hubURL!=null); } COM: <s> tests to see if the constants </s>
funcom_train/11514677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public E previous() { if (list.isEmpty()) { throw new NoSuchElementException( "There are no elements for this iterator to loop on"); } if (iterator.hasPrevious() == false) { E result = null; while (iterator.hasNext()) { result = iterator.next(); } iterator.previous(); return result; } return iterator.previous(); } COM: <s> returns the previous object in the list </s>
funcom_train/24087389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String goToExperimentFromDataBrowser(){ if(getBrowseDataRememberedStageId()!=-1){ if(getBrowseDataRememberedStageId()==2){ return goToStage2(); } if(getBrowseDataRememberedStageId()==6){ return goToStage6(); } } //the default value is design experiment return goToStage2(); } COM: <s> coming from the data browser decide where to go within the experiment </s>
funcom_train/43768604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int update(Connection conn, String sql) throws SQLException { Statement stmt = null; int rows = 0; try { stmt = conn.createStatement(); verboseQuery(sql, (Object[]) null); rows = stmt.executeUpdate(sql); } catch (SQLException e) { rethrow(e, sql, (Object[]) null); } finally { close(stmt); } return rows; } COM: <s> execute an sql insert update or delete query without replacement </s>
funcom_train/14330191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHandler(Handler handler) { synchronized ( handlerMutex ) { Handler[] newHandlers = new Handler[handlers.length + 1]; if ( handlers.length > 0 ) System.arraycopy(handlers, 0, newHandlers, 0, handlers.length); newHandlers[newHandlers.length-1] = handler; handlers = newHandlers; } println("Handler: " + handler.getClass().getName()); } COM: <s> add handler adds a handler to the broker </s>
funcom_train/48561069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand1() { if (backCommand1 == null) {//GEN-END:|395-getter|0|395-preInit // write pre-init user code here backCommand1 = new Command("\u041D\u0430\u0437\u0430\u0434", Command.BACK, 0);//GEN-LINE:|395-getter|1|395-postInit // write post-init user code here }//GEN-BEGIN:|395-getter|2| return backCommand1; } COM: <s> returns an initiliazed instance of back command1 component </s>
funcom_train/12810311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String convertCIDs(String text) { char cid[] = text.toCharArray(); for (int k = 0; k < cid.length; ++k) { char c = cid[k]; if (c == '\n') cid[k] = '\uff00'; else cid[k] = (char) (c - ' ' + 8720); } return new String(cid); } COM: <s> converts the cids of the horizontal characters of a string </s>
funcom_train/25420856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGroupDynamicMembersAttribute(String attribute){ attribute = Val.chkStr(attribute); if ((attribute.length() > 0) && !attribute.equalsIgnoreCase("none") && !attribute.equalsIgnoreCase("n/a")) { _groupDynamicMembersAttribute = attribute; } else { _groupDynamicMembersAttribute = ""; } } COM: <s> sets the attribute used to dynamically determine the members of a group </s>
funcom_train/48661604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Track getTrack(String handle) throws ITunesUException { String xml = this.showTree(handle); String pattern = "//Track[Handle=" + handle + "]"; Element element = getElementByXPath(xml, pattern); if (element == null) { throw new ITunesUException("not a Track handle"); } return Track.fromXmlElement(element); } COM: <s> retrieves a track by its handle </s>
funcom_train/26143604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { antTarget = (Ant) getProject().createTask("ant"); antTarget.setOwningTarget(super.getOwningTarget()); antTarget.setTaskName(getTaskName()); antTarget.setLocation(getLocation()); antTarget.init(); } COM: <s> initializes the ant target that we will be calling during the loops </s>
funcom_train/23991738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeDataRelationship(OWLNamedIndividual ind, String data, String relation, OWLOntology ont) { OWLDataProperty relProperty = this.getDataPropertyByName(relation, ont); PropertyAxiomCollector col = new PropertyAxiomCollector(); col.registerPropertyExpression(relProperty, data); col.collectPropertyAxioms(ind, ont); col.deleteCollectedPropertyAxioms(manager, ont); } COM: <s> removes data axiom for a specific individual and property </s>
funcom_train/21343885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void onActivityResult(int requestCode, int resultCode, Intent data){ // See which child activity is calling us back. switch (requestCode) { case OPTIONS: if(DEBUG) System.out.println("Options sent result back."); //interval.update(profile.getOpts()); break; default: System.out.println("Error on activity result"); break; } } COM: <s> listen for activity result </s>
funcom_train/10003932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeGeometry() { GeometryInfo ga = new GeometryInfo(GeometryInfo.POLYGON_ARRAY); ga.setCoordinates(vertices); ga.setContourCounts(contourCounts); ga.setStripCounts(stripCounts); ga.setCoordinateIndices(indices); ga.setColors(colors); ga.setColorIndices(colorIndices); ga.setTextureCoordinates(texPoints); ga.setTextureCoordinateIndices(texIndices); new NormalGenerator().generateNormals(ga); setGeometry(ga.getGeometryArray()); } COM: <s> rebuilds the shape using the current coordinates and colors </s>
funcom_train/3947404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setToTranslation(double mx, double my) { m00 = m11 = 1.0; m01 = m10 = 0.0; m02 = mx; m12 = my; if (mx == 0.0 && my == 0.0) { type = TYPE_IDENTITY; } else { type = TYPE_TRANSLATION; } } COM: <s> sets the transformation to a translation alone </s>
funcom_train/1128578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void populatePropertyFromContent(String qName, StringBuffer content, IXMLFormatter formatter) { NodeMapping mapping = (NodeMapping)_propertyMappings.get(qName); if (mapping.hasPropertyMapping()) { String value = content.toString(); mapping.getPropertyContentMapping().setPropertyValueAsString(_createdObject, value, formatter); } } COM: <s> default is to use introspection to populate the property but you can override </s>
funcom_train/21291151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void log(Level level, Object message, Throwable exception) { if (logger == null) return; if (message == null) return; switch (level) { case DEBUG: logger.debug(message, exception); break; case ERROR: logger.error(message, exception); break; case FATAL: logger.fatal(message, exception); break; case INFO: logger.info(message, exception); break; case WARN: logger.warn(message, exception); break; default: // Will be treated as info by default logger.info(message, exception); break; } } COM: <s> logs the message of the priority i level i with stacktrace </s>
funcom_train/7661611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLastIndexOf1() { CopyOnWriteArrayList full = populatedArray(3); full.add(one); full.add(three); assertEquals(3, full.lastIndexOf(one)); assertEquals(-1, full.lastIndexOf(six)); } COM: <s> last index of returns the index for the given object </s>
funcom_train/10790445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Index findIndex(Table dbTable, Index idx) { Index[] idxs = dbTable.getIndexes(); for (int i = 0; i < idxs.length; i++) if (idx.columnsMatch(idxs[i].getColumns())) return idxs[i]; return null; } COM: <s> find an index in the given table that matches the given one </s>
funcom_train/47615991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanel getPanel() { if (panel == null) { panel = new JPanel(); panel.setLayout(new GroupLayout()); panel.add(getModePanel(), new Constraints(new Leading(6, 12, 12), new Leading(10, 12, 12))); panel.add(getParametersPanel(), new Constraints(new Leading(6, 12, 12), new Leading(110, 12, 12))); } return panel; } COM: <s> creates the panel of this tab </s>
funcom_train/8311148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void purgeFolder(String name) throws Exception { Folder folder = store.getFolder(name); folder.open(Folder.READ_WRITE); try { Folder trash = store.getFolder("[Gmail]/Trash"); folder.copyMessages(folder.getMessages(), trash); } finally { folder.close(true); } } COM: <s> removes all mails stored in the given folder to the trash one </s>
funcom_train/41020265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int findCardName(String name, String filteredSet, CardBeanList list) { for (int i = 0; i < list.size(); i++) if (list.get(i).getName().equals(name) && !list.get(i).getSetName().equals(filteredSet)) return i; return -1; } COM: <s> find card that doesnt in filtered set </s>
funcom_train/1683828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exitGame(){ if( JOptionPane.OK_OPTION == JOptionPane.showConfirmDialog(this, "Do you really want to exit the game?", "Exit the game?", JOptionPane.YES_NO_OPTION) ){ if(loggedIn){ ControllerForWindowsOutsideGame.getInstance().sendLogout(); } System.exit(0); } } COM: <s> shows message dialog for exiting the game </s>
funcom_train/27899828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void callHandler(String cmd) throws Exception { ContextHandler handler = (ContextHandler)findMap(context).get(cmd); if ( handler == null ) { handler = DefaultDefiner.defaultCommandHandler(cmd, context); } if ( handler != null ) { handler.handle(); } else { throw new NoHandlerException("No handler found for: "+cmd); } } COM: <s> calling call handler allows a handle method to run </s>
funcom_train/3986474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float bezierPoint(float a, float b, float c, float d, float t) { float t1 = 1.0f - t; return a*t1*t1*t1 + 3*b*t*t1*t1 + 3*c*t*t*t1 + d*t*t*t; } COM: <s> evalutes quadratic bezier at point t for points a b c d </s>
funcom_train/24187711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStrategyE() { U utility = module.getCurrentUtility(variable); if( comparison < 0) { assertEquals(initialValue, value); } else if(comparison > 0) { assertEquals(optimal, utility); } else { // either the value has not changed, or the optimal value has been chosen assertTrue(initialValue.equals(value) || optimal.equals(utility)); } } COM: <s> test the strategy e </s>
funcom_train/11754553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExecuteAsyncWithNonExistingApplication() throws Exception { CommandLine cl = new CommandLine(nonExistingTestScript); DefaultExecuteResultHandler handler = new DefaultExecuteResultHandler(); exec.execute(cl, handler); Thread.sleep(2000); assertNotNull(handler.getException()); assertTrue(exec.isFailure(handler.getExitValue())); } COM: <s> try to start an non existing application asynchronously which should result </s>
funcom_train/64803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point belongsToCell(int col, int row) { if (getSortState() == KTableSortComparator.SORT_NONE) return doBelongsToCell(col, row); // if sorting is active, all cells get rendered seperately! return new Point(col, row); } COM: <s> sorting disables all cell spanning </s>
funcom_train/22031001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void killServer() { // set flag to cause server's threads to stop running alive = false; // shut down all client sockets synchronized (sockets) { while (sockets.size() > 0) killSocket(0); } // shut down server socket try { socket.close(); } catch (IOException exc) { } } COM: <s> destroys this server and kills all associated threads </s>
funcom_train/17539910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { logger.trace(String.format("Starting thread %s", getClass())); while (true) { try { strategy(); } catch (InterruptedException ex) { // break because interrupted flag cleared when exception // occurs break; } } logger.trace(String.format("Exiting thread %s", getClass())); } COM: <s> worker method of thread repeats indefinitely until interrupted by a call </s>
funcom_train/44840074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() throws IOException { _stop = true; //wait a bit for it to finish try { Thread.sleep(STOP_TIME); } catch (InterruptedException ie) { } if (_queueFile != null) saveQueue(); if (_blacklistFile != null) saveBlacklist(); _logger.info("Scutter stopped."); } COM: <s> stop the scutter </s>
funcom_train/9644842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List getLevelNodes(Component thisComp, MultiLevelList list) { for (Iterator iter = list.getLevels().iterator(); iter.hasNext();) { List levelComps = (List) iter.next(); if (levelComps.contains(thisComp)) { return levelComps; } } throw new IllegalArgumentException("no level this this component found"); } COM: <s> gets the level nodes </s>
funcom_train/37023634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JdbcType getColumnJdbcType(int columnIndex, Class requiredType) { JdbcType jdbcType = JdbcType.getInstance(getColumnType(columnIndex)); if (jdbcType == null) { jdbcType = JdbcType.getInstance(requiredType); } if (jdbcType != null) { return jdbcType; } String msg = "Unknown JDBC type: " + getColumnTypeName(columnIndex) + ". Cannot find suitable type for " + requiredType.toString(); throw new ConfigurationException(msg); } COM: <s> get column jdbc type </s>
funcom_train/22027688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString( ) { return "fp=" + filePosition + ", bs=" + bufferStart + ", de=" + dataEnd + ", ds=" + dataSize + ", bl=" + buffer.length + ", m=" + mode + ", bm=" + bufferModified; } COM: <s> create a string representation of this object </s>
funcom_train/18570088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCanMockVoidMethodWithPrimitiveArgs() { int i = 5; boolean b = true; float f = 5.5f; sampleCollaborator.voidMethodWithPrimitiveArgs(i, b, f); vm.playbackCalls(); sample.callVoidMethodWithPrimitiveArgs(i, b, f); vm.verify(); } COM: <s> tests the mocking of a void method call with primitive args </s>
funcom_train/34642345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float getMotionAngleDelta(float motionAngle,float previousMotionAngle) { float delta = motionAngle - previousMotionAngle; // Normalize to [-180,180] if ( delta < -180 ) { delta += 360; } else if ( delta > 180 ) { delta -= 360; } return delta; } COM: <s> returns the difference in angle normalized to 180 180 </s>
funcom_train/40737381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calculate() throws DataException{ if(couponBO == null){ lineTotal = price * qty; }else{ lineTotal = price * qty - couponBO.getAmount(); } try{ txBO.calculate(); }catch(DataException e){ throw new DataException("Error caught in TxLineBO", e); } }// end calculate() COM: <s> calculates the line total </s>
funcom_train/13916781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int handleFatalError(ETLEvent event) throws KETLQAException { ResourcePool.LogMessage(event.getETLStep(), event.getReturnCode(), ResourcePool.FATAL_MESSAGE, event.mstrMessage, event.getExtendedMessage(), true); throw new KETLQAException("Step halted, QA failed, see below for details: " + event.mstrMessage, event, this); } COM: <s> handle fatal error </s>
funcom_train/36230685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFileShortName(String p_FName) { String name = p_FName; String fSep = System.getProperty("file.separator"); int nidx = name.lastIndexOf(fSep); if (nidx == -1) { return name; } return name.substring(nidx + 1); //+1 avoid the last separator. } COM: <s> returns the file base name without path </s>
funcom_train/26454843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveItem() { // Add 3 elements cache.itemPut(KEY); cache.itemPut(KEY + 1); cache.itemPut(KEY + 2); // Get the last element cache.itemRetrieved(KEY); // The least recently used item is key + 1 assertTrue((KEY + 1).equals(cache.removeItem())); } COM: <s> test the cache algorithm </s>
funcom_train/42897379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void discardResults(String... transactionIDs) throws FPSException { Map<String, String> params = new HashMap<String, String>(); for (int i = 0; i < transactionIDs.length; i++) params.put("TransactionID." + i, transactionIDs[i]); HttpGet method = new HttpGet(); makeRequestInt(method, "DiscardResults", params, DiscardResultsResponse.class); } COM: <s> discard the results that are fetched using the </s>
funcom_train/17743688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MessageFormat createMessageFormat(String msg, Locale locale) { if (logger.isDebugEnabled()) { logger.debug("Creating MessageFormat for pattern [" + msg + "] and locale '" + locale + "'"); } MessageFormat messageFormat = new MessageFormat(""); messageFormat.setLocale(locale); if (msg != null) { messageFormat.applyPattern(msg); } return messageFormat; } COM: <s> create a message format for the given message and locale </s>
funcom_train/47253089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getComboSeleccion() { if (comboSeleccion == null) { comboSeleccion = new JComboBox(); comboSeleccion.setBounds(new Rectangle(283, 388, 231, 22)); comboSeleccion.addItem("Selección por ruleta"); comboSeleccion.addItem("Selección por torneo"); comboSeleccion.addItem("Selección por ranking"); } return comboSeleccion; } COM: <s> this method initializes combo seleccion </s>
funcom_train/7647086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkConnect(String host, int port) { if (host == null) { throw new NullPointerException(); } if (port > 0) { checkPermission(new SocketPermission(host + ':' + port, "connect")); //$NON-NLS-1$ } else { checkPermission(new SocketPermission(host, "resolve")); //$NON-NLS-1$ } } COM: <s> checks whether the calling thread is allowed to establish socket </s>
funcom_train/14461250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getDefaultVal(){ if(this.isDoubleNumber) return new Double(0.0); if(this.isFPNumber) return new Float(0.0f); if(this.isBoolean) return new Boolean(false); if(this.isIntNumber) return new Integer(0); if(this.isString) return ""; if(this.isFormula) return ""; if(this.isBlank) return ""; return null; } COM: <s> get a default empty data value for this record </s>
funcom_train/31342786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void prepareBackup() { final File backupFile = getBackupFile(); List<File> backupFiles = fLayoutStrategy.findBackupFiles(); deleteOldBackups(backupFiles); if (!backupFiles.isEmpty()) fLayoutStrategy.rotateBackups(backupFiles); Assert.isLegal(!backupFile.exists(), "backupFile should have been rotated or deleted: " + backupFile); //$NON-NLS-1$ } COM: <s> deletes old backups and rotates the existing ones as appropriate </s>
funcom_train/28293098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDirtyObj() { if (logger.isDebugEnabled()) { logger.debug(" :: SeqObjectiveTracking --> BEGIN - " + "setDirtyObj"); } mDirtyObj = true; if (logger.isDebugEnabled()) { logger.debug(" :: SeqObjectiveTracking --> END - " + "setDirtyObj"); } } COM: <s> indicates that the current objective state is invalid due to a new </s>
funcom_train/43999117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void setEnabled(JComponent rootComponent, boolean isEnabled) { Component[] theComponents = rootComponent.getComponents(); Component aComponent; JComponent aJComponent; for (int i = 0; theComponents.length > i; ++i) { aComponent = theComponents[i]; if (aComponent instanceof JComponent) { aJComponent = (JComponent) aComponent; setEnabled(aJComponent, isEnabled); aJComponent.setEnabled(isEnabled); } } } COM: <s> traverse root panels components and set enabled </s>
funcom_train/2890652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNotUnderstoodOption() throws IOException { Options options = new Options(); options.addOption(new URI("http://localhost/invalid.sf"), "test", true); DeploymentDescriptorType dd = operation.createSmartFrogDescriptor( DeploySmartFrogTest.SIMPLE_DESCRIPTOR); deployExpectingFault(null, dd, options, null, DeployApiConstants.FAULT_NOT_UNDERSTOOD, null); } COM: <s> test that a header is not understood </s>
funcom_train/29695557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayMech(Entity en) { this.en = en; locList.removeAll(); for (int i = 0; i < en.locations(); i++) { if (en.getNumberOfCriticals(i) > 0) { locList.add(en.getLocationName(i), i); } } locList.select(0); displaySlots(); } COM: <s> updates fields for the specified mech </s>
funcom_train/33725906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateUI() { mh.setCoordinates(miX, miY); int n = mh.getSeletectedItemIndex(); display.setWeights(mh.getCurrentItemWeight()); display.updateUI(miX, miY, n, mh.getNumMenuAtCurrentLevel(), mh .getLevel()); mh.playSound(n); //String name = mh.getItemText(n); //display.showMessage(name); } COM: <s> this function updates the gui part of the program </s>
funcom_train/9783082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public TreeSet getGeoSetNameDescriptionOrder() { // sorted set of geos TreeSet sortedSet = new TreeSet(new NameDescriptionComparator()); // get all GeoElements from construction and sort them Iterator it = geoSet.iterator(); while (it.hasNext()) { GeoElement geo = (GeoElement) it.next(); // sorted inserting using name description of geo sortedSet.add(geo); } return sortedSet; } COM: <s> returns a set with all labeled geo element objects sorted in alphabetical </s>
funcom_train/43421677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getRemainingWorkingTime() { Double workingHoursInMinutes = Settings.getDefault().getWorkingHours() * 60; long remaining = TimeUnit.MILLISECONDS.convert(workingHoursInMinutes.longValue(), TimeUnit.MINUTES); remaining -= getTotalTime(); return remaining >= 0 ? remaining : 0; } COM: <s> returns the remaining work time for this day </s>
funcom_train/24219586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Partner getPartnerByOdetteId( String odetteId ){ for( int i = 0; i < this.root.getChildCount(); i++ ){ SortableTreeNode child = (SortableTreeNode)root.getChildAt(i); Partner partner = (Partner)child.getUserObject(); if( partner.getOdetteId().equals( odetteId )) return( partner ); } return( null ); } COM: <s> returns a specified partner from the tree </s>
funcom_train/42719040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String returnString=""; if(this.patterns!=null) returnString+="patterns:\t"+ArrayLibrary.getString(this.patterns)+"\n"; if(this.result!=null) returnString+="result:\t\t"+this.result+"\n"; for(int index=0;index<this.relations.length;index++) { String[][] relation=this.relations[index]; returnString+=relation[0][0]+":\t"+ArrayLibrary.getString(relation[1])+"\n"; } return returnString; } COM: <s> generates a string containing the patterns the result and all non null </s>
funcom_train/16411296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createTIFFImage(){ File imageFile = new File(url); RenderedImage renderedImage = JAI.create("fileload", imageFile.getAbsolutePath()); Graphics2D g = image.createGraphics(); g.drawRenderedImage(renderedImage,AffineTransform.getScaleInstance(area.getWidth() / (float)renderedImage.getWidth(),area.getHeight() / (float)renderedImage.getHeight())); g.dispose(); } COM: <s> creates the tiff image </s>
funcom_train/29985205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int scanComment () throws HTMLParseException { int startvalue = index - 1; int i = -1; int j = index; while (j+2 < length) { if (pagepart[j] == '-' && pagepart[j + 1] == '-' && pagepart[j + 2] == '>') { i = j; break; } j++; } if (i > -1) { index = i + 2; nextToken = MT; match (MT); stringLength = index - startvalue; return COMMENT; } block.setRest (startvalue); return END; } COM: <s> scan a comment from the block that is the string up to and </s>
funcom_train/9869516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int deleteByWhere(String where) throws SQLException { Connection c = null; PreparedStatement ps = null; try { c = getConnection(); String delByWhereSQL = "DELETE FROM PROYECTO " + where; ps = c.prepareStatement(delByWhereSQL); return ps.executeUpdate(); } finally { getManager().close(ps); freeConnection(c); } } COM: <s> deletes rows from the proyecto table using a where clause </s>
funcom_train/51167788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void heartbeat(String id, boolean create) { Monitor monitor; synchronized (this) { monitor = monitorsById.get(id); if (monitor == null && create) doCreate(id, observer.getDefaultTimeouts(id)); } if (monitor != null) { monitor.heartbeat(); } } COM: <s> a heartbeat from a particular service or object </s>
funcom_train/12837449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCellContent(int position, String content) { if (position < 0) { return; } if (StringUtils.isBlank(content)) { content = HTML.noBreakSpace(); } if (contentList.size() < (position + 1)) { contentList.ensureCapacity(position + 1); } contentList.set(position, content); } COM: <s> sets the content argument to the specified position </s>
funcom_train/12564098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void pointerPressed(final int x, final int y) { if (svgEventListener != null) { svgEventListener.pointerPressed(x, y); } lastX = x; lastY = y; lastWasPressed = true; float[] pt = {x, y}; dispatchPointerEvent(SVGConstants.SVG_MOUSEDOWN_EVENT_TYPE, pt); } COM: <s> invoked when a mouse button has been pressed on a component </s>
funcom_train/10594611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean verifyExtension(String uri) { int dot = uri.lastIndexOf('.'); if (dot != -1) { final String ext = uri.substring(dot); return ext.equals(".war") || ext.equals(".jar") || ext.equals(".zip"); } return false; } COM: <s> test if the extension of the source is either war jar or zip </s>
funcom_train/28296317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPropertyConversion() throws Exception { Entry entry = dvm.new Entry(Package.class, Sphere.class, Package.NAME, Sphere.NAME); dvm.set(entry); DataConversion<Integer, Color3f> conversion = createConversion(); dvm.setProperty(entry.getDataClass(), Package.CLASSES_ATTR, Sphere.COLOR_ATTRIBUTE, conversion); DataConversion result = dvm.getPropertyConversion(Package.class, Sphere.COLOR_ATTRIBUTE); assertEquals(conversion, result); } COM: <s> test get property conversion </s>
funcom_train/44011309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRead() throws Exception { System.out.println("read"); String id = ""; PositionDAO instance = new PositionDAO(); PositionBO expResult = null; PositionBO result = instance.read(id); 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 read method of class edu </s>
funcom_train/14515936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createLocalHardTokenIssuer(int admingroupid) throws Exception{ HardTokenIssuer localissuer = new HardTokenIssuer(); localissuer.setDescription("Issuer created by installation script, used to create the first administration token"); ArrayList availableprofiles = new ArrayList(); availableprofiles.add(new Integer(getHardTokenSession().getHardTokenProfileId(administrator, ADMINTOKENPROFILENAME))); localissuer.setAvailableHardTokenProfiles(availableprofiles); this.getHardTokenSession().addHardTokenIssuer(administrator, ISSUERALIAS, admingroupid, localissuer); } COM: <s> creates the local hard token issuer </s>
funcom_train/21915887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String createClassName(String projectName, String addition) { String result = ""; StringTokenizer st = new StringTokenizer(projectName, "-"); while (st.hasMoreTokens()) { result = result + StringHelpers.firstCharToUpper(st.nextToken()); } st = new StringTokenizer(addition, "-"); while (st.hasMoreTokens()) { result = result + StringHelpers.firstCharToUpper(st.nextToken()); } return result; } COM: <s> returns the concat of project name and addition </s>
funcom_train/51056292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PointerBuffer get(long[] dst, int offset, int length) { if ( is64Bit ) view64.get(dst, offset, length); else { checkBounds(offset, length, dst.length); if ( length > view32.remaining() ) throw new BufferUnderflowException(); int end = offset + length; for ( int i = offset; i < end; i++ ) dst[i] = view32.get() & 0x00000000FFFFFFFFL; } return this; } COM: <s> relative bulk i get i method </s>
funcom_train/29000747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireNodeSelected(JTree tree) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree .getLastSelectedPathComponent(); if (node != null) { Object nodeInfo = node.getUserObject(); if (node.isLeaf()) { MenuItem menuitem = (MenuItem) nodeInfo; loadScript(menuitem.getObjectName(), menuitem.getScriptToRun(), menuitem.getUserAccessLevel()); } } } COM: <s> h2 code fire node selected code h2 </s>
funcom_train/41990466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onBattleStarted(BattleStartedEvent event) { // Retrieves the battlefield height and width. theHeight = event.getBattleRules().getBattlefieldHeight(); theWidth = event.getBattleRules().getBattlefieldWidth(); halfHeight = theHeight / 2; halfWidth = theWidth / 2; } COM: <s> sets parameters when battle begins </s>
funcom_train/48668078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceTokens() { setString(TRUST_STORE, replaceProfileToken(getString(TRUST_STORE))); setString(KEY_STORE, replaceProfileToken(getString(KEY_STORE))); setString(SOAP_PROPS, replaceProfileToken(getString(SOAP_PROPS))); setString(SAS_PROPS, replaceProfileToken(getString(SAS_PROPS))); setString(WAS_CLASSPATH, replaceProfileToken(getString(WAS_CLASSPATH))); } COM: <s> replaces the tokens after this method is called the configuration </s>
funcom_train/45134243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getAttributeBoolean(String attributeName) throws XMLInvalidTypeException, NullPointerException { boolean value; try { value = (getAttributeInt(attributeName)==1); } catch (NullPointerException npe){ throw npe; } catch (Exception e){ throw new XMLInvalidTypeException("Attribute not a boolean"); } return value; } COM: <s> returns the boolean value of the given attribute of the root tag </s>
funcom_train/6513762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getAutoContextVariable(String variableName, Context context) { ContextAutoLoader loader = (ContextAutoLoader) _toolLoader.get(variableName); try { if (loader == null) return null; else return loader.get(variableName, context); } catch (PropertyException e) { return null; } } COM: <s> fetch a tool </s>
funcom_train/43915528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void encodeGeometry(Feature feature) { if (feature.getDefaultGeometry() != null) { Geometry g = feature.getDefaultGeometry(); //handle case of multi geometry with a single geometry in it if (g instanceof GeometryCollection) { GeometryCollection mg = (GeometryCollection) g; if (mg.getNumGeometries() == 1) { g = mg.getGeometryN(0); } } geometryEncoding.encode(g, this); } } COM: <s> encodes the geometry of a feature </s>
funcom_train/2437874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLocationOk(ImportParameters params, JitterPackDescriptor descriptor, File destination) { String folderName = getFolderName(params, descriptor); File unpackedFolder = new File(destination, folderName); if (unpackedFolder.exists()) { return canDestinationBeOverwritten(unpackedFolder); } return true; } COM: <s> checks if the specified jitterpak can be extracted to the specified destination folder </s>
funcom_train/16622615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double getRadians(int base) { if ((virtualZoomMultiplier <= 1.0f) || (base == centerBase)) { return (base * ((2.0d * Math.PI) / (double) (sequenceLength))) - ((Math.PI / 180.0d) * origin); } else { return getRadians((double) base); } } COM: <s> returns a radians representation of the given base </s>
funcom_train/47867359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void packetReceivedLT(MNPLinkTransferPacket packet) { byte[] payload = packet.getData(); int seq = packet.getSequence(); if (sequenceLT < seq) { sequenceLT = seq; // Byte: 0xFF + 1 == 0x00 if (sequenceLT == 0xFF) sequenceLT = -1; try { // Ignore duplicate packets? commandPackets.write(payload); commandPackets.flush(); synchronized (in) { in.notifyAll(); } } catch (IOException ioe) { ioe.printStackTrace(); } } } COM: <s> received a link transfer packet </s>
funcom_train/20307055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Graph loadTestFile(Resource test, Property predicate) throws IOException { if (test.hasProperty(predicate)) { String fileName = test.getRequiredProperty(predicate).getObject().toString(); boolean cache = predicate.equals(tboxP) || predicate.equals(dataP); return loadFile(fileName, cache).getGraph(); } else { return Factory.createGraphMem(); } } COM: <s> load the datafile given by the property name </s>
funcom_train/5673277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContent(String content, String type) throws SMIMEException { if (content != null) { ByteArrayInputStream bais = null; try { bais = new ByteArrayInputStream(content.getBytes("ISO-8859-1")); } catch (Exception e) { throw SMIMEException.getInstance(this, e, "setContent"); } this.setContent(bais, type); } else throw new SMIMEException(this, 1035); } COM: <s> sets message content from string </s>
funcom_train/33266159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processMouseMotionEvent( MouseEvent e ) { if (ignoreEvents) { return; } if (e.getID() == MouseEvent.MOUSE_MOVED) { if (choiceList) { selectUnderMouse((MouseEvent)e); } } else if (e.getID() == MouseEvent.MOUSE_DRAGGED) { selectUnderMouse(e); } super.processMouseMotionEvent( e ); } COM: <s> process mouse motion event </s>
funcom_train/12555573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void toggleMidsquareParameters(boolean isActive) { midSquare_BitsAvailable.setEnabled(isActive); midSquare_BitsAvailable.setVisible(isActive); midSquare_BitsAvailableLabel.setVisible(isActive); midSquare_BitsUsed.setEnabled(isActive); midSquare_BitsUsed.setVisible(isActive); midSquare_BitsUsedLabel.setVisible(isActive); } COM: <s> toggles controls for the mid square hash function </s>
funcom_train/21955469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector createAddressBookList() { Vector allAddressBooks = new Vector(); String addressBookID = null; StringTokenizer tokens = new StringTokenizer(Pooka.getProperty("AddressBook", ""), ":"); while (tokens.hasMoreTokens()) { addressBookID=(String)tokens.nextToken(); allAddressBooks.add(createAddressBook(addressBookID)); } return allAddressBooks; } COM: <s> this loads and creates all the address books using the address book </s>
funcom_train/20772043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setXDegrees(float degrees) throws HardwareInterfaceException { currentX= degrees; if (hwInterface != null) { hwInterface.setServoValue(PAN_SERVO, convert(degrees)); // assume 1st servo X direction if (outputTwice) hwInterface.setServoValue(PAN_SERVO+2, convert(degrees)); // assume 1st servo X direction } } COM: <s> sets the servo to the specified position in degrees will only update </s>
funcom_train/42944203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object put(Object key, Object value) { if ((this.ignoredCaseMap != null) && (key instanceof String)) { this.ignoredCaseMap.put(((String) key).toLowerCase(), key); } this.keyOrder.add(key); return super.put(key, value); } COM: <s> puts a value in this map with the given key </s>
funcom_train/41206790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) { impl.fillRoundRect(nativeGraphics, xTranslate + x, yTranslate + y, width, height, arcWidth, arcHeight); } COM: <s> fills a rounded rectangle in the same way as draw round rect </s>