__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/31399538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XDecorator getDecorator( XElementType type) { if (DEBUG) System.out.println( "DefaultService.getDecorator( "+type+")"); XDecorator decorator = null; if ( decorator == null && type.equals( getRecordType())) { decorator = getRecordDecorator(); } else if ( type.equals( getCategoryType())) { decorator = getCategoryDecorator(); } return decorator; } COM: <s> returns the decorator for the category if the element type </s>
funcom_train/28750514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAdmincomments(String newVal) { if ((newVal != null && this.admincomments != null && (newVal.compareTo(this.admincomments) == 0)) || (newVal == null && this.admincomments == null && admincomments_is_initialized)) { return; } this.admincomments = newVal; admincomments_is_modified = true; admincomments_is_initialized = true; } COM: <s> setter method for admincomments </s>
funcom_train/40028286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadedActivityList(ActivityList activities) { this.activities.setActivities(activities); // pack all columns Runnable runner = new Runnable() { public void run() { activitiesTable.packAll(); } }; if (SwingUtilities.isEventDispatchThread()) { runner.run(); } else { SwingUtilities.invokeLater(runner); } } COM: <s> get notified when time ticker load new activity list </s>
funcom_train/33601526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void strongAcceptReceived(Round round, int a, byte[] value) { int eid = round.getExecution().getId(); Logger.println("(Acceptor.strongAcceptReceived) STRONG from " + a + " for consensus " + eid); round.setStrong(a, value); computeStrong(eid, round, value); } COM: <s> called when a strong message is received </s>
funcom_train/19349856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHeaders() { StringBuffer sb = new StringBuffer(); sb.append( "URI" ); for (int i=0; i < Errors.allCodes.length; i++) { sb.append( "," ); sb.append( Errors.pretty( Errors.allCodes[i] ) ); } return sb.toString(); } COM: <s> get the headers for condition codes </s>
funcom_train/25963334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadTile(int key, Drawable tile) { Bitmap bitmap = Bitmap.createBitmap(mTileSize, mTileSize, true); Canvas canvas = new Canvas(bitmap); tile.setBounds(0, 0, mTileSize, mTileSize); tile.draw(canvas); mTileArray[key] = bitmap; } COM: <s> function to set the specified drawable as the tile for a particular </s>
funcom_train/3045304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean scroll(int positions) throws HibernateException { boolean more = false; if ( positions > 0 ) { // scroll ahead for ( int i = 0; i < positions; i++ ) { more = next(); if ( !more ) { break; } } } else if ( positions < 0 ) { // scroll backward for ( int i = 0; i < ( 0 - positions ); i++ ) { more = previous(); if ( !more ) { break; } } } else { throw new HibernateException( "scroll(0) not valid" ); } afterScrollOperation(); return more; } COM: <s> scroll an arbitrary number of locations </s>
funcom_train/50140222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resolve(IPersistenceDriver driver) throws MappingException { for (int i = 0; i < ids.length; i++) { ids[i].resolve(driver); } for (int i = 0; i < fields.length; i++) { fields[i].resolve(driver); } } COM: <s> since class molders respectively their field molders can hold itself </s>
funcom_train/26379807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (OptionsDialogBox.isDoD()) return _poisonDeath + " " + _wand + " " + _paralysis + " " + _breath + " " + _spellStaff + " " + _psi; else return _poisonDeath + " " + _wand + " " + _paralysis + " " + _breath + " " + _spellStaff; } COM: <s> returns the string representation of this object </s>
funcom_train/11725674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setUp() throws Exception { File home = new File(JCR_HOME_DIR); if (!home.exists()) { home.mkdirs(); } // Construct the managed connection factory this.mcf = new JCAManagedConnectionFactory(); this.mcf.setHomeDir(JCR_HOME_DIR); this.mcf.setConfigFile(JCR_CONFIG_FILE); } COM: <s> setup the test </s>
funcom_train/43568130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMenuItemCheckUpdate() { if (menuItemCheckUpdate == null) { menuItemCheckUpdate = new JMenuItem(); menuItemCheckUpdate.setText(Constant.messages.getString("cfu.help.menu.check")); menuItemCheckUpdate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { checkForUpdates(true); } }); } return menuItemCheckUpdate; } COM: <s> this method initializes menu item encoder </s>
funcom_train/35305352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void installNonRolloverBorders ( JComponent c ) { // Put non-rollover borders on buttons. These borders reduce the margin. Component[] components = c.getComponents(); for (Component component : components) { if (component instanceof JComponent) { ((JComponent) component).updateUI(); setBorderToNonRollover(component); } } } COM: <s> installs non rollover borders on all the child components of the jcomponent </s>
funcom_train/28276832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveRequested() { if (TasksUiPlugin.getDefault() != null && Platform.isRunning()) {// && // TasksUiPlugin.getDefault().isShellActive() try { taskListSaverJob.runRequested(); } catch (Exception e) { StatusHandler.fail(e, "Could not auto save task list", false); } } } COM: <s> called periodically by the save timer </s>
funcom_train/16652038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Unit getUnit(String unitName, EntityManager entityManager) { if (unitName != null && !"".equals(unitName)) { Query unitQuery = entityManager.createQuery("SELECT u FROM Unit u WHERE u.acronym = :acronym") .setParameter(PARAM_ACRONYM, unitName); if (unitQuery.getResultList().size() == 1) { return (Unit) unitQuery.getSingleResult(); } } return null; } COM: <s> returns a specific unit object for a given name </s>
funcom_train/8399971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONObject put(String key, Object value) throws NullPointerException { if (key == null) { throw new NullPointerException("Null key."); } if (value != null) { this.myHashtable.put(key, value); } else { remove(key); } return this; } COM: <s> put a key value pair in the jsonobject </s>
funcom_train/21637259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadPluginInfo() { PluginHelper helper = PluginHelper.getInstance(); Map<String, Plugin> plugins = helper.loadPluginsMap(); if (plugins != null && plugins.size() != 0) { String[][] info = new String[plugins.size()][2]; int i = 0; for (Plugin plugin : plugins.values()) { info[i][0] = plugin.getName(); info[i][1] = Integer.toString(plugin.getVersion()); i++; } data = info; } fireTableDataChanged(); } COM: <s> load information about plugins to db </s>
funcom_train/15801230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveXMLAnswers(String outputXMLFile) throws IOException { Writer writer = null; try { writer = new OutputStreamWriter(new FileOutputStream(outputXMLFile), "UTF-8"); saveXMLAnswers(writer); workingFilePath = new File(outputXMLFile).getAbsolutePath(); dirty = false; } finally { if (writer != null) { writer.close(); } } } COM: <s> save the answers of the survey to an xml file </s>
funcom_train/5689297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Parameters compare) { return _additionalBOFs == compare._additionalBOFs && _baudRate == compare._baudRate && _dataSize == compare._dataSize && _linkDisconnectTime == compare._linkDisconnectTime && _maxTurnaroundTime == compare._maxTurnaroundTime && _minTurnaroundTime == compare._minTurnaroundTime && _threshold == compare._threshold && _windowSize == compare._windowSize; } COM: <s> compare two instances of parameters for equality </s>
funcom_train/46867658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Trade getTrade(String tradeId, boolean fetchOffer, boolean fetchItem, boolean fetchMadeByUser, boolean fetchMadeToUser){ TradeFetchDescriptor tradeFetchDesc= new TradeFetchDescriptor(); tradeFetchDesc.setFetchOffer(fetchOffer); tradeFetchDesc.setFetchItem(fetchItem); tradeFetchDesc.setFetchMadeByUser(fetchMadeByUser); tradeFetchDesc.setFetchMadeToUser(fetchMadeToUser); Trade trade = tradeService.getTrade(tradeId, tradeFetchDesc); return trade; } COM: <s> method to retrieve trade entity for a specified trade id </s>
funcom_train/32613671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeProperty(Predicate predicate) { ensureTransients(); boolean removed = properties.remove(predicate) != null; for (Iterator i = statements.iterator(); i.hasNext();){ Triple triple = (Triple)i.next(); // remove the Triple, if the predicates match if (triple._predicate().equals(predicate)){ i.remove(); } } return removed; } COM: <s> removes all properties which have been linked to the resource via the </s>
funcom_train/4665829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String get(String key, Object... data) { String msg = bundle != null ? bundle.getString(key) : key.substring(key.lastIndexOf('.') + 1); if (data != null && data.length > 0) { msg = MessageFormat.format(msg, data); } return msg; } COM: <s> returns formatted string value of specified property </s>
funcom_train/11671537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read() throws IOException { int b = super.in.read(); if (b == -1) { System.out.println("Client: Read "+fTotal+" byte(s) total."); return -1; } fTotal++; return b; } // read():int COM: <s> reads a single byte </s>
funcom_train/28723564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getGTtoxTagger(IDDNode glentryNode) { String query = projectReader.getGTtoxTaggerQuery(); TaggerDocument xdoc = (TaggerDocument) EditorEnvironment.getTaggerDocument(); if (xdoc != null) { Hashtable ht = new Hashtable(); ht.put("glossary-glentry", glentryNode); xdoc.selectTextEXQuery(query, ht); } } COM: <s> links the code glentry node code to x tagger </s>
funcom_train/4922300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNoResponse() throws IOException { HttpManagedObject mo = this .addRequest("GET", "/path", "HTTP/1.1", null); HttpResponse response = mo.getServerHttpConnection().getHttpResponse(); OutputBufferStream body = response.getBody(); writeUsAscii(body, "TEST"); this.assertWireData(""); // Close to ensure buffers get closed body.close(); } COM: <s> ensure no data on the wire until </s>
funcom_train/37136008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRangeDefinition(String rangeDefinition) throws IllegalRangeFormatException { /* * Check for syntax errors in range definition. An exception will be thrown if error exists. * And at the same time count the number of elements. */ RangeIterator ri = new RangeIterator(rangeDefinition); while(ri.hasNext()) { size ++; ri.next(); } /* Cool, no errors, then proceed */ String oldRangeDefinition = this.rangeDefinition; this.rangeDefinition = rangeDefinition; propertyChangeSupport.firePropertyChange("rangeDefinition", oldRangeDefinition, rangeDefinition); } COM: <s> setter for property range definition </s>
funcom_train/20211095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addProfile(Profile profile) { if (!(profile instanceof Profile)) { throw new ClassCastException( "ContinuumDatabase.addProfiles(profile) parameter must be instanceof " + Profile.class.getName()); } getProfiles().add(profile); } // -- void addProfile(Profile) COM: <s> method add profile </s>
funcom_train/48601187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void broadcastMessage(Exception e) { synchronized(mainFrames) { for (MainFrame frame: mainFrames) frame.addMessage(e); } if(mainFrames.size() == 0) { System.out.print(XMLWrapper.dfLocal.format(new Date()) + " [FAT] "); e.printStackTrace(); } } COM: <s> broadcasts a message to every client connected to the server </s>
funcom_train/39787869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLeadingSlashes() { assertEquals("test/image1.png", new ResourceImageReference("test/image1.png").getResource()); assertEquals("test/image1.png", new ResourceImageReference("/test/image1.png").getResource()); } COM: <s> ensure leading slashes are dropped from resource names </s>
funcom_train/38556773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean willAcceptChildOfClass(Class aNewClass) { NSArray myArray = acceptableClassesOfChildren(); Enumeration myEnum = myArray.objectEnumerator(); Class myClass; while (myEnum.hasMoreElements()) { myClass = (Class) myEnum.nextElement(); while (myClass != Object.class) { if (myClass == aNewClass) return true; myClass = myClass.getSuperclass(); } } return false; } COM: <s> reports whether or not the receiver will accept children of the </s>
funcom_train/50344106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPriority(String type, String name, String priority){ List<CarLoad> loads = list.get(type); for (int i=0; i<loads.size(); i++){ CarLoad cl = loads.get(i); if (cl.getName().equals(name)) cl.setPriority(priority); } } COM: <s> sets a loads priority </s>
funcom_train/49160655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getRandomTransferFee() { int fairRange = GameController.getInstance().getScenario().getScenarioSettings().PLAYER_CONTRACT_FAIR_RANGE; int randomPercent = GameController.getInstance().getScenario().getRandomInt(-fairRange, +fairRange); return getFairTransferFee() / 100 * (100 + randomPercent); } COM: <s> returns a random transferfee based on the fair transferfee </s>
funcom_train/13773452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VarType getColBnds(int colnum) throws WrongLPX { ensureColumnExist(colnum); double[] temp = native_get_col_bnds(id, colnum + 1); return new VarType((int) temp[0], temp[1], temp[2]); } COM: <s> returns an object of the type </s>
funcom_train/23931902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawLabels(GC gc, TreeMapNode item) { // add the labels (level -1) gc.setFont(this.getFont()); if (this.displayedRoot.isLeaf()) { drawLabel(gc, this.displayedRoot); } else { for (TreeMapNode node : this.displayedRoot.getChildren()) { drawLabel(gc, node); } } } COM: <s> draw all the labels to draw </s>
funcom_train/46789646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void action() { //Check for any unsaved changes. int choice = unsavedChanges(); // If choice is still equal to 1 (ie. user has not selected "Yes") if (choice == 1) { // Clear the filename and password boxes mFileNameField.setText(null); mPasswordNameField.setText(null); // Create new DM and set in DataPanel object. DataManager newDm = new DataManager("New"); setData(newDm); mStatusText.setText("New file created."); //Disable the JTree selection buttons disableTreeFunctionButtons(); } } COM: <s> create a new data manager object and display in gui panel </s>
funcom_train/44587208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsComment(int sourceStart, int sourceEnd) { int iComment = this.scanner.commentPtr; for (; iComment >= 0; iComment--) { int commentStart = this.scanner.commentStarts[iComment]; if (commentStart < 0) { commentStart = -commentStart; } // ignore comments before start if (commentStart < sourceStart) continue; // ignore comments after end if (commentStart > sourceEnd) continue; return true; } return false; } COM: <s> insure that start position is always positive </s>
funcom_train/9853099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSampleString() { ISample sample = new Sample("1 2 3"); assertEquals(3, sample.size()); assertEquals(1.0, sample.value(0)); assertEquals(2.0, sample.value(1)); assertEquals(3.0, sample.value(2)); } COM: <s> tests the string based constructor </s>
funcom_train/20846028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean setHeaderValue(String fieldName, String fieldValue) { boolean newValue = true; Enumeration en = headerFields.keys(); while (en.hasMoreElements()) { String key = (String) en.nextElement(); if (key.toLowerCase().equals(fieldName.toLowerCase())) { newValue = false; headerFields.remove(key); } } headerFields.put(fieldName, fieldValue); return newValue; } COM: <s> set the value of a header </s>
funcom_train/23997940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaxTextLength( int len ) { maxLen = len; // trim existing string to max length if ( ( maxLen >= 0 ) && ( str.size() > maxLen) ) { int diff = str.size() - maxLen; for ( int cnt = 0; cnt < diff; cnt++ ) str.remove( str.size() - 1 ); } } COM: <s> set the maximal text length </s>
funcom_train/16906845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getLength() { /* if(shape==null) return 0.0; Rectangle2D r2d = shape.getBounds2D(); double w = r2d.getWidth(); double h = r2d.getHeight(); if(w==0 && h==0) return 0.0; PathIterator pIter; flatten = true; if(flatten) pIter = getFlatteningPathIterator(shape, flatness); else pIter = shape.getPathIterator(new AffineTransform()); double[] par = new double[1]; parsePath(pIter, par, null, null, null); flatten = false; return par[0]; */ return 0.0; } COM: <s> returns the length of this shape perimeter if shape is closed </s>
funcom_train/3934163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void insertBalanced(String[] k, char[] v, int offset, int n) { int m; if (n < 1) return; m = n >> 1; insert(k[m + offset], v[m + offset]); insertBalanced(k, v, offset, m); insertBalanced(k, v, offset + m + 1, n - m - 1); } COM: <s> recursively insert the median first and then the median of the </s>
funcom_train/25792639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetEntityTerminated() { int entityId = 0; Entity toolEntity = new Entity(entityId, "Fake Tool", Entity.Type.TOOL, true, 0); Tuple toolTuple = m_mscData.addEntity(toolEntity); m_mscVisualization.setEntityTerminated(0, Entity.Type.TOOL, entityId); boolean toolRunning = (Boolean) toolTuple.get(Entity.RUNNING_FIELDNAME); assertFalse("The tool that is terminated is not set as terminated in the MSC.", toolRunning); } COM: <s> test if a terminated tool is correctly set as not running </s>
funcom_train/3133328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String country(char[] text, int start, int len) { int size = len; while(start < len) { if(text[start++] == '-') { return new String(text, start, --size); } size--; } return ""; } COM: <s> this will extract the primary country tag from the header </s>
funcom_train/43896172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void purge() { for (Iterator i = open.iterator(); i.hasNext();) { Object resource = i.next(); if (resource instanceof Iterator) { Iterator resourceIterator = (Iterator) resource; try { closeIterator(resourceIterator); } catch (Throwable e) { // TODO: Log e = ln } finally { i.remove(); } } } } COM: <s> close any outstanding resources released by this resources </s>
funcom_train/45692231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFxChainPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Pattern_fxChain_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Pattern_fxChain_feature", "_UI_Pattern_type"), EsxPackage.Literals.PATTERN__FX_CHAIN, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the fx chain feature </s>
funcom_train/26095888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCheckModalFormulaPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Network_checkModalFormula_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Network_checkModalFormula_feature", "_UI_Network_type"), ArnePackage.Literals.NETWORK__CHECK_MODAL_FORMULA, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, MODEL_CHECKING_GROUP, null)); } COM: <s> this adds a property descriptor for the check modal formula feature </s>
funcom_train/25649339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateEmptyProject() { KendoProject prj = DummyProjectBuilder.createEmptyProject(); assertNotNull(prj); assertNotNull(prj.getDefaultModel()); assertEquals(1, prj.getModels().size()); assertEquals(0, Iterators.asList(prj.getDefaultModel().getChildModels()).size()); } COM: <s> test of create empty project method of class com </s>
funcom_train/47546743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getBounds(float[] bounds) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (bounds == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (bounds.length < 4) SWT.error(SWT.ERROR_INVALID_ARGUMENT); double[] extents = new double[4]; Cairo.cairo_extents(handle, extents); bounds[0] = (float)extents[0]; bounds[1] = (float)extents[1]; bounds[2] = (float)(extents[2] - extents[0]); bounds[3] = (float)(extents[3] - extents[1]); } COM: <s> replaces the first four elements in the parameter with values that </s>
funcom_train/26455542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CastorUser queryUsersByNameKey(Database db, String name) throws PersistenceException { OQLQuery userOql = null; userOql = db.getOQLQuery(userQueryString); userOql.bind(name); QueryResults result = userOql.execute(); if (!result.hasMore()) { result.close(); return null; } else { CastorUser ret = (CastorUser)result.next(); result.close(); return ret; } } COM: <s> querys users by name and returns a single object </s>
funcom_train/41509920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayNotConnected() { String message = I18N.getString("Not connected.\n" //$NON-NLS-1$ + "Please click the 'Refresh' button to connect."); //$NON-NLS-1$ teamList.clear(); categoryWidget.getWorkspaceBrowser().showErrorMessage(message); if (isTasksActive()) { categoryWidget.getTaskContainer().showErrorMessage(message); } } COM: <s> disable all features in the client that are dependent on a correctly </s>
funcom_train/18808166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getObject(final Comparable rowKey, final Comparable columnKey) { Object result = null; final int row = this.rowKeys.indexOf(rowKey); if (row >= 0) { final KeyedObjects rowData = (KeyedObjects) this.rows.get(row); result = rowData.getObject(columnKey); } return result; } COM: <s> returns the object for the given row and column keys </s>
funcom_train/32750771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { try { Lattice cloned= (Lattice) super.clone(); //make a deep copy of the list of lattice elements cloned.elements= new ArrayList(); LatticeIterator liter= latticeIterator(); while (liter.hasNext()) { Element elm= (Element) liter.next().clone(); cloned.elements.add(elm); } return cloned; } catch (CloneNotSupportedException e) { //cannot happen -- we support clone throw new InternalError(e.toString()); } } COM: <s> clone a lattice </s>
funcom_train/41288807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fillProviderByClasses() { put(Object.class, new DynamicObjectUIProvider(this)); put(String.class, new StringUIProvider()); put(Boolean.class, new BooleanUIProvider()); put(Integer.class, new NumberUIProvider(Integer.class)); put(Long.class, new NumberUIProvider(Long.class)); put(Float.class, new NumberUIProvider(Float.class)); put(Double.class, new NumberUIProvider(Double.class)); put(File.class, new FileUIProvider()); put(Enum.class, new EnumUIProvider()); } COM: <s> fill the proider by classes map for all usable data types </s>
funcom_train/21644270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getBattleNewMenuItem() { if (battleNewMenuItem == null) { battleNewMenuItem = new JMenuItem(); battleNewMenuItem.setText("New"); battleNewMenuItem.setMnemonic('N'); battleNewMenuItem.setDisplayedMnemonicIndex(0); battleNewMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_MASK, false)); battleNewMenuItem.addActionListener(eventHandler); } return battleNewMenuItem; } COM: <s> return the battle new menu item </s>
funcom_train/33776039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initActions() { Class c = getClass(); addAction(c, ACTION_EXIT_APP, new ExitAction(this)); addAction(c, ACTION_ABOUT_APP, new AboutAppAction(this)); addAction(c, ACTION_SHOW_HELP_CONTENTS, new HelpContentsAction()); } COM: <s> initialize this applications action table </s>
funcom_train/31741151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ModuleBase fetchModule(String moduleName) { ModuleBase m = null; synchronized(modules) { ListIterator lMod = modules.listIterator(); while (lMod.hasNext()) { m = (ModuleBase)lMod.next(); if (m.getName().equals(moduleName)) return m; } } return null; } COM: <s> attempts to return the module specified </s>
funcom_train/42907847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintPanel(){ /* * This should not happen but just in case ... */ if ( graphics_buffer == null ) return; /* * Draw to the window/screen */ java.awt.Graphics2D g = (java.awt.Graphics2D) getGraphics(); if (g != null) g.drawImage(graphics_buffer, 0, 0, null); /* * Sync display */ java.awt.Toolkit.getDefaultToolkit().sync(); } COM: <s> program scheduled paint method </s>
funcom_train/4915864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(B bean, String value) { // Only set value if have mutator if (this.mutator == null) { return; } try { // Set the property value on the bean this.mutator.invoke(bean, value); } catch (Exception ex) { LogUtil.logError("Failed to set value for property " + this.name, ex); } } COM: <s> specifies the property value on the bean </s>
funcom_train/23181795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateMapData() { MapCalibration mapCalibration = new XMLFactory().getMapCalibration(); if (mapData != null) { if (mapFile == null) { File mapFile = getMapCalibrationFileByImageFile(mapData.getPathToImage()); this.mapFile = mapFile; } mapCalibration.marshall(mapData, this.mapFile); } } COM: <s> if some settings in the file was changed </s>
funcom_train/38952925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unfoldPredicate(Node node, List result) { if (node instanceof Node.BinaryLogical) { Node.BinaryLogical b = (Node.BinaryLogical) node; if (b.operator == Node.AND) { unfoldPredicate(b.lhs, result); unfoldPredicate(b.rhs, result); } else { result.add(node); } } else { result.add(node); } } COM: <s> returns the list of predicate composing the given predicate </s>
funcom_train/41523585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String accFindProcess(){ List<ProcessDef> auxList = null; //Prepare for search by criteria fSrcObject.setOid(null); fSrcObject.setCode(null); Command cmd = getCommand(FindProcessDef.class); ((FindProcessDef)cmd).setProcessDef(fSrcObject); cmd = runCommand(cmd); auxList = ((FindProcessDef)cmd).getResult(); if(auxList != null){ processDefList = new ArrayList<ProcessDef>(); for(ProcessDef proc : auxList) processDefList.add(proc); } return ActionBeanNames.SEARCH_PROCESSES; } COM: <s> search processes by criteria and returns valid list </s>
funcom_train/37475923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addValue(String newValue, String uname) throws Exception { SWAMPHashSet values = getValueAsList(); SWAMPHashSet newValues = new SWAMPHashSet(newValue, ","); values.addAll(newValues); setValue(values.toString(", "), uname); } COM: <s> add one or more values to the databit </s>
funcom_train/26455527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CastorGroup queryGroupsByNameKey(Database db, String name) throws PersistenceException { OQLQuery groupOql = null; groupOql = db.getOQLQuery(groupQueryString); groupOql.bind(name); QueryResults result = groupOql.execute(); if (!result.hasMore()) { result.close(); return null; } else { CastorGroup ret = (CastorGroup)result.next(); result.close(); return ret; } } COM: <s> binds name to query string executes it and returns a single object </s>
funcom_train/22753960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element createTable(DataTable tbl) { Element nd = xml.createElement("data-table"); setEntityProperties(nd, tbl); setSubNode(nd, "cols", tbl.getCols()); setSubNode(nd, "rows", tbl.getRows()); return nd; } COM: <s> creates a lt data table gt element </s>
funcom_train/17788655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumPrecinctsWide() { CADIRectangle bounds = getBounds(); int tmp = parent.getPrecinctWidths(rLevel); return (int)Math.ceil(1.0 * (bounds.x + bounds.width) / tmp) - (int)Math.floor(1.0 * bounds.x / tmp); } COM: <s> returns the number of precincts in the wide dimension </s>
funcom_train/41319938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { setBounds(0, 0, x+300, y+10); Graphics2D g2 = (Graphics2D) g; g2.setColor(color); Stroke stroke = new BasicStroke(w); g2.setStroke(stroke); g2.drawLine(x, y, x+200, y); g2.drawLine(x+219, y, x+270, y); } COM: <s> paint line on defined position </s>
funcom_train/10791728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTypeName(Column col) { if (!DBIdentifier.isEmpty(col.getTypeIdentifier())) return appendSize(col, toDBName(col.getTypeIdentifier())); if (col.isAutoAssigned() && autoAssignTypeName != null) return appendSize(col, autoAssignTypeName); return appendSize(col, getTypeName(col.getType())); } COM: <s> return the preferred database type name for the given columns type </s>
funcom_train/40844403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JFreeChart createChart(PieDataset dataset) { JFreeChart chart = ChartFactory.createPieChart3D( chartTitle, // chart title dataset, // data true, // include legend true, // tooltips false // urls ); PiePlot plot = (PiePlot) chart.getPlot(); plot.setSectionOutlinesVisible(false); plot.setNoDataMessage("No data available"); return chart; } COM: <s> creates a chart </s>
funcom_train/13849318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void snapshot() throws IOException { int oldVersion = version; version++; String fname = versionName(snapshotPrefix); File snapshotFile = new File(fname); FileOutputStream out = new FileOutputStream(snapshotFile); try { try { handler.snapshot(out); /* force contents to disk */ out.getFD().sync(); } catch (Exception e) { throw new LogException("snapshot failed", e); } snapshotBytes = snapshotFile.length(); } finally { out.close(); } logBytes = 0; openLogFile(); writeVersionFile(); deleteSnapshot(oldVersion); deleteLogFile(oldVersion); } COM: <s> records the client defined current snapshot by invoking the client </s>
funcom_train/44187034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scanArchive(ArchiveReader reader) { System.out.println(); for (ArchiveRecord record : reader) { this.recordCount++; logRecordErrors(record); System.out.print("."); if ((this.recordCount % 100) == 0) System.out.print("[" + this.recordCount+ "]\n"); } } COM: <s> scan read archive printing </s>
funcom_train/13392813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runTask() throws Throwable { SpecialEvent sp = new SpecialEvent("Sender2", i++); logger.info("sender2(" + getServiceId() + "):sent<" + sp + ">count=" + i); eventService.send(sp, getServiceId(), Event.EventPriority.LOWEST); // now we wait synchronized (this) { wait(WAIT_TIME); } } COM: <s> perform a unit of work for the thread iteration </s>
funcom_train/44342065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList copySegmentPoints() { if (this.segmentPoints == null) return null; ArrayList newSgmtPts = new ArrayList(this.segmentPoints.size()); for (Iterator i = this.segmentPoints.iterator(); i.hasNext();) newSgmtPts.add(new Point((Point) i.next())); return newSgmtPts; } COM: <s> get a copy of the segment points array list of the current relation </s>
funcom_train/12647041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AudioData getData() throws IOException { byte buffer[] = new byte[audioIn.getLength()]; int gotbytes = read(buffer, 0, audioIn.getLength()); close(); if (gotbytes != audioIn.getLength()) { throw new IOException("audio data read error"); } return new AudioData(buffer); } COM: <s> get the data </s>
funcom_train/46874519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void translate(double x, double y, double z) { Matrix4 matrix = new Matrix4(); matrix.set(0, 3, x); matrix.set(1, 3, y); matrix.set(2, 3, z); current.multiplyAndSet(matrix); } COM: <s> multiplies current transformation matrix by matrix corresponding to </s>
funcom_train/34563110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addDocs(final DBNode db) { final NodIter col = new NodIter(); final Data data = db.data; for(int p = 0; p < data.meta.size; p += data.size(p, data.kind(p))) { col.add(new DBNode(data, p)); } addColl(col, token(data.meta.name)); } COM: <s> adds database documents as a collection </s>
funcom_train/48900915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReleaseDate(final Date date) { assertNotNull(this.release); final Date actualDate; if (date == null) { actualDate = new Date(); } else { actualDate = date; } this.log("Setting releasedate: " + actualDate); this.release.setReleaseDate(actualDate); } COM: <s> called when the code releasedate code xml attribute is encountered </s>
funcom_train/1536902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void setCoords(Coords v, boolean doPathOrRegion) { super.setCoords(v); updateCoords(); if (doPathOrRegion){ // region if (hasRegion()){ //Application.printStacktrace(getLabel()); region.pointChangedForRegion(this); } // path if (hasPath()) { // remember path parameter for undefined case //PathParameter tempPathParameter = getTempPathparameter(); //tempPathParameter.set(getPathParameter()); path.pointChanged(this); } updateCoords(); } } COM: <s> sets homogenous coordinates and updates </s>
funcom_train/4974278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeRange(int fromIndex, int toIndex) { modCount++; atomicModCount.incrementAndGet(); int numMoved = elementCount - toIndex; System.arraycopy(elementData, toIndex, elementData, fromIndex, numMoved); // Let gc do its work int newElementCount = elementCount - (toIndex-fromIndex); while (elementCount != newElementCount) elementData[--elementCount] = null; } COM: <s> removes from this list all of the elements whose index is between </s>
funcom_train/50633457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void syncA() { if (a != null) { a_aId = a.getA2Pkey().getAId(); assert a.getA2Pkey().getGroupId().equals(pkey.getGroupId()) : "different groupId"; } else { a_aId = null; } } COM: <s> sync unshared pkey columms of association </s>
funcom_train/34186321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initFilter(){ filter = new Filter(); Filter.types = new CharSequence[numberOfTypes()]; Filter.typesId = new int[numberOfTypes()]; Filter.checkedTypes = new boolean[numberOfTypes()]; Filter.lowprice = true; Filter.mediumprice = true; Filter.highprice = true; Filter.radius = 10000; Filter.ratingFrom = "0"; Filter.ratingTo = "5"; // Collect data for types. collectTypes(); } COM: <s> initializes the filter </s>
funcom_train/49760405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonFileChooser() { if (jButtonFileChooser == null) { jButtonFileChooser = new JButton(); jButtonFileChooser.setBounds(new Rectangle(285, 30, 116, 31)); jButtonFileChooser.setToolTipText("Opens a file dialog."); jButtonFileChooser.setText("File"); jButtonFileChooser.addActionListener(this); } return jButtonFileChooser; } COM: <s> this method initializes jbutton file chooser </s>
funcom_train/23867277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate(final FacesContext facesContext, final UIComponent component, final Object value) { CDebug.checkParameterNotNull(facesContext, "facesContext"); CDebug.checkParameterNotNull(component, "component"); if (arePreValidationConditionsMet(component, value)) { validateValueIsNumeric(facesContext, value.toString()); validateValueIsModuloEleven(facesContext, value.toString()); } } COM: <s> validates that the supplied value represents a valid number that adheres </s>
funcom_train/11706516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AttributesImpl getXMLAttributes() { AttributesImpl attrs = super.getXMLAttributes(); attrs.addAttribute("", "name", "name", null, getName()); attrs.addAttribute("", "value", "value", null, getValue()); return attrs; } COM: <s> overridden to write the name and value properties as xml attributes </s>
funcom_train/50531723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showContactListWindow() { /* And now, a GUI for the IM layer */ if (contactlistwin==null && contactlist!=null) { contactlistwin=new ContactListWindow(this); contactlistwin.setVisible(true); } /* Set a logger different than standard output */ //Logger.setLogger(contactlistwin); } COM: <s> show the contact list window </s>
funcom_train/7293475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int newestStamp(int first, int last, int bestStampSoFar) { int bestStamp = bestStampSoFar; for (int i=first; i<=last; ++i) { if (stamp[i] > bestStamp) { bestStamp = stamp[i]; } } return bestStamp; } COM: <s> return the newest stamp of a given range of fields </s>
funcom_train/18751414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TemporalFormula createAllFinally(TemporalFormula operand) throws FormatException { // AF(phi) <==> A(true U phi) List<TemporalFormula> operandList = new ArrayList<TemporalFormula>(); operandList.add(new True()); operandList.add(operand); CTLStarFormula factory = TemporalFormula.getFactory(); TemporalFormula until = factory.createUntil(operandList); return factory.createAll(until); } COM: <s> creates an equivalent all formula from the current all formula </s>
funcom_train/36670824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSessionControlRequiredForThisResource(HttpServletRequest httpServletRequest) { String requestPath = httpServletRequest.getRequestURI(); boolean required = ( requestPath.indexOf(getTimeoutPage()) < 0 ); if (log.isTraceEnabled()) { log.trace("Session control required for request path '" + requestPath + "'? " + required); } return required; } COM: <s> the session shouldnt be checked for some pages </s>
funcom_train/24379220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getTypeAsNode(Node node, TemplateInlineType type){ if (type != null) { QName qname = new QName("http://www.imsglobal.org/xsd/imsqti_v2p1", "templateInline"); JAXBElement<TemplateInlineType> jaxbe = new JAXBElement<TemplateInlineType>(qname, TemplateInlineType.class, type); node = getNode(node, jaxbe); } return node; } COM: <s> gets the template inline type as a dom node </s>
funcom_train/51270996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void mergeChildPULS() throws MXQueryException { if (subIters != null && subIters.length > 0) { for (int i=0;i<subIters.length;i++) { if (subIters[i].getExpressionCategoryType(true) == EXPR_CATEGORY_UPDATING) { this.pendingUpdateList.merge(subIters[i].getPendingUpdateList()); } } } } COM: <s> merge the the puls of the child iterators i </s>
funcom_train/9086747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Vehicles entity) { EntityManagerHelper.log("deleting Vehicles instance", Level.INFO, null); try { entity = getEntityManager().getReference(Vehicles.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent vehicles entity </s>
funcom_train/310784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (this == obj) return true; if ((obj==null) || (!(obj instanceof RangeSet))) return false; RangeSet other = (RangeSet) obj; if (other.sz!=sz) return false; for (int i=0; i<sz; ++i) if (other.r[i]!=r[i]) return false; return true; } COM: <s> returns true the object represents an identical set of ranges as obj </s>
funcom_train/51615645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(Record record, ReportBuilder builder) throws BuildException { builder.startRecordset(class_id, AttributeList.EMPTY); Iterator subrecords = record.detail(); while (subrecords.hasNext()) builder.writeObject(subrecords.next()); builder.endRecordset(); } COM: <s> write a field or group out to a report builder </s>
funcom_train/16838488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSimpleHtmlStackTrace(final Throwable throwable) { final StringBuilder strb = new StringBuilder(200) // .append("<br />") // .append(throwable.toString()); LOG.severe(throwable.toString()); for (final StackTraceElement s : throwable.getStackTrace()) { strb.append(s).append("<br />"); LOG.severe(s.toString()); } return strb.toString(); } COM: <s> utility method to render a simple </s>
funcom_train/1534019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setProbabilityOfSuccessInternal(double p) { if (p < 0.0 || p > 1.0) { throw MathRuntimeException.createIllegalArgumentException( "{0} out of [{1}, {2}] range", p, 0.0, 1.0); } probabilityOfSuccess = p; } COM: <s> change the probability of success for this distribution </s>
funcom_train/22185360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*public void runAfterPut(boolean wereExceptions) throws JSExn { try { if (!wereExceptions && jsthread.currentInterpreter.f!=null) { jsthread.currentInterpreter.run(null); } } finally { if (jsthread.currentInterpreter.old==null) { jsthread.destroy(); } else { jsthread.currentInterpreter = jsthread.currentInterpreter.old; } } }*/ COM: <s> execute write traps part 2 </s>
funcom_train/19971893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveData(ContentResolver cr, Uri uri) { Log.i(TAG, "save " + uri); // Add derived fields. rowValues.put(VesselSchema.Passages.UNDER_WAY, isRunning() ? 1 : 0); // Save the data. cr.update(uri, rowValues, null, null); } COM: <s> save this passage to the given content resolver </s>
funcom_train/15518180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadGenomeList () { genome_choices = SeqFeatureData.userSelectableGenomes (data_model, true, true); genomes.setRenderer (GenomeCellRenderer.getListCellRenderer ()); genomes.setModel (new DefaultComboBoxModel (genome_choices)); result_pane = new SearchResultPanel (SeqFeatureData.userSelectableGenomes ( data_model, false, false), this); } COM: <s> loads list of genomes user is viewing and should be able to search </s>
funcom_train/50741616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List clonePosts() throws CloneNotSupportedException { // // Copy Posts // List clonedPosts = new ArrayList(); if (this.getPosts() != null) { //List clonePosts = new ArrayList(); Iterator postsItr = getPosts().iterator(); while (postsItr.hasNext()) { Post orginalPost = (Post)postsItr.next(); clonedPosts.add(orginalPost.clone()); } } return clonedPosts; } COM: <s> performs a deep copy of this code blog code s </s>
funcom_train/15884549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JTextField getSessionIdText() { if (sessionIdText == null) { sessionIdText = new JTextField(); sessionIdText.setName("address"); sessionIdText.setPreferredSize(new java.awt.Dimension(300, 19)); } return sessionIdText; } COM: <s> this method initializes protocol text </s>
funcom_train/49503319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int find(java.sql.Connection con){ int index = -1; // Find the matching Connection in the pool if ((con != null) && (m_pool != null)){ for (int i=0; i<m_pool.size(); i++){ ConnectionObject co = (ConnectionObject) m_pool.get(i); if (co.con == con) { index = i; break; } } } return index; } COM: <s> p find the given connection in the pool </s>
funcom_train/46464451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLine(Line line) { if (line == null) { throw new IllegalArgumentException( "the tunnel's line cannot be null"); } if (Tunnel.this.line == line) { return; } if (isBound()) { try { Binder binder = getBinder(); unbindFrom(binder); Tunnel.this.line = line; bindTo(binder); } catch (BindingException e) { assert false; } } else { Tunnel.this.line = line; } } COM: <s> safely changes the tunnels line </s>