__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/48406710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTeamRolePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TeamProfile_teamRole_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TeamProfile_teamRole_feature", "_UI_TeamProfile_type"), SpemxtcompletePackage.eINSTANCE.getTeamProfile_TeamRole(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the team role feature </s>
funcom_train/35875278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnLimparVersao() { if (btnLimparVersao == null) { btnLimparVersao = new JButton(); btnLimparVersao.setBounds(new Rectangle(186, 40, 92, 22)); btnLimparVersao.setText("Limpar"); btnLimparVersao.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { txtPaneDescricaoVersao.setText(""); txtValorVersao.setText(""); txtPrazoVersao.setText(""); } }); } return btnLimparVersao; } COM: <s> this method initializes btn limpar versao </s>
funcom_train/25457526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getCBProtect() { if (CBProtect == null) { CBProtect = new JCheckBox(); CBProtect.setSelected(true); CBProtect.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { parentPane.switchPanel(CBProtect.isSelected(), "p"); } }); } return CBProtect; } COM: <s> this method initializes cbprotect </s>
funcom_train/22209536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void persistRendererViews() { ArrayList allRVDs = new ArrayList(); for (Iterator iter = getRendererViews().iterator(); iter.hasNext();) { RendererView rv = (RendererView) iter.next(); allRVDs.add(rv.getRendererViewDesc()); } SessionUtil.storeStorables(prefs, RV, allRVDs); } COM: <s> persist all renderer views so that they can be restored on next startup </s>
funcom_train/35486693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Combination diff(Combination operand) { Combination result = new Combination(value.length); for (int i = 0; i < value.length; i++) { result.value[i] = value[i]; if (operand.value[i] != null) { if (result.value[i] == null) { result.value[i] = operand.value[i]; } else { if (result.value[i].equals(operand.value[i])) result.value[i] = null; else return null; } } } return result; } COM: <s> find the difference between given combination with this combination </s>
funcom_train/20483224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ChangeCapsule getChange(Long sequenceNumber) throws IOException { String filename = Long.toString(sequenceNumber); filename = ChangeWriter.addLeadingZeros(filename, ChangeWriter.LEADINGZEROSNUMBER); filename = ChangeWriter.CHANGEPREFIX + filename + ChangeWriter.CHANGEEXTENSION; File file = new File(baseFilename.getPath(), filename); return getChange(file); } COM: <s> retrieves a change object from a sequence number matching the change filename </s>
funcom_train/14652427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillLoadedPlugList(){ String plugList[]; listModel.clear(); plugList = frameworkCore.listLoadedPlugins(); if( plugList.length < 1 ) { System.out.println("PluginCore.listLoadedPlugins() did not return proper list"); return; } for( int i = 0, listSize = plugList.length; i < listSize; i++ ){ listModel.add(i, plugList[i] ); } } COM: <s> this method will get the list of plugins that are loaded </s>
funcom_train/42068097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCuePointIDPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SampleLoop_cuePointID_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SampleLoop_cuePointID_feature", "_UI_SampleLoop_type"), WavPackage.Literals.SAMPLE_LOOP__CUE_POINT_ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the cue point id feature </s>
funcom_train/46327699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delete(Long appID) { if (appID == null) { throw new IllegalArgumentException("primary key null."); } // Set the whereArgs to null here. return database.delete(DATABASE_TABLE, KEY_APPID + "=" + appID, null) > 0; } COM: <s> delete a registered app record </s>
funcom_train/45465580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName(boolean ignoreRef) { if (isReference() && ignoreRef == false) { String localName = _elementRefName; //-- check for namespace prefix int idx = localName.indexOf(':'); if (idx > 0) { localName = localName.substring(idx+1); } return localName; } return _name; } //-- getName COM: <s> returns the name of this element declaration </s>
funcom_train/18095573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getJComboBoxStimme() { if (jComboBoxStimme == null) { jComboBoxStimme = new JComboBox((data.container.getMLEConfig()).sprachenTTS); HelperPanel.formatCombo(jComboBoxStimme); jComboBoxStimme.setToolTipText(Msg.getString("PanelAudioTTS.TOOLTIP_CHOOSE_LANGUAGE")); //$NON-NLS-1$ } return jComboBoxStimme; } COM: <s> this method initializes j combo box stimme </s>
funcom_train/50775873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean recheckConditions() { try { Type res = ExpressionResolver.resolveAssignExpression(parent.getConditions(), environment); if (!(res instanceof BoolType)) return false; return ((BoolType)res).getBoolValue(); } catch (InjectException e) { // since this didn't happen at the first check, maybe a weavepoint is now missing or so. return false; } } COM: <s> since transformations might have made this detection pattern result invalid overlapping patterns </s>
funcom_train/36142915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCompatible(Mapping mapping) { // if we are not constrained, just say it's fine... if (!isConstrained) { return true; } // for each of the mappings that we have, for (Mapping m : mappings) { // see if it is compatible if (!m.isCompatibleWith(mapping)) { // if it is, return true, as it only takes one. return true; } } // if we get through all of the mappings and don't find one that's // compatible, return false... return false; } COM: <s> tells the user if the given mapping is compatible with the mappings </s>
funcom_train/2291176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSortName() { if (m_sort == SORT_DATE_CREATED) { return SORT_NAMES[1]; } if (m_sort == SORT_DATE_LASTMODIFIED) { return SORT_NAMES[2]; } if (m_sort == SORT_TITLE) { return SORT_NAMES[3]; } return SORT_NAMES[0]; } COM: <s> returns the name of the sort option being used </s>
funcom_train/43245628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsConfAddressActive() { System.out.println("isConfAddressActive"); AddlDemographicsDG1Object instance = new AddlDemographicsDG1Object(); boolean expResult = true; boolean result = instance.isConfAddressActive(); 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 is conf address active method of class org </s>
funcom_train/18393410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getMultipleFiles(String path) throws FileNotFoundException { ArrayList files = new ArrayList(); for (Iterator iter = getMultipleRootsForFile(path).iterator(); iter.hasNext();) { files.add(((Root) iter.next()).getFile(path)); } return files; } COM: <s> returns an array list containing se </s>
funcom_train/48148113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Component tableCellRendererComponent = defaultRenderer.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); return new SortHeaderRendererComponent2(tableCellRendererComponent, table.getTableHeader().getFont(), column); } COM: <s> returns the component used for drawing the cell </s>
funcom_train/11730619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GarbageCollector createDataStoreGarbageCollector() throws RepositoryException { final GarbageCollector gc = repositoryContext.getRepository().createDataStoreGarbageCollector(); // Auto-close if the main session logs out addListener(new SessionListener() { public void loggedOut(SessionImpl session) { } public void loggingOut(SessionImpl session) { gc.close(); } }); return gc; } COM: <s> create a data store garbage collector for this repository </s>
funcom_train/15626817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean doInsertArch(final boolean performAction) { final MapCursor<G, A, R> mapCursor = getActiveMapCursor(); final BaseObject<G, A, R, ?> gameObject = objectChooser.getSelection(); return mapCursor != null && gameObject != null && mapCursor.insertGameObject(performAction, gameObject, false, true); } COM: <s> executes the insert arch action </s>
funcom_train/41516994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getAllImports() { ArrayList res = new ArrayList(); MibImport imp; for (int i = 0; i < imports.size(); i++) { imp = (MibImport) imports.get(i); if (imp.hasSymbols()) { res.add(imp); } } return res; } COM: <s> returns all mib import references </s>
funcom_train/3422088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringList getLexicalEnumeration() { if (fLexicalEnumeration == null){ if (fEnumeration == null) return StringListImpl.EMPTY_LIST; int size = fEnumeration.size(); String[] strs = new String[size]; for (int i = 0; i < size; i++) strs[i] = fEnumeration.elementAt(i).toString(); fLexicalEnumeration = new StringListImpl(strs, size); } return fLexicalEnumeration; } COM: <s> a list of enumeration values if it exists otherwise an empty </s>
funcom_train/15582559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testingDefaults() { /** * exercises.addElement(new Exercise("Push up")); * exercises.addElement(new Exercise("Bench press")); * exercises.addElement(new Exercise("Inclined bench press")); * exercises.addElement(new Exercise("Crunches")); **/ } COM: <s> debugging purpose set a list of default exercises </s>
funcom_train/23267858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetApellidoM() { System.out.println("setApellidoM"); String apellidoM = ""; Cliente instance = new Cliente(); instance.setApellidoM(apellidoM); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set apellido m method of class capa negocios </s>
funcom_train/27676013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readProduct() { final StringBuilder builder = new StringBuilder(); builder.append( this.readToken() ); if ( this.tryReadByte( (byte) '/' ) ) { builder.append( '/' ); builder.append( this.readToken() ); } return builder.toString(); } COM: <s> reads a code product code at the current position </s>
funcom_train/50813575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEachIntOnlyOnce( int[] array ) { for ( int first = 0 ; first < array.length - 1 ; first++ ) { for ( int second = first + 1 ; second < array.length ; second++ ) { if ( array[ first ] == array[ second ] ) return false ; } } return true ; } COM: <s> return true if each int of the array is different from the others </s>
funcom_train/2537151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireStateChange(StateChangeEvent evt) { if (this.statesToListener != null && !this.statesToListener.isEmpty() ){ StateChange stateName = evt.getState(); StateChangeListener[] common = this.statesToListener.get(null); StateChangeListener[] named = (stateName != null) ? this.statesToListener.get(stateName) : null; this.fire(common, evt); this.fire(named, evt); } } COM: <s> fire an existing state change event to any registered listeners </s>
funcom_train/3862372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void process() throws IOException { File[] mFiles = getFile().listFiles(); for (int i = 0; i < mFiles.length; i++) { WriteableSplitIndexFileDescriptor bFileDesc = new WriteableSplitIndexFileDescriptor(this, mFiles[i]); addFileDescriptor(bFileDesc); bFileDesc.process(); } saveDescriptor(); } COM: <s> does the splitting zipping deleting and then saves the descriptor file </s>
funcom_train/7620423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean up() { if (isWithinCurrentMonth(mRow - 1, mColumn)) { // within current month, just move up mRow--; return false; } // flip back to previous month, same column, first position within month previousMonth(); mRow = 5; while(!isWithinCurrentMonth(mRow, mColumn)) { mRow--; } return true; } COM: <s> move up one box potentially flipping to the previous month </s>
funcom_train/4640684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean undoMove(boolean isNetwork){ if(isNetwork && !me){ return false; } if (!moves.isEmpty()){ GameMove gameMove = moves.peek(); if(gameMove.getType().equalsIgnoreCase("ATTACKMOVE")) { return false; } gameMove.printUndoMove(); gameMove.restore(); redoMoves.push(moves.pop()); this.numberOfMoves--; if(isNetwork){ Client.sendMsg(new InformClients(this.game, redoMoves.peek().getBriefUndo())); } return true; } return false; } COM: <s> undoing the players last move </s>
funcom_train/8036970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAll() { ListSelectionModel lsm = connectionTable.getSelectionModel(); lsm.clearSelection(); while (requestResponses.size() > 0) { ((RequestResponse) requestResponses.get(0)).remove(); } lsm.setSelectionInterval(0, 0); } COM: <s> method remove all </s>
funcom_train/43329960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFont(String fName, int fSize) { f = new Font(fName,Font.PLAIN,fSize); fBold = new Font(fName,Font.BOLD,fSize); FontMetrics fm = mainFrame.getFontMetrics(f); fontWidth = fm.charWidth('X'); fontHeight = fm.getHeight(); fontLeading = fm.getLeading(); lineHeight = fontHeight + padY; } COM: <s> set font to draw labels </s>
funcom_train/9931224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(ArrayList<String> jsonStrings) throws JSONException { keyValuesSums = new HashMap<Object, Summary>(); for (String jsonString : jsonStrings) { parse(removeStrangeChars(jsonString)); } // System.out.println("createOutputJSON: " + createOutputSumJSON()); } COM: <s> method parses list of json strings </s>
funcom_train/24185757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAgentReporting() throws InterruptedException { String agentName = "agent"; AgentAddress agentAddress = Controller.PipeFactoryInstance.getSelfAddress(4445); MessageAgentReporting msg1 = new MessageAgentReporting(MessageAgentReporting.AGENT_REPORTING, agentName, agentAddress); queue.sendMessageToSelf(msg1); // make sure the message is received Thread.sleep(500); HashMap<String, AgentAddress> agents = whitePage.getAgents(); assertEquals(agentAddress, agents.get(agentName)); } COM: <s> test that an agent that reports is handeled correctly </s>
funcom_train/1376836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Step last() throws StepNotFoundException { Step s; if (current.getName().equals(Stepper.ENC)) { encounters--; } if (!history.empty()) { s = game.get(history.pop()); current = s; } else { throw new StepNotFoundException("ERROR: history empty. cannot go back a step"); } return s; } COM: <s> goes back one step </s>
funcom_train/3361849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValue(Object obj) { // if obj is null or not a TabularData, return false // if (!(obj instanceof TabularData)) return false; // if obj is not a TabularData, return false // TabularData value = (TabularData) obj; TabularType valueType = value.getTabularType(); return isAssignableFrom(valueType); } COM: <s> tests whether var obj var is a value which could be </s>
funcom_train/43245245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetNOKOneStreetAddr1() { System.out.println("getNOKOneStreetAddr1"); EmergencyContactObject instance = new EmergencyContactObject(); String expResult = ""; String result = instance.getNOKOneStreetAddr1(); 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 nokone street addr1 method of class org </s>
funcom_train/21625265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearGraph(Graph graph) { graph.setSelection(null); Object[] nodeElements = viewer.getNodeElements(); for (int i = 0; i < nodeElements.length; i++) { viewer.removeGraphModelNode(nodeElements[i]); } Object[] connectionElements = viewer.getConnectionElements(); for (int i = 0; i < connectionElements.length; i++) { viewer.removeGraphModelConnection(connectionElements[i]); } } COM: <s> convenience method for clearing all the elements in the graph </s>
funcom_train/31978716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeNote(String name, boolean jgnotify) { super.removeNote(name); if ( jgnotify) { SessionMessage msg = new SessionMessage(SessionMessage.EVT_REMOVE_SESSION_NOTE, null, getId(), name, null, null); sendMessage(msg); } } COM: <s> remove any object bound to the specified name in the internal notes </s>
funcom_train/3577751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsOutputPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Specification_isOutput_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Specification_isOutput_feature", "_UI_Specification_type"), SchemaPackage.eINSTANCE.getSpecification_IsOutput(), true, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the is output feature </s>
funcom_train/43615698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean vote(int id, int index){ this.hasResults = false; int votes = getVotes(id,index)+1; String query = "UPDATE `poll` SET `votes"+index+"` = '"+votes+"' WHERE `poll`.`id` ="+id+" LIMIT 1 ;"; return db.executeQuery(query); } COM: <s> adds a single vote for given poll to given choice </s>
funcom_train/40873765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInput(ArrayList<Object> o) { if(o!= null) switch(o.size()) { case 0: setNothingSelected(); break; case 1: Object element = o.get(0); if(element instanceof IFormatable){ IFormator formator = ((IFormatable)element).getFormator(factory); if(formator != null) { updateContent((Widget) formator.format((IFormatable)element)); } else { setNoProperties(); } } else if (element instanceof Schema){ selectSchema((Schema) element); } else { setNothingSelected(); } break; default: setMultipleSelection(); break; } else setNothingSelected(); } COM: <s> show information about the given objects </s>
funcom_train/28658330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scroll(boolean down, int row1, int row2, int nLines) { if (down) ivCrtBuffer.scrollDown(row1, row2, nLines); else ivCrtBuffer.scrollUp(row1, row2, nLines); repaint(0, row1 * ivCrtBuffer.getCharSize().height, ivCrtBuffer.getSize().width, (row2 - row1) * ivCrtBuffer.getCharSize().height); } COM: <s> scrolls a portion of the panel </s>
funcom_train/21445855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(String path) throws IOException { purge(); File file = new File(path); ObjectOutputStream oos = null; try { FileOutputStream fos = new FileOutputStream(file); oos = new ObjectOutputStream(fos); oos.writeObject(cache); oos.close(); } catch (IOException ex) { } finally { try { oos.close(); } catch (IOException ex) { } } } COM: <s> attempts to save the cache to the given path </s>
funcom_train/10801105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRecursionDepth(FieldMetaData fm, int depth) { if (_readOnly) throw new UnsupportedOperationException(); if (depth < -1) throw new MetaDataException(_loc.get("invalid-fg-depth", _name, fm, depth)); if (_depths == null) _depths = new HashMap<FieldMetaData, Number>(); _depths.put(fm, depth); } COM: <s> recursion depth for the given field </s>
funcom_train/3414470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void firePropertyChange(String propertyName, byte oldValue, byte newValue) { if (changeSupport == null || oldValue == newValue) { return; } firePropertyChange(propertyName, Byte.valueOf(oldValue), Byte.valueOf(newValue)); } COM: <s> reports a bound property change </s>
funcom_train/47276469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean load(String theFileName) { blockDraw = true; clear(); System.out.println("loading.." + theFileName); String[] myStrings = papplet.loadStrings(theFileName); String myString = ""; for (int i = 0; i < myStrings.length; i++) { myString += myStrings[i]; } if (myString.length() == 0) { return false; } try { Thread.sleep(200); } catch (Exception e) { } _myControlP5IOHandler.parse(myString); blockDraw = false; return true; } COM: <s> load an xml file containing a control p5 setup </s>
funcom_train/12548482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void hypothesizeUnit(GrammarEnvironment env, Grammar g) { UnitProductionRemover remover = new UnitProductionRemover(); if (remover.getUnitProductions(g).length > 0) { UnitPane up = new UnitPane(env, g); UnitController controller=new UnitController(up, g); controller.doAll(); g=controller.getGrammar(); } hypothesizeUseless(env, g); } COM: <s> method for getting rid of unit productions </s>
funcom_train/50878603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumPoints(){ int tempSum = 0; for (int i=0; i<myVectEditors.size(); i++){ LinearRingEditor tempEditor = (LinearRingEditor) myVectEditors.elementAt(i); tempSum = tempSum + tempEditor.getNumPoints(); } return tempSum; } COM: <s> returns the number of points in this polygon </s>
funcom_train/10591624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStopExecutionFunctionsConf( Configuration conf ) throws ConfigurationException { this.stopExecutionFunctions = new ArrayList(); Configuration stopExecutionFunctionsConf[] = conf.getChildren(); for( int i = 0; i < stopExecutionFunctionsConf.length; i++ ) { stopExecutionFunctions.add( stopExecutionFunctionsConf[i].getValue() ); } } COM: <s> provide configuration part of the interpreter configuration </s>
funcom_train/8335609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDataset(SimpleDataset dataset) { if (this.dataset != null) { this.dataset.removePropertyChangeListener(datasetListener); } if (dataset != null) { dataset.addPropertyChangeListener(datasetListener); } SimpleDataset oldDataset = this.dataset; this.dataset = dataset; propertyChangeSupport.firePropertyChange(PROP_DATASET, oldDataset, dataset); updateDatasetState(); updateTrainable(); } COM: <s> set the value of dataset </s>
funcom_train/27783843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int whyStay( Mine m ) { int why = Mine.NORTH; while( why <= Mine.NORTHWEST && !(m.get(why) instanceof Unknown) ) { why++; } if (why>Mine.NORTHWEST) { //System.out.println( "this mine knows its neightbors" ); //Mine.printBombsAround( m ); why = -1; } return why; } COM: <s> describe code why stay code method here </s>
funcom_train/24243099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFilteredSqlQuery(String sqlQuery, String whereClause) { if (whereClause == null || whereClause.trim().isEmpty()) { return sqlQuery; } if (sqlQuery.toLowerCase().contains("where")) { return sqlQuery + " AND " + whereClause; } return sqlQuery + " WHERE " + whereClause; } COM: <s> get filtered query passed in argument </s>
funcom_train/26392682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void callJava() { JavaArgs javaArgs = (JavaArgs) pop(); String methodName = (String) pop(); Object o = pop(); if (methodName.equals("new")) { callJavaConstructor(o, javaArgs); } else { callJavaMethod(o, methodName, javaArgs); } /* End if*/ } /* End callJava()*/ COM: <s> resove and make the call </s>
funcom_train/27835453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLoad() { /* try { assertEquals("NOT_LOADED", goodDBDriver_.getStatus()); goodDBDriver_.load(); assertTrue(isDriverLoaded(goodDBDriver_.getClassName())); assertEquals("LOADED", goodDBDriver_.getStatus()); } catch (IOException ex) { ex.printStackTrace(); } */ } COM: <s> tests the load method and the status of the dbdriver </s>
funcom_train/3115324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addScenario(Scenario toAdd) { /* Scenario toAdd = new Scenario(name); for (Iterator it = nodes.iterator(); it.hasNext();) { ScenarioNode temp = (ScenarioNode) it.next(); toAdd.getNodes().add(temp); } */ sheet.addScenario(toAdd); loadScenariosFromSheet(); updateTable(scenPanel, myTableItems); } COM: <s> note changed method name from set scenario to more accurately describe </s>
funcom_train/36125081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(FilterConfig filterConfig) throws ServletException { setFilterConfig(filterConfig); log("PrestFilter init"); String applicationClassName = filterConfig .getInitParameter("Application"); Application app = createApplication(applicationClassName); app.setFilterConfig(filterConfig); try { app.initialize(); log("Application successfuly initialized"); } catch (ApplicationException e) { String msg = "Initialization of application failed: " + e.getMessage(); log(msg); throw new ServletException(msg, e); } setApplication(app); } COM: <s> initializes the p rest application using the filter configuration from </s>
funcom_train/22366638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePlayList(int index) { // If index is not valid, do nothing // if there is only one play list, don't delete if (validateIndex(index) && moreThanOnePlayList()) { switchPlayListIfNeeded(index); playListsContainer.removePlayList(index); adjustVisibleAndActivePlayLists(index); // Delete tab playListTabController.deletePlayList(index); // Refresh table playListController.refreshPlayList(); playListHandler.playListsChanged(true, true); } } COM: <s> removes play list by given index </s>
funcom_train/3598129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRightAligned() { List results=null; try { results = engine.search(nom, "($p np)($w word):$p]]$w"); results.remove(0); // remove list of vars Collections.sort(results, new SearchResultIDComparator()); assertTrue(results.size()==3); NOMElement r1 = (NOMElement)((List)results.get(2)).get(0); NOMElement r2 = (NOMElement)((List)results.get(2)).get(1); assertTrue(r1.getID().equals("np_3")); assertTrue(r2.getID().equals("w_8")); } catch (Throwable ex) { ex.printStackTrace(); fail("Right alignment test failed! " + results.size()); } } COM: <s> right alignment between phases and words should be three matches </s>
funcom_train/50503445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate(List findings) { super.validate(findings); if (getName() == null || getName().trim().length() == 0) { findings.add(new FatalFinding("Missing ref name.", this)); } if (role == null) { findings.add(new ErrorFinding("Missing role.", this)); } } COM: <s> validates the findings list adds all findings to the given list </s>
funcom_train/50977278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeDataToXML(NObXMLArchive theArchive, String currentIndent, boolean encodeData) { if (mNode.getAllowsChildren() == true) { //A NObListNode writeNObListNodeDataToXML(theArchive, currentIndent, encodeData); } else { //A NObNode writeNObNodeDataToXML(theArchive, currentIndent, encodeData); } } COM: <s> constructor for the write data to mime object </s>
funcom_train/41522343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanOutputDir() { File outputDir = new File(m_outputDirName); for (File file : outputDir.listFiles()){ if (file.isDirectory()) { deleteDir(file); } else if (file.getName().endsWith(".java")){ file.delete(); } } } COM: <s> removes all java source files from the output directory </s>
funcom_train/19437317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initDefaultButtons() { getExerciseButton = new mButton(new mImage("icons/get.png")); addNext(getExerciseButton).setCell(DONTSTRETCH); setExerciseButton = new mButton(new mImage("icons/set.png")); addLast(setExerciseButton).setCell(DONTSTRETCH); doButtons(BACKB); } COM: <s> get set and back buttons </s>
funcom_train/51270063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isSmallerThan(DeweyIdentifier did){ int l = did.getDeweyLevel(); int[] deweyId = copyArray(did.getDeweyId(),0); int i= 0; if (l <= dewey_level ){ while (i <= l){ if (deweyIdentifier[i] < deweyId[i]){ return true; } else if (deweyId[i] < deweyIdentifier[i]){ return false; } i++; } return false; } else { while (i <= dewey_level){ if (deweyIdentifier[i] < deweyId[i]){ return true; } else if (deweyIdentifier[i] > deweyId[i]){ return false; } i++; } return true; } } COM: <s> returns true if this is smaller than did order </s>
funcom_train/3764096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStockBuy() throws Exception{ //Create a Stock with our simulated values StockOffer testOffer = new StockOffer(); testOffer.setStockName("MEGACORP"); testOffer.setStockPrice(22); testOffer.setStockQuantity(1000); //Run the rules on it BusinessLayer.evaluateStockPurchase(testOffer); //Is it what we expected? assertTrue(testOffer.getRecommendPurchase()!=null); assertTrue("YES".equals(testOffer.getRecommendPurchase())); } COM: <s> tests the purchase of a stock </s>
funcom_train/18254689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDistance(Coordinate target) { double minXDistance = Math.abs(this.values[0] - ((Coordinate2DContinuous) target).getXValue()); double minYDistance = Math.abs(this.values[1] - ((Coordinate2DContinuous) target).getYValue()); return Math.sqrt(minXDistance * minXDistance + minYDistance * minYDistance); } COM: <s> returns the calculated distance between this coordinate and the supplied </s>
funcom_train/32218408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyWsdl() throws EnhancedException { FileUtils.createDirectory(outputDir + "//" + copyWsdlDir); FileUtils.copyFile(inputFile, new File(outputDir + "//" + copyWsdlDir + "//" + inputFile.getName())); context.put("wsdl_url", copyWsdlDir + "/" + inputFile.getName()); } COM: <s> copies the source wsdl file </s>
funcom_train/8374170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadModels(String index){ String temp; Scanner s; try { s = new Scanner(new File(index)); while(s.hasNext()){ s.next(); temp = s.next(); loadModel(temp); } } catch (FileNotFoundException ex) { System.err.println(ex.getMessage()); } } COM: <s> reads the binary models saved in hmmanalyzer </s>
funcom_train/18318595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LinkedList getAnchors(Side s) { if (s.equals(Side.LEFT)) { return leftAnchors; } else if (s.equals(Side.RIGHT)) { return rightAnchors; } else if (s.equals(Side.TOP)) { return topAnchors; } else { throw new IllegalArgumentException("incorrect side"); } } COM: <s> left and right are bottom top alg </s>
funcom_train/46620820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Label getBuildFileLabel() { if (iBuildFileLabel == null) { try { iBuildFileLabel = new Label(); iBuildFileLabel.setName("BuildFileLabel"); iBuildFileLabel.setText("Ant-Buildfile:"); } catch (Throwable iExc) { handleException(iExc); } } return iBuildFileLabel; } COM: <s> return the build file label property value </s>
funcom_train/3022463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent evt) { if (evt.getActionCommand().equals("OK")) { dispose(); String result = (String)packageName.getSelectedItem(); if (result.startsWith("<")) { result = ""; } repackage(result); } else if (evt.getActionCommand().equals("Cancel")) { dispose(); } } COM: <s> respond to a button press </s>
funcom_train/8072560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String fuzzyMap(String concept) throws Exception { Set<String> names = getYagoTypes().keySet(); int distance = 0; for (String name : names) { distance = StringUtility.getLevenshteinDistance(concept.toLowerCase(), name); if (distance <= 1 && ((float)(distance)/(float)(concept.length())) <= 0.21) return getYagoTypes().get(name); } return null; } COM: <s> this method maps from a concept in life database into the most </s>
funcom_train/22674978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getNamespaceAlias(String nsURI) { String ns = namespaces.get(nsURI); if (ns == null) { ns = "ns" + nameSpaceCnt++; namespaces.put(nsURI, ns); definitions.declareNamespace(nsURI, ns); } return ns; } COM: <s> returns the namespace alias for the namespace and declares it if </s>
funcom_train/6511409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitConcreteMethod(ConcreteMethod method) { initMethod(method, method.isStatic()? 0 : 1); if(applyPreHook(method)) { method.getBody().accept(this); if(method.getResultType() == null) // void il.append(InstructionConstants.RETURN); } if(applyPostHook(method)) finishMethod(); } COM: <s> int foo string bla </s>
funcom_train/40322385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Button getBotonMutar() { if (botonMutar == null) { botonMutar = new Button(); botonMutar.setLabel("Mutar"); botonMutar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed() panelMutante.Mutar(); } }); } return botonMutar; } COM: <s> this method initializes boton mutar </s>
funcom_train/44316176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeSearch() { queue = new QueueAsLinkedList(); FakeTreeNode ftn = rootOfSearch; numberOfVertices = swmm.getNumberOfVertices(); lastSearch = ""; visitedVertices = new boolean[numberOfVertices]; for(int i = 0; i < numberOfVertices; i++) visitedVertices[i] = false; queue.enqueue(ftn); } COM: <s> initializes the search queue for a search of the datamap </s>
funcom_train/1304818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addValue(Value value) { final Tree<XmlLite.Data> xmlTree = asTree(); final Tree<XmlLite.Data> child = new Tree<XmlLite.Data>(new XmlLite.Tag(value.getName())); xmlTree.addChild(child); child.addChild(value.asTree()); } COM: <s> add the given value to this record associated with its name as </s>
funcom_train/7788621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GameNPC findNpc(int id) { for (Object o : values.getNPCs()) { if (o != null) { GameNPC npc = new GameNPC(o, mainComponent); if (npc.getNPCDef().getID().equals(id)) { npc.setParent(o, mainComponent, values); return npc; } } } return null; } COM: <s> finds npc by id </s>
funcom_train/33299645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printHeader(TestResult result) { if (result.wasSuccessful()) { writer().println(); writer().print("OK"); writer().println (" (" + result.runCount() + " tests)"); } else { writer().println(); writer().println("FAILURES!!!"); writer().println("Test Results:"); writer().println("Run: "+result.runCount()+ " Failures: "+result.failureCount()+ " Errors: "+result.errorCount()); } } COM: <s> prints the header of the report </s>
funcom_train/49431544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasPlacedStartingForce() { List<UnitType> placedForces = new ArrayList<UnitType>(); for (Unit placedUnit : getUnits()) { placedForces.add(placedUnit.getType()); } boolean transportsPlaced = getTransports().size() >= startingTransports; return !getStartingForce().isEmpty() && CollectionUtilities.containExactSameElementsIgnoreOrder(placedForces, getStartingForce()) && transportsPlaced; } COM: <s> this method is only valid to call in the setup phase </s>
funcom_train/4193370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onServiceTerminated(UdpProvider udp, Exception error) { if (listener!=null) listener.onTransportTerminated(this,error); UdpSocket socket=udp.getUdpSocket(); if (socket!=null) try { socket.close(); } catch (Exception e) {} this.udp_provider=null; this.listener=null; } COM: <s> when datagram service stops receiving udp datagrams </s>
funcom_train/11743638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ExtendedType getRegisteredType(Class<?> javaClass) { String name = null; if (javaClass.isArray()) { // only support single dimensional arrays now name = javaClass.getComponentType().getName() + "[]"; } else { name = javaClass.getName(); } return getRegisteredType(name); } COM: <s> returns a type registered for the class name </s>
funcom_train/10171058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeIResourceFromNavigator(IResourceDelta[] deletedMembers) { for (IResourceDelta deletedMember : deletedMembers) { // checking if instance of IFile IResource iFile = deletedMember.getResource(); if (deletedMember.getResource() instanceof IFile) { removeIFile((IFile) iFile, IResourceDelta.REMOVED); } removeIResourceFromNavigator(deletedMember.getAffectedChildren()); } } COM: <s> removes the resources from navigator </s>
funcom_train/36852837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paint(byte state) { int x, y; for (int i = 0; i < shapeX.length; i++) { x = xPos + getRelativeX(i, orientation); y = yPos + getRelativeY(i, orientation); getBoard().setSquareColor(x, y, state); } } COM: <s> paints the figure on the board with the specified color </s>
funcom_train/31947695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRolePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EAgent_role_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EAgent_role_feature", "_UI_EAgent_type"), SailuserdataPackage.Literals.EAGENT__ROLE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the role feature </s>
funcom_train/119431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CellView getMapping(Object cell, boolean create) { if (cell == null) return null; CellView view = (CellView) mapping.get(cell); if (view == null && create) { view = (CellView) hiddenSet.get(cell); if (view != null && isVisible(cell)) { putMapping(cell, view); hiddenSet.remove(cell); } else view = factory.createView(cell, this); } return view; } COM: <s> returns the view for the specified cell </s>
funcom_train/8064909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFromDiagram() { // remove the edges in reverse order because to make sure // that other edges in figEdge don't have their position // altered as a side effect. while (figEdges.size() > 0) { FigEdge f = (FigEdge) figEdges.get(figEdges.size() - 1); f.removeFromDiagram(); } super.removeFromDiagram(); } COM: <s> when a fig node is removed all of its edges are removed first </s>
funcom_train/37762992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GridModel getRowsWM() { GridModel rows = (GridModel) getWidgetCache().getModel("rows"); if (rows == null) { rows = new GridModel(); getWidgetCache().addModel("rows", rows); populateRows(rows); } return rows; } COM: <s> getter for property rows </s>
funcom_train/43988997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSelectionAfterSetElement() { initComboWithSelectionInList(); combo.setSelectedItem("two"); listModel.set(1, "other"); assertEquals("combo selection must be changed", "other", combo.getSelectedItem()); } COM: <s> verifies that a combo box adapter built with a selection in list </s>
funcom_train/33234007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getCardExpDateSI() { if (cardExpDateSI == null) {//GEN-END:|127-getter|0|127-preInit // write pre-init user code here cardExpDateSI = new StringItem("Exp. Date:", null);//GEN-LINE:|127-getter|1|127-postInit // write post-init user code here }//GEN-BEGIN:|127-getter|2| return cardExpDateSI; } COM: <s> returns an initiliazed instance of card exp date si component </s>
funcom_train/14059514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endWaiting() { if ((--this.m_waiting) == 0) { this.setComponentZOrder(this.m_image, this.getComponentCount() - 1); this.m_image.setImage(this.m_im); this.bountify(this.getWidth(), this.getHeight()); this.setCursor(this.m_cursor); } } COM: <s> leave the waiting state </s>
funcom_train/22167545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void saveXML(Document doc, String fileName) throws IOException { // Open output stream where XML Document will be saved Writer writer = new BufferedWriter(new FileWriter(fileName)); try { String encoding = System.getProperty("file.encoding"); if(encoding == null) encoding = "UTF-8"; printXML(writer, doc, encoding); } finally { writer.close(); } } COM: <s> saves xml document into xml file in the system encoding </s>
funcom_train/22234234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBasePath(String pathName) { basePath = pathName; if (basePath == null || basePath == "") basePath = "." + java.io.File.separator; basePath = basePath.replace('/', java.io.File.separatorChar); basePath = basePath.replace('\\', java.io.File.separatorChar); if (!basePath.endsWith(java.io.File.separator)) basePath = basePath + java.io.File.separator; } // End of setBasePath COM: <s> set the path where files associated with this </s>
funcom_train/34341523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getNuevoRegistro() { if (NuevoRegistro == null) {//GEN-END:|42-getter|0|42-preInit // write pre-init user code here NuevoRegistro = new Command("NuevoRegistro", Command.ITEM, 0);//GEN-LINE:|42-getter|1|42-postInit // write post-init user code here }//GEN-BEGIN:|42-getter|2| return NuevoRegistro; } COM: <s> returns an initiliazed instance of nuevo registro component </s>
funcom_train/34268317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTextPane(JTextPane text) { if (textPane != null) { textPane.removeCaretListener(this); } textPane = text; if (text != null) { text.addCaretListener(this); updateTabSet(text.getSelectionStart()); } else { updateTabSet(0); } } COM: <s> sets the text pane tabs are rendered for </s>
funcom_train/29651637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String loadItemXml(String itemFile) throws IOException { StringBuffer item = new StringBuffer(); String itemFileName = getParam("file_path") + itemFile; String inLine = null; BufferedReader itemStream = new BufferedReader(new FileReader( itemFileName)); try { while ((inLine = itemStream.readLine()) != null) { item.append(inLine); } } catch (IOException ex) { throw ex; } finally { itemStream.close(); } return item.toString(); } COM: <s> load the xml for a particular item question </s>
funcom_train/457819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateNewProjectEmptyName() { tester.startPage(EditProjectPage.class); final FormTester formTester = tester.newFormTester(MARKUP_ID_FORM); formTester.setValue(MARKUP_ID_PROJECT_NAME_TEXTFIELD, PROJECT_NAME_EMPTY); formTester.submit(MARKUP_ID_PROJECT_PERSIST_BUTTON); assertTrue(formTester.getForm().hasError()); //final String[] message = {INFO_MESSAGE_EMPTY_PROJECT_NAME}; //tester.assertErrorMessages(message); } COM: <s> tests the basic creation of a new project empty name submitted </s>
funcom_train/28973478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataFile generate(String sample){ File file = getFile(sample); SimpleDatafile result = new ResultDataFile(); RawDataAtNode node = new RawDataAtNode(0, file); node.setWorkingCopy(file); node.preLoad(); node.initializeScanBrowser(0, node.getNumberOfScans()); //create the header row result.addRow(createHeader(node)); for (int i = 0; i < node.getNumberOfScans(); i++) { result.addRow(createContentRow(node)); } return result; } COM: <s> generates the ion trace and returns it as datafile </s>
funcom_train/23717644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { this.params = new HashMap<String, Object>(); this.setUiStyle(1); this.setDebug(0); this.setNext("close"); this.setCancel("close"); this.setReadOnly(false); this.setSchemaCachingDisabled(false); } COM: <s> reset bean to default property values </s>
funcom_train/37504730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent ev) { if (ev.getSource() == repeatTimer && repeatTimer.isRunning()) { if (mouseTile != null) { pushActionChain(walkLayer.getMap(), mouseTile.x, mouseTile.y); } else { repeatTimer.stop(); } } } COM: <s> process action event from the repeat timer </s>
funcom_train/18807422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueLocation(int location) { if ((location >= 0) && (location < 4)) { this.valueLocation = location; notifyListeners(new PlotChangeEvent(this)); } else { throw new IllegalArgumentException( "ThermometerPlot.setDisplayLocation: location not recognised."); } } COM: <s> sets the location at which the current value is displayed </s>