__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/39911061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetPassword() { System.out.println("setPassword"); String password = ""; Employee instance = new Employee(); instance.setPassword(password); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set password method of class buissness </s>
funcom_train/50328179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Turnout createNewTurnout(String systemName, String userName) { String addr = systemName.substring(getSystemPrefix().length()+1); Turnout t = new CbusTurnout(getSystemPrefix(), addr, memo.getTrafficController()); t.setUserName(userName); return t; } COM: <s> internal method to invoke the factory after all the </s>
funcom_train/28353976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public List getNodes(List bpmAgents) { int count = bpmAgents.size(); List bpmNodes = new ArrayList(count); for ( int index = 0 ; index < count ; index++ ) { BpmAgent bpmAgent = (BpmAgent)bpmAgents.get(index); bpmNodes.add( bpmAgent.getNode() ); } return bpmNodes; } COM: <s> return a list of bpm nodes associated with the list of bpm agents </s>
funcom_train/45815721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void clickButton(String buttonID) throws SAXException, IOException { WebForm forms[] = resp.getForms(); assertTrue(forms.length > 0); WebForm form = forms[0]; Button button = form.getButtonWithID(buttonID); assertNotNull(button); button.click(); resp = wc.getCurrentPage(); } COM: <s> click on the button with a given id and on the first form </s>
funcom_train/39911196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetHtml1() { System.out.println("getHtml1"); Page1 instance = new Page1(); Html expResult = null; Html result = instance.getHtml1(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get html1 method of class timesheetmanagement </s>
funcom_train/2920108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void altReferencesTokenID(String ruleName, GrammarAST refAST, int outerAltNum) { Rule r = getRule(ruleName); if ( r==null ) { return; } r.trackTokenReferenceInAlt(refAST, outerAltNum); if ( !tokenIDRefs.contains(refAST.getToken()) ) { tokenIDRefs.add(refAST.getToken()); } } COM: <s> track a token reference within an outermost alt of a rule </s>
funcom_train/4230794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double join(CompactTreeNode t) { CompactTreeNode c; double d, h, sum; c = t.child; t.contour = c.contour; sum = h = c.width + 2 * nodeDistance; c = c.sibling; while (c != null) { d = merge(t.contour, c.contour); c.offsetY = d + h; c.offsetX = 0; h = c.width + 2 * nodeDistance; sum += d + h; c = c.sibling; } return sum; } COM: <s> joins the specified tree node </s>
funcom_train/28918025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeHeader(final String name) { if (name == null) { throw new IllegalArgumentException("Name may not be null"); } Iterator<Header> iterator = this.headers.iterator(); while (iterator.hasNext()) { Header header = iterator.next(); if (header.getName().equalsIgnoreCase(name)) { iterator.remove(); } } } COM: <s> removed message header </s>
funcom_train/13965384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String showString() { if (_showString == null) { String key = stringValueForBinding(Keys.showString, "Show"); _showString = localizer().localizedStringForKey("ERMBatchSizeControl." + key); if (_showString == null) { _showString = localizer().localizedStringForKeyWithDefault(key); } } return _showString; } COM: <s> the string displayed for 100 items show 10 </s>
funcom_train/27719915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void focusLost(FocusEvent e) { current.focusLost(e); // JCustomizer customizer = (JCustomizer) e.getComponent(); // JCustomizerPane pane = (JCustomizerPane) customizer.getParent(); // if (pane.isSelected(customizer)){ // setState(selectedState); // } else { // setState(normalState); // } } COM: <s> invoked when a component loses the keyboard focus </s>
funcom_train/29063197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTextPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DocumentRoot_text_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_text_feature", "_UI_DocumentRoot_type"), AspectxPackage.eINSTANCE.getDocumentRoot_Text(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the text feature </s>
funcom_train/8087347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkRemainingOptions() { boolean result; String[] options; print("Remaining options..."); options = getUserOptions(); try { getDefaultHandler().setOptions(options); if (getDebug()) println("\n remaining: " + printOptions(options)); println("yes"); result = true; } catch (Exception e) { println("no"); result = false; if (getDebug()) println(e); } return result; } COM: <s> checks whether the user supplied options can be processed completely </s>
funcom_train/17479631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return new String( "" + number + "\t" + Double.valueOf(f.format(x)) + "\t" + Double.valueOf(f.format(y)) + "\t" + Double.valueOf(f.format(z)) + "\t" + description + "\n"); } COM: <s> prints this point in a nice format </s>
funcom_train/36233499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectedOne(MouseEvent evt){ int row = table.getSelectedRow(); _row = row; if(row >= 0) { int modelRow = table.convertRowIndexToModel(row); //get selected entry @SuppressWarnings("unused") EmployeeEntity employee = (EmployeeEntity) table.getModel().getValueAt(modelRow, 0); //set focus if(row > 0) { table.setRowSelectionInterval(row, row); } } } COM: <s> selected one time </s>
funcom_train/46681850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int CreateOpen(String name, double lambda) { String fn = "CreateOpen()"; /* if (DEBUG) { FILE * out_fd; out_fd = fopen("PDQ.out", "a"); com.bruja.format.FormatFormat.printf(out_fd, "name : %s lambda : %f\n", name, * lambda); close(out_fd); } */ create_transaction(noStreams, NETWORK.OPEN, name, lambda); jobNo = ++noStreams; return jobNo; } // CreateOpen COM: <s> defines the characteristics of a workload in an open circuit queueing </s>
funcom_train/47028047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void upgradeBadRailsNatures() { IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects(); for (int i = 0; i < projects.length; i++) { try { if (projects[i].hasNature("org.radrails.rails.ui.railsnature")) { RailsPlugin.addRailsNature(projects[i], null); } } catch (CoreException e) { // ignore } } } COM: <s> fix existing rails projects who had their nature set to the bad value </s>
funcom_train/33959212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetMainView() { System.out.println("setMainView"); JFrame frame = null; UbernotesManagerImplementation instance = new UbernotesManagerImplementation(); instance.setMainView(frame); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set main view method of class ubernotes manager implementation </s>
funcom_train/25188983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetLinks() throws Exception { System.out.println("getLinks"); JSchema instance = new JSchema(); List links = new ArrayList(); assertNull(instance.getLinks()); instance.setLinks(links); assertEquals(links, instance.getLinks()); } COM: <s> test of get links method of class jschema </s>
funcom_train/50918973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getLegacyObject() { StringWriter w = new StringWriter(); try { writeMOL(w); w.close(); } catch (IOException e) { throw new CMLRuntimeException("BUG?" +e); } catch (CMLException e1) { throw new CMLRuntimeException("BUG?" +e1); } return w.toString(); } COM: <s> returns a text image of mol file </s>
funcom_train/51205019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refresh(int type, JRecept busRecept, JTemplate busTemplate, JOrderline busOrderline, javax.swing.JTable tblProducts) throws JException { m_iType = type; calculate(busRecept, busTemplate, busOrderline, tblProducts); } COM: <s> calculate and fill panel </s>
funcom_train/34341845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getNuevaCarga() { if (NuevaCarga == null) {//GEN-END:|18-getter|0|18-preInit // write pre-init user code here NuevaCarga = new Command("Cargar de Nuevo", Command.ITEM, 0);//GEN-LINE:|18-getter|1|18-postInit // write post-init user code here }//GEN-BEGIN:|18-getter|2| return NuevaCarga; } COM: <s> returns an initiliazed instance of nueva carga component </s>
funcom_train/26213433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUrl(String url) throws MalformedURLException { super.setPath(URIUtil.getPath(url)); this.url = url; String query = URIUtil.getQuery(url); if (query != null && query.length() > 0) { super.setQueryString(query); } } COM: <s> sets the url </s>
funcom_train/1469808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*private String getErrorMessages(List fes) throws NoSuchMessageException { StringBuffer message = new StringBuffer(); for (int i = 0; i < fes.size(); i++) { ObjectError error = (ObjectError) fes.get(i); message.append(this.requestContext.getMessage(error, true)); } return message.toString(); }*/ COM: <s> extract the error messages from the given object error list </s>
funcom_train/28271085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void zoneChangeEvent(ValueChangeEvent e) { if( e.getPhaseId() != PhaseId.INVOKE_APPLICATION ){ e.setPhaseId( PhaseId.INVOKE_APPLICATION ); e.queue(); return; } Integer newValue = (Integer)e.getNewValue(); Integer oldValue = (Integer)e.getOldValue(); if (newValue!=0){ selectedRow.setCountriesId(remote.getZoneCountry(newValue)); } } COM: <s> zone change event </s>
funcom_train/8199062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setQuadrantPaint(int index, Paint paint) { if (index < 0 || index > 3) { throw new IllegalArgumentException("The index value (" + index + ") should be in the range 0 to 3."); } this.quadrantPaint[index] = paint; notifyListeners(new PlotChangeEvent(this)); } COM: <s> sets the paint used for the specified quadrant and sends a </s>
funcom_train/44011375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetCreditCardNum() { System.out.println("setCreditCardNum"); String creditCardNum = ""; MembershipBO instance = null; instance.setCreditCardNum(creditCardNum); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set credit card num method of class edu </s>
funcom_train/10795764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addBasicAttributes(FieldMetaData fmd, AnnotationBuilder ab) { if (!fmd.isInDefaultFetchGroup()) ab.add("fetch", FetchType.LAZY); if (fmd.getNullValue() == FieldMetaData.NULL_EXCEPTION) ab.add("optional", false); } COM: <s> add basic attributes </s>
funcom_train/47486706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rename(Name oldName, Name newName) throws NamingException { map.put(normalized(newName), map.remove(normalized(oldName))); if (parentContext != null) { parentContext.rename(prefix + "/" + normalized(oldName), prefix + "/" + normalized(newName)); } } COM: <s> this synchronizes a parent from any child but not the other way around </s>
funcom_train/31872043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public class FrameWOAS extends FrameW { public String getLongName () { return "Official audio source URL frame"; } public FrameWOAS (ID3V2Frame frm) { super (frm); } public FrameWOAS (ID3V2Frame frm, DataSource ds) throws SeekPastEndException { super (frm, ds); } public String toString () { return getLongName () + "\nURL : " + url; } } COM: <s> oficial audio source url frame </s>
funcom_train/1546879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkArray(long[][] in) throws IllegalArgumentException { if (in.length < 2) { throw MathRuntimeException.createIllegalArgumentException( LocalizedFormats.INSUFFICIENT_DIMENSION, in.length, 2); } if (in[0].length < 2) { throw MathRuntimeException.createIllegalArgumentException( LocalizedFormats.INSUFFICIENT_DIMENSION, in[0].length, 2); } checkRectangular(in); checkNonNegative(in); } COM: <s> checks to make sure that the input long array is rectangular </s>
funcom_train/18566264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void searchRandomBreeder(PreferenceType preferences, ExportWizard parent) { breederType = null; this.parent = parent; this.preferences = preferences; connectingDialog = new ConnectingDialog(parent, false, this); connectingDialog.show(); System.out.println("start "); start(); } COM: <s> starts thread searching for a random breeder </s>
funcom_train/12103759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Tuple2i getAvatarCellIndex(Point3D avatarPosition) { //Point3D topLeft = ((Tree) treeGrid.getNode(0, 0)).getLocation(); // return new Tuple2i( (int)( (avatarPosition.z - topLeftCellCenter.z) / treeCellDepth ), Math.round( (avatarPosition.x - topLeftCellCenter.x) / treeCellWidth ) ); } COM: <s> gets the avatars tree grid cell index based on its position </s>
funcom_train/3361352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read() throws IOException { if( frameSize != 1 ) { throw new IOException("cannot read a single byte if frame size > 1"); } byte[] data = new byte[1]; int temp = read(data); if (temp <= 0) { // we have a weird situation if read(byte[]) returns 0! return -1; } return data[0] & 0xFF; } COM: <s> reads the next byte of data from the audio input stream </s>
funcom_train/1378128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getUniqueFileManageable(Long currentDirectoryId, String name) { MediaDirectory currentDirectory = null; if(currentDirectoryId != null) { currentDirectory = genericDAO.getById(MediaDirectory.class, currentDirectoryId); } FileManageable managable = genericDAO.findUnique(new UniqueFileManageableCriteriaFactory(name, currentDirectory)); return managable == null; } COM: <s> returns true of a given media name is unique in a directory </s>
funcom_train/10908715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCorrespondingForced(PropertyList propertyList) { if (!relative) { return false; } PropertyList pList = getWMPropertyList(propertyList); if (pList != null) { int correspondingId = pList.getWritingMode(lrtb, rltb, tbrl); if (pList.getExplicit(correspondingId) != null) { return true; } } return false; } COM: <s> for properties that operate on a relative direction before after </s>
funcom_train/120265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { String name = JOptionPane.showInputDialog(Translator.getString("URLDialog", new Object[]{"foo.gpd"})); // canceled? if (name == null) return; // open the graphpad try { graphpad.addDocument(new URL(name)); } catch (MalformedURLException ex) { JOptionPane.showMessageDialog( graphpad, ex.getLocalizedMessage(), Translator.getString("Error"), JOptionPane.ERROR_MESSAGE); } } COM: <s> shows a file chooser with the </s>
funcom_train/9203256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void union(AABB aabb) { this.min.x = Math.min(this.min.x, aabb.min.x); this.min.y = Math.min(this.min.y, aabb.min.y); this.max.x = Math.max(this.max.x, aabb.max.x); this.max.y = Math.max(this.max.y, aabb.max.y); } COM: <s> performs a union of this </s>
funcom_train/2919644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StateCluster build_AlternativeBlockFromSet(StateCluster set) { if ( set==null ) { return null; } // single alt, no decision, just return only alt state cluster NFAState startOfAlt = newState(); // must have this no matter what transitionBetweenStates(startOfAlt, set.left, Label.EPSILON); return new StateCluster(startOfAlt,set.right); } COM: <s> from a set a b build </s>
funcom_train/31985519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String writeTime(String t) { if ( t == null ) return "none"; if ( t.lastIndexOf(".") == -1 ) return t; // no decimal point -> just print it int decPoint = t.lastIndexOf("."); if ( t.length() - decPoint <= timeFloats+1 ) return t; // less floats than specified return t.substring(0,decPoint+timeFloats+1); } COM: <s> returns a string representation of a simulation time value with the </s>
funcom_train/44946272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set tables() throws SQLException { DatabaseMetaData meta = getConnection().getMetaData(); ResultSet tables = meta.getTables(null, null, "%", null); Set tableSet = new HashSet(); while (tables.next()) tableSet.add(tables.getObject(3).toString().toUpperCase()); tables.close(); return tableSet; } COM: <s> returns the set of table names as uppercase strings in the database </s>
funcom_train/22284400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRangeAt(IntRange range, int index) { // set to unlimited if null if (range == null) { range = new IntRange(); } // make sure the ranges contain the correct number of objects for (int i = ranges.size(); i <= index; i++) { ranges.addElement(new IntRange()); } // set range at specified index ranges.setElementAt(range, index); } COM: <s> set the range of the integer element </s>
funcom_train/1370408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QueryBuilder parameters(final Collection parameters) { checkNoParametersConfigured(); parameterBuilder = new ParameterBuilder() { public void populateQuery(Session entityManager, Query query) { int counter = 0; for (Object parameter : parameters) { query.setParameter(counter++, parameter); } } @Override public String toString() { return "Parameters: " + parameters; } }; return this; } COM: <s> specifies the parameters to the query as an ordered collection of </s>
funcom_train/16490657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JMenuBar createMenuBar() { this.menuBar = new SubstanceMenuBar(); this.menuBar.setFocusable(false); this.menuBar.setBorderPainted(true); this.menuBar.add(this.createMenu()); this.menuBar.setOpaque(false); // support for RTL this.menuBar.applyComponentOrientation(this.rootPane .getComponentOrientation()); this.markExtraComponent(this.menuBar, ExtraComponentKind.LEADING); return this.menuBar; } COM: <s> returns the code jmenu bar code displaying the appropriate system menu </s>
funcom_train/41163629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoCourseType entity) { EntityManagerHelper.log("saving CoCourseType instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved co course type entity </s>
funcom_train/26216246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readString(int numberOfChars) throws IOException { StringBuffer stringBuffer = new StringBuffer(); int input; for (int i = 0; i < numberOfChars; i++) { input = in.read(); if (input != 0) stringBuffer.append((char)input); } return stringBuffer.toString().trim(); } // END readString COM: <s> reads the string with the length of the given number </s>
funcom_train/45715195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToOpenedImages(ImageWindow imgw) { //FileInfo fInfo = imgw.getImagePlus().getFileInfo();//13.10.2010 String fName = imgw.getTitle(); //fInfo.fileName; openedImages.put(fName, imgw); } COM: <s> add an image name to the list of linked images </s>
funcom_train/29517020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int get_starts_and_ends(int first, int last) { int y = 0; //4 and 5 are positions of "+" and "-" for (int x = first - 1; x <= last - 1; x++) { //in the BASES array respectively y += baseScore[4][x] + baseScore[5][x]; } return y; } COM: <s> get number of sequence beginnings and endings </s>
funcom_train/12926049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setComboFromDefaultAccount(String defaultAccount) { if (defaultAccount==null || defaultAccount.trim().length()==0) { defaultAcctCombo.setSelectedIndex(0); } else { defaultAcctCombo.setSelectedItem(m_defaultAccountTree.get(defaultAccount)); } } COM: <s> helper method to set default accounts combo box value </s>
funcom_train/39268556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getDomainAttributeNames(String className) { if (className == null) {return null;} IXholon node = null; try { Class clazz = Class.forName(className); node = (IXholon)clazz.newInstance(); } catch (InstantiationException e) { getLogger().error(e); return null; } catch (IllegalAccessException e) { getLogger().error(e); return null; } catch (ClassNotFoundException e) { getLogger().error(e); return null; } return getDomainAttributeNames(node); } COM: <s> get the domain attribute names from the domain class </s>
funcom_train/10840890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean unmodified(HttpServletRequest request, long modifTime) { if (modifTime > 0) { long modTime = modifTime / 1000; // seconds long ims = request.getDateHeader(HEADER_IF_MODIFIED_SINCE) / 1000; return modTime <= ims; } // we have no modification time value, assume modified return false; } COM: <s> returns code true code if the request has a </s>
funcom_train/42068177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCountryPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ChunkDataListTypeLabeledText_country_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ChunkDataListTypeLabeledText_country_feature", "_UI_ChunkDataListTypeLabeledText_type"), WavPackage.Literals.CHUNK_DATA_LIST_TYPE_LABELED_TEXT__COUNTRY, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the country feature </s>
funcom_train/40764941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteEntry(URL feedUrl, Map<String, Object> entry) throws FeedServerClientException { try { String entryUrl = (String) entry.get(ContentUtil.ID); deleteEntry(new URL(entryUrl)); } catch (MalformedURLException e) { throw new FeedServerClientException("invalid base URL", e); } } COM: <s> deletes specified by id in supplied entry map </s>
funcom_train/10284390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLengthInTag(TagContent length) throws TagFormatException { // check format if (length.getTextContent() == null || !checkNumeric(length.getTextContent())) { throw new TagFormatException(); } (new TextFrameEncoding(id3v2, "TLEN", length, use_compression)).write(); } COM: <s> set length of audiofile in milliseconds read from text content </s>
funcom_train/49426465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer getCharacterAdvance(final char currentCharacter, final char nextCharacter, final float size) { CharacterInfo currentCharacterInfo = font.getChar(currentCharacter); if (currentCharacterInfo == null) { return null; } else { return new Integer( (int) (currentCharacterInfo.getXadvance() * size + getKerning(currentCharacterInfo, nextCharacter))); } } COM: <s> return the width of the given character including kerning information </s>
funcom_train/31685154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean merge(AbstractPropertyInstance property) { boolean bReturn = false; if (m_property_ptr.equals(property.m_property_ptr)) { int nNumberValues = property.getValues().size(); for (int i = 0; i < nNumberValues; i++) { if (m_values.contains(property.getValue(i)) == false) { m_values.add(property.getValue(i)); bReturn = true; } } } return bReturn; } COM: <s> merge the given property instance with this property instance </s>
funcom_train/12163641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDoFragmentLinkSimple() throws Exception { FraglinkAttributes attrs = new FraglinkAttributes(); attrs.setHref("href"); final DOMOutputBuffer outputBuffer = new DOMOutputBuffer(); outputBuffer.writeText("text"); attrs.setLinkText(outputBuffer); checkDoFragmentLink(attrs, Orientation.None); } COM: <s> test the do fragment link method with a simple attributes </s>
funcom_train/27829246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { String inst = ""; double current = this.getPrice(inst); if (_previous > 0) { float cash = this.getCash(); float quantity = this.getPosition(inst); if (_previous > current) { if (quantity > 0) { this.addQuantityOrder(inst, -quantity); } } else if (_previous < current) { if (cash > 0) { addAmountOrder(inst, cash); } } } _previous = current; } COM: <s> fully invests the entire amount of cash </s>
funcom_train/34339606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getArt2() { if (art2 == null) {//GEN-END:|33-getter|0|33-preInit // write pre-init user code here art2 = new TextField("Art2", null, 5, TextField.NUMERIC);//GEN-LINE:|33-getter|1|33-postInit // write post-init user code here }//GEN-BEGIN:|33-getter|2| return art2; } COM: <s> returns an initiliazed instance of art2 component </s>
funcom_train/31931122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addOutcomes(StringBuffer buffer) { buffer.append(LINE); addOutcomes(buffer, "SUCCESSES", m_collector.successes()); addOutcomes(buffer, "FAILURES", m_collector.failures()); addOutcomes(buffer, "ERRORS", m_collector.errors()); } COM: <s> add details for each of the different outcome types to the given </s>
funcom_train/20883617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void dumpASCII(Utterance utterance) { if (waveDumpFile != null) { LPCResult lpcResult = (LPCResult) utterance.getObject("target_lpcres"); try { if (waveDumpFile.equals("-")) { lpcResult.dumpASCII(); } else { lpcResult.dumpASCII(waveDumpFile); } } catch (IOException ioe) { error("Can't dump file to " + waveDumpFile, ioe); } } } COM: <s> dumps the wave for the given utterance </s>
funcom_train/20307113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InfGraph getPreload() { synchronized (OWLFBRuleReasoner.class) { if (staticPreload == null) { boolean prior = JenaParameters.enableFilteringOfHiddenInfNodes; try { JenaParameters.enableFilteringOfHiddenInfNodes = true; staticPreload = new FBRuleInfGraph(this, rules, null); staticPreload.prepare(); } finally { JenaParameters.enableFilteringOfHiddenInfNodes = prior; } } return staticPreload; } } COM: <s> get the single static precomputed rule closure </s>
funcom_train/45911123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFleet(Fleet fleet) { for (Player p : players.values()) { p.fleets.remove(fleet); // if someone targeted this fleet for (Fleet f : p.fleets.keySet()) { if (f.owner == p) { if (f.targetFleet == fleet) { // change it to move to its last known location f.targetFleet = null; f.mode = FleetMode.MOVE; f.waypoints.clear(); f.waypoints.add(new Point2D.Float(fleet.x, fleet.y)); } } } } } COM: <s> remove the specified fleet from existence of all players knowledge </s>
funcom_train/7640174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onSdkTargetModified() { IAndroidTarget target = getSdkTarget(); if (target != null && !mMinSdkVersionModifiedByUser) { mInternalMinSdkVersionUpdate = true; mMinSdkVersionField.setText(Integer.toString(target.getApiVersionNumber())); mInternalMinSdkVersionUpdate = false; } } COM: <s> called when an sdk target is modified </s>
funcom_train/39108234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkOperationPermitted(String username, Inst inst) throws BadLoginDetailsException { // DUMMY_USERNAME cannot login if (username.equals(Global.DUMMY_USERNAME)) { loginFailure( username, inst, getUNKNOWN_USERNAME_LOG_MSG()); throw new BadLoginDetailsException(getUNKNOWN_USERNAME_USER_MSG()); } else if (username.equals(ADMIN_USERNAME)) { if (!IPAddrIsPermitted()) { loginFailure( username, inst, getIP_ADDRESS_NOT_PERMITTED_LOG_MSG()); throw new BadLoginDetailsException( getIP_ADDRESS_NOT_PERMITTED_USER_MSG()); } } } COM: <s> cannot do anything with dummy username if the </s>
funcom_train/42653851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(String[] cpat, String sentinel) { StringBuilder sb = new StringBuilder(); sb.append('{'); toString(cpat, head, sb, sentinel); if (sb.length() == 1) { sb.append(" "); } sb.setCharAt(sb.length() - 1, '}'); return sb.toString(); } COM: <s> a to string method with names supplied by the store </s>
funcom_train/8078681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DoubleVector subsetEstimate( DoubleVector x ) { DoubleVector h = h( x ); DoubleVector copy = x.copy(); for( int i = 0; i < x.size(); i++ ) if( h.get(i) <= 0 ) copy.set(i, 0); trim( copy ); return copy; } COM: <s> returns the estimate of optimal subset selection </s>
funcom_train/25065183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSizerPanel(DockPanel panel, boolean createSizerPanel) { if (createSizerPanel) { HorizontalPanel sizerPanel = createSizerLinkPanel(); panel.add(sizerPanel, DockPanel.CENTER); panel.setCellHorizontalAlignment(sizerPanel, HorizontalPanel.ALIGN_CENTER); panel.setCellVerticalAlignment(sizerPanel, VerticalPanel.ALIGN_MIDDLE); } } COM: <s> creates and adds the sizer panel to the paging controls panel e </s>
funcom_train/23032249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean evaluateConditions(RuleContext context) throws EvalError { int i = 1; // Lazily evaluate conditions, this is, stop as soon as one // evaluates to "false" for (Condition condition : conditions) { // As soon as one evaluates to "false" the whole evaluation is // "false" if (condition.evaluate(context) == false) { return false; } i++; } // At this point all conditions evaluated to "true" return true; } COM: <s> evaluate conditions from the internal list of conditions </s>
funcom_train/3319298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Hashtable getProperties() { Hashtable toReturn = new Hashtable(); toReturn.put("x", new Double(x)); toReturn.put("y", new Double(y)); toReturn.put("height", new Double(height)); toReturn.put("width", new Double(width)); toReturn.put("type", "TextNote"); return toReturn; } COM: <s> this method returns the properties of the text note </s>
funcom_train/4112087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOk5Band() { if (ok5Band == null) {//GEN-END:|101-getter|0|101-preInit // write pre-init user code here ok5Band = new Command("Ok", Command.OK, 0);//GEN-LINE:|101-getter|1|101-postInit // write post-init user code here }//GEN-BEGIN:|101-getter|2| return ok5Band; } COM: <s> returns an initiliazed instance of ok5 band component </s>
funcom_train/24378559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void callGetMQSimpleChoice(SimpleChoiceType simpleChoiceType) { MQMain.logger.debug("MQModel: callGetMQSimpleChoice"); String simpleChoiceXML; simpleChoiceXML = mathqurateObjectFactory.getTypeAsXML(simpleChoiceType); MQSimpleChoice simpleChoiceHelper = new MQSimpleChoice(simpleChoiceType, simpleChoiceXML); firePropertyChange(DefaultController.GET_MQSIMPLECHOICE_PROPERTY, "", simpleChoiceHelper); } COM: <s> calls the get mq simple choice </s>
funcom_train/5257942
/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(BmmVisualIDRegistry .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/14227728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void dial() { java.io.PrintStream out = System.out; try { // make a series of calls to ensure the call manager disposes of them properly for(int i = 0; i < 100; i++) { processCall(provider, address, terminals, toAddress); } } catch (Exception e) { out.println(" failure: " + e); e.printStackTrace(); } } COM: <s> dial and hang up a call </s>
funcom_train/21995182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invoke() throws RpcException { try { authorize(Scanner.INVOKE); getBus().invoke(); } catch (JRecSecurityException e) { throw new RpcException("security-problem invoking scanner", e); } catch (BusException e) { throw new RpcException("bus-problem invoking scanner", e); } } COM: <s> invoke the scanner if not already started </s>
funcom_train/12596653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Object arg0, Object arg1) { long id1 = ((TManDescriptor) arg0).getRankingID(); long id2 = ((TManDescriptor) arg1).getRankingID(); long dist1 = distance(baseId, id1); long dist2 = distance(baseId, id2); if (dist1 > dist2) { return 1; } else if (dist1 == dist2) { return 0; } return -1; } COM: <s> compare two nodes based on their epidemic id and binary tree criteria </s>
funcom_train/29372487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton_Apply() { if (jButton_Apply == null) { jButton_Apply = new JButton(); jButton_Apply.setBounds(new Rectangle(480, 420, 69, 17)); jButton_Apply.setText("Apply"); jButton_Apply.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ApplySettings(); } }); } return jButton_Apply; } COM: <s> this method initializes j button apply </s>
funcom_train/8076246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setNumOfNodes(Node r,int l) { Edge e; l++; m_levels[l]++; for (int noa = 0;(e = r.getChild(noa)) != null && r.getCVisible();noa++) { setNumOfNodes(e.getTarget(),l); } } COM: <s> this function finds the number of nodes on each level recursively </s>
funcom_train/35294633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToHistory() { HistoryListEntry e = new HistoryListEntry(); e.index = historyListModel.getSize() + 1; for (int i = 0; i < resultListModel.size(); i++) { e.values.add(resultListModel.get(i)); } historyListModel.addElement(e); resultHistory.setSelectedIndex(historyListModel.getSize() -1); } COM: <s> add current findings to the history </s>
funcom_train/7971968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Observable o, Object arg) { if (voting && override && !finishedVoting && currentDriver != null) { auditorium.announce(new OverrideCancelDenyEvent(mySerial, nonce)); override = false; currentDriver.getView().drawPage(pageBeforeOverride); } else throw new RuntimeException( "Received an override-cancel-deny event at the incorrect time"); } COM: <s> announce the deny message and return to the page the voter was </s>
funcom_train/21027559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long runCalibration() throws InputMismatchException, IOException { final int ITERATIONS = 10; long total = 0; for (int i=0; i<ITERATIONS; i++) { long calBegin = System.currentTimeMillis(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); gen.generateText(PARAGRAPH, LINE_WIDTH, TOTAL_CHARS, baos); baos.close(); long calEnd = System.currentTimeMillis(); total = calEnd - calBegin; } log.debug("Calibration: {} ms", total / ITERATIONS); return total / ITERATIONS; } COM: <s> run system calibration </s>
funcom_train/8806224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int lineOfOffset(final int offset) throws BadLocationException { /* * Works for any binary search tree. */ int remaining= offset; Node node= fRoot; int line= 0; while (true) { if (node == null) fail(offset); if (remaining < node.offset) { node= node.left; } else { remaining -= node.offset; line+= node.line; if (remaining < node.length || remaining == node.length && node.right == null) // last line return line; remaining -= node.length; line ++; node= node.right; } } } COM: <s> returns the line number for the given offset </s>
funcom_train/18319764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void validateInput() { String errorMessage = null; for (int i = 0; i < fields.length; i++) { if (fields[i].getValidator() != null) { errorMessage = fields[i].getValidator().isValid(texts[i].getText()); setErrorMessage(errorMessage); } } } COM: <s> validates the input </s>
funcom_train/25127494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLayerVisible() throws ServerRuntimeException { if (!active) { ServerRuntimeException ex = new ServerRuntimeException(ServerRuntimeException.ERROR, "Try to set visible an inactive Layer"); ex.setLayer(this); ex.setA661ExceptionType(ServerRuntimeException.ERR_UA_REQUEST_ABORTED); throw ex; } else { setVisible(true); } } COM: <s> set this layer as visible </s>
funcom_train/22210940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PortalAdmin fetchPortalAdmin() throws CreateException, NamingException, RemoteException { if(portalAdmin == null) { Context ctx = new InitialContext(); PortalAdminHome home = (PortalAdminHome)ctx.lookup(jndi_portalAdmin); portalAdmin = home.create(); } return portalAdmin; } COM: <s> obtains a reference to the portal admin object through portal admin home </s>
funcom_train/45623345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSatelliteAssembliesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ResolveManifestFilesType_satelliteAssemblies_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ResolveManifestFilesType_satelliteAssemblies_feature", "_UI_ResolveManifestFilesType_type"), MSBPackage.eINSTANCE.getResolveManifestFilesType_SatelliteAssemblies(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the satellite assemblies feature </s>
funcom_train/36557493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector3f getRightVector() { ModelInstance body = getModelInstance(); if (body != null) { if (bReverseHeading) return body.getTransform().getLocalMatrix().getLocalX().mult(-1.0f); else return body.getTransform().getLocalMatrix().getLocalX(); } return null; } COM: <s> override to return the characters right vector </s>
funcom_train/32055658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openLibrary(Object state) { if (state instanceof Vector) { Vector v = (Vector) state; ScrollablePanel p = addLibrary(v.get(0).toString()); for (int i = 1; i < v.size(); i++) { Object t = v.get(i); if (t instanceof Transferable) getTransferHandler().importData(this, (Transferable) t); } } } COM: <s> opens a library </s>
funcom_train/7626898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rule matchRule(String url) { Matcher matcher = mPattern.matcher(url); if (matcher.lookingAt()) { for (int i = 0; i < mRules.length; ++i) { if (matcher.group(i + 1) != null) { return mRules[i]; // Rules are sorted most specific first. } } } return Rule.DEFAULT; } COM: <s> match a string against every rule and find one that matches </s>
funcom_train/16608628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean match(String seq) { groups.clear(); splitTokens(seq); matchResult = root.matchAt(0); if (matchResult > threshold || root.getMatchLen() != tokens.length) { return false; } // if firstMatched = 0; lastMatched = tokens.length - 1; replaceResult = root.getReplacement(); return true; } // match COM: <s> check whether presented string matches with this regexp with all tokens </s>
funcom_train/6410908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateState(Point3 tail, Point3 head) { checkState(tail, head); _dummyVect.sub(head, tail); // dir double len = _dummyVect.length(); checkState(tail, _dummyVect, len); superUpdateState(tail, _dummyVect, len, head); } COM: <s> called by subclasses to initialize update the state of this object </s>
funcom_train/21955347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadAllSentFolders() { List profileList = Pooka.getPookaManager().getUserProfileManager().getUserProfileList(); for (int i = 0; i < profileList.size(); i++) { ((UserProfile)profileList.get(i)).loadSentFolder(); } } COM: <s> this loads all the sent folders on the user profile object </s>
funcom_train/4519214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RButton getRButton3118() { if (RButton3118 == null) { RButton3118 = new RButton(0); RButton3118.setText("RadioCell"); RButton3118.setBounds(new Rectangle(300, 330, 120, 30)); RButton3118.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { (new TestRadioCell()).setVisible(true); } }); } return RButton3118; } COM: <s> this method initializes rbutton3118 </s>
funcom_train/37784425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FormKey runCheckPolicy() throws ApplicationExceptions, FrameworkException { if (m_checkPolicyComponent == null || !m_checkPolicyComponent.isActive()) { m_checkPolicyComponent = (CheckPolicyComponent) run("Jaffa.Admin.CheckPolicy"); m_checkPolicyComponent.setReturnToFormKey(getRolesEditorFormKey()); } return m_checkPolicyComponent.display(); } COM: <s> this will run the check policy component </s>
funcom_train/4856008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getArea(int location) { if (this.history.isEmpty() || location < 0) { return 1.0f; } if (location > this.history.size() - 1) { location = this.history.size() - 1; } return this.history.get(location).area; } COM: <s> this method returns the free area at a particular location </s>
funcom_train/5154241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cacheSetPdf(int n, int nt, long r, long rmin, int out, Apfloat pdf) { if( canBeCached(n, nt) ) { String key = cacheKey(n, nt, r, rmin, out); cachePdf.put(key, pdf); } } COM: <s> set a result in cache </s>
funcom_train/49078602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Interest create(){ String ID = null; try { ID = new GUID().generate(); } catch (Exception ex) { ex.printStackTrace(); } Interest interest = new Interest(); interest.setInterestGUID(ID); //Cache c = Cache.getInstance(); //c.getInstance().put(interest,ID); interest.setDirty(true); return interest; } COM: <s> creates a interest object that is empty except for an id guid </s>
funcom_train/45623350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBaseManifestPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GenerateTrustInfoType_baseManifest_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GenerateTrustInfoType_baseManifest_feature", "_UI_GenerateTrustInfoType_type"), MSBPackage.eINSTANCE.getGenerateTrustInfoType_BaseManifest(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the base manifest feature </s>
funcom_train/14375435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void perform() { if (this.mainFrame!=null) { HGBaseMenu m = this.mainFrame.getMenu(); if (m!=null) { JComponent tool = m.getToolbarItem(this.menuId); if (tool!=null) performMenuItem(tool); JComponent menu = m.getMenuItem(this.menuId); if (menu!=null) performMenuItem(menu); } } } COM: <s> performs the action </s>
funcom_train/38868387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testParseDay() { // Too low String grpdata="AA20000820300000800 "; sao.setGrpData(grpdata); Assert.assertEquals(1, sao.parseGrp()); // Too high grpdata="AA20000820332000800 "; sao.setGrpData(grpdata); Assert.assertEquals(1, sao.parseGrp()); } COM: <s> test parse grp for sao group 3 day exceptions </s>
funcom_train/18899933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { ConstraintIs constraint = new ConstraintIs( (ConstraintElement)element[0].clone(), (ConstraintElement)element[2].clone(), (ConstraintElement)element[3].clone() ); if (!element[1].equals(KOWARI_IS)) { constraint.element[1] = (ConstraintElement)element[1].clone(); } constraint.rows = rows; return constraint; } COM: <s> clones an instance of a new constraint is </s>