__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/37598803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getNextButtonPanel() { if (nextButtonPanel == null) { nextButtonPanel = new javax.swing.JPanel(); java.awt.GridLayout layout = new java.awt.GridLayout(1,2); layout.setHgap(3); nextButtonPanel.setLayout(layout); nextButtonPanel.setName(""); nextButtonPanel.setOpaque(false); nextButtonPanel.add(getNextMonthButton()); if (isShowYearButtons()) { nextButtonPanel.add(getNextYearButton()); } } return nextButtonPanel; } COM: <s> this method initializes next button panel </s>
funcom_train/34583217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean connectToSrv() { try { //System.out.println("Connecting..."); logger.info("Establishing a connection "); server = new Socket(serverName, serverPort); msgSender = new ClientMsgSender(server); msgSender.start(); msgReceiver = new ClientMsgReceiver(server, BomberClient.this); msgReceiver.start(); msgSender.sendMsg(new InfoRequestMsg( InfoRequestMsg.GET_SESSION_LIST)); logger.info("connected to " + serverName); return true; } catch (IOException e) { // TODO Auto-generated catch block // e.printStackTrace(); logger.info("Connection failed"); return false; } } COM: <s> tries to connect to the server </s>
funcom_train/39543359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSource(Filter chainSource) { if(chainSource == null){ throw new IllegalArgumentException("Null Source for Filter Chain"); } touch(); this.chainSource = chainSource; if(filterRes == null){ crop.setSource(chainSource); } else{ filterRes.setSource(chainSource); } } COM: <s> sets the source to be src </s>
funcom_train/23233666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { //TODO figure out how is this XML used //questInfos = QuestsXMLLoader.get(); loadQuest("LookKnifeforQuest"); loadQuest("HerbsForTheWhiteWolf"); loadQuest("TheSpyReport"); loadQuest("WoodsForTheTownHall"); loadQuest("WoodsForAurelius"); loadQuest("PretorianHelmet"); loadQuest("TheSpyreport2"); loadQuest("TheWolfSkin"); loadQuest("HopefullMessage"); loadQuest("HerbsForTheHelper"); loadQuest("IronOres"); loadQuest("PassageAmulet"); } COM: <s> initializes the quest system </s>
funcom_train/19540646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Quadrant findCorner(String name) { try { if (name == null) return Quadrant.SOUTH_EAST; return Quadrant.valueOf(name.toUpperCase()); } catch (IllegalArgumentException e) { if (!CORNER_MAP.containsKey(name.toLowerCase())) { throw new IllegalArgumentException(I18N.getText("addtokenstate.invalidCorner", name)); } // endif return CORNER_MAP.get(name); } // endtry } COM: <s> find a corner for the passed name </s>
funcom_train/49849007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putAll(VariableItems v) { if (!v.sameFlavour(this)) { throw new IllegalArgumentException("NotSameFlavour."); } for (int i = 0; i < size(); i++) { //values[i] = v.values[i]; put(v.labels[i], v.values[i]); } } COM: <s> set the values of all the pairs from the specified variable items </s>
funcom_train/3831769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPropertyKnown (String property) { String tmp = property.replace('/','.'); return (properties.get (property) != null || (properties.isEmpty () && (dbFieldTypes.get (property) != null || dbFieldTypes.get (tmp) != null) ) ); } COM: <s> checks if a property mapping or table </s>
funcom_train/23779380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(String argString) { int length = argString.length(); if (length != _length) return false; for (int i = 0; i < length; i++) { if (argString.charAt(i) != _content[i]) return false; } return true; } COM: <s> is the content equal to the given string </s>
funcom_train/48249282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDeltaCepstrum(String filename, String cb){ rc = new Recognizer(order, frameLength, frameShift, min_T, weights); // Record the observation sequences in Vector <code>obs</code> rc.testDeltaCepstrum(filename, cb); } COM: <s> test using only vq against the codebook formed using delta cepstrums </s>
funcom_train/44869111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WCMDrawGeometricBean getCPoint() { if (cPoint == null) { cPoint = new WCMDrawGeometricBean(); cPoint.setShape(10); cPoint.setFillColor(Color.magenta); cPoint.setColor(Color.magenta); cPoint.setX1(getCInput()); cPoint.setY1(getFOfC()); cPoint.setV(3); cPoint.setH(3); if (presentation) { cPoint.setV(5); cPoint.setH(5); cPoint.setLineWidth(3); } } return cPoint; } COM: <s> this method initializes c point </s>
funcom_train/34537819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFromField(String _field, String _alias, String _realName) { QueryFieldStructure p = new QueryFieldStructure(_field, " ", _alias, "FROM", _realName); if (this.from == null) this.from = new Vector<QueryFieldStructure>(); from.addElement(p); } COM: <s> adds new field to the from clause </s>
funcom_train/19433829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNextPlayerToRemove() { if ( playersToRemove.isEmpty() ) { throw new IndexOutOfBoundsException( "There are no player names to remove" ); } String name = (String) playersToRemove.iterator().next(); playersToRemove.remove( name ); return name; } COM: <s> the gui gets the players that keep exiting the channel with this method </s>
funcom_train/36550507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void restoreRowId(Bundle savedInstanceState) { mTaskId = savedInstanceState != null ? savedInstanceState.getLong(DataDbAdapter.KEY_ID) : null; if (mTaskId == null) { Bundle extras = getIntent().getExtras(); mTaskId = extras != null ? extras.getLong(DataDbAdapter.KEY_ID) : null; } } COM: <s> restore task id from bundle </s>
funcom_train/10841961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWithExtraPathB() throws IOException { final String toDelete = uploadTestScript("rendering-test.esp","GET.esp"); try { // expected to not be found as dispalyUrl has no dots assertHttpStatus(displayUrl + "/extra/more.a4.html", HttpServletResponse.SC_NOT_FOUND); } finally { testClient.delete(toDelete); } } COM: <s> behavior seems slightly different if using get </s>
funcom_train/7929106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String removeSuffix( String value, String toRemove ) { // be-safe !!! if ((value == null) || (toRemove == null) || !suffix(value,toRemove) ) { return value ; } return value.substring(0,value.length()-toRemove.length()) ; } COM: <s> remove a string suffix </s>
funcom_train/42959302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Project getEntity() { try { return (Project) em.createQuery("SELECT e FROM Project e where e.projId = :projId").setParameter("projId", id).getSingleResult(); } catch (NoResultException ex) { throw new WebApplicationException(new Throwable("Resource for " + uriInfo.getAbsolutePath() + " does not exist."), 404); } } COM: <s> returns an instance of project identified by id </s>
funcom_train/43326921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public DVector calcMatchRank() { int i,j; if (matchSeq == null) makeMatchMatrices(); DVector rv = new DVector(nMatches()); for (i=0; i<nMatches(); i++) { int ms = matchSeq[i]; int mf = matchFold[i]; for (j=0; sortedScores[ms].data[j] != mf; j++); rv.data[i] = (double)(j+1); } return rv; } COM: <s> calculate vector of ranks showing one rank for each match </s>
funcom_train/42188424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJLoadButton() { if (jLoadButton == null) { jLoadButton = new JButton(); jLoadButton.setText("Utilizar"); jLoadButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { productName = (String) jList.getSelectedValue(); } }); } return jLoadButton; } COM: <s> this method initializes j load button </s>
funcom_train/2294419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSiteRoot(String rootPath) { // most sites will be below the "/sites/" folder, CmsSite site = lookupSitesFolder(rootPath); if (site != null) { return site.getSiteRoot(); } // look through all folders that are not below "/sites/" return lookupAdditionalSite(rootPath); } COM: <s> returns the site root part for the given resources root path </s>
funcom_train/7808227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getPricewatchCommand() { if (PricewatchCommand == null) {//GEN-END:|90-getter|0|90-preInit // write pre-init user code here PricewatchCommand = new Command("Pricewatch", Command.OK, 0);//GEN-LINE:|90-getter|1|90-postInit // write post-init user code here }//GEN-BEGIN:|90-getter|2| return PricewatchCommand; } COM: <s> returns an initiliazed instance of pricewatch command component </s>
funcom_train/12318607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String removeSID(URL encodedURL) { // Get file path and file name String filePath = encodedURL.getFile(); // Find session ID int IndexOfSID = filePath.lastIndexOf("securesessionid=") ; if (IndexOfSID == -1) // There is no session id embedded return filePath; else { // Remove session ID from URL return filePath.substring(0, IndexOfSID-1); } } COM: <s> remove the sid from the url to properly send to web server </s>
funcom_train/536883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testProblematicCharsInsensitivity() { Track dup1 = new DummyTrack("Accept", "Can't Stand The Night", 180); Track dup2 = new DummyTrack("Accept", "Can?t Stand The Night", 180); assertAreCloseEnough(dup1, dup2); } COM: <s> test insensitivity to characters that can be the result of coding system trouble </s>
funcom_train/32831190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInfinity_notEqual() { Difference result = reflectionComparator.getDifference(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY); assertEquals(Double.NEGATIVE_INFINITY, result.getLeftValue()); assertEquals(Double.POSITIVE_INFINITY, result.getRightValue()); } COM: <s> tests for equality of a negative infinity with a positive infinity value </s>
funcom_train/33993692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document friends_areFriends( long userId1, long userId2 ) throws FacebookException, IOException { return callMethod( FacebookMethod.FRIENDS_ARE_FRIENDS, new Pair<String,CharSequence>( "uids1", Long.toString( userId1 ) ), new Pair<String,CharSequence>( "uids2", Long.toString( userId2 ) ) ); } COM: <s> retrieves the friends of the currently logged in user </s>
funcom_train/1387346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBusRouteById_KnownRoute_IncludePolylinesAndStops_CheckPolylinesLast()throws IOException, JSONException { BusRoute busRoute = fetcher.getBusRouteById(30, true); Polyline actual = busRoute.getPolylines().get(busRoute.getPolylines().size()-1); assertEquals("i|_bHrpfiV?uE?mB?oBAoCiGDCDCJ@bFpGB", actual.getEncodedPolyline()); assertEquals("BBBBBBBBBB", actual.getEncodedLevels()); } COM: <s> test functionality of get bus route by id by </s>
funcom_train/38463617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Transaction getTransaction() throws StorageException { synchronized(txMap) { Transaction tx = (Transaction)txMap.get(Thread.currentThread()); if(tx == null) { tx = new JSOTransaction(this); txMap.put(Thread.currentThread(),tx); } return tx; } } COM: <s> gets the transaction associated to the current thread </s>
funcom_train/3901008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUniqueElementNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Id_uniqueElementName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Id_uniqueElementName_feature", "_UI_Id_type"), LomPackage.Literals.ID__UNIQUE_ELEMENT_NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the unique element name feature </s>
funcom_train/48656056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RevenueSource create() throws Exception{ String id = GUID.generate("co"); RevenueSource rs = new conversionBO(id); System.out.println("I've created a ConversionOrder : ID: " + rs.getId()); //put RS into Cache Cache c = Cache.getInstance(); c.put(rs.getId(),rs); return rs; } COM: <s> create a conversion business object </s>
funcom_train/27952065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void play() throws AudioException, IOException { if (isPlaying()) { return; } try { getClip().start(); setPlaying(true); setPaused(false); } catch (LineUnavailableException lue) { throw new AudioException(lue); } catch (UnsupportedAudioFileException uafe) { throw new AudioException(uafe); } } COM: <s> play this message </s>
funcom_train/22342644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startReceive() { serverThread = new Thread() { public void run() { while (true) { Socket s; try { s = server.accept(); } catch (IOException e) { e.printStackTrace(); continue; } Thread handler; try { handler = new ClientSocketThread(s); } catch (IOException e) { e.printStackTrace(); try { s.close(); } catch (IOException e1) { e1.printStackTrace(); } continue; } synchronized (clientThreads) { clientThreads.add(handler); } handler.start(); } } }; System.out.println("Starting thread"); serverThread.start(); } COM: <s> starts the initial thread that connects and sets up ip clients </s>
funcom_train/21036571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createDefaultInitComponents(String bootStrapIconPath, String initialRenderIconPath){ if (bootStrapComponent==null){ if (bootStrapIconPath!=null) this.bootStrapIconPath=bootStrapIconPath; Icon bIcon = new ImageIcon(this.bootStrapIconPath); bootStrapComponent = new JLabel(bIcon); } if (initialRenderComponent==null){ if (initialRenderIconPath!=null) this.initialRenderIconPath=initialRenderIconPath; Icon rIcon = new ImageIcon(this.initialRenderIconPath); initialRenderComponent = new JLabel(rIcon); } } COM: <s> create default init components allows changing the </s>
funcom_train/42690068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void prepare_template_(File file) throws IOException { if (true) throw new RuntimeException("remove this line"); boolean modified = false; Document doc; try { doc = new SAXBuilder().build(file); } catch (JDOMException ex) { throw new RuntimeException(ex); } Element root = doc.getRootElement(); Element principalDescription = root.getChild("principalDescription"); if (principalDescription != null) { root.removeContent(principalDescription); modified = true; } if (modified) save(doc, file); } COM: <s> use as template dont modify </s>
funcom_train/18052325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getSvManageAddSecretMenuItem() { if (svManageAddSecretMenuItem == null) { svManageAddSecretMenuItem = new JMenuItem(); svManageAddSecretMenuItem.setText("Add Secret..."); svManageAddSecretMenuItem .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { addSecretDialog(); } }); } return svManageAddSecretMenuItem; } COM: <s> this method initializes sv manage add secret menu item </s>
funcom_train/16356978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeEntry(final String positionKey, final DefaultTrie trie) { final int subTrieSize = trie.length(); if (subTrieSize == 1) { // lower trie is now not required final TrieEntry entry = trie.getFirstElement(); if (entry != null) { getEntries().put(positionKey, entry); } else { getEntries().remove(positionKey); } } } COM: <s> removes the entry from a trie </s>
funcom_train/17568469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PBounds getUnionOfChildrenBounds(PBounds dstBounds) { if (dstBounds == null) { dstBounds = new PBounds(); } else { dstBounds.resetToZero(); } int count = getChildrenCount(); for (int i = 0; i < count; i++) { PNode each = (PNode) children.get(i); dstBounds.add(each.getFullBoundsReference()); } return dstBounds; } COM: <s> compute and return the union of the full bounds of all the </s>
funcom_train/9498334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public String getLongDescription() { if (algoParent == null) return getNameDescription(); else { sbLongDesc.setLength(0); sbLongDesc.append(getNameDescription()); // add dependency information sbLongDesc.append(": "); sbLongDesc.append(algoParent.toString()); return sbLongDesc.toString(); } } COM: <s> returns type label and definition information about this geo element for </s>
funcom_train/26401668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User getUser(String userid) { if (userTable == null) { userTable = new Hashtable(); LinkedList users = getUsers(); Iterator it = users.iterator(); while (it.hasNext()) { User user = (User) it.next(); userTable.put(user.getUserid(), user); } } return((User) userTable.get(userid)); } COM: <s> retrieves the user with the given user id </s>
funcom_train/24936913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ByteRange getRange() { assert (!cluster.isEmpty()); int min = cluster.iterator().next().getAbsoluteMinDelta(); int max = 0; for (Location location : cluster) { min = Math.min(min, location.getAbsoluteMinDelta()); max = Math.max( max, location.getAbsoluteMaxDelta() + location.getAddressableSize()); } return new ByteRange(min, max); } COM: <s> retrieves the range of bytes covered by all locations that have been </s>
funcom_train/20742362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getAttrFromMap(DirContextOperations dco, String name) { String ldap_name = (String) MapLdapAttrs.get(name); if (ldap_name == null) { ldap_name = ""; } // get name from attributes return getAttr(dco, ldap_name); } COM: <s> get attribute from ldap from emforge user property </s>
funcom_train/11344501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeTest(Test test) { int index = 1; synchronized (this) { for (TestRecord t : m_list) { if (t.m_test.equals(test)) { index = m_list.indexOf(t); m_list.remove(t); return; } } } if (index != -1) { fireContentsChanged(this, index, index); } } COM: <s> removes a test </s>
funcom_train/20324554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void center(WordNode tempNode) { /* This Function centers the display on a certain node */ setXoffset((int) (((width / zoomLevel) - tempNode.position().x()) - ((width / zoomLevel) / 2))); setYoffset((int) (((height / zoomLevel) - tempNode.position().y()) - ((height / zoomLevel) / 2))); } COM: <s> centers the screen on a given word node </s>
funcom_train/20441841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPetPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ESMFVirtualMachine_pet_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ESMFVirtualMachine_pet_feature", "_UI_ESMFVirtualMachine_type"), ESMFPackage.Literals.ESMF_VIRTUAL_MACHINE__PET, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the pet feature </s>
funcom_train/34024608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setEnableOwnComponents(boolean t) { for (Component b : toDisableIfNotOwn) b.setEnabled(t || !PersonalAnnos.useRemoteServer); if (PersonalAnnos.useRemoteServer) { mtopublic.setEnabled(false); mtoprivate.setEnabled(true); } else { mtopublic.setEnabled(true); mtoprivate.setEnabled(false); } if (t && !PersonalAnnos.useRemoteServer) mtopublic.setEnabled(true); else mtopublic.setEnabled(false); } COM: <s> enables disables different buttons depending on being in local or </s>
funcom_train/9288965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onStatementErrorOccurred(PreparedStatement statement,SQLException sqle) { if (!statementEventListeners.isEmpty()){ StatementEvent event = new StatementEvent(this,statement,sqle); for (StatementEventListener l : statementEventListeners) { l.statementErrorOccurred(event); } } } COM: <s> raise the statement error occurred event for all the listeners when the </s>
funcom_train/24642345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getConditionalProbability(List<String> instance){ // do logging //LOG.debug("Computing the probability of " + instance + " with respect to the clause " + this.toString()); if(instance.size() != this.getBody().size()+1){ //do logging //LOG.debug("Computing the probability of " + instance + " with respect to the clause " + this.toString() + " failed due to misformed parameter."); return -1; } return cpd.get(instance); } COM: <s> returns the conditional probality encoded in this bayesian clause with the given instance </s>
funcom_train/11724578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invalidate(HierarchyEntry entry, boolean recursive) { HierarchyEntryImpl he = (HierarchyEntryImpl) entry; if (recursive) { he.generation = INVALIDATION_PENDING; if (!invalidating) { nextGeneration = 1; } } else { if (!invalidating) { nextGeneration = 1; } he.invalidateInternal(false); } } COM: <s> records a pending recursive </s>
funcom_train/46335669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void callComplete() { // end the timing event eventTimer.end(timingEvent); // close the statement OpbSqlHelper.close(lggr, sourceClass, sourceMethod, statement); lggr.logp(Level.FINER, sourceClass, sourceMethod, "call complete"); } COM: <s> call this method when this helper is finished with </s>
funcom_train/19054109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleProperty(Node inNode) { NamedNodeMap attribs = inNode.getAttributes(); Node propKeyNode = attribs.getNamedItem("key"); Node propValueNode = attribs.getNamedItem("value"); if (propKeyNode != null && propValueNode != null) { StructureProperty strProperty = new StructureProperty(propKeyNode.getNodeValue(), propValueNode.getNodeValue()); codeList.add(strProperty); } } COM: <s> this method handles the property node </s>
funcom_train/44950237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { boolean result; if ((other == null) || !(other instanceof ComicToConvert)) { result = super.equals(other); } else { ComicToConvert otherComic = (ComicToConvert) other; result = getTargetComicFile().equals(otherComic.getTargetComicFile()); } return result; } COM: <s> does code other code result in the same target comic </s>
funcom_train/22659604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void completeRecord(ModuleID id, SymbolTable table) { ModuleRecord record = map.get(id); record.setSymbolTable(table); ModuleID id2 = stack.pop(); assert id == id2 : "id != id2"; if (!debugOff) { err.message("Complete record: " + id.toString()); //DEBUG } } COM: <s> places the symbol table for an associated module into the environment and </s>
funcom_train/37183618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateInfoLabel() { String s = keysSorted.length + " keys. " + iNumMissing + " missing/unchanged"; if (iNumExtra > 0) { s += " and " + iNumExtra + " extra (mislabeled or no longer used)"; } lInfo.setText(s); } COM: <s> the time to comment such a small and self expanatory function could much </s>
funcom_train/17183286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String sub_encode() { StringBuilder sb = new StringBuilder(); sb.append(getTipo()).append(" "); sb.append(getNumero()).append(" "); sb.append(getData().getTime()).append(" "); sb.append(getUtilizador()).append(" "); return sb.toString(); } COM: <s> encodes the commom fields for pedido assistencia </s>
funcom_train/39170992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ParsingFrame (String source) { Stats.markIt(-1); this.source = source; Matcher lexMatcher = LEXEME_MATCH_PAT.matcher(source); int lastSuff = -1; while (lexMatcher.find()) { if (lastSuff < 0) lastSuff = lexMatcher.start(); parsingBuffer.add( new ParsingBufferElement( lastSuff, lexMatcher.end(1) - lexMatcher.start(1), lexMatcher.end(2) - lexMatcher.start(2), lexMatcher.group(1), lexMatcher.start() - lastSuff)); lastSuff = lexMatcher.end(2) - lexMatcher.start(2); } Stats.markIt(7); } COM: <s> the constructor parses the source string with the regular expression </s>
funcom_train/1223014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector3d getTCentre(BSimTriangle t){ double x, y, z; Vector3d a = vertices.get(t.getP1()).getLocation(); Vector3d b = vertices.get(t.getP2()).getLocation(); Vector3d c = vertices.get(t.getP3()).getLocation(); x = (a.x + b.x + c.x)/3; y = (a.y + b.y + c.y)/3; z = (a.z + b.z + c.z)/3; return (new Vector3d(x,y,z)); } COM: <s> compute the coordinates of the centre of a triangle </s>
funcom_train/12277421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDomainUsers(String rdnUsers) throws Exception { if(! rdnUsers.trim().equals("")) this.rdnUsers.add(rdnUsers.trim()); if (this.rdnUsers.size() == 1 && this.rdnUsers.equals("")) { throw new IllegalArgumentException("No ldap domain of user configured."); } } COM: <s> set rdn users </s>
funcom_train/34627901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String createList(String[] items) { StringBuffer sb = new StringBuffer(); if (items.length > 0) { for (int i = 0; i < items.length-1; i++) { sb.append(items[i]); sb.append(SEPARATOR); } sb.append(items[items.length-1]); } return sb.toString(); } COM: <s> combines the given list of items into a single string </s>
funcom_train/14408321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createCIMModel(String mofFile) throws IOException { TaskProperties propertyList = null; propertyList = new TaskProperties(configFileLocation, EcuteProperties.getToolNameAcronym()); IEcuteTask importMof = new ImportMOFTask(propertyList); Object result = null; result = importMof.execute(logger, new NullProgressMonitor()); this.cimModel = (org.sblim.ecute.common.cimmodel.CIMModel)result; } COM: <s> parses the mof files and creates a cim model object </s>
funcom_train/28750449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUtn(Long newVal) { if ((newVal != null && this.utn != null && (newVal.compareTo(this.utn) == 0)) || (newVal == null && this.utn == null && utn_is_initialized)) { return; } this.utn = newVal; utn_is_modified = true; utn_is_initialized = true; } COM: <s> setter method for utn </s>
funcom_train/44011404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetFireDate() { System.out.println("getFireDate"); EmployeeBO instance = new EmployeeBO(); String expResult = ""; String result = instance.getFireDate(); 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 fire date method of class edu </s>
funcom_train/42375517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void StateChanged(String state){ StateChangedEvent event = new StateChangedEvent(this, state); for(int i=0;i<this.state_changed_listener.size();i++) { this.state_changed_listener.get(i).StateChanged(event); } } COM: <s> to specifie that the current state changed </s>
funcom_train/16436165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(BigDecimal iValue) { // Dont add a empty row if (iValue == null) { return; } // Add the value if (iValue.signum() > 0) { iDebet = iValue; iCredit = null; } else { iDebet = null; iCredit = iValue.abs(); } } COM: <s> set the value of this row such as </s>
funcom_train/50464295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BLXObject copy(BLXObject source) throws ClassNotFoundException, InstantiationException { BLXElement blxE = source.getBLXElement(); Element data = source.getDataElement(); blxE.setDataElement(data); BLXObject dest = (BLXObject)getObject(blxE, null); dest.setBLXElement(blxE); return dest; } COM: <s> copy a blx object </s>
funcom_train/26402003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LinkedList getDoctors() throws I18NException { LinkedList doctors = new LinkedList(); LinkedList users = getUserData(); Iterator it = users.iterator(); while (it.hasNext()) { User user = (User) it.next(); if (user.getGroupList().contains("doctors")) doctors.add(user); } return (doctors); } COM: <s> extract those users belonging to the group doctors </s>
funcom_train/38724998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int amountOfFittingShapePanels() { Dimension avail = resultPanel.getSize(); Dimension needed = new ShapePanel(null, null).getPreferredSize(); int horizontal = (avail.width) / (needed.width+5); int vertical = (avail.height) / (needed.height+5); return horizontal * vertical; } COM: <s> calculates the amount of shape panels currently fitting into the panel </s>
funcom_train/10680913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getNextValueAsLong() { reading_data_index = reading_data_index + TypesLengths.getTypeLength(TypesLengths.LONG_ID); return readFromByteArray(data, reading_data_index - TypesLengths.getTypeLength(TypesLengths.LONG_ID), TypesLengths .getTypeLength(TypesLengths.LONG_ID)); } COM: <s> gets the next value of the data of the packet as long </s>
funcom_train/12839024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTableName() { Enumeration en = objectAttributeList.elements(); while (en.hasMoreElements()) { String tableName = ((ObjectAttribute)en.nextElement()).getTableName(); if(StringUtils.isNotBlank(tableName)) { return tableName; } } return null; } COM: <s> attempts to determine the database table name that this object attribute set </s>
funcom_train/31357876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void event(int importance, String desc) { //System.out.println("DM: (" + importance + ") " + desc); /* // Variables XMLObject xml; // Create Event XML xml = XMLFactory.createEvent(30, access.getID(), null, importance, desc, null); */ // Broadcast event // try { // access.process(Message.create(xml)); // } catch (RuntimeException e) { // } // try } // event() COM: <s> process event for driver manager </s>
funcom_train/2546895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getSourceWorkflowConnections() { ArrayList connList = new ArrayList(); for (int i = 0; i < sourceConnections.size(); i++) { if (sourceConnections.get(i) instanceof WorkflowConnectionModel || sourceConnections.get(i) instanceof LoopConnectionModel) { connList.add(sourceConnections.get(i)); } } return connList; } COM: <s> gets a list of workflow connections for which this element is the source </s>
funcom_train/25567675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MenuItem getMenuItem(String itemName) { int n = getMenuComponentCount(); Component comp; for(int i=0; i<n; i++){ comp = getMenuComponent(i); if(comp instanceof MenuItem){ if(itemName.equals(comp.getName())) return (MenuItem) comp; }else if(comp instanceof Menu){ comp = ((Menu)comp).getMenuItem(itemName); if(comp!=null) return (MenuItem) comp; } } return null; } COM: <s> returns item of the given name from this menu or its sub menus </s>
funcom_train/27904983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int forward(int M0, Transition [] ts) { int len = ts.length; int Mp, M = M0; do { Mp = M; ref(M); for(int i = 0; i < len; i++) { int next = ref( image(M, ts[i]) ); int tmp = ref( union(next, M) ); deref(next); deref(M); M = tmp; } deref(M); } while(Mp != M); return M; } COM: <s> compute forward reachables </s>
funcom_train/22120937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(SocketIdentifier id) { return (getLocalAddress().equals(id.getLocalAddress()) && getRemoteAddress().equals(id.getRemoteAddress())) || (getLocalAddress().equals(id.getRemoteAddress()) && getRemoteAddress().equals(id.getLocalAddress())); } COM: <s> a socket identifier is semantically equal to another socket identifier if </s>
funcom_train/13874185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTargetPropertyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PropertyAssignment_targetProperty_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PropertyAssignment_targetProperty_feature", "_UI_PropertyAssignment_type"), QvtcorePackage.Literals.PROPERTY_ASSIGNMENT__TARGET_PROPERTY, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the target property feature </s>
funcom_train/37138393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DeserializedPacket readPacket() throws IOException { try { DeserializedPacket packet = (DeserializedPacket) in.readObject(); packet .setDeserializedTimestamp(new Timestamp(System.currentTimeMillis())); return packet; } catch (ClassNotFoundException e) { logger.error("Can not deserialize a packet from InputStream " + e.getMessage()); throw new IOException("Can not deserialize a packet from InputStrea " + e.getMessage()); } } COM: <s> deserializes a packet from the underlying input stream that was previously </s>
funcom_train/45622975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addResourcesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CscType_resources_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CscType_resources_feature", "_UI_CscType_type"), MSBPackage.eINSTANCE.getCscType_Resources(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the resources feature </s>
funcom_train/37240816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ String scoreData = new String("******** SCORE: " + title + ". Contains " + this.size() + " parts. *******" + '\n'); scoreData += "Tempo = " + this.tempo + " bpm" +'\n'; Enumeration enum = partList.elements(); while(enum.hasMoreElements()){ Part part = (Part) enum.nextElement(); scoreData = scoreData + part.toString() + '\n'; } return scoreData; } COM: <s> print the titles of all tracks to stdout </s>
funcom_train/18743449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isEditedValueCorrect(String value) { if (this.editingValueForKey == null) { return GraphProperties.isValidUserKey(value); } else { Property<String> test = getDefaultKeys().get(this.editingValueForKey); return test == null || test.isSatisfied(value); } } COM: <s> tests if a given non empty string value is correct </s>
funcom_train/37492465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void launchScheduledProtocols() { if (smachines.size() > 0) { StateBehavior toAdd = smachines.firstElement(); //System.err.println("Launching " + toAdd.getProtocol()); this.agent.addBehaviour(toAdd); addCID(toAdd.getConversationID(), toAdd.getPlayedRole()); activeMachines.put(new Pair(toAdd.getConversationID(), toAdd .getPlayedRole()), toAdd); smachines.removeElementAt(0); } } COM: <s> it traverses a list of </s>
funcom_train/33391781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String determineTargetUrl(HttpServletRequest request, HttpServletResponse response) { String targetUrl = request.getParameter("logoutSuccessUrl"); if (!StringUtils.hasLength(targetUrl)) { targetUrl = getLogoutSuccessUrl(); } if (!StringUtils.hasLength(targetUrl)) { targetUrl = request.getHeader("Referer"); } if (!StringUtils.hasLength(targetUrl)) { targetUrl = "/"; } return targetUrl; } COM: <s> returns the target url to redirect to after logout </s>
funcom_train/3772220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RevisionBean getInitialRevision() { RevisionBean bean = null; try { if (revisionDescriptors != null) { Content content = nat.getContentHelper(); NodeRevisionNumber nrn = revisionDescriptors.getInitialRevision(); NodeRevisionDescriptor nrd = content.retrieve(st, revisionDescriptors, nrn); bean = new RevisionBean(nat, st, nrd); } } catch (SlideException e) { // ignore for now } return bean; } COM: <s> returns the initial revision of the node </s>
funcom_train/33064516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleBrowse() { IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(), root, false, "Select new file container"); if (dialog.open() == ContainerSelectionDialog.OK) { Object[] result = dialog.getResult(); if (result.length >= 1) { setContainer(root.getFolder((IPath) result[0])); } } } COM: <s> browse container dialog </s>
funcom_train/20885044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStringFLR() { StringDTO dto = new StringDTO(); dto.stringField = "stringValue"; assertTrue(JSefaTestUtil.serialize(FLR, dto).indexOf("stringValue") >= 0); JSefaTestUtil.assertRepeatedRoundTripSucceeds(FLR, dto); } COM: <s> tests string flr </s>
funcom_train/2807793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Assembly matchOneAssembly(Assembly in) { if (!in.hasMoreElements()) { return null; } if (qualifies(in.peek())) { Assembly out = (Assembly) in.clone(); Object o = out.nextElement(); if (!discard) { out.push(o); } return out; } return null; } COM: <s> returns an assembly equivalent to the supplied assembly </s>
funcom_train/4519189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RButton getRButton3111() { if (RButton3111 == null) { RButton3111 = new RButton(2); RButton3111.setText("Tab"); RButton3111.setBounds(new Rectangle(50, 350, 120, 30)); RButton3111.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { new TestTab("Tab").runTest(); } }); } return RButton3111; } COM: <s> this method initializes rbutton3111 </s>
funcom_train/4462620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Section sectionFactory(Locus l, String name) { if(name.equalsIgnoreCase("FEATURES")) return new GenBankFile.FeaturesSection(l, name); else if(name.equalsIgnoreCase("ORIGIN")) return new GenBankFile.OriginSection(l, name); // else if(name.equalsIgnoreCase("LOCUS")) // return new GenBankFile.LocusSection(l, name); else return new GenBankFile.Section(l, name); } COM: <s> returns a section object of the right type i </s>
funcom_train/12562730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAlertWaitingInBackground() { synchronized (midletProxies) { for (int i = midletProxies.size() - 1; i >= 0; i--) { MIDletProxy current = (MIDletProxy)midletProxies.elementAt(i); if (current.isAlertWaiting()) { return true; } } } return false; } COM: <s> return true if home indicator needs to be turned on </s>
funcom_train/37595415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Type meet(Iterable<? extends Type> ts) { Set<? extends Type> toMeet = CollectUtil.asSet(ts); switch (toMeet.size()) { case 0: return TOP; case 1: return IterUtil.first(toMeet); default: return new IntersectionType(IterUtil.snapshot(toMeet)); } } COM: <s> simple meet implementation construct an intersection if there are more than two </s>
funcom_train/1109565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeCurrentRun() { if(currentRunPack != null){ int index = getRunIndex(); listRunPack.remove(currentRunPack); runDlm.removeElementAt(index); if(index > 0) { setCurrentRunPack(index - 1); } else if(index == 0 && !listRunPack.isEmpty()) { setCurrentRunPack(index); } } refreshListRun(); setSelectedIndex(); } COM: <s> remove current run </s>
funcom_train/25765820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertClose(double[] m, double[] n, double tolerance) { if (m.length != n.length) { fail("vectors not same length"); } for (int i = 0; i < m.length; i++) { assertEquals(m[i], n[i], tolerance); } } COM: <s> verifies that two vectors are close sup norm </s>
funcom_train/15720479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLastVib(String lastVib) { this.lastVib = lastVib; MainClass.net.getTreemodel().valueForPathChanged(new javax.swing.tree.TreePath(MainClass.net.getTreemodel().getPathToRoot(this)),this); // if (meantForMe()) { // MainClass.gui.nodes.nodesValues.vibLastDetect.setText(lastVib); // } } COM: <s> sets the date of the last sensordata vibration detection of the routing node </s>
funcom_train/31929012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeGP8(int reg, byte val) { if (reg < 4) { gp32[reg] = (gp32[reg] & 0xffffff00) | (((int) val) & 0x000000ff); } else { gp32[reg - 4] = (gp32[reg - 4] & 0xffff00ff) | (((int)val & 0xff) << 8); } } COM: <s> write an 8bit general purpose register </s>
funcom_train/1575995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void findOwnedPopups(final Window window, final List popups) { assert window != null; assert EventQueue.isDispatchThread(); // On AWT event thread final Window[] ownedWindows = window.getOwnedWindows(); for (int i = 0; i < ownedWindows.length; i++) { findContainedPopups(ownedWindows[i], popups); findOwnedPopups(ownedWindows[i], popups); } } COM: <s> find owned popups </s>
funcom_train/7270579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCompleteDownloads() { int complete = 0; for (int row = 0; row < DATA_MODEL.getRowCount(); row++) { DownloadDataLine dataLine = DATA_MODEL.get(row); if (dataLine.getState() == DownloadStatus.COMPLETE) { complete++; } } return complete; } COM: <s> returns the number of completed downloads </s>
funcom_train/25792165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendClickEvent(int clickCount, int column, ToolTreeNode node) { switch (column) { case ToolTreeModel.VISIBLE_COLUMN: changedNodeFilter(node); break; case ToolTreeModel.TOOL_COLUMN: if (clickCount == 1) { m_focusSync.setHighlight(node.getToolInstance()); } if (clickCount == 2) { m_focusSync.setFocus(node.getToolInstance()); } break; default: // No need to do anything break; } } COM: <s> check whick column is clicked and passes the node further </s>
funcom_train/50863261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCollaborativePaperCompleted(Person researcher) { if (collaborativePaperWorkTime.containsKey(researcher)) { double currentWorkTime = collaborativePaperWorkTime.get(researcher); double requiredWorkTime = getTotalCollaborativePaperWorkTimeRequired(); return (currentWorkTime >= requiredWorkTime); } else throw new IllegalArgumentException(researcher + " is not a collaborative researcher in this study."); } COM: <s> checks if collaborative paper writing has been completed by a given researcher </s>
funcom_train/51267717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Function getAsExternalFunction(String prefix) { QName fName = new QName(signature.getName().getNamespaceURI(), prefix, signature.getName().getLocalPart()); Hashtable annotations = signature.getAllAnnotations(); annotations.put(FunctionSignature.PRIVATE_ANNOTATION,new XDMIterator[]{}); FunctionSignature newSig = new FunctionSignature(fName, signature.paramTypes , FunctionSignature.EXTERNAL_FUNCTION,annotations); Function func = new Function(className, newSig, iter, operation, returnType); return func; } COM: <s> adapts the signature of the function to become an external class </s>
funcom_train/9989829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validationError() { failed = true; if (validationStatusBackup.equals("")) { validationStatus.setText("Validation error!"); connectionStatus.setText(""); fileStatus.setText(""); } else { restoreStatus(); } updateLog("Could not validate dataSources."); } COM: <s> this method indicates there was an error validating the data sources </s>
funcom_train/13442064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton() { JButton jButton = new JButton(); jButton.setText("Cancel"); jButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { selectedButton = BUTTON_CANCEL; name = ValueEditDialog.this.nameField.getText(); value = ValueEditDialog.this.valueField.getText(); ValueEditDialog.this.dispose(); } }); return jButton; } COM: <s> this method initializes j button </s>
funcom_train/41183606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void FindDevices() throws BluetoothStateException { this.cancel = false; devices = new java.util.Vector(); servers = new java.util.Vector(); local = LocalDevice.getLocalDevice(); agent = local.getDiscoveryAgent(); agent.startInquiry(DiscoveryAgent.GIAC, this); } COM: <s> it searches for available servers </s>
funcom_train/1665775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getMaximumSize(JComponent c) { long width = 0; Enumeration enumeration = header.getColumnModel().getColumns(); while (enumeration.hasMoreElements()) { TableColumn aColumn = (TableColumn) enumeration.nextElement(); width = width + aColumn.getMaxWidth(); } return createHeaderSize(width); } COM: <s> return the maximum size of the header </s>
funcom_train/22047662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object value_at(int position_ref) { if ((position_ref < iArray_data.size()) && (position_ref < iValues_in) && (position_ref >= 0)) { return iArray_data.elementAt(position_ref); } else { return null; } } COM: <s> returns the value of the array at position ref </s>