__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/21100876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDataElementItems(Document dom, Element currentEle) { XMLGenerator.addTextElement("description",description,currentEle,dom); XMLGenerator.addTextElement("abbreviation",abbreviation,currentEle,dom); XMLGenerator.addTextElement("OptionKey",key,currentEle,dom); XMLGenerator.addTextElement("minNr",minNr,currentEle,dom); XMLGenerator.addTextElement("maxNr",maxNr,currentEle,dom); } COM: <s> adds the xmlitems of this class to the element given as parameter </s>
funcom_train/5372814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static int registerType(String formatName) { // Look name up in the registry // If name is not in registry, add it and return assigned value. // If name already exists in registry, return its assigned value // TCHAR chFormatName = new TCHAR(0, formatName, true); // return OS.RegisterClipboardFormat(chFormatName); // TODO: return 0; } COM: <s> registers a name for a data type and returns the associated unique identifier </s>
funcom_train/24468257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getXmlContent(final String starttag, final String endtag, final String content) { String output = ""; output = content.substring(content.indexOf('>', content.indexOf(starttag)) + 1, content.indexOf(endtag, content.indexOf(starttag))); return StringEscapeUtils.unescapeXml(output); } COM: <s> extract the content of a given tag of xml </s>
funcom_train/3939743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void putWord(String word) { String code = getCode(word); LinkedList<String> list = mainDictionary.get(code); if (list != null) { list.add(word); } else { list = new LinkedList<String>(); list.add(word); mainDictionary.put(code, list); } } COM: <s> allocates a word in the dictionary </s>
funcom_train/9236193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void delOption(final String optionName) { ((DefaultComboBoxModel) addOptionComboBox.getModel()).removeElement( optionName); if (addOptionComboBox.getModel().getSize() == 0) { addOptionComboBox.setEnabled(false); addOptionButton.setEnabled(false); } } COM: <s> removes an addable option </s>
funcom_train/32978495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int lookupUserIndex(String uT, String uF) { /* lookupUserIndex */ int idx= -1; for(int i=0;i<nMap;i++) if(userTableMap[i].equals(uT) && userFieldMap[i].equals(uF)) { idx= i; break; } return(idx); } /* lookupUserIndex */ COM: <s> lookup user index find map index given u t u f </s>
funcom_train/48962988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawSelectedCircle(Circle c){ stroke(0); textFont(font, songFontHeight); pushMatrix(); translate(c.position[0],c.position[1]); //outer vinyl stroke(255); fill(100); ellipse(0f, 0f, 2*c.radius, 2*c.radius); //inner vinyl fill(c.color); ellipse(0f, 0f, 0.8f* c.radius, 0.8f* c.radius); //hole in vinyl stroke(200); fill(180); ellipse(0f, 0f, 0.05f*c.radius, 0.05f*c.radius); //text fill(255); text(c.name, 2-c.radius, 2*songFontHeight/3); popMatrix(); } COM: <s> draw one selected circle </s>
funcom_train/28139352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Visibility extractVisibility(String line) { Pattern pattern = Pattern.compile(visibilityPattern()); Matcher matcher = pattern.matcher(line); matcher.find(); String stringVisibility = line.substring(matcher.start(), matcher.end()); for (Visibility visibility : Visibility.values()) { if (stringVisibility.equals(visibility.toString())) { return visibility; } } throw new IllegalArgumentException("Couldn't find a visibility"); } COM: <s> used to find the current visibility of a method </s>
funcom_train/5380943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createControl(Composite parent) { GridLayout layout = new GridLayout(); layout.numColumns = getNumberOfControls(); layout.marginWidth = 0; layout.marginHeight = 0; layout.horizontalSpacing = HORIZONTAL_GAP; parent.setLayout(layout); doFillIntoGrid(parent, layout.numColumns); } COM: <s> creates this field editors main control containing all of its </s>
funcom_train/17203492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void computeLoopMultipliers(LSTNode n) { for (Enumeration<LSTNode> e = n.getChildren(); e.hasMoreElements();) { computeLoopMultipliers(e.nextElement()); } if (n != lst.getRoot()) { computeMultiplier(n); n.header.clearScratchFlag(); // so we won't ignore when processing enclosing loop } } COM: <s> postorder traversal of lst computing loop multiplier and loop exits </s>
funcom_train/29506008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButtonMenuItem getRadioShadowVerticalUp() { if (radioShadowVerticalUp == null) { radioShadowVerticalUp = new JRadioButtonMenuItem(); radioShadowVerticalUp.setText("Up"); radioShadowVerticalUp.setName("VerticalUp"); radioShadowVerticalUp.addItemListener(PrincipalActionFactory.makeSelectShadowCommand(getOptions(),getFontText())); } return radioShadowVerticalUp; } COM: <s> this method initializes j radio button menu item6 </s>
funcom_train/2919368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void genTokenTypeNames(StringTemplate code) { for (int t=Label.MIN_TOKEN_TYPE; t<=grammar.getMaxTokenType(); t++) { String tokenName = grammar.getTokenDisplayName(t); if ( tokenName!=null ) { tokenName=target.getTargetStringLiteralFromString(tokenName, true); code.setAttribute("tokenNames", tokenName); } } } COM: <s> generate a token names table that maps token type to a printable </s>
funcom_train/20644975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTable getJTable() { if (jTable == null) { rtbsptModel= new DBSTableModel(); jTable= new JTable(rtbsptModel); jTable.setDefaultRenderer(Object.class, new RTBSPTRenderer()); rtbsptEditor = new DBSTableEditor(); jTable.setDefaultEditor(Object.class,rtbsptEditor); jTable.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent evt) { jTableMouseEvent(evt); } public void mouseReleased(MouseEvent evt) { jTableMouseEvent(evt); } }); } return jTable; } COM: <s> this method initializes j table </s>
funcom_train/15453056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFile(int fileCode) { try { IndexReader reader = initIndexReader(); reader.delete( new Term(LuceneConstraints.IDENTIFIER, fileCode + "." + LuceneConstraints.TYPE_DOCUMENT)); finalizeIndexReader(reader); } catch (Exception e) { throw new IndexingException(e); } } COM: <s> removes the file with the given code from the lucene index </s>
funcom_train/11010219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPageSize(Dimension pgSize){ CTSlideSize sz = CTSlideSize.Factory.newInstance(); sz.setCx(Units.toEMU(pgSize.getWidth())); sz.setCy(Units.toEMU(pgSize.getHeight())); _presentation.setSldSz(sz); } COM: <s> sets the page size to the given code dimension code object </s>
funcom_train/36915700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(int port) { this.port = port; listening = true; try { socket = new ServerSocket(port); System.out.println("[SERVER] Bound to port " + port); } catch (IOException ex) { System.out.println("[SERVER] Unable to bind to port " + port); System.exit(0); } new Thread(this, "Serversocket listener").start(); } COM: <s> starts listening for incoming connections and forking new client threads </s>
funcom_train/4875690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float getCurrentStepProgressPercentageValue() { assert getStepsFloatValues() != null : "getStepsFloatValues() is null"; assert getCurrentStep() < getStepsFloatValues().length : "the total number of steps isn't correct"; return getStepsFloatValues()[getCurrentStep()]; } COM: <s> returns the current step progress percentage value to display in the progress bar </s>
funcom_train/3290191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getInfoField(MMObjectNode message, String field) { String info = message.getStringValue(F_INFO); StringTagger tagger = new StringTagger(info,'\n', '=', ',', '\"'); return getHTML(tagger.Value(field)); } COM: <s> obtain a value from the multi purpose code info code field </s>
funcom_train/9797038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUAdmin(Boolean newVal) { if ((newVal != null && this.uAdmin != null && newVal.equals(this.uAdmin)) || (newVal == null && this.uAdmin == null && uAdmin_is_initialized)) { return; } this.uAdmin = newVal; uAdmin_is_modified = true; uAdmin_is_initialized = true; } COM: <s> setter method for u admin </s>
funcom_train/33477301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String checkAccount(String login, String password) throws IOException, ServletException { try { AccountBean ab = (AccountBean)entityManager_EcomAdminBean.createQuery("from AccountBean where Email='"+login+"' and Password='"+password+"'").getSingleResult(); if(ab.getPassword().equals(password)) { return ab.getEmail(); } return null; } catch (NoResultException e) { return null; } } COM: <s> check if the login correspond to the password </s>
funcom_train/21100613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateTable() { //Remove old panels this.remove(buttonPanel); this.remove(armyTablePane); //Generate new ones buttonPanel = generateButtonPanel(); armyTablePane = generateArmyTablePane(); //Add the new ones this.add(buttonPanel, BorderLayout.WEST); this.add(armyTablePane, BorderLayout.CENTER); this.revalidate(); } COM: <s> called after the current system has been set to generate </s>
funcom_train/37593092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCaretMovementCyclesWhenAtPrompt() throws EditDocumentException { _doc.insertText(_doc.getLength(), "test text", InteractionsDocument.DEFAULT_STYLE); _controller.moveToPrompt(); _controller.moveLeftAction(); assertEquals("Caret was not cycled when moved left at the prompt.", _doc.getLength(), _text.getCaretOffset()); } COM: <s> tests that moving the caret left when its already at the prompt will </s>
funcom_train/34641072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SyntaxManager (ISharedTextColors colors, CLNGEditor editor){ fEditor = editor; // set color manager sharedColors = colors; // The default Style has a black text color and is neither italic nor bold. DEFAULT_COLOR = sharedColors.getColor(new RGB(200,0,0)); DEFAULT_STYLE = new TextAttribute(DEFAULT_COLOR); // The default comment Style has a grey text color and is italic. DEFAULT_COMMENT_COLOR = sharedColors.getColor(new RGB(100,100,100)); DEFAULT_COMMENT_STYLE = new TextAttribute(DEFAULT_COMMENT_COLOR, null, SWT.ITALIC); } COM: <s> the constructor br </s>
funcom_train/49199405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFilenamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DSpaceText_filename_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DSpaceText_filename_feature", "_UI_DSpaceText_type"), DspaceMetamodelPackage.Literals.DSPACE_TEXT__FILENAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the filename feature </s>
funcom_train/511129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean shouldUse(Task t) { if (ifProperty != null && t.getProject().getProperty(ifProperty) == null) { return false; } else if (unlessProperty != null && t.getProject().getProperty(unlessProperty) != null) { return false; } return true; } COM: <s> ensures that the selector passes the conditions placed </s>
funcom_train/18851878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void itemStateChanged(ItemEvent e) { Choice c = (Choice)e.getSource(); String name = c.getName(); if (name.equals("file")) { selectedFilter = c.getSelectedIndex(); if (selectedFilter > -1) { filePanel.refresh(); } } else if (name.equals("dir")) { try { filePanel.setDirectory(dirs.getDirectory()); } catch (FileNotFoundException fnex) {} } } COM: <s> user selected a file type or directory </s>
funcom_train/38328387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ReturnVector executeFunction(Rete engine, Parameter[] params) { DefaultReturnVector rv = new DefaultReturnVector(); if (params != null && params.length == 1) { if (params[0] instanceof BoundParam) { BoundParam bp = (BoundParam)params[0]; Message msg = (Message)bp.getObjectRef(); msg.setMessageStatus(Message.RECEIVED); System.out.println("message recieved!"); } } return rv; } COM: <s> this method is not implemented </s>
funcom_train/22558152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadPersonalData(DBUser user) throws TENCDatabaseException { communityPersonalData = new HashMap<Integer, DBPersonalData>(); for (DBCommunity community : communities) { final DBPersonalData dbPersonal = PersonalDataManager.getPersonalData(user, ObjectType.Community, community.getId()); if (dbPersonal != null) { communityPersonalData.put(community.getId(), dbPersonal); } } } COM: <s> load personal data </s>
funcom_train/3380105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String resultToString(int res) { String resultString = ""; switch (res) { case BuildStep.POSSIBLE: resultString = "Certificate to be tried.\n"; break; case BuildStep.BACK: resultString = "Certificate backed out since path does not " + "satisfy build requirements.\n"; break; case BuildStep.FOLLOW: resultString = "Certificate satisfies conditions.\n"; break; case BuildStep.FAIL: resultString = "Certificate backed out since path does not " + "satisfy conditions.\n"; break; case BuildStep.SUCCEED: resultString = "Certificate satisfies conditions.\n"; break; default: resultString = "Internal error: Invalid step result value.\n"; } return resultString; } COM: <s> return a string representing the meaning of the result code associated </s>
funcom_train/48071021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void transaction(Transaction transaction) { log.fine("transaction(" + getAuctionTypeAsString(transaction.getAuction()) + ", " + transaction.getQuantity() + " unit(s) at $" + transaction.getPrice() + ") called"); int auctionCategory = getAuctionCategory(transaction.getAuction()); if (auctionCategory == CAT_ENTERTAINMENT){ setAuctionAllocations(); updateEntertainmentBids(); } } COM: <s> called when a transaction has occurred </s>
funcom_train/20042449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _loadModule() { log.println("Load module IGNORE_CASE"); oObj.loadModule(TransliterationModules.IGNORE_CASE, loc); String name = oObj.getName(); boolean res = name.equals("case ignore (generic)"); log.println("getName return: " + name); tRes.tested("loadModule()", res ); } COM: <s> calls the method for load ignore case module and checks the name returned </s>
funcom_train/42600802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { /*TODO PreferenceManager pm = new PreferenceManager(); BibsterPreferencesPage p = new BibsterPreferencesPage("Main preferences"); pm.addToRoot(new PreferenceNode("mainBibsterProperties", p)); //ColumnPreferencesPage p2 = new ColumnPreferencesPage("Column preferences"); //pm.addToRoot(new PreferenceNode("columnProperties", p2)); ResizablePreferenceDialog d = new ResizablePreferenceDialog(window.getShell(), pm); d.setInitialSize(700, SWT.DEFAULT); d.create(); d.open();*/ } COM: <s> perform the action open the preference dialog </s>
funcom_train/1175660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleRtpStatusEvent(RtpStatusEvent rtpEvent) { if (rtpEvent.getStatus() == RtpStatus.RECEIVER_STOPPED) { System.out.println("RECEIVED RTP STATUS EVENT: RECEIVER_STOPPED"); } else if (rtpEvent.getStatus() == RtpStatus.RECEIVER_STARTED) { System.out.println("RECEIVED RTP STATUS EVENT: RECEIVER_STARTED"); } } COM: <s> trap rtp status events </s>
funcom_train/39097847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTypeName(Organization org, String lang) { Connection con = getConnection(); String ret = ""; try { PreparedStatement ps = con.prepareStatement(typeName); ps.setString(1, lang); ps.setLong(2, org.getCatID()); ResultSet rs = ps.executeQuery(); if (rs.next()) ret = rs.getString(1); rs.close(); ps.close(); } catch (SQLException e) { e.printStackTrace(); } finally { try { con.close(); } catch (SQLException sqlEx) { } } return ret; } COM: <s> retrieves the name of the organization type in the language of the </s>
funcom_train/34733858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateNewVacancy() { // create new vacancy for our agent and validate String vacancyRef = "job/666"; NewVacancy newVacancy = agent.createNewVacancy(vacancyRef); assertNotNull(newVacancy); assertEquals(newVacancy.getRef(), vacancyRef); assertEquals(newVacancy.getAgent(), agent); Set<NewVacancy> newVacancies = agent.getNewVacancies(); assertNotNull(newVacancies); assertEquals(newVacancies.size(), 1); assertTrue(newVacancies.contains(newVacancy)); } COM: <s> test creating new vacancies </s>
funcom_train/51153470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean getterRequiresTransaction( XPojoModel childNode ) { String propertyName = childNode.getPropertyName(); Class[] argTypes = childNode.getGetterArgTypes(); Set set = (Set)getterTransactions.get( propertyName ); if ( set == null ) return false; return ( set.contains( XPojoHelper.getSignatureKey( argTypes ))); } COM: <s> indicates whether the property getter requires an active transaction </s>
funcom_train/45231938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextPane getTxpNoteStampa() { if (txpNoteStampa == null) { txpNoteStampa = new JTextPane(); txpNoteStampa.setText(scheda.getNoteStampa()); if(modality == mode.view){ txpNoteStampa.setEditable(false); } txpNoteStampa.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent e) { scheda.setNoteStampa(txpNoteStampa.getText()); } }); } return txpNoteStampa; } COM: <s> this method initializes txp note stampa </s>
funcom_train/28982924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getSettingsRetrievePassword () { if (settingsRetrievePassword == null) {//GEN-END:|72-getter|0|72-preInit // write pre-init user code here settingsRetrievePassword = new TextField ("Password*:", null, 64, TextField.ANY | TextField.PASSWORD);//GEN-LINE:|72-getter|1|72-postInit // write post-init user code here }//GEN-BEGIN:|72-getter|2| return settingsRetrievePassword; } COM: <s> returns an initiliazed instance of settings retrieve password component </s>
funcom_train/40496601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { String oldStat = Gui.lblStatus.getText(); Methods.stat("sending 1 deauthentication request..."); Methods.readExec("aireplay-ng -0 1 -a " + Methods.currentBSSID + " " + (String)Gui.cboDrivers.getSelectedItem()); Methods.stat("1 deauth sent"); Methods.pause(0.5); Gui.lblStatus.setText(oldStat); } COM: <s> sends 1 deauthentication request to the current bssid pauses 1 2 second </s>
funcom_train/11102745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendLastModified(FacesContext context, String timestamp) { Object response = context.getExternalContext().getResponse(); if (response instanceof HttpServletResponse) { ((HttpServletResponse) response).setHeader("Last-Modified", timestamp); /* else it is a portlet response with mechanism to support this } else { ; */ } } COM: <s> p set the code last modified code header to the specified timestamp </s>
funcom_train/5809508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getDownTime(String cat, long curTime, long rollingWindow) { // get the down time for this node in the context of the // category // if the service is not in 'context', return a negative value if (!m_categories.contains(cat)) return (long) RTCConstants.NODE_NOT_IN_CATEGORY; return m_svcTimesList.getDownTime(curTime, rollingWindow); } COM: <s> get the down time </s>
funcom_train/6404374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void construct(int childIndex, Node parent, boolean doSort) { Spatial spat = parent.getChild(childIndex); if (spat instanceof TriMesh) { mesh = (TriMesh) spat; triIndex = mesh.getTriangleIndices(triIndex); createTree(0, triIndex.length, doSort); } } COM: <s> recreate this collision tree for the given node and child index </s>
funcom_train/31660162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getTopics(String raw) throws Exception { StringReader reader = new StringReader(raw); LinkLexConvertBackLinks convert = new LinkLexConvertBackLinks(); LinkLex lexer = new LinkLex(reader); lexer.setLinkLexConvert(convert); this.lex(lexer); return convert.getLinks(); } COM: <s> parse raw text and return a list of all found topic names </s>
funcom_train/41517080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadMib(List fileList) { Loader loader; File[] files = (File[]) fileList.toArray(new File[fileList.size()]); if (files.length > 0) { currentDir = files[0].getParentFile(); descriptionArea.setText(""); loader = new Loader(files); loader.start(); } } COM: <s> opens the load mib files </s>
funcom_train/21894219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildIndices() { for (Table table : tables) { int[] capacities = new int[table.getColumnCount()]; Arrays.fill(capacities, 3); //table.buildIndices(capacities); table.buildLightIndices(); table.buildMultiColumnIndex(); table.buildPrimaryKeyIndex(); } } COM: <s> create indices for each table in the database </s>
funcom_train/39198779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setItemEdit(IModel rowModel, boolean edit) { if (isSelectToEdit()) { selectItem(rowModel, edit); } else { WebMarkupContainer rowComponent = findRowComponent(rowModel); if (rowComponent != null) { boolean editing = Boolean.TRUE.equals(rowComponent.getMetaData(EDITING)); if (editing != edit) { rowComponent.setMetaData(EDITING, edit); markItemDirty(rowModel); } } } } COM: <s> sets the edit mode of the row </s>
funcom_train/4124614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int nextInt(int n) { if (n <= 0) { throw new IllegalArgumentException("n must be positive!"); } // TODO (Erik): get random int in given range. // This may not be good enough, as the low bits may be less // random than the entire range. See the Random class for a // more advanced implementation. return Math.abs(nextInt() % n); } COM: <s> get the next pseudo random integer between 0 and n </s>
funcom_train/46821845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NodeList getObjects(String xPath) { NodeList nodes = this.getNodes(xPath); NodeSequence objects = this.getFactory().createNodeSequence(); for (int i = 0; i < nodes.getLength(); ++i) { Node n = nodes.item(i); ObjectNode obj; if (n instanceof ObjectNode) { obj = (ObjectNode)n; } else { obj = getObject(n); if (obj == this) continue; } if (!objects.contains(obj)) objects.add(obj); } return objects; } COM: <s> finds the object nodes along the given xpath based on this object node </s>
funcom_train/44450102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Label addLabel(String f_label) { Node n = getParent(); if (!(n instanceof Block)) { logger.warning("SrcMLElement: addLabel: parent is no block"); return null; } Block block = (Block)n; // create the new label: Label label = Factory.createLabel(f_label); block.insertBefore(label, this); return label; } COM: <s> this method allows the addition of a label before this src mlelement </s>
funcom_train/15406844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processTableEvents(TransactionEventTable tableEvents) { if (tableEvents != null && !tableEvents.isEmpty()) { // notify cache with table based changes BeanDescriptorManager dm = manager.getBeanDescriptorManager(); for (TableIUD tableIUD : tableEvents.values()) { dm.cacheNotify(tableIUD); } } } COM: <s> table events are where sql or external tools are used </s>
funcom_train/7772478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPnlVendite() { if (pnlVendite == null) { pnlVendite = new JPanel(); pnlVendite.setLayout(new BorderLayout()); pnlVendite.add(getJScrollPane1(), BorderLayout.CENTER); pnlVendite.setBorder(BorderFactory.createTitledBorder(BorderFactory.createBevelBorder(0), "Vendite", 0, 0, new Font("Dialog", 1, 12), new Color(51, 51, 51))); } return pnlVendite; } COM: <s> this method initializes pnl vendite </s>
funcom_train/25694313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public int write(File baseTarget, File input, int chunkSize, boolean useBase64) throws FileNotFoundException, IOException{ return write(baseTarget, new FileInputStream(input), input.length(), chunkSize, useBase64); } COM: <s> split the content of the input file into several files </s>
funcom_train/32128991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer(); sb.append(""+ID); if (params == null) { return sb.toString(); } sb.append(":\n"); for (int i = 0; i < params.length; i++) { sb.append(""+params[i]); if (i != params.length - 1) { sb.append(","); } } return sb.toString(); } COM: <s> prints out the id and a comma separated list of parameters on a </s>
funcom_train/20966538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getShapeString(DynamicShape2D dynamic){ // Default identifier String baseName = "shape"; // try to find a better identifier if(dynamic.isDefined()) { Shape2D shape = dynamic.getShape(); if(shape!=null) baseName = getShapeName(shape.getClass()); } // adds the name if any String name = dynamic.getName(); if(name!=null) if(!name.isEmpty()) { baseName = baseName + " (" + name + ")"; } // return the result return baseName; } COM: <s> returns a string associated with an euclide shape </s>
funcom_train/46474626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handle() throws Exception { switch (in.readByte()) { // read Net.SERVER_REQUEST_BYTE case Net.PING: sendResult(new Boolean(true)); break; case Net.REGISTER_RENDEZVOUS: sendResult(registerRendezvous((Rendezvous)in.readObject())); break; case Net.SEND_RENDEZVOUS: String[] req = (String[])in.readObject(); sendResult(requestRendezvous(req[0], req[1])); break; case Net.SEND_RENDEZVOUS_IDS: sendResult(getRendezvousIDs()); break; } } COM: <s> handle all rendezvous server requests </s>
funcom_train/25276677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createMessage(HttpServletRequest request, HttpServletResponse response) throws Exception { final Member member = (Member) request.getSession().getAttribute(SessionConstants.CURRENT_MEMBER); final Discussion discussion = (Discussion) request.getSession().getAttribute( SessionConstants.CURRENT_DISCUSSION); final String name = request.getParameter("name"); final String text = request.getParameter("text"); final String date = request.getParameter("date"); dataProvider.createMessage(name, text, date, discussion.getId(), member.getId()); response.sendRedirect("Mainframe?action=messages"); } COM: <s> todo zmicer alpavl 27 </s>
funcom_train/11009778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDisplayGuts(boolean value) { CTSheetPr sheetPr = getSheetTypeSheetPr(); CTOutlinePr outlinePr = sheetPr.getOutlinePr() == null ? sheetPr.addNewOutlinePr() : sheetPr.getOutlinePr(); outlinePr.setShowOutlineSymbols(value); } COM: <s> set whether to display the guts or not </s>
funcom_train/18781554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File getFileName(URL url) { String urlString = url.toString(); int index = urlString.lastIndexOf('/'); if (index > 0) urlString = urlString.substring(index + 1); urlString = URLDecoder.decode(urlString); //$NON-NLS-1$ return new File(downloadContext.getTrackDatabase().getDownloadDirectory(), urlString); } COM: <s> get the file name associated with the given url </s>
funcom_train/3302243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addClasspath() throws MalformedURLException { ArrayList dirs = new ArrayList(); StringTokenizer tokenizer = new StringTokenizer(classpath, java.io.File.pathSeparator); while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); if (new File(token).isDirectory()) { token += "/"; dirs.add(token); } addURL(makeURL(token)); } classDirs = (String[])dirs.toArray(new String[dirs.size()]); } COM: <s> add the system class path elements to the url search list of this </s>
funcom_train/46864269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("access".equals(portName)) { setaccessEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/47492057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand() { if (backCommand == null) {//GEN-END:|85-getter|0|85-preInit // write pre-init user code here backCommand = new Command("Volver", Command.CANCEL, 0);//GEN-LINE:|85-getter|1|85-postInit // write post-init user code here }//GEN-BEGIN:|85-getter|2| return backCommand; } COM: <s> returns an initiliazed instance of back command component </s>
funcom_train/38495673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRemaining() { for(int i = 0; i < data.length(); i++) { Assert.assertEquals(strData.substring(i), data.getRemaining()); Assert.assertEquals(i, data.getCurrentPosition()); data.getNextChar(); } //After End of Data Assert.assertNull(data.getRemaining()); Assert.assertEquals(data.length(), data.getCurrentPosition()); } COM: <s> test the data get remaining method </s>
funcom_train/25513361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void postFields(){ properties.setProperty(XMLPortletFactory.PORLETSDIR_KEY, txtPortletDir.getText()); properties.setProperty(XMLPortletFactory.LASTXML_KEY, txtXmlDefinition.getText()); if (btn60.isSelected()) { properties.setProperty(XMLPortletFactory.SDK_VERSION, "6.0.x"); } else { properties.setProperty(XMLPortletFactory.SDK_VERSION, "6.1.x"); } } COM: <s> function that fills properties object with last values at text fields </s>
funcom_train/47833698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String generateAgreementTermHashCode(AgreementTerm aT) { String aTHashCode = null; int slaUUIDHash = this.inputSLA.getUuid().toString().hashCode(); int aTHash = aT.hashCode(); aTHashCode = slaUUIDHash + ":" + aTHash; return aTHashCode; } COM: <s> produces an agreement term hash code </s>
funcom_train/50295345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (RESULT_SET_GET_STATEMENT.equals(method)) return owner; else { try { return method.invoke(target, args); } catch(InvocationTargetException ex) { if (ex.getTargetException() instanceof SQLException) throw ex.getTargetException(); else throw ex; } } } COM: <s> implementation of the dynamic proxy handler interface </s>
funcom_train/16689809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSashForm() { sashForm = new SashForm(shell, SWT.V_SCROLL); sashForm.setOrientation(SWT.HORIZONTAL); tree = new Tree(sashForm, SWT.BORDER); tree.setItemCount(0); createTabFolder(); sashForm.setWeights(new int[] {30, 70}); } COM: <s> this method initializes sash form </s>
funcom_train/3944341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean liesIn(Point pt) { if (pt == null || !Point.isValidTriple(pt)) { throw new IllegalArgumentException( "liesIn() called with Point that is either null or not valid."); } double result; result = (a * pt.getX()) + (b * pt.getY()) + (c * pt.getZ()) - d; return (result == 0.0f); } COM: <s> does a point lie in the plane </s>
funcom_train/50330234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void configure() { Mx1CommandStation cs = new Mx1CommandStation(); adaptermemo.setCommandStation(cs); // connect to a packetizing traffic controller Mx1Packetizer packets = new Mx1Packetizer(cs); packets.connectPort(this); adaptermemo.setMx1TrafficController(packets); adaptermemo.configureManagers(); // start operation packets.startThreads(); jmri.jmrix.zimo.ActiveFlag.setActive(); } COM: <s> set up all of the other objects to operate with a mx 1 </s>
funcom_train/25029427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateTabHistory(MotherTabbedPane pane, int i) { // update the tab index record; // addTabIndexHistory increments the record index; // add the current tab selection now to ensure that // all selections are recorded if (i == -1) i = pane.getSelectedIndex(); if (updateTabIndexHistory) { pane.addTabHistory(i); } else { updateTabIndexHistory = true; } } COM: <s> updates the tab history for the given text pad </s>
funcom_train/34527559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void firePackGenerationStarted(PackRequestContext context) { // global listeners List<PackGenerationListener> packListeners = generationListenerMgr.getPackGenerationListeners(); for (PackGenerationListener listener : packListeners) { listener.packGenerationStarted(context); } // request listeners packListeners = context.getPackGenerationListeners(); if (packListeners != null) { for (PackGenerationListener listener : packListeners) { listener.packGenerationStarted(context); } } } COM: <s> reports that the pack generation has started </s>
funcom_train/4545057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAudioPlayer(String filename, int x, int y) { try{ SoundPlayer player = new SoundPlayer(filename); add(player); setPosition(player, x, y); validate(); }catch(Exception ex){ ex.printStackTrace(); } } COM: <s> create an audioplayer with a audiostream at a specific location </s>
funcom_train/45146610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getBranch(int index) { if (index >= children.size()) { throw new NodeException("looked for branch node, "+ "but found no nodes", line); } Object node = children.get(index); if (!(node instanceof Node)) { throw new NodeException("looked for branch node, found leaf node", line); } return (Node) node; } COM: <s> return a branch child node at the specified position </s>
funcom_train/42062002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNettyAgent() { String agentIP = (String) JOptionPane.showInputDialog(frame, "Enter the IP address of the Netty SAL agent:\n", "SAL Agent detail", JOptionPane.QUESTION_MESSAGE, null, null, "127.0.0.1"); if (agentIP == null) return; SALAgent a = controller.nettyConnect(name, agentIP); try { registerEventHandlers(a); } catch (NotFoundException e) { addLog("Error registering event handlers with agent"); e.printStackTrace(); } tree.addAgent(a); } COM: <s> this method is called when the user selected the connect to netty agent </s>
funcom_train/36010727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void formWindowOpened(java.awt.event.WindowEvent evt)//GEN-FIRST:event_formWindowOpened {//GEN-HEADEREND:event_formWindowOpened //if the application was started with an initial file parameter then try load the file if (initialFile != null) { loadFile(new File(initialFile)); initialFile = null; //let the GC have it } }//GEN-LAST:event_formWindowOpened COM: <s> called when the window is first opened </s>
funcom_train/50345653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addLoadName(String load){ if (_loadList.contains(load)) return false; _loadList.add(load); log.debug("train (" +getName()+ ") add car load "+load); setDirtyAndFirePropertyChange (LOADS_CHANGED_PROPERTY, _loadList.size()-1, _loadList.size()); return true; } COM: <s> add a load that the train will </s>
funcom_train/48183988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj, TObjectIntHashMap varMap, TObjectIntHashMap varMap2) { if (obj.getClass() != this.getClass()) { return false; } HyloVar hv = (HyloVar) obj; if (varMap.get(this) != varMap2.get(hv)) return false; if (!this.type.equals(hv.type)) return false; return true; } COM: <s> returns whether this var equals the given object up to variable names </s>
funcom_train/14464424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCellBackgroundColor() { if (getFillPattern() > 0) { if (getFillPattern()==Xf.PATTERN_SOLID) return myxf.getForegroundColor(); // 20080814 KSC: getForegroundColor() does the swapping so use base method else return myxf.getBackgroundColor(); } return getColorInt(FormatConstants.White); } COM: <s> get the pattern background color for this formatted cell </s>
funcom_train/12739235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getSourceNames() { if (!sourceNames.isEmpty()) return sourceNames; for (int i = 0; i < resolvers.size(); i++) { ArrayList sources = ((Path) resolvers.get(i)).getSourceNames(); if (sources == null) continue; for (int j = 0; j < sources.size(); j++) { String sourcename = (String) sources.get(j); if (!sourceNames.contains(sourcename)) sourceNames.add(sourcename); } } return sourceNames; } COM: <s> return all sources names referenced </s>
funcom_train/1620871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(String fileName) throws IOException { log.info("saving data to " + fileName + "..."); OutputFormat format = OutputFormat.createPrettyPrint(); format.setLineSeparator(System.getProperty("line.separator")); FileOutputStream out = new FileOutputStream(fileName); XMLWriter writer = new XMLWriter(out, format); writer.write(document); out.close(); log.info(fileName + " saved"); } COM: <s> saves xml document to the specified file </s>
funcom_train/45384741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeAllFrames() { Vector frames = getDataFrames(); for (int i = 0; i < frames.size(); i++) { if (((DataFrame) frames.get(i)).isClosable()) try { ((DataFrame) frames.get(i)).setClosed(true); } catch (java.beans.PropertyVetoException ev) { } } } COM: <s> closes all frames on the desktop </s>
funcom_train/13246626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void togglePencilmark(int digit) { final int cursorX = midletModel.getCursorX(); final int cursorY = midletModel.getCursorY(); // model pencilmarks model.getCell(cursorX, cursorY).togglePencilmark(digit); // user pencilmarks int digitBit = 1 << (digit - 1); userPencilmarks[cursorX][cursorY] = userPencilmarks[cursorX][cursorY] ^ digitBit; } COM: <s> toggles the pencilmark state of the selected digit in the current cell </s>
funcom_train/8282518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printValues() { Set keys = hm.keySet(); String key; Iterator i = keys.iterator(); SchoolLogger.logger.log(Level.INFO, "Token: " + tokenKey); SchoolLogger.logger.log(Level.INFO, "List token values"); while (i.hasNext()) { key = (String) i.next().toString(); SchoolLogger.logger.log( Level.INFO, " " + key + " : " + hm.get(key)); } } COM: <s> prints all values stored in the security token in addition to the string </s>
funcom_train/20777336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMenu getMenu(String s) { if (s == null) { return null; } JMenuBar b = getJMenuBar(); int n = b.getMenuCount(); for (int i = 0; i < n; i++) { JMenu m = b.getMenu(i); if (m.getText().equals(s)) { return m; } } return null; } COM: <s> finds the top level menu named s </s>
funcom_train/32998586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Calendar calculateGMTDate( Calendar calendar ) { Calendar cal = Calendar.getInstance(); cal.setTime( calendar.getTime() ); // gmt cal.add( Calendar.MILLISECOND, -1 * cal.get( Calendar.ZONE_OFFSET ) ); cal.add( Calendar.MILLISECOND, -1 * cal.get( Calendar.DST_OFFSET ) ); cal.setTimeZone( timeZoneGMT ); COM: <s> calculate a date to gmt time </s>
funcom_train/33499032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getFontFamilyName() { // First try to find "preferred family name", which is a more common family name denominator, like // "Arial" for "Arial Narrow". String familyName = m_fontFileParser.getBestMatchingName(NAME_PREFERRED_FAMILY_NAME); if (familyName == null) { // If not found, fall back to traditional family name familyName = m_fontFileParser.getBestMatchingName(NAME_FAMILY_NAME); } return familyName; } COM: <s> get the family name of the font face </s>
funcom_train/27787398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isMarketIndex(Symbol symbol) { if (PreferencesManager.isMarketIndex(symbol)) { return true; } else { return false; } /* Previous version; guaranteed for ASX, not for DAX or anything else. // HACK. It needs to keep a table which maintains a flag // for whether a symbol is an index or not. if(symbol.length() == 3 && symbol.charAt(0) == 'X') return true; else return false; */ } COM: <s> is the given symbol a market index </s>
funcom_train/5344321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { LongIntervalSet ret = new LongIntervalSet(); for (Iterator iter = getAllIntervals(); iter.hasNext(); ) // access the internal TreeSet directly, - it's faster that way. ret.intervals.add(iter.next()); return ret; } COM: <s> clones the interval set </s>
funcom_train/14120767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List findMailFolders() { log.debug("findMailFolders..."); try { User user = getLoggedInUser(); if (user != null) { return GWTServiceHelper.createMailFolderList(system.findMailFolderByUser(user)); } } catch (ServiceException e) { e.printStackTrace(); } return null; } COM: <s> finds users folders </s>
funcom_train/47557030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node findNode(Node node) { int top = 0; // Find the child of the root element. while (node.parent.child == null) { stack[top++] = node; node = node.parent; } // Do path compression on the way back down. Node rootChild = node; while (top > 0) { node = stack[--top]; node.parent = rootChild; } return rootChild.parent; } COM: <s> finds the set containing a given node </s>
funcom_train/48667117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireFinishedScanning(LogRepositoryInfo logRepositoryInfo, BoundedTimeInterval ti) { synchronized(fScanListeners) { for(ScanListener listener : fScanListeners) { try { listener.finishedScanningLog(logRepositoryInfo, ti); }catch(Exception e) { logger.error(e); } } } } COM: <s> fires end of log event </s>
funcom_train/6347336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIntCopy() { int[] x = new int[]{'\0', 'c', '\uFFFF'}; IntArrayRecord r = RecordFactoryCreator. createIntArrayRecordFactory(). createRecord(x); int[] y = r.getIntArray(); int[] z = r.getIntArray(); assertNotSame(y, z); } COM: <s> asserts that the int wrapper makes a copy when returning </s>
funcom_train/12837733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void suppressAllHyperlinksToTable(String tableName) { if (StringUtils.isBlank(tableName)) { return; } if (suppressAllHyperlinksToTableVector == null) { suppressAllHyperlinksToTableVector = new Vector(); } suppressAllHyperlinksToTableVector.add(tableName.toLowerCase()); } COM: <s> causes all hyperlinks to the argument table name to be omitted </s>
funcom_train/3315503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public V setValue (V value) { V reply = getValue(); if (base.get(value) != null) { throw new IllegalArgumentException ("Entry already exists."); } base.remove(getValue()); base.put(value,getKey()); mValue = value; return reply; } COM: <s> removes the old entry from the base map and </s>
funcom_train/8408638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int oppositeIndex(final int index) { // old trick ... to find the opposite of a value, m or n, // subtract the value from the sum of the two possible // values. (m + n) - m = n; (m + n) - n = m return SUM_OF_INDICES - index; } COM: <s> get the opposite index of the specified index </s>
funcom_train/17850786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getZoneInt (String timeZone){ int hour = Integer.parseInt(timeZone.substring(1, 3)); int minute = Integer.parseInt(timeZone.substring(3, 5)); int sign = 1; if (timeZone.substring(0, 1).equals("-")){ sign = -1; } return sign * hour * 60 + minute; } COM: <s> transform xmltv timezone string to integer </s>
funcom_train/32057216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetItems() { GPGraphpad gp = new GPGraphpad(); AbstractActionListCellImpl aa = new AbstractActionListCellImpl(gp, "str" ); // should return null Object[] items = null; items = (aa.getItems()); assertTrue( items == (aa.getItems()) ); } COM: <s> test of get items method of class abstract action list cell </s>
funcom_train/12636995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sizeChanged(int w, int h) { stopScroll(); width = w; height = h; int widthForText = w - ITEM_PAD - ICON_BG.getWidth(); int msiNameWidth = ICON_FONT.charsWidth(text, 0, textLen); scrollWidth = msiNameWidth - widthForText + w/5; truncated = msiNameWidth > widthForText; } COM: <s> on size change event we define the items text </s>
funcom_train/10554349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Properties filterProperties(Properties inputSet) { Properties limited = new Properties(); // filter out any derby.* properties, only // JDBC attributes can be set this way for (java.util.Enumeration e = inputSet.propertyNames(); e.hasMoreElements(); ) { String key = (String) e.nextElement(); // we don't allow properties to be set this way if (key.startsWith("derby.")) continue; limited.put(key, inputSet.getProperty(key)); } return limited; } COM: <s> filter out properties from the passed in set of jdbc attributes </s>
funcom_train/10009358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getAmountOwed(Resident first, Resident second) { int total = 0; Map<Biller, BigDecimal> originalDebtMap = first.getDebtsTowardResident(second); for (Biller biller : originalDebtMap.keySet()) { BigDecimal owing = originalDebtMap.get(biller); total += owing.intValue(); } return total; } COM: <s> returns the amount that first owes to second </s>
funcom_train/14425868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object invoke(String method, boolean bool) { try { Method m = wrappedObject.getClass().getMethod(method, new Class[]{boolean.class}); return m.invoke(wrappedObject, new Object[]{new Boolean(bool)}); } catch (Exception e) { throw new STDProjectException(e,STDMess.get("error.plugin.exec",userTag.getTagName())); } } COM: <s> invokes this method name on the inner wrapped object with the given boolean </s>