__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/28757572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFooterheight(Long newVal) { if ((newVal != null && this.footerheight != null && (newVal.compareTo(this.footerheight) == 0)) || (newVal == null && this.footerheight == null && footerheight_is_initialized)) { return; } this.footerheight = newVal; footerheight_is_modified = true; footerheight_is_initialized = true; } COM: <s> setter method for footerheight </s>
funcom_train/28316960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String decrypt(String str) { try { // first step, change back $ -> + if any // because we define in the encrypt. String encryptString = str.replace('$', '+'); // Decode base64 to get bytes byte[] dec = new sun.misc.BASE64Decoder() .decodeBuffer(encryptString); // Decrypt byte[] utf8 = dcipher.doFinal(dec); // Decode using utf-8 String decryptResult = new String(utf8, "UTF8"); return decryptResult; } catch (Exception e) { } return null; } COM: <s> we know the encrypt the result is 12 24 32 character </s>
funcom_train/2026117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showIntegrityWarning() { TestLogger.warn("Integrity of test cases is not assured!"); Display disp = Display.getDefault(); try { disp.syncExec(new Runnable() { public void run() { MessageDialog .openWarning( Activator.getDefault().getWorkbench() .getActiveWorkbenchWindow() .getShell(), "Warning", "Integrity of test cases is not assured!\n" + "This version of tests was modified since delivery."); } }); } catch (Exception ex) { TestLogger.error(ex); } } COM: <s> show message to communicate non integrity of test cases to the user </s>
funcom_train/43895258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Iterator openIterator() throws IOException { try { return new FeatureWriterIterator(writer()); } catch (IOException badWriter) { return new NoContentIterator(badWriter); } catch (UnsupportedOperationException readOnly) { } try { return new FeatureReaderIterator(reader()); } catch (IOException e) { return new NoContentIterator(e); } } COM: <s> returns a feature writer iterator or feature reader iterator over content </s>
funcom_train/6260179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void structDeclaration() { if (superTypes(thisDt).size() == 0) { sline(PUB_FIN + "class " + structName(thisDt) + " extends "); println(MDF_STRUCT_IMPL + " implements " + type(thisDt)); } else { throw new RuntimeException(); } } COM: <s> generates struct class declaration </s>
funcom_train/45077705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getXml() { StringBuffer xml = new StringBuffer(); xml.append(createHeader()); xml.append("<DsOAS>\n"); // construct the observation data for (int i = 0; i < curObsDataSeq.length; i++) { xml.append(obs2XML(curObsDataSeq[i], " ")); } xml.append("</DsOAS>\n"); return xml.toString(); } COM: <s> generates an xml string representation for the current observation data struct structure </s>
funcom_train/8075355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setInstancesFromFile(File f) { try { Reader r = new BufferedReader(new FileReader(f)); setInstances(new Instances(r)); r.close(); } catch (Exception ex) { JOptionPane.showMessageDialog(this, "Couldn't read from file:\n" + f.getName(), "Load Instances", JOptionPane.ERROR_MESSAGE); } } COM: <s> loads results from a set of instances contained in the supplied </s>
funcom_train/43603507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MessageSender getSender(String msg){ MessageSender sender ; if("BLUETOOTH".equalsIgnoreCase(connType)){ sender = new SendBlueToothThread(); } else if("HTTP".equalsIgnoreCase(connType)){ sender = new SendHTTPMsgThread(); } else { sender = new SendMsgThread(this.phoneno, msg); } return sender; } COM: <s> factory method to get the communication type to send message </s>
funcom_train/11340933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object waitForService(long timeout) throws InterruptedException { if (timeout < 0) { throw new IllegalArgumentException("timeout value is negative"); } Object object = getService(); while (object == null) { final Tracked t = tracked(); if (t == null) { /* if ServiceTracker is not open */ return null; } synchronized (t) { if (t.size() == 0) { t.wait(timeout); } } object = getService(); if (timeout > 0) { return object; } } return object; } COM: <s> wait for at least one service to be tracked by this </s>
funcom_train/44300755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isExistsSchemaValue(MtSchemaColumn col) throws FatalException { for (int i=0; i < lst.size(); i++) { SchemaValue val = (SchemaValue) lst.get(i); if (val.getSchemaColumn() == col) return true; } return false; } COM: <s> return true if a code schema value code have the parameter column </s>
funcom_train/29903524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCount(Integer count) { if ((count!=null) && this.count!=null) if (count.compareTo(this.count)==0) return; this.count = count; /*undoHistory.addFirst(this.getProbability()); undoHistory.addFirst("setProbability"); if (!JRipplesEIG.redoInProgress) clearRedoHistory(); this.probability = probability;*/ JRipplesEIG .fireJRipplesEIGChanged(this.edge, JRipplesEIGEdgeEvent.EDGE_COUNT_CHANGED, JRipplesEIG.NONEABLE); } COM: <s> sets the number of times the edge appears in the code </s>
funcom_train/31502277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(GanttCalendar when) { int[] comparissons = { Calendar.YEAR, Calendar.MONTH, Calendar.DATE }; for (int i = 0; i < comparissons.length; i++) { switch (module(this.get(comparissons[i]) - when.get(comparissons[i]))) { case -1: return -1; case 1: return 1; default: break; } } return 0; } COM: <s> this function compare two date </s>
funcom_train/1171203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int sumAllCounters() { Object[] values = counters.values().toArray(); int count = 0; int num = 0; for (int i = 0; i < values.length; i++) { num = (Integer) values[i]; count += num; } return count; } COM: <s> p sum all counters </s>
funcom_train/10645853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addHighlight() { if (mark == dot) { return; } if (!isSelectionVisible) { restoreSelection = true; removeHighlight(); return; } if (selectionTag == null) { selectionTag = addHighlight(Math.min(dot, mark), Math.max(dot, mark)); } } COM: <s> adds selection according to current dot and mark if is selection visible </s>
funcom_train/33610454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean removeHelp(VGraphicEntry en) { if (entries.remove(en)) { if (en instanceof CompositeGraphicEntry) ((CompositeGraphicEntry)en).removeChangeListener(this); else if (en instanceof AbstractVGraphicEntry) { if (((AbstractVGraphicEntry)en).parent == this) ((AbstractVGraphicEntry)en).parent = null; } return true; } return false; } COM: <s> remove w o events </s>
funcom_train/29290276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getAllCompetitionExpireForFatculty() throws Exception{ SurveySession surveySession = SessionBeanFactory.getSurveySessionRemoteObject(); Integer survey_type_id = 2; Integer survey_status_id = 3; Integer group_id = 4; return surveySession.getAllSurveyExpireWhereGroupId(survey_type_id, survey_status_id, group_id); } COM: <s> return all survey expire for fatculty </s>
funcom_train/10802989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addClassLoaders(MultiClassLoader multi) { if (multi == null) return false; // use iterator so that the thread loader is not resolved boolean added = false; for (Iterator itr = multi._loaders.iterator(); itr.hasNext();) added = addClassLoader((ClassLoader) itr.next()) || added; return added; } COM: <s> adds all the class loaders from the given multi loader </s>
funcom_train/23619233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resolveCollision(MidiInputLocation mil) { if (milArr[mil.getChannel()][mil.getCtrlType()] != null) { this.milVect.remove(milArr[mil.getChannel()][mil.getCtrlType()]); } milArr[mil.getChannel()][mil.getCtrlType()] = mil; } COM: <s> resolves any collision by removing the occupying mil and then moving the </s>
funcom_train/12180915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(IPageSite pageSite) { /* Note : the order in which the eclipse calls us is : * * ODOMOutlinePage.init * ODOMOutlinePage.createControl * ODOMOutlinePage.setActionBars //not to be used here */ super.init(pageSite); context.updatePageSiteActions(pageSite); } COM: <s> extends its superclass method by making contributions to the global </s>
funcom_train/19620846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testChaser() { //When a new ghost is created, the default position is set to the prison which is also the STARTINGPOINT assertNotNull("When a new Chaser is created it is not null", m.getChaser() == null); //when a new ghost is created the name is set assertEquals("Chasers name Blinky", ghost.getName(), "Blinky"); } COM: <s> checks that the constructor method actually created the new chaser </s>
funcom_train/33010604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void characters(char[] ch, int start, int length) throws SAXException { String data = new String(ch, start, length); debug("Received characters event: " + data); getContentHandler().characters(ch, start, length); } COM: <s> filter the characters event </s>
funcom_train/47867631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int readByte(InputStream in) throws IOException { int b; try { b = in.read(); } catch (IOException ioe) { // PipedInputStream throws IOException instead of returning -1. if ((in.available() == 0) && (in instanceof PipedInputStream)) throw new EOFException(ioe.getMessage()); throw ioe; } if (b == -1) throw new EOFException(); return b; } COM: <s> read a byte </s>
funcom_train/44994409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sort() { int termListSize = termList.size(); if (IndexTerm.getTermLocale() == null || IndexTerm.getTermLocale().getLanguage().trim().length()==0) { IndexTerm.setTermLocale(new Locale(Constants.LANGUAGE_EN, Constants.COUNTRY_US)); } /* * Sort all the terms recursively */ for (int i = 0; i < termListSize; i++) { IndexTerm term = (IndexTerm) termList.get(i); term.sortSubTerms(); } Collections.sort(termList); } COM: <s> sort term list extracted from dita files base on locale </s>
funcom_train/3556677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkArgument(String arg, String name) throws IllegalArgumentException { if (arg == null) { throw new IllegalArgumentException(name + " is null."); } else if (arg.length() <= 0) { throw new IllegalArgumentException(name + " is empty."); } } COM: <s> checking a string parameter on null or emptiness </s>
funcom_train/3402572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isMetadataQuery(String query) { // we intentionally return true even if documents don't exist, // so that they get 404. return query != null && (query.equals("WSDL") || query.startsWith("wsdl") || query.startsWith("xsd=")); } COM: <s> returns true if the given query string is for metadata request </s>
funcom_train/49330618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SlideSet load(Reader reader) throws IOException { source = new TextLineReader(reader); // Read title and description String title = source.next(); StringBuilder desc = new StringBuilder(); while (!nextLineStartsSlide()) { if (desc.length() > 0) { desc.append('\n'); } desc.append(source.next()); } // Create the slide set SlideSet set = new SlideSet(); set.setTitle(title); set.setDescription(desc.toString()); // Read the slides while (source.hasNext()) { Slide s = readSlide(); set.addSlide(s); } return set; } COM: <s> load slide set from a reader </s>
funcom_train/25308796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String replaceAppReference(String url) { String appRef = (String) this.getContext().getAttributes().get(ContextAttributes.APP_ATTACH_REF); url = url.replace(APPLICATION_REF, HOST_REF + appRef); url = this.replacePublicHostName(url); return url; } COM: <s> method to put the application reference in a url </s>
funcom_train/40099097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getNwRowButton() { if (nwRowButton == null) { nwRowButton = new JButton(); nwRowButton.setText("INSERT ROW"); nwRowButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("actionPerformed()"); tableModel.insertRow(0, new Vector()); } }); } return nwRowButton; } COM: <s> this method initializes nw row button </s>
funcom_train/8009546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getActiveTab () { int n = _tabItems.size(); for (int i = 0; i < n; i++) { TabInfo info = (TabInfo)_tabItems.elementAt(i); if(info._active) { return i + 1; } } return 1; } COM: <s> get active tab number </s>
funcom_train/38315331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LinkEntry getLink(long id) throws PersistenceException { LinkEntry link = null; Session session = null; try { session = this.sessionManager.getHibernateSession(); link = (LinkEntry) session.load(LinkEntry.class, new Long(id)); } catch (HibernateException he) { link = null; } finally { this.sessionManager.flushCommitCloseSession(session); } return link; } COM: <s> retrieve a given link with an id from the database </s>
funcom_train/39125219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MidiPart getMidiPart() { Collection<Part> partSelection = project.getPartSelection().getSelected(); if ((partSelection != null) && ( ! partSelection.isEmpty() )) { Part p = partSelection.iterator().next(); if (p instanceof MidiPart) { return (MidiPart)p; } } if (this.selectedList != null) { if ( ! this.selectedList.isEmpty() ) { MultiEvent event = this.selectedList.firstElement(); return event.getMidiPart(); } } return null; } COM: <s> get currently selected midi part or null if no midi part is selected </s>
funcom_train/37518250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitInitializerDeclaration(/*@non_null@*/ JInitializerDeclaration self ) { // We do not want to generate these methods in source code // since they are the concatenation of the JClassBlocks and // JFieldDeclarationType initializers. Those AST nodes are still // in the AST and can be printed in the correct place from the // original nodes. } COM: <s> prints an initializer declaration </s>
funcom_train/45622998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addJcpaPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_VjcType_jcpa_feature"), getString("_UI_PropertyDescriptor_description", "_UI_VjcType_jcpa_feature", "_UI_VjcType_type"), MSBPackage.eINSTANCE.getVjcType_Jcpa(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the jcpa feature </s>
funcom_train/3375147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getFirstComponent(Container aContainer) { if (aContainer == null) { throw new IllegalArgumentException("aContainer cannot be null"); } Comparator comparator = getComparator(); if (comparator instanceof LayoutComparator) { ((LayoutComparator)comparator). setComponentOrientation(aContainer. getComponentOrientation()); } return super.getFirstComponent(aContainer); } COM: <s> returns the first component in the traversal cycle </s>
funcom_train/37592749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int show() { Utilities.setPopupLoc(_dialog, _dialog.getOwner()); _dialog.setVisible(true); Object val = _optionPane.getValue(); if (val == null || !(val instanceof Integer)) { return JOptionPane.CLOSED_OPTION; } return ((Integer)val).intValue(); } COM: <s> shows the dialog </s>
funcom_train/1303465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PointerSymbol getRelationFromSource() { PointerSymbol result = null; if (source != null) { final WordNetFile.Entry entry = source.getWordSense().getFileEntry(); final WordNetFile.Pointer pointer = entry.pointers[sourcePointerIndex]; result = pointer.pointerSymbol; } return result; } COM: <s> get the relation that brought us here from its source </s>
funcom_train/12758942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createNewApplicationDefinition() { applicationDefinition = new ApplicationDefinition(); applicationDefinition.markNew(); changes.add(applicationDefinition); saveButton.setEnabled(true); saveToolbarButton.setEnabled(true); cancelButton.setEnabled(true); cancelToolbarButton.setEnabled(true); applicationDefinitionTableModel.addRowData(applicationDefinition); int index = applicationDefinitionTableModel .getRowFor(applicationDefinition); if (index >= 0) { applicationDefinitionTable.getSelectionModel() .setSelectionInterval(index, index); } } COM: <s> create a new application definition </s>
funcom_train/2583657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test1472942() { DateAxis a1 = new DateAxis("Test"); DateAxis a2 = new DateAxis("Test"); assertTrue(a1.equals(a2)); // range a1.setRange(new Date(1L), new Date(2L)); assertFalse(a1.equals(a2)); a2.setRange(new Date(1L), new Date(2L)); assertTrue(a1.equals(a2)); } COM: <s> a test for bug report 1472942 </s>
funcom_train/7421836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseId(SubProcess subProcess, Node subProcessNode) { NamedNodeMap attributes = subProcessNode.getAttributes(); if (attributes.getNamedItem(ID) == null) { this.output.addParseError("An activity set does " + "not have a specified Id.", subProcessNode); } else { String id = attributes.getNamedItem(ID).getNodeValue(); subProcess.setId(id); nodes.put(id, subProcessNode); } } COM: <s> determines and sets the id of the sub process represented by the </s>
funcom_train/5689282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private byte _readByte() { byte b = (byte) 0; try { for ( ;; ) { synchronized ( _lock ) { if ( _port.getInputStream() != null ) { if ( _port.getInputStream().available() > 0 ) { b = (byte) (0x000000FF & _port.getInputStream().read()); break; } else { try { Thread.sleep(100); } catch ( InterruptedException interrupted ) { // // catch the exception and warn about // it, but keep trying to read. // System.err.println(interrupted); } } } } } } catch ( IOException io ) { System.err.println(io); } return b; } COM: <s> we need to check for available data before we read </s>
funcom_train/28272882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void currentPasswordChange(ValueChangeEvent e) { String newValue = (String)e.getNewValue(); String encryptedPassword = PasswordService.getInstance().encrypt(newValue); if (!encryptedPassword.equals(customer.getCustomersPassword())) { UIComponent component = e.getComponent(); FacesUtil.addErrorMessage(component, "Password incorrect."); } } COM: <s> current password change </s>
funcom_train/34342025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getComandoEnvioSMS() { if (ComandoEnvioSMS == null) {//GEN-END:|33-getter|0|33-preInit // write pre-init user code here ComandoEnvioSMS = new Command("Enviar SMS", Command.ITEM, 0);//GEN-LINE:|33-getter|1|33-postInit // write post-init user code here }//GEN-BEGIN:|33-getter|2| return ComandoEnvioSMS; } COM: <s> returns an initiliazed instance of comando envio sms component </s>
funcom_train/49080854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writes(int writeCount) { stopWatch.startTimer(); for (int i=0; i<writeCount; i++) { hashMap.put("key", new Integer(i).toString()); } stopWatch.reportElapsedTime(numberFormat.format(writeCount) + " writes"); } COM: <s> might be a better test if it wrote six to ten values </s>
funcom_train/18838153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Parameters getParameters( String executable) { java.util.prefs.Preferences rootPreferences = java.util.prefs.Preferences.userNodeForPackage( getClass()); StringBuffer path = new StringBuffer(); path.append( PREFERENCE_PROCESS_PARAMETERS); path.append("/"); path.append( executable.replace('/', '_')); java.util.prefs.Preferences preferences = rootPreferences.node( path.toString()); preferences.put("executable", executable); return new Parameters( preferences); } COM: <s> returns the current profiled process parameters </s>
funcom_train/1825294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Runnable runnable) { int waiting; synchronized (queuedRunnables) { if (disposed) return; waiting = waitingThreads; queuedRunnables.add(runnable); queuedRunnables.notify(); } // synchronized (queuedRunnables) synchronized (runningThreads) { // if waitingThreads == 1 then // the queuedRunnables.notify() should have waked it up. if (waitingThreads < 2 && runningThreads[0] < maxRunningThreads) { ++runningThreads[0]; Worker w = new Worker(); w.setDaemon(true); w.start(); } } // synchronized (runningThreads) } COM: <s> adds a runnables to the queue </s>
funcom_train/1240258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void check() { try { readOnly = configFile.canRead() & !configFile.canWrite(); } catch (SecurityException se){ readOnly = true; } /* * If file is read-only, log informational message * as configuration changes will not persist. */ if (readOnly) { log.info(Messages.getMessage("readOnlyConfigFile")); } } COM: <s> check the configuration file attributes and remember whether </s>
funcom_train/51299187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadGoodsTable(Integer... ides) { modelGoodsList.clear(); Collection<Goods> allgoods = GoodsDataHandler.getInstance().getList(true, ides); for (Goods param : allgoods) { if (!param.getIsDeleted() || (param.getIsDeleted() && tablePanel.isShowHiden())) modelGoodsList.addRow(param); } } COM: <s> fills table model for transferred ids array </s>
funcom_train/13599119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Transition addLeavingTransition(Transition leavingTransition) { if (leavingTransition == null) throw new IllegalArgumentException("can't add a null leaving transition to an node"); if (leavingTransitions == null) leavingTransitions = new ArrayList(); leavingTransitions.add(leavingTransition); leavingTransition.from = this; leavingTransitionMap = null; return leavingTransition; } COM: <s> creates a bidirection relation between this node and the given leaving transition </s>
funcom_train/40369895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double polarAngle() { if (x == 0.0 && y == 0.0) return -1.0; if (x == 0) return (y > 0.0 ? 90 : 270); double theta = Math.atan(y / x); theta *= 360 / MathHelper.TWO_PI; if (x > 0.0) return (y >= 0.0 ? theta : 360 + theta); else return (180 + theta); } COM: <s> calculates polar angle of the vector </s>
funcom_train/32656961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClassDescSerEntry getClassDescSerEntry() { ClassDescSerEntry entry = null; if(value instanceof ReferenceSerEntry) { entry = (ClassDescSerEntry)handlesTable.get(value.getHandle()); } else if(value instanceof ClassDescSerEntry) { entry = (ClassDescSerEntry)value; } return entry; } COM: <s> gets serialized class description </s>
funcom_train/32058158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsHideEdgesOnBecomeInvisible() { System.out.println("testIsHideEdgesOnBecomeInvisible"); GraphModel gm = null; CellViewFactory cvf = null; GraphLayoutCache cache = new GraphLayoutCache(gm, cvf); assertEquals("isHideEdgesOnBecomeInvisible failed", cache .isHideEdgesOnBecomeInvisible() == true, true); } COM: <s> this function tests is hide edges on become invisible function of </s>
funcom_train/29640878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EventPipe put(String name, EventPipe pipe) { if (getPipes().containsKey(name)) { throw new IllegalArgumentException(name + " - name already registered"); } EventPipe ret = getPipes().put(name, pipe); logger.info("goes in scope " + pipe + ", here we have " + getPipes().size() + " pipes now"); return ret; } COM: <s> puts a pipe to the thread local storage </s>
funcom_train/13999469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProjectName(String projectName) throws IllegalArgumentException { if (projectName == null || "".equals(projectName)) { //$NON-NLS-1$ throw new IllegalArgumentException("project name == null or empty"); //$NON-NLS-1$ } String oldName = this.projectName; if (!projectName.equals(oldName)) { this.projectName = projectName; firePropertyChange(NAME_PROP, oldName, projectName); } } COM: <s> sets new project name </s>
funcom_train/45317952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void requestPause(String reason) { try { BreakMessage message = new BreakMessage(Integer.parseInt(reason)); sendMessageToServer(message); } catch (NumberFormatException ex) { Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).warning("Invalid reason code. Must be numeric: " + reason); } } COM: <s> request setting agent in paused state </s>
funcom_train/37454529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeDRLineParameters(DRParameters parameters) throws IOException { writer.write(parameters.getUniprotAc()); writer.write("; "); writer.write((parameters.getNumberOfInteractions() > 0 ? Integer.toString(parameters.getNumberOfInteractions()) : "-")); writer.write("."); writer.write(WriterUtils.NEW_LINE); } COM: <s> write the content of a dr line </s>
funcom_train/10910903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void renderText(TextArea area) { int col = Helper.ceilPosition(this.currentIPPosition, CHAR_WIDTH); int row = Helper.ceilPosition(this.currentBPPosition, CHAR_HEIGHT); String s = area.getText(); addString(row, col, s); super.renderText(area); } COM: <s> render text area to text </s>
funcom_train/29629273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDeltaX(City citya, City cityb) { double deltaLong = Math.abs(citya.getCoordinates().getX() - cityb.getCoordinates().getX()); double lat = (citya.getCoordinates().getY() + cityb.getCoordinates().getY()) / 2; return deltaLong * getDegreeLength(lat); } COM: <s> calculates the horizontal distance between the cities in kilometers </s>
funcom_train/13304402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOfferResponsePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Agreement_offerResponse_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Agreement_offerResponse_feature", "_UI_Agreement_type"), NegotiationPackage.Literals.AGREEMENT__OFFER_RESPONSE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the offer response feature </s>
funcom_train/18189795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addUserMarkerData(UserMarkerData umd){ if( umd!=null ){ ArrayList al = (ArrayList)game.getProperty("UserMarkers"); if( al==null ){ al = new ArrayList(); game.putProperty( "UserMarkers",al); } al.add(umd); } } COM: <s> this method adds a new usermarker to the usermarker database </s>
funcom_train/4625868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setStatus(Status other){ if(other == status){ return false; } else { if (status == Status.NORMAL){ status = other; return true; } else if (status != Status.NORMAL && other == Status.NORMAL){ status = other; return true; } else { return false; } } } COM: <s> under the impression that another status cannot be used </s>
funcom_train/17492172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object visit(SuperFieldAccess node) { ClassInfo c = classInfo; FieldInfo f = null; try { f = ClassInfoUtilities.getField(c.getSuperclass(), node .getFieldName()); } catch (Exception e) { throw new CatchedExceptionError(e, node); } node.setProperty(NodeProperties.TYPE, f.getType()); return null; } COM: <s> visits a super field access </s>
funcom_train/50462745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(DCMenuModel subMenuModel) { synchronized(items) { items.add(subMenuModel); DCMenuModelEvent event = new DCMenuModelEvent(DCMenuModelEvent.ADD_EVENT, items.size()-1, subMenuModel, this); fireMenuChanged(event); } } COM: <s> add an action to the end of this menu model </s>
funcom_train/32870559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSpecialRequest(JoinPointRequest evRec) { if ( (acceptMask& evRec.getMask()) != 0) { // System.err.println("event is accepted:" + acceptMask); if ((mayFilterStaticallyMask & evRec.getMask()) != 0) { return doIsSpecialRequest(evRec); } else return true; } return false; } COM: <s> subclasses of this class should in conformance with the </s>
funcom_train/2287663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { if (o == this) { return 0; } if (o instanceof CmsProject) { try { // compare the names return m_name.compareTo(((CmsProject)o).getName()); } catch (Exception e) { // ignore, return 0 } } return 0; } COM: <s> compares this instance to another given object instance of this class </s>
funcom_train/45773860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean xItem(XItemSelection xmm, String methodName, String[] path, Vector params) { if (methodName.equals("selectItem_Index")) { xmm.selectItem_Index(path, getIntValue(params.get(0))); return true; } else if (methodName.equals("selectItem_Name")) { xmm.selectItem_Name(path, (String) params.get(0)); return true; } return false; } COM: <s> search the methode name in xitem interface </s>
funcom_train/16462662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addDateCriteria(DetachedCriteria criteria, Long start, Long end) { if(start != null) { criteria.add(Restrictions.ge(Field.DATE.getFieldName(), start)); } if(end != null) { criteria.add(Restrictions.le(Field.DATE.getFieldName(), end)); } } COM: <s> augments the supplied criteria with that required to match a date range </s>
funcom_train/4823104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getNewMnuItem() { if (newMnuItem == null) { newMnuItem = new JMenuItem(); newMnuItem.setText("New..."); newMnuItem.setMnemonic(KeyEvent.VK_N); newMnuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0)); newMnuItem.addActionListener(newMnuItemActionListener); } return newMnuItem; } COM: <s> this method initializes new mnu item </s>
funcom_train/28298555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void calculateZoomedPoints(int x1,int y1,int x2,int y2, int w,int []xP, int []yP) { double zoom=map.getZoomFactor(); TransBaseTools.calculatePoints(x1,y1,x2,y2,w,zoom,xP,yP); } COM: <s> calculates the four points for the polygon </s>
funcom_train/26318689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasImprovedSensors() { for (Mounted equip : getMisc()) { if (equip.getType().hasFlag(MiscType.F_BAP)) { if (equip.getType().getInternalName().equals(Sensor.ISIMPROVED) || equip.getType().getInternalName().equals(Sensor.CLIMPROVED)) { return true; } } } return false; } COM: <s> return if this ba has improved sensors </s>
funcom_train/48495859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCollisionMask(int mask) { if (mask < 0 || mask >= 16) return; if (body != null) { FilterData fd = new FilterData(); for (Shape shape = body.getShapeList(); shape != null; shape = shape.getNext()) { fd.set(shape.getFilterData()); fd.maskBits |= 1 << mask; shape.setFilterData(fd); } } } COM: <s> adds the collision mask </s>
funcom_train/17205524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void push(String type, String decl, String fieldName) { StringBuilder sb = new StringBuilder("("); sb.append(type).append(")"); sb.append(decl).append(".").append(fieldName); push(sb.toString()); } COM: <s> push a field access onto the context </s>
funcom_train/31659238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTemplateId() { // if(templateId == null){ //No current way to reset this when adding FormTemplates... if(parent == null){ return "1"; } templateId = parent.getTemplateId(); Object[] formItems = parent.getFormItemList().toArray(); for (int i = 0; i < formItems.length; i++) { if(formItems[i] == this){ templateId = templateId +"."+(i+1); } } //} return this.templateId; } COM: <s> returns an identifier for this form item that is unique among the </s>
funcom_train/35195132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ShortArray without(final int i) { final short[] newArr = new short[shorts.length - 1]; System.arraycopy(shorts, 0, newArr, 0, i); System.arraycopy(shorts, i + 1, newArr, i, newArr.length - i); return new ShortArray(newArr); } COM: <s> return a new code short array code that contains the same elements </s>
funcom_train/47885977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void save() { MainPanel.updateStatusBar("Saving Kpoints file..."); if (guidedPanel.isVisible()) { KpointsGuided.save(); KpointsEditor.getTextFromFormatter(); } else if (editorPanel.isVisible()) { KpointsEditor.saveFile(); KpointsGuided.refreshFromFormatter(); } } COM: <s> method that is controlled by the save button in the kpoints toolbar </s>
funcom_train/28115748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void disconnect() { try { logger.log("Closing socket and input and output streams."); in.close(); out.close(); socket.close(); } catch (IOException e) { logger.error(e.getMessage()); } // Removing the client entry. connectionManager.removeEntry(clientId); } COM: <s> shuts down the socket cleanly </s>
funcom_train/13952978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WOActionResults deleteIt() { NSLog.out.appendln(isSecondConfirmation ? "ModalDialogContents deleteIt called will delete" : "ModalDialogContents deleteIt called will reconfirm"); isSecondConfirmation = ! isSecondConfirmation; if (isSecondConfirmation) { AjaxModalDialog.update(context()); } else { AjaxModalDialog.close(context()); } return null; } COM: <s> ajax method that is called when deletion is confirmed in the ajax dialog </s>
funcom_train/9635957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean handleFile(File f) { String fileContent = FileUtils.readFileToString(f); if (fileContent == null) { return false; } RDFTripleStore tripleStore = ontology.getTripleStore(); tripleStore.removeStatements(tripleStore.getStatementsForFile(f .getPath())); for (IKnowledgeParser parser : parsers) { parser.handleFile(f, new StringReader(fileContent), ontology); } return true; } COM: <s> uses all parsers to handle this file </s>
funcom_train/22444554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createHighSpeedTable() { for ( int value = 0; value < vlcCodes.length; value++ ) { int code = (int)vlcCodes[value][0]; int length = (int)vlcCodes[value][1]; if ( length == 0 ) continue; // Skip this value writeTable( value, code, length ); } } COM: <s> create indexed lookup tables </s>
funcom_train/39131666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clickElementByName(String elementName, String elementType, String index) throws InvalidElementException { lastClickedName = elementName; lastClickedTag = elementType; lastClickedIndex = index; if (elementName.equals(getInvalidElementName())) { throw new InvalidElementException("Unknown element name '" + elementName + "'."); } } COM: <s> records the parameters used in the current call to this method </s>
funcom_train/26097477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSlider getSliderThreadsPerScan() { if (sliderThreadsPerScan == null) { sliderThreadsPerScan = new JSlider(); sliderThreadsPerScan.setMaximum(Constant.MAX_HOST_CONNECTION); sliderThreadsPerScan.setMinimum(1); sliderThreadsPerScan.setValue(1); sliderThreadsPerScan.setPaintTicks(true); sliderThreadsPerScan.setPaintLabels(true); sliderThreadsPerScan.setMinorTickSpacing(1); sliderThreadsPerScan.setMajorTickSpacing(1); sliderThreadsPerScan.setSnapToTicks(true); sliderThreadsPerScan.setPaintTrack(true); } return sliderThreadsPerScan; } COM: <s> this method initializes slider threads per host </s>
funcom_train/14034619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRolesByUserId(int userId) throws NoUserRolesException { String roleNames = ""; try { roleNames = rdao.getUserRoleNames(userId); } catch (NoUserRolesException ex) { throw new NoUserRolesException( "\n\n System couldn't retrieve list of roles for user -> userId: " + userId); } return roleNames; }// end getRolesByUserId() COM: <s> get roles attached to user </s>
funcom_train/3724905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void clearLayer(Image layer) { Graphics2D g = ((BufferedImage) layer).createGraphics(); g.setColor(TITANConstants.TRANSPARENT); g.setComposite(AlphaComposite.Src); g.fillRect(0, 0, getHitWidth(), getHitHeight()); // Draw transparency here.. whatever. g.dispose(); } COM: <s> this function clear the entire layer but preserve </s>
funcom_train/8064691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Fig hitFig(Rectangle r) { if (!isVisible()) return null; Fig res = null; int figCount = this.figs.size(); for (int figIndex = 0; figIndex < figCount; ++figIndex) { Fig f = (Fig) this.figs.get(figIndex); if (f.hit(r)) res = f; } return res; } COM: <s> retrieve the top most fig containing the given point or null </s>
funcom_train/33440558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double distance2(P from, P to) { double d = 0; final int imax = from.getDimensions(); for(int i = 0; i < imax; ++i) { double diff = (to.getCoord(i).doubleValue() - from.getCoord(i).doubleValue()); d+=(diff*diff); } return d; } COM: <s> returns the square of the euclidean distance between two points </s>
funcom_train/12655492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateEffectPositions() { if (effectStructure != null) { effectPoints = new HashMap<Effect, List>(); for (Map.Entry<Effect, DefaultEdge> entry : effectEdgeMapping.entrySet()) { List points = GraphConstants.getPoints(entry.getValue().getAttributes()); effectPoints.put(entry.getKey(), (points)); } effectStructure.setEffectPoints(effectPoints); } } COM: <s> read coordinates of all points which the effects cross </s>
funcom_train/25028066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent evt) { chooser.setApproveButtonText("Export"); super.actionPerformed(evt); File file = this.getSelectedFile(); // exports the prefs if user selects a file; the file must actually // be selected, not merely given as the default file and loc if (file != null) { exportPrefs(file); // System.out.println("file: " + file.getPath()); } } COM: <s> adds to the action by adjusting the approve button </s>
funcom_train/48397433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { ArrayList tempList = new ArrayList(); String conn = ""; for(int i=1; i< colNumber*rowNumber + 1; i++){ tempList = getConnectedNeurons(i); conn = conn + i + "\t" + tempList + "\n"; } return conn; } COM: <s> returns a string representation of the topology </s>
funcom_train/39379406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onApplyOptionsClick() { //Reset the tree and nodes to default values resetTree(); //Store the users options in the session TreeOptions options = new TreeOptions(); options.javascriptEnabled = jsEnabled.isChecked(); options.rootNodeDisplayed = rootNodeDisplayed.isChecked(); PageUtils.setSessionObject(this, options); //Apply users new options applyOptions(); return true; } COM: <s> called when user submits the options form </s>
funcom_train/34138752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFlashlight(boolean light) { mFlashlight = light; if (mCamera != null) { Camera.Parameters parameters = mCamera.getParameters(); if (mFlashlight) { parameters.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH); } else { parameters.setFlashMode(Camera.Parameters.FLASH_MODE_OFF); } mCamera.setParameters(parameters); } } COM: <s> turns the camera light on or off </s>
funcom_train/32060950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPosOfLineEnd( char[] line, int offset ) { int ltermination = getFirstIndexOfCharTarget( line, new CharTarget() { public boolean isTarget(char c) { return isLineTerminatorChar(c); } }, offset, line.length - 1, true ); if ( ltermination >= offset ) { return ltermination ; } else { return line.length - 1; } } COM: <s> returns the index of the last character in a line </s>
funcom_train/18781376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deepSleep(long msec) { long start = System.currentTimeMillis(); long end = -1, elapsed = -1; do { try { Thread.sleep(msec - elapsed); } catch (InterruptedException e) { } end = System.currentTimeMillis(); elapsed = end - start; } while (elapsed < msec); } COM: <s> function that sleeps in spite of interruptions </s>
funcom_train/49159768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GameDayMatchesEvent getSchedulerGameDayEvent(User user) { for (int i = 0; i < SchedulerGameDayEvents.size(); i++) { GameDayMatchesEvent tmp = SchedulerGameDayEvents.get(i); if (tmp.isUserInvolved(user)) { return tmp; } } return null; } COM: <s> returns game day event for a single user </s>
funcom_train/36182122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getServiceId() { StringBuffer serviceId = new StringBuffer(); // serviceId.append(getDefaultDPI()); // Unique solution // UUID uuid = UUID.randomUUID(); // serviceId.append(uuid.toString()); // For integration serviceId.append("ac"); // tag it so we know we generated it serviceId.append(Long.toHexString(Double .doubleToLongBits(Math.random()))); return serviceId.toString(); } COM: <s> get a complete service id </s>
funcom_train/14181056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSeats() { Game g = new Game(u1, "type", "name", 5, true); assertEquals(g.getSeats(), "0/5"); g.addUser(u2); assertEquals(g.getSeats(), "1/5"); } COM: <s> tests the get seats method </s>
funcom_train/46655159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String generateQuestionText(Question question) { String textString; // when the question type is 'gaps', text is set in gap class if (question.getQuestionType().compareTo("gaps") == 0) { textString = QuestionTypeGap.hideWord(question.getText()); } else { textString = question.getText(); } return textString; } COM: <s> generate question text </s>
funcom_train/3371058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAutoCreateRowSorter(boolean autoCreateRowSorter) { boolean oldValue = this.autoCreateRowSorter; this.autoCreateRowSorter = autoCreateRowSorter; if (autoCreateRowSorter) { setRowSorter(new TableRowSorter(getModel())); } firePropertyChange("autoCreateRowSorter", oldValue, autoCreateRowSorter); } COM: <s> specifies whether a </s>
funcom_train/39549039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setToolTip(Element elt, String toolTip){ if (toolTipMap == null) { toolTipMap = new WeakHashMap(); } toolTipMap.put(elt, toolTip); if (elt == lastTarget) EventQueue.invokeLater(new ToolTipRunnable(toolTip)); } COM: <s> sets the tool tip on the input element </s>
funcom_train/19268430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteCurrent() { if (!playing) { if (cursorPos >= 0) { sequence.removeElementAt(cursorPos); // Move back one place, to the previous note cursorPos--; // Ensure the cursor position is valid if (cursorPos < 0 && sequence.size() > 0) { cursorPos = 0; // Ensure the cursor remains valid if the sequence is not empty } notifyNotesChanged(); } } } COM: <s> deletes the current note </s>
funcom_train/937956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFirstDayOfWeek(final int firstDayOfWeek) { final int old = this.firstDayOfWeek; if (datepanel != null) { datepanel.setFirstDayOfWeek(firstDayOfWeek); } this.firstDayOfWeek = firstDayOfWeek; firePropertyChange("firstDayOfWeek", old, firstDayOfWeek); } COM: <s> setter for property first day of week </s>
funcom_train/20400106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension preferredLayoutSize(Container arg0) { Dimension r = new Dimension(); for (int i = 0; i < arg0.getComponentCount(); i++) { Component c = arg0.getComponent(i); Dimension d = c.getPreferredSize(); r.height = Math.max(r.height, d.height); r.width = Math.max(r.width, d.width); } return r; } COM: <s> prefered size of a container is the maximum prefered size </s>