__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/45692122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addReservedBytePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SongEventDrumNote_reservedByte_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SongEventDrumNote_reservedByte_feature", "_UI_SongEventDrumNote_type"), EsxPackage.Literals.SONG_EVENT_DRUM_NOTE__RESERVED_BYTE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the reserved byte feature </s>
funcom_train/51605185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSplitPane getJSplitPane1() { if (jSplitPane1 == null) { jSplitPane1 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); jSplitPane1.setDividerSize(3); jSplitPane1.setLeftComponent(getJSplitPane()); jSplitPane1.setRightComponent(getJPanel16()); } return jSplitPane1; } COM: <s> this method initializes j split pane1 </s>
funcom_train/44177994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void tryAll(String[] candidates, boolean expected) { for (String candidate : candidates) { assertEquals("new: " + candidate, expected, UriUtils.isLikelyUri(candidate)); assertEquals("html context: " + candidate, expected, UriUtils.isLikelyUri(candidate)); } } COM: <s> test that all supplied candidates give the expected results for </s>
funcom_train/25422380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getEncryptedPwd() { String sPwd = getChangePasswordCriteria().getNewCredentials().getPassword(); String sEncrypted = PC1_Encryptor.encrypt(sPwd); //String sDecrypted = PC1_Encryptor.decrypt(sEncrypted); //return sPwd+" "+sEncrypted+" "+sDecrypted; return sEncrypted; } COM: <s> encrypts a password for configuration file storage </s>
funcom_train/25010860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void translate(final Vector3 newPosition) { int xDiff = glLoc.x - (int) newPosition.getX(); int yDiff = glLoc.y - (int) newPosition.getY(); gl.getGL2().glTranslatef(xDiff, yDiff, 0f); glLoc = new Point((int) newPosition.getX(), (int) newPosition.getY()); } COM: <s> produces a translation by x y z </s>
funcom_train/40712747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasAddCommand(int x, int y, int color) { for (Iterator iter = cmds.iterator(); iter.hasNext();) { Object o = iter.next(); if(o instanceof AddCommand) { AddCommand c = (AddCommand)o; if(c.getPlayer() == color && c.hasPoint(x, y)) return true; } } return false; } COM: <s> checks if this sgfnode has a specific add command </s>
funcom_train/3276109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLegalMoveCount () { int count = 0; List movingTeam = (isBlackMove) ? blackTeam : whiteTeam; if (staleLegalDests) genLegalDests(); for (int i=0; i < movingTeam.size(); i++) count += ((ChessPiece) movingTeam.get(i)).getLegalDests().size(); return count; } COM: <s> how many legal moves on the current board </s>
funcom_train/22277907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void computeVisibleRect(Rect visibleRect) { if (_superview == null) { visibleRect.setBounds(0, 0, getWidth(), getHeight()); } else { _superview.computeVisibleRect(visibleRect); _superview.convertRectToView(this, visibleRect, visibleRect); visibleRect.intersectWith(0, 0, getWidth(), getHeight()); } } COM: <s> computes the views visible rect the intersection </s>
funcom_train/4717719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLoopRightRel() { SynMessage msg = new SYN().sequencer().setLoopRight(100).relative(); assertEquals("TFi", msg.getTypetag()); assertEquals(new Integer(100), (Integer) msg.getArguments()[2]); assertEquals("/SYN/ID*/LOOPR", msg.getAddress()); } COM: <s> loop right relative </s>
funcom_train/42214000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String makeWorkgroupInfoXML(Workgroup workgroup){ String workgroupInfoXML = "<id>" + workgroup.getId().toString() + "</id>"; Offering offering = workgroup.getOffering(); workgroupInfoXML += "<offeringId>" + offering.getId().toString() + "</offeringId>"; Group group = workgroup.getGroup(); workgroupInfoXML += "<group>"; workgroupInfoXML += makeGroupInfoXML(group); workgroupInfoXML += "</group>"; return workgroupInfoXML; } COM: <s> returns the workgroup info xml containing some information about workgroup </s>
funcom_train/44602230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_requires_12(){ compileAndExecGivenStatementExpectRuntimeError( "X.java", "public class X{\n" + " //@ pre_redundantly false;\n" + " //@ requires_redundantly false;\n" + " public void m() {\n" + " }\n" + "}\n", "new X().m()", null, JMLInternalPreconditionError.class); } COM: <s> is requires redundantly clause supported </s>
funcom_train/20630624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void findAndStoreTestClassesFromZip (final ZipFile zipFile) { Enumeration files = zipFile.entries(); while (files.hasMoreElements()) { ZipEntry file = (ZipEntry) files.nextElement(); String className = computeClassName(file.getName(), 0); if (isValidClass(className)) { classNameList.add (className); } } } COM: <s> this method examines a </s>
funcom_train/24153056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDateBorderColor() { System.out.println("dateBorderColor"); Color color = Color.ORANGE; AbstractDatePicker date_picker = getDatePicker(); date_picker.setDateBorderColor(color); assertEquals("Wrong dateBorderColor:", color, date_picker.getDateBorderColor()); } COM: <s> test of date border color property of class com </s>
funcom_train/28224190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Goal getValidGoalFromLocation(List<Goal> goalList, String location) { Goal goal; ListIterator<Goal> it = goalList.listIterator(); while (it.hasNext()) { goal = it.next(); if (goal.location != null && goal.location.equals(location) && goal.precondition == 0) { return goal; } } return null; } COM: <s> returns the first goal from goallist whose location is </s>
funcom_train/15607714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadFile( String fileName, OID axisOfInterest, FacadeManagerBase facadeMgr ) throws Exception { inputSourceName = fileName; axisOID = axisOfInterest; this.facadeMgr = facadeMgr; File inputFile = new File( fileName ); if ( ! inputFile.canRead() || ! inputFile.isFile() ) { throw new Exception( "Cannot read file " + fileName ); } initializeContents( fileName ); } COM: <s> expects file to contain gff3 data </s>
funcom_train/49959044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onClick(Widget sender) { if (sender.equals(this.homeImage)) { String userCookie = Cookies.getCookie("user"); if (userCookie == null) { userCookie = "NoUserCookie"; } Window.open(TWITTERURL + userCookie, NEWPAGE, PAGEFEATURES); } else if (sender.equals(this.pollImage)) { this.statusesPanel.poll(); } } COM: <s> respond to widgets that are clicked on </s>
funcom_train/35668868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean write(byte[] audioData, int offset, int size) { try { if (!firstByteSent) { firstByteTime = System.currentTimeMillis(); firstByteSent = true; } bytesPlayed += size; dataOutputStream.write(audioData, offset, size); dataOutputStream.flush(); if (debug) { System.out.println("sent " + size + " bytes " + audioData[0] + " " + audioData[size/2]); } return true; } catch (IOException ioe) { ioe.printStackTrace(); return false; } } COM: <s> writes the given bytes to the audio stream </s>
funcom_train/21727739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Position getNextPositionForward() { Position pos; double x, y = 0; x = Math.cos(tankDirection * Math.PI / 180) * -speed; y = Math.sin(tankDirection * Math.PI / 180) * -speed; pos = new Position(position.getX() + x, position.getY() + y); return pos; } COM: <s> method that returns the next position of the tank </s>
funcom_train/8629282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(int index) { if (SysProperties.CHECK && index >= size) { throw new ArrayIndexOutOfBoundsException("i=" + index + " size=" + size); } System.arraycopy(data, index + 1, data, index, size - index - 1); size--; } COM: <s> remove the value at the given index </s>
funcom_train/13306165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void intersectValues(QueryParameter qp, QueryParameter otherQp) { if(qp.getType().equals(otherQp.getType())){ List<QueryParameterEntry> newqpes = new ArrayList<QueryParameterEntry>(); for(QueryParameterEntry newqpe : otherQp.getValues()){ if(!containsPerson(qp,newqpe.getPerson())) newqpes.add(newqpe); } qp.addValues(newqpes); } } COM: <s> intersects query parameter entries of two given query parameters of the person type </s>
funcom_train/5009535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStringEncoding(String enc) throws RserveException { if (!connected || rt==null) throw new RserveException(this,"Not connected"); RPacket rp = rt.request(RTalk.CMD_setEncoding, enc); if (rp != null && rp.isOk()) return; throw new RserveException(this,"setStringEncoding failed", rp); } COM: <s> set string encoding for this session </s>
funcom_train/32191669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValidMemberLine(String[] memberData) { boolean valid = isValidInteger(memberData[0]) && isValidName(memberData[1]) && isValidPhoneNumber(memberData[5]) && isValidInteger(memberData[6]) && ((memberData.length == 8) ? isValidEmail(memberData[7]) : true); // the system allows empty field for e-mail return valid; } COM: <s> validates member data when reading from a file </s>
funcom_train/16175932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putObjectAt(int x, int y, Object object) { if (!(object instanceof Number)) { throw new IllegalArgumentException("object must be a Number"); } Number number = (Number) object; writeMatrix.putDoubleAt(xnorm(x), ynorm(y), number.doubleValue()); } COM: <s> puts the specified object at the specified coordinate </s>
funcom_train/16525616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Document getQtiDocument(Node stepNode) { //get the qti string from the step String qtiString = stepNode.selectSingleNode("parameters/asQTI").getText(); SAXReader reader = new SAXReader(); Reader in = new StringReader(qtiString); Document document = null; try { //write the qti string to the document document = reader.read(in); } catch (DocumentException e) { e.printStackTrace(); } return document; } COM: <s> get a document object that contains the qti for the step </s>
funcom_train/26644660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(Object o, String formatName) { if( formatName==null ) return o.toString(); if( formatName.equals("js") ) return toJSString(o); if( formatName.equals("xml") ) return toXmlString(o); if( formatName.equals("underline") ) return toUnderlineString(o); log.warn("Unknown format name {}", formatName); return o.toString(); } COM: <s> convert o into a string using the given format name </s>
funcom_train/4300209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CompiledStatement recompileStatement(int csid) { String sql = compiledStatementManager.getSql(csid); if (sql == null) { // invalid sql has been removed already return null; } Result r = sqlPrepare(sql); if (r.mode == ResultConstants.ERROR) { // sql is invalid due to DDL changes compiledStatementManager.freeStatement(csid, sessionId); return null; } return compiledStatementManager.getStatement(csid); } COM: <s> recompile a prepard statement or free it if no longer valid </s>
funcom_train/6290088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getEmptyRootsNumber() { int result = 0; final int rootMessagesCount = rootMessages.size(); for ( int i = 0; i < rootMessagesCount; ++i) { if ( ((MessageHeader)rootMessages.elementAt( i )).isEmpty() ) { ++result; } } return result; } COM: <s> returns number of empty root messages </s>
funcom_train/8241023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String buildMessageUrl(String newsgroup, String articleId) { StringBuffer tmp = new StringBuffer().append("<nntp://www.web30core.org:119/").append(newsgroup); String id = articleId.substring(articleId.indexOf("<") + 1).trim(); return tmp.append("/").append(id).toString(); } COM: <s> build n triple from mime message </s>
funcom_train/26666022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object preConvertValue(MetaDataBean mdb, Object sourceValue) { if( !(sourceValue instanceof String) ) return null; String sourceValueStr = ((String) sourceValue).trim(); if( !sourceValueStr.startsWith("${") ) return null; if( !sourceValueStr.endsWith("}") ) return null; return Expressions.instance().createValueBinding(sourceValueStr); } COM: <s> convert the string to a value binding </s>
funcom_train/42536464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o){ if(!(o instanceof IncludeCons))return false; if(o == this)return true; IncludeCons oo = (IncludeCons)o; return (((Object)first).equals(oo.first))&&(((Object)rest).equals(oo.rest)); } COM: <s> is the given object equal to this include cons </s>
funcom_train/12275652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedContext(String context) { ContextPanel p = null; for (Iterator i = contextList.iterator(); i.hasNext();) { ContextPanel z = (ContextPanel) i.next(); if (context.equals(z.name)) { p = z; } } if (p != null) { selectedContext = p; cardLayout.show(cardPanel, context); makeToolBar(); } } COM: <s> set the selected context </s>
funcom_train/4150940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize() { // Populate list with animation states if (model.getControllerCount() > 0) { for (String i : ((MeshAnimationController)(model.getController(0))).getAnimationNames()) animation.add(i); System.out.println("Animations: "+animation); } // Create vector velocity = new Vector3f(); } COM: <s> called once the model is loaded and the </s>
funcom_train/2389245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMenuItemEditModellName() { if (menuItemEditModellName == null) { menuItemEditModellName = new JMenuItem(); menuItemEditModellName.setText("Modell-Name ändern"); menuItemEditModellName .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { GUIEditModellName gui = new GUIEditModellName(bscm); gui.show(); } }); } return menuItemEditModellName; } COM: <s> this method initializes menu item insert given value </s>
funcom_train/9581191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SecretKey getSymmetricKey() throws SAMLCoreException { KeyGenerator generator = null; try { logger.debug("encrypting data key"); generator = KeyGenerator.getInstance(this.dataEncryptKeyAlgo); logger.debug("Algorithm: " + this.dataEncryptKeyAlgo); generator.init(128); } catch (NoSuchAlgorithmException e) { logger.debug(e.getMessage()); throw new SAMLCoreException(e); } return generator.generateKey(); } COM: <s> data will be encrypted with this symmetric key </s>
funcom_train/13596399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnBack() { if (btnBack == null) { btnBack = new JButton(Messages.getString("GeneralUI.ButtonBack")); //$NON-NLS-1$ btnBack.setEnabled(false); btnBack.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { prevStep(); } }); } return btnBack; } COM: <s> this method initializes j button </s>
funcom_train/3612094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSessionProperty(String nm, Object val, String context) { if (context != null) { nm = nm + "/" + context; } HttpServletRequest req = getCurrentRequest(); if (req != null) { HttpSession sess = req.getSession(); if (sess != null) { sess.setAttribute(nm, val); } } } COM: <s> set a property that will be active during the users session </s>
funcom_train/11381814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void meterTaskAttempt(TaskInProgress tip, TaskStatus status) { JobCounter slotCounter = (tip.isMapTask()) ? JobCounter.SLOTS_MILLIS_MAPS : JobCounter.SLOTS_MILLIS_REDUCES; jobCounters.incrCounter(slotCounter, tip.getNumSlotsRequired() * (status.getFinishTime() - status.getStartTime())); } COM: <s> metering occupied slots finish start </s>
funcom_train/41179100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean secondRead(boolean readSame, boolean controle, UserDetails validator) throws Exception { // Bouml preserved body begin 00020F7B boolean rez = false; if (!validator.equals(technicien) && validator.isAtLeast(BioClearanceLvls.Validator) ) { rez = true; if (readSame && controle) { this.stat = AnalysisState.Validated; } else { notAnalysableTest(); } } API_bdd.saveAnalysis(this); return rez; // Bouml preserved body end 00020F7B } COM: <s> used by the validator </s>
funcom_train/39563906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SyntaxTreeNode getPreviousLeaf() { SyntaxTreeNode previousSibling; SyntaxTreeNode myParent = (SyntaxTreeNode)getParent(); if (myParent == null) return null; previousSibling = getPreviousSibling(); // linear search if (previousSibling != null) return previousSibling.getLastLeaf(); return myParent.getPreviousLeaf(); // tail recursion } COM: <s> returns the leaf before this node or null if this node is the </s>
funcom_train/9873849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector getVRamaHybTreatCy3( Vector ramaHybs ) { Vector vReturn = new Vector(); for( int h = 0; h < ramaHybs.size(); h ++ ) { RHyb hyb = ( RHyb ) ramaHybs.elementAt( h ); if( ! hyb.controlCy3() ) { vReturn.add( hyb ); } } return vReturn; } COM: <s> creates a vector of rama hybs where treated cy3 control cy5 </s>
funcom_train/35228910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void closeCurrentEntry() throws IOException { if (currentEntry != null) { if (currentEntry.getSize() > currentFileSize) { throw new IOException( "The current entry[" + currentEntry.getName() + "] of size[" + currentEntry.getSize() + "] has not been fully written." ); } currentEntry = null; currentFileSize = 0; pad(); } } COM: <s> closes the current tar entry </s>
funcom_train/18744692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParent(Index parent, int nr) { testFixed(false); assert this.parent == null && parent.isFixed(); this.parent = parent; this.index = new ArrayList<Integer>(parent.index.size() + 1); this.index.addAll(parent.index); this.index.add(nr); setFixed(); } COM: <s> sets the parent and index of this level </s>
funcom_train/26207475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dump() { System.err.println( "\n\n ****** Dump of " + getQualifiedName() + " ******\n" + " \t INDEX \t\t\tDOMAIN \t\t\tMEMBERSHIP"); for (int indx= 0; indx < VECMAX; indx++) { System.err.println( " \t " + indx + " \t\t" + domain[indx] + " \t\t " + +membership[indx]); } } COM: <s> used for debugging </s>
funcom_train/38537948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setValueZ(Number n) throws PropagationFailureException { if (currentNz != null) { currentNz.setValue(n); } else if (currentGz != null){ for (int i=0; i<currentGz.getNodeCount(); i++) { ((NumNode) currentGz.getNode(i)).setValue(n); } } } COM: <s> sets the value for the current z </s>
funcom_train/33078743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getSelectedRowObjects() { int[] visibelSelectedRows = super.getSelectedRows(); List result = new ArrayList(visibelSelectedRows.length); ObjectViewAdapter model = (ObjectViewAdapter) super.getModel(); for (int i = 0; i < visibelSelectedRows.length; i++) { result.add(model.getNewRow(visibelSelectedRows[i])); } return result; } COM: <s> get the selections </s>
funcom_train/14471603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(final File xmlFile, final File dtdFile) throws FileNotFoundException, TransformerException { final PrintStream dtdPrintStream = new PrintStream(new FileOutputStream(dtdFile.getAbsolutePath())); final DocumentInfo documentInfo = prepare(xmlFile.getAbsolutePath()); run(documentInfo); save(dtdPrintStream); } COM: <s> description of the method </s>
funcom_train/45064880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCopyButton() { if (copyButton == null) { copyButton = new JButton(); copyButton.setIcon(new ImageIcon(Tools.loadBufferedImage(iconsPath + "copy.png"))); copyButton.setToolTipText("Copy"); copyButton.addMouseListener(new MouseAdapter() { public void mouseExited(MouseEvent e) { statusBar.setText(""); } public void mouseEntered(MouseEvent e) { statusBar.setText("Copy the selection to clipboard"); } }); } return copyButton; } COM: <s> this method initializes copy button </s>
funcom_train/24607305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _generateAProf_a(int type, int index) { _generateAFaculty_a(type, index); writer_.addProperty(CS_P_RESEARCHINTEREST, _getRelativeName(CS_C_RESEARCH, random_.nextInt(RESEARCH_NUM)), false); } COM: <s> generates properties for a professor instance </s>
funcom_train/1300817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHeadingsString() { if (headings == null) return ""; final StringBuilder result = new StringBuilder(); for (Extraction heading : headings) { if (result.length() > 0) result.append(';'); result.append(heading.getText().replaceAll(";", ",")); } return result.toString(); } COM: <s> get the headings as a semi colon delimited string ordered from highest </s>
funcom_train/48024409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefaultTemplateLib() throws TransformationException { StringTemplateGroup tmpl = null; if ((tmpl = StringTemplateGroup.loadGroup(getDefaultTemplateGroup()))==null) throw new TransformationException("Could not load template group "+getDefaultTemplateGroup()); // set global parameters tmpl.defineMap("params", parameters); setTemplateLib(tmpl); } COM: <s> sets default template library loads default template group and </s>
funcom_train/25774143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJStartGameButton() { if (jStartGameButton == null) { jStartGameButton = new JButton(); jStartGameButton.setText("Start"); jStartGameButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { jStartGameButton.setEnabled(false); startGame(); jStopGameButton.setEnabled(true); } }); } return jStartGameButton; } COM: <s> this method initializes j start game button </s>
funcom_train/50911881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void transform(Transform3 t, IntSet is) { int nis = is.size(); for (int j = 0; j < nis; j++) { int i = is.elementAt(j); if (i >= 0 && i < size()) { Point3 p = new Point3(getPoint3(i)); vector.set(i, p.transform(t)); } } } COM: <s> transform subset of coordinates modifies vector </s>
funcom_train/9701640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getWorkload() { GeneratorFactory factory = new GeneratorFactory(model); IGenerator jet = null; // if (withJETTemplate){ // user specified Jet file jet = factory.getInstance(EGenerationType.JETEMPATE); // } else { // jet = factory.getInstance(EGenerationType.JETEMPATE); // } int result = jet.getWorkload()+AST_STATIC_WORKLOAD; try { jet.cleanup(); } catch (CoreException e) { // so this is not cleaned up. } return result; } COM: <s> take the workload for the generation of the jet file and add 3 </s>
funcom_train/16758389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updownLoad (HttpServletRequest req, HttpServletResponse resp, String downUrl, String upLoadUrl, String systemName, String complay) throws IOException{ UPDownLoadFile dlf = new UPDownLoadFile(); systemName = decodeUtf8Str(systemName); complay = decodeUtf8Str(complay); dlf.downLoad(req, resp, getBasePath(), downUrl, upLoadUrl, systemName, complay); } COM: <s> p description license license </s>
funcom_train/2586424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JFileChooser createFileChooser() { final JFileChooser fc = new JFileChooser(); fc.addChoosableFileFilter( new ExtensionFileFilter(getFileDescription(), getFileExtension()) ); fc.setMultiSelectionEnabled(false); fc.setCurrentDirectory(getCurrentDirectory()); return fc; } COM: <s> creates the file chooser </s>
funcom_train/44011374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEmpState() { System.out.println("getEmpState"); EmployeeBO instance = new EmployeeBO(); String expResult = ""; String result = instance.getEmpState(); 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 emp state method of class edu </s>
funcom_train/8693112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getXPathNameStep() { String uri = getNamespaceURI(); if ((uri == null) || (uri.length() == 0)) { return getName(); } String prefix = getNamespacePrefix(); if ((prefix == null) || (prefix.length() == 0)) { return "*[name()='" + getName() + "']"; } return getQualifiedName(); } COM: <s> returns the xpath expression to match this elements name which is </s>
funcom_train/5464798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TXRequestMessage createRegularRequest(String method, Map urlParams, Map httpParams, String destination) { TXRequestMessage result = TXRequestMessage.getInstance(SERVER_DEST_URL, httpParams, urlParams, "-1", "GET", destination); //uncomment this to see the data that will be sent in clear text //logger.finest(result.createXML()); return result; } COM: <s> prepare a xml request </s>
funcom_train/42538355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(Stringer<X> s){ String ret = ""; List<X> lst = this; while(!lst.isEmpty()){ ret += s.toString(lst.top(),lst.pop()); lst = lst.pop(); } return ret; } COM: <s> to string using a stringer visitor </s>
funcom_train/16910809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containseEquivalentCoupling(final Coupling<?> toCheck) { for (Coupling<?> coupling : getCouplings()) { boolean consumersMatch = attributesMatch(coupling.getConsumer(), toCheck.getConsumer()); boolean producersMatch = attributesMatch(coupling.getProducer(), toCheck.getProducer()); if (consumersMatch && producersMatch) { return true; } } return false; } COM: <s> returns whether the coupling is referenced by this manager </s>
funcom_train/29939563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changeExtension(String extension) { IPath path = new Path(getFileName()); String pathExtension = path.getFileExtension(); if (extension.equals(pathExtension)) { // do nothing } else { fileEntry.setText (path.removeFileExtension().addFileExtension(extension).toString()); } } COM: <s> changes the file extension of the file name </s>
funcom_train/43422858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storeAgreement(String uares) throws CDRException { AgreementDAO myDAO = DAOFactory.getDAOFactory().getAgreementDAO(); AgreementType newAgreement = ((UAResType) UARes.txt2xml(uares)) .getAgreement(); String key = newAgreement.getAgreementToken(); Logger.getInstance().logMessage(Logger.INFO, "storeAgreement"); myDAO.insertAgreement(key, AgreementDAO.xml2txt(newAgreement)); } COM: <s> this method stores a new agreement in the database after marshalling it </s>
funcom_train/3815014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveAlignedText(String hypothesis, String reference) { try { FileWriter writer = new FileWriter("align.txt"); writer.write(hypothesis); writer.write("\n"); writer.write(reference); writer.close(); } catch (IOException ioe) { ioe.printStackTrace(); } } COM: <s> saves the aligned hypothesis and reference text to the aligned text file </s>
funcom_train/42711066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getJButtonAddInvoiceTB() { if (jButtonAddInvoiceTB == null) { jButtonAddInvoiceTB = new JButton(); jButtonAddInvoiceTB.setBounds(new Rectangle(10, 300, 121, 21)); jButtonAddInvoiceTB.setText("Add"); jButtonAddInvoiceTB.setActionCommand("AddPosition"); } return jButtonAddInvoiceTB; } COM: <s> this method initializes j button add invoice tb </s>
funcom_train/25437304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayMessageInTray(String message){ if(objTrayIcon != null && !message.trim().equals("")){ //MessageBox.showInfo(null, message); objTrayIcon.displayMessage("", message, TrayIcon.MessageType.NONE); } } COM: <s> this method display message in tray </s>
funcom_train/47184119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeNDCode(MedicationBean med) throws DBException, iTrustException { Connection conn = null; PreparedStatement ps = null; try { conn = factory.getConnection(); ps = conn.prepareStatement("DELETE FROM NDCodes WHERE Code=?"); ps.setString(1, med.getNDCode()); return (1 == ps.executeUpdate()); } catch (SQLException e) { e.printStackTrace(); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } COM: <s> removes a nd code returns whether or not the change was made </s>
funcom_train/23671527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChild(E child) { if(child == null) throw new IllegalArgumentException("Child was null"); List<E> childList = getChildList(); int size = childList.size(); childList.add(child); child.setParent(this); if(isInTree()) fireTreeNodesInserted((E)this, new int[]{size}); } COM: <s> add child node to this one </s>
funcom_train/9407581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void delayedExecute(ScheduledFutureTask<?> task) { if (isShutdown()) reject(task); else { super.getQueue().add(task); if (isShutdown() && !canRunInCurrentRunState(task.isPeriodic()) && remove(task)) task.cancel(false); else prestartCoreThread(); } } COM: <s> main execution method for delayed or periodic tasks </s>
funcom_train/21157193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean suitesToArgs(final Object[] args) { boolean flag = parameterClasses != null && parameterClasses .length == args .length; for (int i = 0; i < parameterClasses.length && flag; i++) { Object curParameter = args[i]; Class curParamClass = parameterClasses[i]; flag = isInstanceOf(curParameter, curParamClass); } return flag; } COM: <s> the method code suites to args code check if the types </s>
funcom_train/45109436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTextInFieldOperator(ContainerOperator operator, String labelText,Object value, int indexNum){ JTextFieldOperator txtField = getJTextFieldComponent(operator, labelText, indexNum); if (!checkOperator(txtField, labelText,"Text Field is disabled!" , labelText+"\nTried to insert value "+value)){ return; } txtField.setText(value.toString()); } COM: <s> set a text in a jtext field operator </s>
funcom_train/11653690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void traverse(HashTreeTraverser visitor) { Iterator<?> iter = list().iterator(); while (iter.hasNext()) { Object item = iter.next(); visitor.addNode(item, getTree(item)); getTree(item).traverseInto(visitor); } } COM: <s> allows any implementation of the hash tree traverser interface to easily </s>
funcom_train/35834235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJbtn_desfazer() { if (jbtn_desfazer == null) { jbtn_desfazer = new JButton(); jbtn_desfazer.setBounds(new Rectangle(435, 15, 50, 21)); jbtn_desfazer.setToolTipText("UNDO"); jbtn_desfazer.setIcon(new ImageIcon(getClass().getResource("/res/undo.gif"))); } return jbtn_desfazer; } COM: <s> this method initializes jbtn desfazer </s>
funcom_train/50253581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void foreUnlock() { if (lock == null) { log.warn("Unlock of token '" + id + "' forced, but it is not locked"); } log.debug("Foce unlock of token[" + id + "] which was locked by " + lock); lock = null; } COM: <s> force unlocking the token even if the owner is not known </s>
funcom_train/34105105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(final List<Vertex> vertices) { // Creates constraints for horizontal overlaps. // init(vertices, X); // ConstraintGraph constraints = generateContraints(); // constraints.rearrange(); // Map<Vertex, Double> xPos = constraints.satisfy(); // Creates constraints for vertical overlaps. init(vertices, Y); ConstraintGraph constraints = generateContraints(); Map<Vertex, Double> yPos = constraints.satisfy(); // Set the new positions of the vertices. for (Vertex v : vertices) { // v.x = xPos.get(v); v.y = yPos.get(v); } } COM: <s> takes in a list of vertices with cooridnates to the nodes </s>
funcom_train/26125594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processResponse(Response response) { try { super.input(Signal.getResponseSignal(response), 1000L); } catch (InterruptedException e) { Logger.e(TAG, "", e); } catch (TransitionActivityException e) { Logger.e(TAG, "", e); } catch (UnhandledConditionException e) { Logger.e(TAG, "", e); } } COM: <s> handle a response for this subscribe transaction </s>
funcom_train/5344950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream getInputStream() throws IOException { if(isClosed()) throw new IOException("Socket closed."); if(reader instanceof NIOInputStream) return ((NIOInputStream)reader).getInputStream(); else throw new IllegalStateException("reader not NIOInputStream!"); } COM: <s> returns the input stream from the nioinput stream </s>
funcom_train/3836761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonBack() { if (jButtonBack == null) { jButtonBack = new JButton(); jButtonBack.setIcon(new ImageIcon(getClass().getResource( "/icons/go-previous.png"))); jButtonBack.setPreferredSize(new java.awt.Dimension(50, 26)); jButtonBack.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { history.back(); } }); } return jButtonBack; } COM: <s> this method initializes j button back </s>
funcom_train/27842547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setText(String inText) { if (Debug.ON) { Debug.assertTrue(getText() != null, "null getText()"); } if (!getText().equals(inText)) { super.setText(inText); controlIssuer.doViewChanged(); } setCaretPosition(0); controlIssuer.reset(); } COM: <s> override to call super </s>
funcom_train/8362190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setCommandSelected(String command, boolean select) { Set set = (Set) this.commandSets.get(command); if (set != null) { Iterator iterator = set.iterator(); while (iterator.hasNext()) { Component component = (Component) iterator.next(); if (component instanceof JCheckBoxMenuItem) { ((JCheckBoxMenuItem)component).setSelected(select); } } } } COM: <s> selects unselects all gui components that execute the same command and are selectable </s>
funcom_train/35071826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BorrowersExpense create(Borrower borrower, java.util.Date postedOn, BigDecimal amount, BigDecimal interest, String description) { this.borrower = borrower; this.postedOn = postedOn; this.amount = amount; this.interest = interest; this.description = description; getOrCreateTemp(GoCustConnApplication.getApp()).persist(this); return this; } COM: <s> package protected to control who can create a new instance </s>
funcom_train/3442511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeEndDocument() throws XMLStreamException { //What do you want me to do eh! :) currentNode = null; for(int i=0; i< depth;i++){ if(needContextPop[depth]){ needContextPop[depth] = false; namespaceContext.popContext(); } depth--; } depth =0; } COM: <s> will reset current node pointer maintained by the implementation </s>
funcom_train/9753528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Printer create() throws Exception { Preferences prefs = Preferences.getGlobalPreferences(); String geometry = prefs.loadString("Geometry"); if (geometry.compareToIgnoreCase("cartesian") == 0) return new CartesianSNAP(prefs); else if (geometry.compareToIgnoreCase("gcodewriter") == 0) return new CartesianGCode(prefs); else if (geometry.compareToIgnoreCase("nullcartesian") == 0) return new NullCartesianMachine(prefs); else throw new ReprapException("Invalid geometry in properties file"); } COM: <s> currently this just always assumes were building </s>
funcom_train/5474965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextField4() { if (jTextField4 == null) { jTextField4 = new JTextField(); jTextField4.setBounds(new java.awt.Rectangle(150,434,85,18)); jTextField4.addFocusListener(new FocusAdapter(){ public void focusGained(FocusEvent e){ jTextField4.setBackground(color_getfocus); } public void focusLost(FocusEvent ev){ jTextField4.setBackground(color_lostfocus); } }); } return jTextField4; } COM: <s> this method initializes j text field4 </s>
funcom_train/20828386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireLineNumberChanged(){ try{ int pos = input.getCaretPosition(); int line = ((JTextArea)input).getLineOfOffset(pos); int col = pos - ((JTextArea)input).getLineStartOffset(line); for(Iterator it = lineNumberListeners.iterator(); it.hasNext();){ LineNumberListener lis = (LineNumberListener)it.next(); lis.positionChanged(line+1, col+1, pos); } } catch(BadLocationException ex){ ErrorReporter.reportInternalError(this, ex); } } COM: <s> fires a new line number changed event may be used for refreshing </s>
funcom_train/14329422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String ucFirst(String s) { if (s == null || s.length() == 0) return s; if (s.length() == 1) { return s.toUpperCase(); } return s.substring(0, 1).toUpperCase() + s.substring(1); } COM: <s> changes the first character of a string to uppercase </s>
funcom_train/1548706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getAngle() { if ((q0 < -0.1) || (q0 > 0.1)) { return 2 * FastMath.asin(FastMath.sqrt(q1 * q1 + q2 * q2 + q3 * q3)); } else if (q0 < 0) { return 2 * FastMath.acos(-q0); } return 2 * FastMath.acos(q0); } COM: <s> get the angle of the rotation </s>
funcom_train/38573816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logDuplicatesFound(){ StringBuffer buf = new StringBuffer(); for(File a : duplicateFiles){ buf.append("Duplicate File: " + a.getPath() + "\n"); } LOG.log(Level.INFO, "Duplicate Files found: " + "\n" + buf.toString()); } COM: <s> logs all of the duplicate files found to the gui main logger object </s>
funcom_train/20126817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createNodes(DefaultMutableTreeNode top) { File[] roots = File.listRoots(); for (int i = 0; i < roots.length; i++) { DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(roots[i]); top.add(newNode); populateSubtree(newNode, 1); } } COM: <s> this method populates the top 2 levels of the file tree </s>
funcom_train/22347027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName() { // When dbms if (use_dbms) { // is so return dbms_LogTable; } else { // When local if (use_local) { // is so return local_file; } else { // must be alt return alt_name; } // endif } // endif } // end-method COM: <s> return the name of the log </s>
funcom_train/32985759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IAtom getAsCdkAtom() throws Exception { DBAtom[] atoms = getDBMolecule().getAtomsAsArrayInMdlOrder(); for (int i = 0; i < atoms.length; i++) { if (atoms[i].equals(this)) { return (getDBMolecule().getAsCDKMolecule(1).getAtom(i)); } } return null; } COM: <s> gets the as cdk atom attribute of the dbatom object </s>
funcom_train/2034816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean addAttribute() { Setting setting = new Setting(); AttributeEditor edit = new AttributeEditor(Display.getCurrent().getActiveShell(), setting); if (edit.open() == 0) { if (listContainsIdentifier(edit.getIdentifier())) { errorDlg("The table already contains this attribute name."); return true; } edit.updateSetting(); TableItem item = new TableItem(table, SWT.NONE); setItemFromSetting(setting, item); attrList.add(setting); } return false; } COM: <s> adds an attribute </s>
funcom_train/1460240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSymbolType(SymbolType symbolType) { // throwExceptionOnAnchorMouse(symbolType); getParent().invalidate(); // will invalidate dependent slices if it was previously a pie slice invalidateDependentSlices(getCurveIndex(getParent())); this.symbolType = symbolType; // will invalidate dependent slices if it is now a pie slice invalidateDependentSlices(getCurveIndex(getParent())); } COM: <s> sets the type of this symbol </s>
funcom_train/11724764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyUUIDorMIXINRemoved(Name propName) { if (NameConstants.JCR_UUID.equals(propName)) { setUniqueID(null); } else if (NameConstants.JCR_MIXINTYPES.equals(propName)) { NodeState state = (NodeState) internalGetItemState(); if (state != null) { state.setMixinTypeNames(Name.EMPTY_ARRAY); } } } COM: <s> deals with removed jcr uuid and jcr mixin types property </s>
funcom_train/38289128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void update() { this.foreign = dataProvider.getForeignRules(original); // remove all local qnames from foreign qnames. for (Iterator<QName> i = this.foreign.keySet().iterator(); i.hasNext();) { QName qname = i.next(); if (DOMUtils.equalsURI(qname.getNamespaceURI(), original .getNamespaceUri())) i.remove(); } } COM: <s> updates the namelist </s>
funcom_train/15867155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validateProduct(Object obj, Errors errors) { String method = "validateProduct(obj, errors)"; if (logger.isDebugEnabled()) { logger.debug("BEGIN " + method); } ValidationUtils.rejectIfEmptyOrWhitespace(errors, "ingredient.product", "required", "*"); if (logger.isDebugEnabled()) { logger.debug(errors.getErrorCount() + "errors found"); logger.debug("END " + method); } } COM: <s> validates the product of the new ingredient </s>
funcom_train/2959591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void awakeOnInst(int idx) throws ContradictionException { // events over successor variables if ((2 < idx) && (idx < nbNodes + 3)) { if (AFFICHE) LOGGER.log(Level.INFO, "awakeOnInst"); structure.getInputGraph().updateOnInst(idx - 3); } this.constAwake(false); } COM: <s> event based propagation related to the instanciation of a variable </s>
funcom_train/42295207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void walk(PathWalker walker, AffineTransform errorMatrix, double error) { Point2D.Double position = new Point2D.Double(startX, startY); walker.beginSubPath(closed); walker.lineTo(startX, startY); for(int i = 0; i < segments.length; i++) segments[i].walk(walker, position, errorMatrix, error); walker.endSubPath(); } COM: <s> walks the given walker through this subpath </s>
funcom_train/39946874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJbtnCerrar() { if (jbtnCerrar == null) { jbtnCerrar = new JButton(); jbtnCerrar.setBounds(new Rectangle(585, 180, 91, 34)); jbtnCerrar.setText("Cerrar"); jbtnCerrar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { VentanaLog.this.setVisible(false); } }); } return jbtnCerrar; } COM: <s> this method initializes jbtn cerrar </s>
funcom_train/45895638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeBuilding(Building building) { if (buildings.remove(building)) { for (int a = building.location.x; a < building.location.x + building.tileset.normal.width; a++) { for (int b = building.location.y; b > building.location.y - building.tileset.normal.height; b--) { buildingmap.remove(Location.of(a, b)); } } } } COM: <s> removes the given building from the map </s>
funcom_train/32754420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSequence( final AcceleratorSeq sequence ) { _sequence = sequence; loadBPMs(); loadCorrectors(); useSetpoints( sequence ); BEAM_EXCURSION_ORBIT_ADAPTOR.setSequence( sequence ); BEAM_EXCURSION_ORBIT_ADAPTOR.setBPMAgents( _bpmAgents ); synchronized(_orbitSources) { for ( final OrbitSource orbitSource : _orbitSources ) { orbitSource.setSequence( sequence, _bpmAgents ); } } _modificationStore.postModification( this ); EVENT_PROXY.sequenceChanged(this, sequence); } COM: <s> set the selected sequence </s>