__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/44453532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(InputStream rd) { this.srcModel.read(rd, ""); // ------ premises optimization ----- for(Premise p : premises) { p.optimize(); } // ------ excute rules ----- for(Rule rule : rules) { rule.execute(null); if(rule.isTerminal()) { break; } } } COM: <s> executes this translation scenario </s>
funcom_train/13988154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrentSubSystem(RequirementsContainer subSystem) { this.currentSubSystem = subSystem; if (this.currentSubSystem.getRequirements().size() > 0) { this.currentRequirement = currentSubSystem.getRequirements().get(0); this.descriptionText.setEnabled(true); } else { this.currentRequirement = null; this.titleText.setEditable(false); this.descriptionText.setEnabled(false); } } COM: <s> the current sub system is the sub system of which the requirements are </s>
funcom_train/32344681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toScore() throws Exception { try { //init the score page initScorePage(); dateStartStr = DateFormatUtility.formatToString(DateFormatUtility.getLastMonth(DateFormatUtility.getToday()), DateFormatUtility.DAY_PATTERN); dateEndStr = DateFormatUtility.formatToString(DateFormatUtility.getToday(), DateFormatUtility.DAY_PATTERN); } catch (Exception e) { addActionError(getText("common.error.unknow")); Log.writeException(e); } return Action.SUCCESS; } COM: <s> to score page </s>
funcom_train/35063462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XSDocument addImport(String namespace, String schemaLocation) throws SAXException{ xml.startElement(URI_XSD, "import"); xml.addAttribute("namespace", namespace); xml.addAttribute("schemaLocation", schemaLocation); xml.endElement(); return this; } COM: <s> xsd import namespace namespace schema location schema location </s>
funcom_train/23453070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addHasClientPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Process_hasClient_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Process_hasClient_feature", "_UI_Process_type"), ProcessPackage.Literals.PROCESS__HAS_CLIENT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the has client feature </s>
funcom_train/4124519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDestination(Unit unit, Location destination) { SetDestinationMessage message = new SetDestinationMessage(unit, destination); Element reply = askExpecting(freeColClient.getClient(), message.toXMLElement(), "update"); if (reply != null) { freeColClient.getInGameInputHandler().update(reply); } } COM: <s> sets the destination of the given unit and send the server </s>
funcom_train/3434937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initInterceptorArrays() { for( int type = 0; type < NUM_INTERCEPTOR_TYPES; type++ ) { Class classType = classTypes[type]; // Create a zero-length array for each type: interceptors[type] = (Interceptor[])Array.newInstance( classType, 0 ); } } COM: <s> initializes all interceptors arrays to zero length arrays of the </s>
funcom_train/28470283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void useSomeSettings(){ //No type casts necessary due to Generics //KEY1 ==> should be "changed value" String valueOfKey1 = Config4J.getInstance().getSetting( Example1.CATEGORY1, Example1.KEY1); log.info("Value of " + Example1.KEY1 + ": " + valueOfKey1); //KEY2 ==> should be <code>true</code> Boolean valueOfKey2 = Config4J.getInstance().getSetting( Example1.CATEGORY1, Example1.KEY2); log.info("Value of " + Example1.KEY2 + ": " + valueOfKey2.toString()); } COM: <s> this method shows how to use the settings set in config4j </s>
funcom_train/3339978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed(MouseEvent e) { if (SwingUtilities.isLeftMouseButton(e)) { if (this.contains(e.getX(), e.getY())) { if (!this.hasFocus() && this.isRequestFocusEnabled()) { this.requestFocus(); } } } } COM: <s> handle mouse input </s>
funcom_train/47547516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean back() { checkWidget(); int /*long*/[] result = new int /*long*/[1]; int rc = webBrowser.QueryInterface(nsIWebNavigation.NS_IWEBNAVIGATION_IID, result); if (rc != XPCOM.NS_OK) error(rc); if (result[0] == 0) error(XPCOM.NS_ERROR_NO_INTERFACE); nsIWebNavigation webNavigation = new nsIWebNavigation(result[0]); rc = webNavigation.GoBack(); webNavigation.Release(); return rc == XPCOM.NS_OK; } COM: <s> navigate to the previous session history item </s>
funcom_train/7971696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveUpCardButtonPressed() { int idx = cardList.getSelectedIndex(); if (idx > 0) { int newIdx = idx - 1; model.moveCard( idx, newIdx ); invalidate(); String element = (String) cardListModel.remove( idx ); cardListModel.add( newIdx, element ); cardList.setSelectedIndex( newIdx ); validate(); } } COM: <s> action for when the user presses the move card up button moves the </s>
funcom_train/35283892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fill(BlenderInputStream inputStream) throws BlenderFileException { int position = inputStream.getPosition(); inputStream.setPosition(position - 8 - inputStream.getPointerSize()); this.oldMemoryAddress = Long.valueOf(inputStream.readPointer()); inputStream.setPosition(position); for (Field field : fields) { field.fill(inputStream); } } COM: <s> this method fills the structure with data </s>
funcom_train/41061946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.add(getField(), java.awt.BorderLayout.NORTH); jContentPane.add(getJTextArea(), java.awt.BorderLayout.CENTER); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/27952584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertLogLevel(String ref, WebResponse webResponse) { try { WebTable tab = webResponse.getTables()[0]; assertEquals(ref, tab.getCellAsText(1,1)); } catch (SAXException e) { e.printStackTrace(); fail(e.toString()); } } COM: <s> method assert log level </s>
funcom_train/29031473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Grid getGridForLocation(int x, int y) { int xReal = (x - (int) context.getLocation().getX()) / Grid.SIZE; int yReal = (y - (int) context.getLocation().getY()) / Grid.SIZE; if (xReal > gridArray.length || yReal > gridArray[0].length) { return null; } return gridArray[xReal][yReal]; } COM: <s> gets a grid for a position on the game board </s>
funcom_train/41332815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Shape createScrollCap(int x, int y, int w, int h) { path.reset(); path.moveTo(x, y); path.lineTo(x, y + h); path.lineTo(x + w, y + h); addScrollGapPath(x, y, w, h, true); path.closePath(); return path; } COM: <s> return a path for a scroll bar cap </s>
funcom_train/47808318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFakeSample(){ //Configure IsaTabIdReplacer IsaTabIdReplacer itr = new IsaTabIdReplacer(FOLDER_FAKE); try { //Execute the replacement method itr.Execute(); }catch (FileNotFoundException e){ //DO not do nothing, it is expected to receive this error. assertTrue("IsatTabReplacer has thrown the expected FileNotFoundException", true); }catch (Exception e){ fail("testIsaTab1Sample have thrown an exception." + e.getMessage()); } } COM: <s> test that a fake folder without a investigation file throws an error </s>
funcom_train/10628484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstrDoublePosInfinity() { double a = Double.POSITIVE_INFINITY; try { new BigDecimal(a); fail("NumberFormatException has not been caught"); } catch (NumberFormatException e) { assertEquals("Improper exception message", "Infinite or NaN", e.getMessage()); } } COM: <s> new big decimal double value when value is positive infinity </s>
funcom_train/34478552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final private void check_value(Value val, CEntity instance) { Value value_next; switch (val.tag) { case TYPED_PARAMETER: value_next = val.nested_values[0]; check_value(value_next, instance); break; case ENTITY_REFERENCE: if (val.integer < 0) { StaticFields staticFields = StaticFields.get(); val.integer = (int)staticFields.current_instance_identifier; val.reference = instance; } break; case EMBEDDED_LIST: for (int i = 0; i < val.length; i++) { value_next = val.nested_values[i]; check_value(value_next, instance); } break; default: break; } } COM: <s> checks if the entity instance should reference itself </s>
funcom_train/14375306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void contentChanged() { if (mainFrame!=null) { String strNew=txtPanel.getText(); if (!strContent.equals(strNew)) { oldContent=strContent; strContent=strNew; oldCaretPos=lastCaretPos; lastCaretPos=txtPanel.getCaretPosition(); if (!mainFrame.isChanged()) { mainFrame.setChanged(true); } } } } COM: <s> does all actions for signaling that the content has changed </s>
funcom_train/12868384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testForceParameter() throws Exception { setupMojo(pomOaw); File timestampFile = mojo.createTimestampFile(); long existingTimestamp = timestampFile.lastModified(); // need to wait longer than 1s to have a difference between the created file and the one created by the Mojo Thread.sleep(1050); setVariableValueToObject(mojo, "force", true); mojo.execute(); verify(mockProject).executeTarget("run-workflow"); assertThat(timestampFile.lastModified(), greaterThan(existingTimestamp)); } COM: <s> tests that execution is forced by setting the code force code configuration parameter </s>
funcom_train/12674487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getQualifiedName() { String nameToUse = _name; String result; if (_name == null) { nameToUse = "~NO NAME~"; } if (getParentScope() != null && !(getParentScope() instanceof BaseScope)) { result = getParentScope().getQualifiedName() + "." + nameToUse; } else { result = nameToUse; } return result; } COM: <s> returns the fully qualifed name of this defintion </s>
funcom_train/18256612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasNext() { if (sweeps.size() == 0) { return false; } if (runCount < runsPer) { return true; } Enumeration e = sweeps.elements(); while (e.hasMoreElements()) { if (((Sweepable) e.nextElement()).hasNext()) { return true; } } return false; } COM: <s> are there more sweep settings in this group </s>
funcom_train/22356896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storeFileHistory() { List<String> files = new ArrayList<String>((history == null) ? 0 : history.size()); if (history != null) { for (FileHistoryAction fileHistoryAction : history) { files.add(fileHistoryAction.getFile().getAbsolutePath()); } Collections.reverse(files); } PropertiesHelper.setList(settings, "Client.fileHistory", files); } COM: <s> stores the current contents of the file history bucket to the settings </s>
funcom_train/24463217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int length() { if (wordsInUse.get() == 0) return 0; return BITS_PER_WORD * (wordsInUse.get() - 1) + (BITS_PER_WORD - Long.numberOfLeadingZeros(words[wordsInUse.get() - 1].get())); } COM: <s> returns the logical size of this code bit set code the index of </s>
funcom_train/36759387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Term flattenTerm(Compound t, String newLabel) { List<Term> subterms = new ArrayList<Term>(); subterms.add(new Constant(renamePredicate(t.getLabel()))); subterms.addAll(t.getSubterms()); return new Compound(newLabel + "-" + t.getSubterms().size(), subterms); } COM: <s> translates a term into one in which the predicate symbol of the original </s>
funcom_train/37449409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetLuceneQuery1() { String iql = "SELECT protein FROM intact;"; String lucene1 = "objclass:uk.ac.ebi.*protein*"; String lucene2 = null; try { lucene2 = qh.getLuceneQuery(iql); } catch (IntactException e) { e.printStackTrace(); } assertNotNull(lucene2); assertEquals(lucene1, lucene2); } COM: <s> test the method get lucene query </s>
funcom_train/20243158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTxtNome() { if (txtNome == null) {//GEN-END:|284-getter|0|284-preInit // write pre-init user code here txtNome = new TextField("Nome", null, 32, TextField.ANY);//GEN-LINE:|284-getter|1|284-postInit // write post-init user code here }//GEN-BEGIN:|284-getter|2| return txtNome; } COM: <s> returns an initiliazed instance of txt nome component </s>
funcom_train/26369877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSongLength(){ Artist art = new Artist( 1, "songTestArtist" ); Album alb = new Album( 1, "album", 1 ); Song song = new Song( 1, "test.mp3", 1, 1, 1, _config.getMP3Root()); song.setPath( art, alb ); assertEquals( 662593, song.getFileSize() ); } COM: <s> tests songs get length </s>
funcom_train/19162948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkEventType() { EventType[] events = this.getEventTypes(); for (int i = 0; i < events.length; i++) { for (int j = 0; j < events.length; j++) { if (i != j && events[i].equals(events[j])) { return false; } } } return true; } COM: <s> checks whether no duplicate short values are assigned to the producer </s>
funcom_train/46718579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String deCapitalise(String capitalisedFieldName) { if(capitalisedFieldName.length()==0) { return capitalisedFieldName; } else if(capitalisedFieldName.length()==1) { return capitalisedFieldName.toLowerCase(); } else { return capitalisedFieldName.substring(0,1).toLowerCase()+capitalisedFieldName.substring(1); } } COM: <s> decapitalises a field name </s>
funcom_train/11111710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int peek(byte[] buffer) throws IOException { int n = 0; mark(buffer.length); int m = read(buffer); while (m != -1) { n += m; if (n < buffer.length) { m = read(buffer, n, buffer.length - n); } else { m = -1; } } reset(); return n; } COM: <s> fills the given buffer with upcoming bytes from this stream without </s>
funcom_train/32741606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get_ptrDB_Value(String fieldName, ResultSet rs, int i) throws SQLException { Object o = base_getValue(fieldName, rs, i); if (o == null) { return o; } return new SQLPointer(dd.getFieldDefinition(fieldName).getPointedType().getName(), ((Number) o).longValue()); } COM: <s> return the value as a pointer </s>
funcom_train/13197706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String addHotel() { if (currentUser == null) return "logout"; if (hotelForm.getIdHotel() == 1) { hotelForm.setUserdata(currentUser); hotelDAO.persist(hotelForm); } else { hotelDAO.attachDirty(hotelForm); } clearHotelForm(); return "searchHotel"; } COM: <s> adds a hotel to the ones owned by the user </s>
funcom_train/48189809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(PosRole entity) { LogUtil.log("deleting PosRole instance", Level.INFO, null); try { entity = entityManager.getReference(PosRole.class, entity .getId()); entityManager.remove(entity); LogUtil.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { LogUtil.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent pos role entity </s>
funcom_train/1662762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Locale getLocale() { String language = getNodeValue(new String[] { "i18n", "language" }, "en"); String country = getNodeValue(new String[] { "i18n", "country" }, null); if (country != null) { return new Locale(language, country); } return new Locale(language); } COM: <s> returns the stored locale </s>
funcom_train/22053877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCharStatus(boolean fShowNPC) { if (isPC() && !isSecretPC() && isShowChar()) { return "(PC)"; } else { if (isSecretPC() || !isAvailable()) { if (fShowNPC) { return "(NPC)"; } else { return ""; } } else { return "(Avail)"; } } } COM: <s> returns returns status of the character as should be shown depending on flags </s>
funcom_train/32362788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object doDeserialize(String str) { try { if (isDateValuePreferred()) { return getDateFormat().parse(str); } else { Calendar c = Calendar.getInstance(); c.setTime(getDateFormat().parse(str)); return c; } } catch (ParseException x) { throw new RuntimeException("This exception must never occur"); } } COM: <s> deserializes date string into </s>
funcom_train/2536983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadStylesAndOverrideSelector(String uri, CSSSelector selector) { CSSParserConnection pc = new CSSParserConnection(uri, app); CSSHandler handler = pc.getCssh(); if (handler != null) { List<CSSStyle> newStyles = handler.getStyles(); for (CSSStyle s: newStyles) { s.setSelector(selector); this.styles.add(new CSSStyleHierarchy(s)); } } } COM: <s> load styles and override selectors </s>
funcom_train/14265259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canView(User viewer) { return (limitedTo == null || limitedTo.size() == 0 || viewer.getGroups().contains(User.ADMIN) || limitedTo.contains(viewer.getName()) || ((AbstractCollection) limitedTo.clone()).removeAll(viewer.getGroups())); // RemoveAll returns true if changed } COM: <s> can this object be viewed by the user </s>
funcom_train/36108999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object getParameterModelID() { if (currentParamaterID == null) { SortedSet<Object> sorted = new TreeSet<Object>(getParameterMap().keySet()); if (sorted.isEmpty()) currentParamaterID = 1; //If it is the first parameter. else currentParamaterID = sorted.last(); } currentParamaterID = ((Integer)(currentParamaterID)) + 1; return currentParamaterID; } COM: <s> getting new model id of fictitious parameter </s>
funcom_train/9990262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object apply(Context context, Object arg) { if (arg == null) { throw new NullArgument("Null argument to squeeze()"); } if (!(arg instanceof String)) { throw new TypeError("First argument to squeeze() is not String"); } return StringUtil.squeeze((String) arg); } COM: <s> replace consecutive whitespace characters with a single space </s>
funcom_train/13936222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void installDir(String dir) { BasicServerCreator bs=new BasicServerCreator(new File(dir)); try { bs.createBasicStructure(); } catch (IOException e) { new Message("Unable to create directory " + dir).showError(); } try { bs.updateUserHome(); } catch (IOException e) { new Message("Unable to create leviathan utility directory inside user home").showError(); } } COM: <s> create basic server structure inside the given dir </s>
funcom_train/2619371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Number parseNumber(Class<? extends Number> numberType, String numberString) { if ( Integer.class.isAssignableFrom(numberType) ) { return Integer.valueOf(numberString); } else if ( Float.class.isAssignableFrom(numberType) ) { return Float.valueOf(numberString); } else if ( Long.class.isAssignableFrom(numberType) ) { return Long.valueOf(numberString); } return Double.valueOf(numberString); } COM: <s> parse a string into a number of a specific type </s>
funcom_train/6487527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(int type) { int len = compatibility.isCompat20() ? 6 : 9; byte[] buf = new byte[9]; for (int i = 0; i < len; i++) { buf[i] = 0; } buf[len - 1] = (byte) type; outgoingPacket.clear(); outgoingPacket.append(buf, len); Log.getLogInstance().log("Packet.start(): type [" + type + "]"); } COM: <s> start constructing a packet to send </s>
funcom_train/15919219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public X10Call createStaticCall(Position pos, Type container, Name name, Expr... args) { Context context = container.typeSystem().emptyContext(); MethodInstance mi = createMethodInstance(container, name, context, args); if (null == mi) return null; return createStaticCall(pos, mi, args); } COM: <s> create a call to a static method </s>
funcom_train/45142115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void staticInitialize() { synchronized (staticMonitor) { if (initialized) return; initialized = true; hasSh = hasShell("hassh"); hasBash = hasShell("hasbash"); hasPerl = hasShell("hasperl"); hasPython = hasShell("haspython"); hasSed = hasShell("hassed"); hasCmd = hasShell("hascmd"); } } COM: <s> check if the env contains the shells </s>
funcom_train/48386722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseDragged(MouseEvent e) { if (checkModifiers(e)) { vv = (VisualizationViewer<SNNode, SNEdge>) e.getSource(); if (startVertex != null) { transformEdgeShape(down, e.getPoint()); transformArrowShape(down, e.getPoint()); } vv.repaint(); } } COM: <s> if start vertex is non null stretch an edge shape between </s>
funcom_train/9957255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFloatingPrecision1() throws Exception { new BufferValidator( 100, "LINESTRING (331771 5530174, 331776 5530175, 331782 5530177, 331787 5530177, 331791 5530178, 331796 5530178, 331800 5530178, 331805 5530177, 331811 5530176, 331817 5530175, 331823 5530173, 331828 5530171, 331832 5530169, 331835 5530167, 331839 5530163, 331843 5530160, 331846 5530157, 331849 5530154, 331853 5530150, 331855 5530145, 331857 5530141)") .test(); } COM: <s> the test floating precision n tests were taken from buffer error dist </s>
funcom_train/45812199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCreateAction(String platform, String action) { List actions = (List)this.c_actions.get(platform); if (actions == null) { actions = new ArrayList(); this.c_actions.put(platform, actions); } actions.add(action); } COM: <s> internal sets the actions to be performed in the database as </s>
funcom_train/28507451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeTexture( final String p_path ){ if ( m_textureMap.containsKey(p_path) ){ Texture l_texture=m_textureMap.get( p_path ); l_texture.dispose(); m_textureMap.remove( p_path ); return true; } return false; } COM: <s> remove the given texture from memory </s>
funcom_train/31871878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public class FrameTRSO extends FrameT { public String getLongName () { return "Internet radio station owner frame"; } public FrameTRSO (ID3V2Frame frm) { super (frm); } public FrameTRSO (ID3V2Frame frm, DataSource ds) throws SeekPastEndException { super (frm, ds); } public String toString () { return getLongName () + " Encoding: "+encoding+"\nInternet radio station owner: " + text; } } COM: <s> inet radio station owner frame </s>
funcom_train/34268548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateFontIfNecessary() { Font font = getUnitsFont(); if (unitsFont != font) { fontHeight = fontAscent = 0; if (font != null) { FontMetrics fm = getFontMetrics(font); if (fm != null) { fontHeight = fm.getHeight(); fontAscent = fm.getAscent(); unitsFont = font; } } } } COM: <s> updates font height information </s>
funcom_train/48045755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DateTimeFormatterBuilder appendText(DateTimeRule rule, TextStyle textStyle) { checkNotNull(rule, "DateTimeRule must not be null"); checkNotNull(textStyle, "TextStyle must not be null"); TextPrinterParser pp = new TextPrinterParser(rule, textStyle); appendInternal(pp, pp); return this; } COM: <s> appends the text of a date time field to the formatter </s>
funcom_train/12170574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void pushArgumentEntryOnStack(Attributes saxAttributes) { ArgumentElement element = new ArgumentElement(); ArgumentAttributes attrs = new ArgumentAttributes(); attrs.setName(saxAttributes.getValue("name")); attrs.setValue(saxAttributes.getValue("value")); elementStackEntry = new IAPIElementStackEntry(element, attrs); elementStack.push(elementStackEntry); } COM: <s> push an argument element onto the top of our stack of elements </s>
funcom_train/14331790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(ParameterDefinition<?> o) { if (o != null) { if (getViewOrder() == o.getViewOrder()) { return getName().compareTo(o.getName()); } return getViewOrder() - o.getViewOrder(); } return 0; } COM: <s> compares this parameter definition to another </s>
funcom_train/1060058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFontSizePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DiagramElement_fontSize_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DiagramElement_fontSize_feature", "_UI_DiagramElement_type"), Di2Package.Literals.DIAGRAM_ELEMENT__FONT_SIZE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the font size feature </s>
funcom_train/34896112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteOldResults() { File outFile = new File(this.getAnalysisDirWebServer() + File.separatorChar + Output.BTOUT); if (!outFile.exists()) return true; log.debug("Deleting old output file: "+outFile.getAbsolutePath()); if (!outFile.delete()) { log.error("Old output file of BT module "+outFile+" could not be deleted!"); return false; } return true; } COM: <s> this will delete the my guide tree </s>
funcom_train/21188891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void bootstrap() throws CruiseControlException { if (synctime) { runAccurev(AccurevCommand.SYNCTIME.create()); } if (keep) { AccurevCommandline cmdKeep = AccurevCommand.KEEP.create(); cmdKeep.selectModified(); cmdKeep.setComment("CruiseControl automatic keep"); runAccurev(cmdKeep); } runAccurev(AccurevCommand.UPDATE.create()); } COM: <s> runs the bootstrapper updates the selected workspace </s>
funcom_train/4114192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean rep0k(){ if (q <= 0){ return false; } else{ for (int i = 2; i <= Math.min(Math.abs(p), q); i++){ //if p is 1, and q > 0, then it is legitimate, so start //at 2 and work up to the lower of abs(p) and q. if (p%i == 0 && q%i == 0){ return false; } } return true; } } COM: <s> checks if this is a legitimate implementation of a rational number </s>
funcom_train/3138187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getSeverity(LoggingEvent ev) { Level level = ev.getLevel(); if (level == Level.FATAL || level == Level.ERROR) { return IStatus.ERROR; } else if (level == Level.WARN) { return IStatus.WARNING; } else if (level == Level.INFO) { return IStatus.INFO; } else { // debug, trace and custom levels return IStatus.OK; } } COM: <s> map logging events level to status severity </s>
funcom_train/17915655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getExecutionStatus(String locator) throws AxisFault { try { log.info("getting status for executing components: "+getPrintable(locator)); ExecutionResult c = Executor.getInstance().getStatus(Locator.parse(locator)); if (c != null) return c.toXML(); return null; } catch (Exception e) { throw new AxisFault("Failed to execute method getExecutionStatus for locator "+getPrintable(locator)+": "+e.getMessage()); } } COM: <s> gets the status of a running execution </s>
funcom_train/34633047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void autoInsert(final TMergeNode tNode){ if (tNode.getPartOf().getTreeType() == TreeType.T1) t1Merges.add(tNode); else if (tNode.getPartOf().getTreeType() == TreeType.T2) t2Merges.add(tNode); else throw new RuntimeException("unknown tree type"); } COM: <s> add the node to the right list depending on the tree type </s>
funcom_train/19052327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deletePhotos(ArrayList photos) { if (photos != null && photos.size() != 0) { // safe to assume all these photos are from the same album StorablePhoto photo = (StorablePhoto) photos.get(0); PhotoAlbum album = getAlbum(photo.getAlbumName()); for (int i = 0; i < photos.size(); i++) { photo = (StorablePhoto) photos.get(i); deletePhoto(photo, album); } refreshAlbums(album); } } COM: <s> this method deletes a list of photos from an album </s>
funcom_train/50156735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List toAdnStandardsList(StandardsList sl) { List suggestions = new ArrayList(); int size = sl.getSize(); for (int i = 0; i < size; i++) { StandardWrapper wrapper = sl.getStandardAt(i); String adnText = getAdnText(wrapper.getIdentifier()); if (adnText != null) suggestions.add(adnText); else { prtln("WARNING: AsfToAdnMapper could not find ADN standard for ASF id: " + wrapper.getIdentifier()); } } return suggestions; } COM: <s> converts a standards list into a list of suggestions represented as adn standards </s>
funcom_train/43326652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void addStrMatch(AlignmentSet aSet) { // add to old AlignmentSets AlignmentSet[] new_strMatches = new AlignmentSet[nMatches()+1]; int i; for (i=0; i<nMatches(); i++) new_strMatches[i] = strMatches[i]; new_strMatches[i] = aSet; strMatches = new_strMatches; } COM: <s> add a single structural match to the set created by the user </s>
funcom_train/9536138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonSendToClient() { if (jBtnSendToClient == null) { jBtnSendToClient = new JButton(sendToClientAction); jBtnSendToClient.setHideActionText(true); jBtnSendToClient.setMargin(new Insets(5, 5, 5, 5)); } return jBtnSendToClient; } COM: <s> this method initializes j btn send to client </s>
funcom_train/50248849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkCount(Session session, Class clazz) { long count = ((Number) (session.createQuery("select count(instance) from " + clazz.getName() + " as instance").uniqueResult())).longValue(); assertEquals("Found " + clazz.getName(), 0, count); } COM: <s> loads objects count stored in main database </s>
funcom_train/15609519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void noteRelevantFacadeManager(FacadeManagerBase aFacadeManagerBase) { //System.out.println("In noteRelevantFacadeManager();"); if ( aFacadeManagerBase instanceof XmlWorkspaceFacadeManager ) { XmlWorkspaceFacadeManager theXmlFacadeMan = (XmlWorkspaceFacadeManager)aFacadeManagerBase; this.setupWorkspace(theXmlFacadeMan.getXmlWorkspaceFacade()); } } COM: <s> get explicit notification that this is relevant to us </s>
funcom_train/36678873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroy(boolean fireEvent) { if (coOnBoard) { setCoOnBoard(false); owner.getCO().resetPowerGauge(); owner.setCoZone(Collections.<Location>emptyList()); } clearTransport(); owner.removeUnit(this); owner = null; location.remove(this); location = null; if (fireEvent) { setState(GameObjectState.DESTROYED); } } COM: <s> destroy this unit </s>
funcom_train/2580683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ItemLabelPosition getSeriesPositiveItemLabelPosition(int series) { // return the override, if there is one... if (this.positiveItemLabelPosition != null) { return this.positiveItemLabelPosition; } // otherwise look up the position table ItemLabelPosition position = (ItemLabelPosition) this.positiveItemLabelPositionList.get(series); if (position == null) { position = this.basePositiveItemLabelPosition; } return position; } COM: <s> returns the item label position for all positive values in a series </s>
funcom_train/23779226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int _findAntSelectionIndex(String argSelectedText) { for (int i=0; i<_antLaunches.length; i++) { if (_antLaunches[i].getName() != null && _antLaunches[i].getName().equals(argSelectedText)) { return i + 1; } } return -1; } COM: <s> search ant selection index from text </s>
funcom_train/14398948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object next() throws NoSuchElementException { Object obj = this.iResultTable.next(); if (obj instanceof Exception) throw new RuntimeException((Exception) obj); if (this.iIsDASrvRequest) { // DADescriptor is internal -> converting to ServiceURL DADescriptor daDesc = (DADescriptor) obj; return new ServiceURL(daDesc.getURL(), ServiceURL.LIFETIME_MAXIMUM); } return obj; } COM: <s> this implementation can throw runtime exceptions </s>
funcom_train/32791197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String handleIterForAll(String collection, Guide guide, String expression) { guide.reset(); Template template = templateEngine.getTemplate("feature_call_forall"); template.setAttribute("source", guide.getFrom()); template.setAttribute("alias", aliasList.getLast()); template.setAttribute("object", guide.getSelect()); template.setAttribute("collection", collection); template.setAttribute("expression", expression); return template.toString(); } COM: <s> generates a declarative code fragment for a for all iterator </s>
funcom_train/33713608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor query(SQLiteDatabase db, String[] columns, String groupBy, String having, String orderBy, String limit) { assertTable(); if (columns != null) mapColumns(columns); if (LOGV) Log.v(TAG, "query(columns=" + Arrays.toString(columns) + ") " + this); return db.query(mTable, columns, getSelection(), getSelectionArgs(), groupBy, having, orderBy, limit); } COM: <s> execute query using the current internal state as </s>
funcom_train/39108973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getImage () { // // Only redraws if hasn't be done before (or object has changed) // if (currentGraph == null) { // CODE FOR JAVA 1.2 currentGraph = new BufferedImage(imageSize.width, imageSize.height, BufferedImage.TYPE_3BYTE_BGR); drawGraph (currentGraph.getGraphics ()); } return currentGraph; }//END of getImage COM: <s> returns the image object of the current graph if graph has not </s>
funcom_train/46124074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkCommonInfo(ArticleSaveRequest request, Language language, String userSessionId){ // We check the session-id assertEquals("User session's id does not match", userSessionId, request.getUserSessionId()); // We check user's language's id assertEquals("User language's id does not match", language.code(), request.getLanguageCode()); } COM: <s> check the common info to article get </s>
funcom_train/15408687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AckResendMessages getAckResendMessages(IncomingPacketsLastAck lastAck) { // Called by the McastClusterBroadcast manager thread AckResendMessages response = new AckResendMessages(); for (GotAllPoint member : mapByMember.values()) { MessageAck lastAckMessage = lastAck.getLastAck(member.getMemberKey()); member.addAckResendMessages(response, lastAckMessage); } return response; } COM: <s> build the list of ack and resend messages that we should send out </s>
funcom_train/8022959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stylizeKeyword(int r, int g, int b, boolean bold, boolean italic) { for (int i = 0; i < Token.keywords.length; i++) { setStyleConstants(styles.getStyleForScanValue(Token.keywords[i] .getScanValue()), new Color(r, g, b), bold, italic); } } COM: <s> set text attributes for scheme keywords </s>
funcom_train/25582204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ReasonerAdapter getReasoner(String name, String host, String port){ if(!containsReasoner(name, host, port)){ return null; } for(ReasonerAdapter reasoner: reasoners){ String n = reasonerNames.get(reasoner); String h = reasonerHosts.get(reasoner); String p = reasonerPorts.get(reasoner); if(name.equalsIgnoreCase(n) && host.equalsIgnoreCase(h) && port.equalsIgnoreCase(p)){ return reasoner; } } return null; } COM: <s> get the reasoner adapter according to the input rmi host and name </s>
funcom_train/19437064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setWindowSize() { if (Gui.screenIs(Gui.PDA_SCREEN)) { // ZAURUS windowFlagsToSet |= Window.FLAG_FULL_SCREEN; windowFlagsToClear |= Window.FLAG_HAS_CLOSE_BUTTON; } else { //setFixedSize(240, 280); // simulating Zaurus setPreferredSize(240, 280); } } COM: <s> set size of main window </s>
funcom_train/34442269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int readIntAttr(Attributable elem, String attrName) { Attribute attr = elem.getAttribute(attrName); int res = -1; if (attr != null) { String asStr = attr.getValue(); try { res = Integer.parseInt(asStr); } catch (NumberFormatException nfe) { //ignored } } return res; } COM: <s> given an element read in the value of a given attribute name </s>
funcom_train/10617401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSignatureException06() { SignatureException tE = new SignatureException(null, null); assertNull("getMessage() must return null", tE.getMessage()); assertNull("getCause() must return null", tE.getCause()); } COM: <s> test for code signature exception string throwable code constructor </s>
funcom_train/37776425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTableWidth(String userId, String userGridId) { // load xml if not loaded if (m_settings == null) { loadXML(userId, userGridId); if (m_settings == null) { return null; } } // return width return m_settings.getGridWidth(); } COM: <s> return the width of the whole table as defined in the xml document </s>
funcom_train/31539701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasSameName(String name) { if (this.getFullname() == null) { return (name == null); } if (name == null) { return false; } // ok, now we are sure, that both names are not null return (this.getFullname().equals(name)); } COM: <s> method has same name </s>
funcom_train/13274303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Action createLockUnlockBasePlanAction(Home home, boolean popup) { ActionType actionType = home.isBasePlanLocked() ? ActionType.UNLOCK_BASE_PLAN : ActionType.LOCK_BASE_PLAN; Action action = getActionMap().get(actionType); return popup ? new ResourceAction.PopupMenuItemAction(action) : new ResourceAction.MenuItemAction(action); } COM: <s> returns the action active on lock unlock base plan menu item </s>
funcom_train/34952430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(String command, int[] keyCode) { ArrayListToSortedSet<KeyCodes> list = keyMap.get(command); if(null == list) { set( command, keyCode ); return; } KeyCodes key = new KeyCodes(); key.keys = keyCode; list.add(key); } COM: <s> code add code adds a list of keycodes corresponding to a </s>
funcom_train/42570889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addETypePropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_ElementTypeTransformator_eType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ElementTypeTransformator_eType_feature", "_UI_ElementTypeTransformator_type"), DescPackage.Literals.ELEMENT_TYPE_TRANSFORMATOR__ETYPE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the etype feature </s>
funcom_train/7660976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetThreadFactoryNull() { ThreadPoolExecutor p = new ThreadPoolExecutor(1,2,LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10)); try { p.setThreadFactory(null); shouldThrow(); } catch (NullPointerException success) { } finally { joinPool(p); } } COM: <s> set thread factory null throws npe </s>
funcom_train/25608120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InchPoint getEdgePoint(WireEdge e){ if(e==null) return getPos(); else{ InchPoint pos = getPos(); double offset = edgeOffset(e); if(getDirection().isLeftRight()) return new InchPoint(pos.x, pos.y + offset*relH*parent.getDim().getHeight()); else return new InchPoint(pos.x + offset*relW*parent.getDim().getWidth(), pos.y); } } COM: <s> todo needs fixing for rot and mir </s>
funcom_train/785863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int addCascadedRow(int prow) { int r = m_rows.addRow(); ((CascadedRowManager)m_rows).put(r, prow); updateRowCount(); fireTableEvent(r, r, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT); return r; } COM: <s> internal method for adding a new cascaded row backed by </s>
funcom_train/23398439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCommand(Request request) { if (request instanceof ReconnectRequest) { Object view = ((ReconnectRequest) request).getConnectionEditPart() .getModel(); if (view instanceof View) { Integer id = new Integer(CoordinationVisualIDRegistry .getVisualID((View) view)); request.getExtendedData().put(VISUAL_ID_KEY, id); } } return super.getCommand(request); } COM: <s> extended request data key to hold editpart visual id </s>
funcom_train/15582655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Form toDisplay() { Form menu = new Form("Synchronise"); menu.append(text); menu.append(new ChoiceGroup("Do you want to:", ChoiceGroup.EXCLUSIVE, ClientSynchronize.choices, null)); menu.addCommand(_cancelCmd); menu.addCommand(_proceedCmd); menu.setCommandListener(this); return menu; } COM: <s> create the form to display </s>
funcom_train/180870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void element(String tagName, Object value, AttributeList attributes, boolean inlined) throws java.io.IOException { if (inlined) { indent(); } out.write(START_TAG + tagName); writeAttributes(attributes); if (value == null) { out.write(SLASH + END_TAG); } else { out.write(END_TAG); simpleContent(value); out.write(START_TAG + SLASH + tagName + END_TAG); } if (inlined) { newline(); } } COM: <s> write an element to xml stream </s>
funcom_train/12173352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNode(Node node) { if (logger.isDebugEnabled()) { logger.debug("Adding " + node + " element " + currentElement + " position " + currentPosition); } if (currentPosition == null) { currentElement.addTail(node); } else { node.insertAfter(currentPosition); } currentPosition = node; } COM: <s> add the specified node at the current insertion point </s>
funcom_train/48474885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOutputOfPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Place_outputOf_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Place_outputOf_feature", "_UI_Place_type"), DtPackage.Literals.PLACE__OUTPUT_OF, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the output of feature </s>
funcom_train/32191672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValidBorrowingLine(String[] borrowingData) { boolean valid = isValidISBN(borrowingData[0]) && (getUserInterface().getBooks().searchISBN(borrowingData[0]) != -1) && isValidInteger(borrowingData[1]) && isValidDate(borrowingData[2]) && isValidDate(borrowingData[3]) && ((borrowingData.length == 4 || borrowingData[4] .equalsIgnoreCase(" ")) ? true : isValidDate(borrowingData[4])); return valid; } COM: <s> validates borrowing data when reading from a file </s>
funcom_train/32867513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean jidRemove(JID jid, int nMask) { String sMember = jid.getUsername(); String sServer = jid.getServer(); int i = getJIDIndex(jid, nMask); if (i > -1) { vJIDs.removeElementAt(i); memberCount--; return( true ); } else return( false ); } COM: <s> remove a user from the group </s>
funcom_train/20460208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConnectionHookClassName(String connectionHookClassName) { this.connectionHookClassName = connectionHookClassName; if (connectionHookClassName != null){ Object hookClass; try { hookClass = loadClass(connectionHookClassName).newInstance(); this.connectionHook = (ConnectionHook) hookClass; } catch (Exception e) { logger.error("Unable to create an instance of the connection hook class ("+connectionHookClassName+")"); this.connectionHook = null; } } } COM: <s> sets the connection hook class name </s>
funcom_train/8092649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if ((m_ClassProbs == null) && (m_Successors == null)) { return "CART Tree: No model built yet."; } return "CART Decision Tree\n" + toString(0)+"\n\n" +"Number of Leaf Nodes: "+numLeaves()+"\n\n" + "Size of the Tree: "+numNodes(); } COM: <s> prints the decision tree using the protected to string method from below </s>