__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/46578388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Date calculateStartDate(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.set(Calendar.DAY_OF_MONTH, 1); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar.getTime(); } COM: <s> calculates the start date of the period a given date is in </s>
funcom_train/27758832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fetchSettings() { int cps = settings.getMaxIncomingCps(); if (cps == 0) { cpstext.setText(""); } else { cpstext.setText("" + cps); } porttext.setText("" + settings.getLocalTextPort()); buffertext.setText("" + settings.getTextBufferTime()); redtext.setText("" + settings.getTextRedundantGenerations()); } COM: <s> fetches the settings from the main program </s>
funcom_train/13722085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getFileMenu() { if (fileMenu == null) { fileMenu = new JMenu(); fileMenu.setText(Messages.getString("Main.MenuFile")); //$NON-NLS-1$ fileMenu.add(getNewMenuItem()); fileMenu.add(getOpenMenuItem()); fileMenu.add(getSaveMenuItem()); fileMenu.add(getSaveAsMenuItem()); fileMenu.add(getPrintMenuItem()); fileMenu.add(getExitMenuItem()); } return fileMenu; } COM: <s> this method initializes j menu </s>
funcom_train/22901798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMalformedEntryWithNoZeroArgsConstructor() { MalformedNoZeroArgsConstructorTestEntry entry = new MalformedNoZeroArgsConstructorTestEntry(new Integer(10)); try { new EntrySerializer().serialize(entry); fail("Each Entry class must provide a public no-arg constructor."); } catch (IllegalArgumentException e) { assertTrue(true); } } COM: <s> tests each entry class must provide a public no arg constructor </s>
funcom_train/11729038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRestoreInvalidVersion() throws RepositoryException { Version vNode2 = versionableNode2.checkin(); try { versionableNode.restore(vNode2, true); fail("VersionException expected on Node.restore(Version, boolean) if the specified version is not part of this node's version history."); } catch (VersionException e) { // ok } } COM: <s> version exception expected on node </s>
funcom_train/13815286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFractionDigits( int newVal ) { double value = getValue(); fractionDigits = newVal; int newMult = 1; for ( int n = 0; n < fractionDigits ; n++, newMult *= 10 ); sliderMult = newMult; setupSliderBoundaries(); setupNumberFormat(); setupLabels(); valueSlider.setValue( getSliderPos( value ) ); } COM: <s> set the number of decimals used whend representing rounding the value </s>
funcom_train/21888410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.add(getJScrollPane(), java.awt.BorderLayout.CENTER); jContentPane.add(getJPanel(), java.awt.BorderLayout.SOUTH); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/42389089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean castSpell(final int spell) { if (getCurrentTab() != Constants.TAB_MAGIC) { openTab(Constants.TAB_MAGIC); for (int i = 0; i < 100; i++) { // waits for up to 2 secs wait(20); if (getCurrentTab() == Constants.TAB_MAGIC) { break; } } wait(random(150, 250)); } if (getCurrentTab() != Constants.TAB_MAGIC) { return false; } return atInterface(Constants.INTERFACE_TAB_MAGIC, spell); } COM: <s> clicks a specified spell opens magic tab if not open and uses interface </s>
funcom_train/35313015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void invalidate(boolean first) { if (!isValid()) { if (canBeValid && !first) { canBeValid = false; } return; } isValid = false; canBeValid = first; if (children != null) { for (ElementInfo child : children) { child.invalidate(false); } children = null; } } COM: <s> invalidates the element info </s>
funcom_train/13865349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReadOnly(boolean readOnly) { DOM.setElementPropertyBoolean(getElement(), "readOnly", readOnly); String readOnlyStyle = "readonly"; if (readOnly) { addStyleDependentName(readOnlyStyle); } else { removeStyleDependentName(readOnlyStyle); } } COM: <s> turns read only mode on or off </s>
funcom_train/5346079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { //Order matters, as calculateFractionalUptime() depends on the //LAST_SHUTDOWN_TIME property. ApplicationSettings.FRACTIONAL_UPTIME.setValue(calculateFractionalUptime()); ApplicationSettings.LAST_SHUTDOWN_TIME.setValue(now()); int sessions = ApplicationSettings.SESSIONS.getValue(); ApplicationSettings.SESSIONS.setValue( sessions + 1 ); } COM: <s> notifies this that lime wire is shutting down updating permanent </s>
funcom_train/27824468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PropertyConceptsTable createPropertyConceptsTable(boolean domain) { PropertyConceptsTable concepts=new PropertyConceptsTable(m_oimodelerViewable,domain); new JTablePopupMenuManipulator(concepts,m_oimodelerViewable.getModule().getAppDriver().createPopupMenu("popup.oimodeler.selection")); new DoubleClickSelectionFocuser(m_oimodelerViewable,concepts); return concepts; } COM: <s> creates a code property concepts table code for either domain or range concepts </s>
funcom_train/5601770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processOptionToken( String token, boolean stopAtNonOption ) { if( this.options.hasOption( token ) ) { currentOption = this.options.getOption( token ); tokens.add( token ); } else { if( stopAtNonOption ) { eatTheRest = true; } else { tokens.add(token); } } } COM: <s> p if an </s>
funcom_train/51787742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createSubsetsAnnotations() { String source = "subsets"; addAnnotation (getRole_RoleActivityModel(), source, new String[] { }); addAnnotation (getRole_FlowElement(), source, new String[] { }); addAnnotation (getRoleActivityModel_Interaction(), source, new String[] { }); addAnnotation (getRoleActivityModel_Role(), source, new String[] { }); addAnnotation (getFlowElement_OwningRole(), source, new String[] { }); } COM: <s> initializes the annotations for b subsets b </s>
funcom_train/51783631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRunUndoRedoSource() { mockUmlConnection.expects(atLeastOnce()).method("getModelElement") .will(returnValue(mockRelation.proxy())); setRunSourceExpectations(); sourceCommand.run(); setUndoSourceExpectations(); sourceCommand.undo(); setRunSourceExpectations(); sourceCommand.redo(); } COM: <s> tests run undo redo on the source </s>
funcom_train/7468895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWritable() throws Exception { Summary summary = new Summary(); summary.add(new Fragment("fragment1.1")); summary.add(new Ellipsis()); summary.add(new Highlight("highlight1")); summary.add(new Fragment("fragment1.2")); WritableTestUtils.testWritable(summary); } COM: <s> test of code writable code implementation </s>
funcom_train/14463128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void trimToSize() { modCount++; int oldCapacity = elementData.length; if (size < oldCapacity) { Object oldData[] = elementData; elementData = new Object[size]; System.arraycopy(oldData, 0, elementData, 0, size); } } COM: <s> trims the capacity of this tt array list tt instance to be the </s>
funcom_train/16371203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void commitTransaction(final String txId) { final FileResourceManager frm = getFRM(); try { frm.prepareTransaction(txId); frm.commitTransaction(txId); } catch (final ResourceManagerException e) { rollback(txId, e); throw new TaskModelPersistenceException(e); } } COM: <s> commit the changes to the current working directory atomically </s>
funcom_train/44297319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate(final TemporalExtent object) { if (object == null) { return; } if (object instanceof SpatialTemporalExtent) { for (final GeographicExtent e : toArray(GeographicExtent.class, ((SpatialTemporalExtent) object).getSpatialExtent())) { dispatch(e); } } } COM: <s> validates the temporal extent </s>
funcom_train/2762419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String convert2StringKey(Object key) { if (key == null) { return "null"; } String sKey = key.toString(); if (sKey.indexOf('.') != -1) { return "[" + sKey + "]"; } if (sKey.indexOf('[') != -1) { return "[" + sKey + "]"; } return sKey; } COM: <s> converts the supplied key to a string </s>
funcom_train/9043087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SparseVector getColum(int i) { SparseVector s = new SparseVector(); for (int row = 0; row < size(); row++) { double v = get(row, i); if (v != 0.) { s.put(row, v); } } return s; } COM: <s> get a column of the sparse matrix expensive </s>
funcom_train/23855094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteComment() { /* * Hibernate does not accept null properties if not-null=true even * for deletion of objects */ comment.setModifiedBy(profile); DBExceptionHandler.callDBManager(db, new VoidUnaryDBFunction<Comment>(comment) { @Override public void call(Comment arg) throws DatabaseException { db.delete(comment); comment = null; } }); } COM: <s> deletes the this </s>
funcom_train/4904859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean connectRemoteHost(int tries) throws IOException { for (int i = 0; i < tries && !sshSession.isConnected(); i++) { try { sshSession.connect(C_SFTP_CONNECT_TIMEOUT); } catch (JSchException e) { throw new IOException("Failed to connect to " + getHostname() + " on port " + getPort() + ": " + e.getMessage()); } } return sshSession.isConnected(); } COM: <s> doesnt check that ssh session exists </s>
funcom_train/29928602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawAll(Graphics g) { int width = estimateWidth(); int height = estimateHeight(); if ((width == 0) || (height == 0)) { return; } double scale = 1.0;// full size, of course... drawBoxes(g, 0, 0, scale); if (drawVertical()) { drawNumbers(g, (int) (getXscale() * scale), 0, scale); } else { drawNumbers(g, 0, 0, scale); } } COM: <s> does the dirty work by calling methods in the superclass </s>
funcom_train/3417467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printStackTrace(PrintStream s) { synchronized (s) { s.println(this); StackTraceElement[] trace = getOurStackTrace(); for (int i=0; i < trace.length; i++) s.println("\tat " + trace[i]); Throwable ourCause = getCause(); if (ourCause != null) ourCause.printStackTraceAsCause(s, trace); } } COM: <s> prints this throwable and its backtrace to the specified print stream </s>
funcom_train/14616231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TemplateIteratorModel templateIterator() throws TemplateModelException { try { Features<T> f = Wrapper.getObjectFeatures( object ); return new EnumIterator<T>( f.getEnumValues() ); } catch (IntrospectionException e) { throw new TemplateModelException( e.getMessage(), e ); } } COM: <s> retrieves an iterator to iterate over the elements of the enum </s>
funcom_train/24087040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAsURI() { if (scheme == null) { return null; } String uri = scheme + "://"; if (path != null) { uri = uri + path; // no metric without a measurement if (fragment != null) { uri = uri + "#" + fragment; } } return uri; } COM: <s> returns the string representation of the uri </s>
funcom_train/20035574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSplitterSize() { if (position.equals(Position.VERTICAL)) { getElement().getStyle().setWidth(100, Unit.PCT); getElement().getStyle().setHeight(size, Unit.PX); } else { getElement().getStyle().setWidth(size, Unit.PX); getElement().getStyle().setHeight(100, Unit.PCT); } } COM: <s> sets the splitter size </s>
funcom_train/29418761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void highlight(Pos e) { if (out!=null && e!=Pos.UNKNOWN) { out.printf("%c%s%c", FLUSH, "POS: "+e.x+" "+e.y+" "+e.x2+" "+e.y2+" "+e.filename, CLICK); out.flush(); } } COM: <s> tell the gui to highlight the text corresponding to the given pos object </s>
funcom_train/41575891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getSettingsCommand() { if (settingsCommand == null) {//GEN-END:|64-getter|0|64-preInit // write pre-init user code here settingsCommand = new Command("Settings", Command.SCREEN, -2);//GEN-LINE:|64-getter|1|64-postInit // write post-init user code here }//GEN-BEGIN:|64-getter|2| return settingsCommand; } COM: <s> returns an initiliazed instance of settings command component </s>
funcom_train/40874034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { file = null; schemaRoot = null; graphicalRoot = null; domainList = new HashMap<String, Domain>(); classList = new HashMap<String, MDClass>(); roleList = new HashMap<String, Role>(); inheritanceList = new HashMap<Tuple, Inheritance>(); maybelinkList = new HashMap<Tuple, MaybeLink>(); attributes = new HashMap<String, Attribute>(); roleRedefitions = new HashMap<String, String>(); } COM: <s> init all composants of the class </s>
funcom_train/44136310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadImage(String img) { Image pic = Toolkit.getDefaultToolkit().getImage(img); MediaTracker trk = new MediaTracker(this); try { trk.addImage(pic, 0); trk.waitForAll(); } catch(Exception e) { } loadImage(pic); } COM: <s> to load an image in panel and edit it </s>
funcom_train/17675732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPersistableOnlyUsingExternalization(Class type, Map classMap) { boolean et = externalizedTypes.contains(type); if (et) externalizedTypes.remove(type); boolean ans = !isPersistentType(type, classMap); if (et) externalizedTypes.add(type); return ans; } COM: <s> is a field of a type that can only be persisted through externalization </s>
funcom_train/33556139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String componentToString(Component component) { final StringBuffer sb = new StringBuffer(); sb.append(ObjectUtils.identityToString(component)); if (component != null) { sb.append(": ").append((component.getName() != null) ? component.getName() : component.toString()); } return sb.toString(); } COM: <s> returns a legible representation of a given component </s>
funcom_train/44102594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { //LOGGER.info("caller id: "+callerId); try { agiServer.shutdown(); } catch (Exception e) { throw new SwitchboardException("Unable to shutdown AGI server"); } try { managerConnection.logoff(); } catch (Exception e) { throw new SwitchboardException("Unable to logoff from Manager",e); } LOGGER.info("Stopped"); } COM: <s> call off the horses </s>
funcom_train/39015259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get(String key){ StringTokenizer st = new StringTokenizer(key, KEYS_SEPARATOR); if(!st.hasMoreTokens()){ logger.warning("Key ignored: "+key); return null; } String tok = st.nextToken(); Object o = settings.get(tok); if(o instanceof Settings){ if(st.hasMoreTokens()){ return ((Settings)o).get(key.substring(tok.length()+1)); }else{ return o; } }else{ if(st.hasMoreTokens()){ logger.warning("Unable to locate hierarchical structure of "+key); return null; }else{ return o; } } } COM: <s> retrieve the object associated with the key </s>
funcom_train/46825496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean unmakeMove (Vector theMove) { // We have to un-make the move from the end forward toward the front ListIterator iter = theMove.listIterator(theMove.size()); while (iter.hasPrevious()) { if (unmakeStep((CamelotStep) iter.previous()) == false) { // We've hit an illegal step return (false); } } return (true); } COM: <s> this routine will un make the given move on the board </s>
funcom_train/50586898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTestSeries generateStandardSeries() { JTestSeries testSeries = new JTestSeries(); JScenario scenario = new JScenario(); Iterator sequences = PersistenceManager .getDefaultInstance() .getRunnableTestSequences() .iterator(); while (sequences.hasNext()) { scenario.addTestSuite( generateTestSequence((TestSequence) sequences.next(), null)); } scenario.setName("StandardRunnerScenario"); testSeries.addTestSuite(scenario); testSeries.setMyPlayer(player); testSeries.setName("StandardRunnerSeries"); return testSeries; } COM: <s> generates a standard jtest series </s>
funcom_train/2577169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() throws CloneNotSupportedException { CategoryAxis clone = (CategoryAxis) super.clone(); clone.tickLabelFontMap = new HashMap(this.tickLabelFontMap); clone.tickLabelPaintMap = new HashMap(this.tickLabelPaintMap); clone.categoryLabelToolTips = new HashMap(this.categoryLabelToolTips); return clone; } COM: <s> creates a clone of the axis </s>
funcom_train/17009498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyFileToFile(File sourceFile, File destFile) throws Exception { InputStream in = new FileInputStream(sourceFile); OutputStream out = new FileOutputStream(destFile); byte[] buf = new byte[1024 * 16]; int length; while ((length = in.read(buf)) > 0) { out.write(buf, 0, length); } in.close(); out.flush(); out.close(); } COM: <s> copy a file to another </s>
funcom_train/19411690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printList(Collection<?> list) { if (writer == null) { return; } writer.printTag(HTMLWriter.UL); for (Iterator<?> i = list.iterator(); i.hasNext(); ) { writer.printEnclosed(i.next().toString(), HTMLWriter.LI); } writer.printEndTag(HTMLWriter.UL); } COM: <s> prints an unordered list of the list items </s>
funcom_train/34870818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Graph convertiXmlInGraph(String xml){ Graph gra=new Graph(); try{ StringBuffer xmlStr = new StringBuffer(xml); JAXBContext jaxbcontext=JAXBContext.newInstance("net.battlehorse.XGrapher.gen.model"); Unmarshaller unMarshaller=jaxbcontext.createUnmarshaller(); JAXBElement<Graph> g= (JAXBElement<Graph>)unMarshaller.unmarshal( new StreamSource( new StringReader( xmlStr.toString() ) ) ); gra=g.getValue(); }catch(Exception e){ System.out.println(e); } return gra; } COM: <s> it converts from xml to object graph </s>
funcom_train/22470876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addChild(Keyword keyword) { if (keyword == null) { return false; // No rubbish. } if (!this.equals(keyword._parent)) { return false; } if (_children == null) { _children = new TreeSet<Keyword>(); } return _children.add(keyword); } COM: <s> adds a keyword as a child of this keyword </s>
funcom_train/51187691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getSendButton() { if (sendButton == null) { sendButton = new JButton(); sendButton.setText("Send"); sendButton.setMnemonic(KeyEvent.VK_UNDEFINED); sendButton.setForeground(new Color(54, 129, 231)); sendButton.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent arg0) { sendMessage(); } }); } return sendButton; } COM: <s> this method initializes send button </s>
funcom_train/36984075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doStop() { if (runtime != null) runtime.stop(); if (watcher != null) watcher.stop(); message(EMPTY); // the buttons are sometimes still null during the constructor // is this still true? are people still hitting this error? /*if (buttons != null)*/ buttons.clear(); running = false; } COM: <s> stop the applet but dont kill its window </s>
funcom_train/17279223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements r) { updateInsets(); rowIterator.updateAdjustments(); //System.out.println("call to calculateTiledRequirements from SHTMLTableView.calculateMajorAxisRequirements"); r = calculateTiledRequirements(rowIterator, r); r.maximum = r.preferred; return r; } COM: <s> calculate the requirements for the major axis </s>
funcom_train/20932256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintComponent(Graphics graphics) { Graphics g = graphics.create(); g.setColor(Color.BLACK); g.fillRect(0, 0, LayoutVariables.WINDOW_WIDTH, LayoutVariables.WINDOW_HEIGHT); for(int i=0; i<LayoutVariables.WINDOW_WIDTH; i++){ } g.dispose(); } COM: <s> paints the background of the component </s>
funcom_train/32741756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String resetValueFormat(RecordFormatter rf, int fieldIndex, String s, Dictionary<String, Object> formatParams) { if (s == null) { s = getDefaultValueFormat(rf, fieldIndex, formatParams); } if ("".equals(s)) { return getEmptyValueFormat(rf, fieldIndex, formatParams); } return s; } COM: <s> chooses between the real formatted value and possible replacements default empty </s>
funcom_train/1560245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isMultiVarStatsPossible(ArrayList<CellRange> rangeList){ if(rangeList == null || rangeList.size() == 0) return false; int columnCount = 0; for(CellRange cr : rangeList){ if(!cr.isColumn()) return false; if(!containsMinimumGeoNumeric(cr,3)) return false; columnCount += cr.getMaxColumn() - cr.getMinColumn() + 1; } return columnCount >= 2; } COM: <s> returns true if range list contains two or more columns and each column </s>
funcom_train/36955535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createTypeNameControls(Composite composite, int nColumns) { fTypeNameDialogField.doFillIntoGrid(composite, nColumns - 1); DialogField.createEmptySpace(composite); Text text= fTypeNameDialogField.getTextControl(null); LayoutUtil.setWidthHint(text, getMaxFieldWidth()); // FIXME Uncomment // TextFieldNavigationHandler.install(text); } COM: <s> creates the controls for the type name field </s>
funcom_train/44489634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getLineContents(final CachingDocument doc, final int line) { final ILineManager manager = doc.getLineManager(); final int start = manager.getOffsetOfLine(line); final int end = manager.getLineEnd(line); return doc.getDocumentContents().substring(start, end); } COM: <s> returns the contents of the specified line in the given document </s>
funcom_train/42977963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ExportedResource_type_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ExportedResource_type_feature", "_UI_ExportedResource_type"), UnitPackage.Literals.EXPORTED_RESOURCE__TYPE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the type feature </s>
funcom_train/37048590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean mouseNotOver(OMGraphic omg) { if (DEBUG) { Debug.output("mouseNotOver(" + omg.getClass().getName() + ")"); } if (grp != null) { grp.unhighlight(omg); } handleToolTip(null); handleInfoLine(null); return false; } COM: <s> notification that the mouse has moved off of an omgraphic </s>
funcom_train/181145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addColumnConst(String columnName, Object value, int defaultWidth, TableCellRenderer renderer) { String property = "_CONST_" + constantsCounter++; if (constants == null) { constants = new HashMap(); } constants.put(property, value); addColumnEvaluated(columnName, property, defaultWidth, renderer, this); } COM: <s> add a column where all rows have the same constant value </s>
funcom_train/50845933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Connection newConnection() throws Exception { final String driver = getDriver(); // not actually needed under JDBC4, as long as jar has META-INF service entry Class.forName(driver); final String url = getUrl(); final String user = getUser(); final String password = getPassword(); return connectionFactory().newConnection(driver, url, user, password); } COM: <s> with the driver url user and password </s>
funcom_train/40866545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Properties toProperties() { Properties props = new Properties(); addAdditionalProperties(props); props.setProperty("keysDirectory", keysDirectory); props.setProperty("merchantID", merchantId); props.setProperty("targetAPIVersion", targetAPIVersion); props.setProperty("sendToProduction", String.valueOf(sendToProduction)); props.setProperty("serverID", serverId); return props; } COM: <s> returns the field values of this configuration as properties </s>
funcom_train/50034170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean createInformation(String author, String[] recipients, String subject, String message, String projectId) throws HibouTechnicalException { Transaction tr = null; Session session = null; try { session = HibernateUtil.openSession(); tr = session.beginTransaction(); ProjectManager projectManager = new ProjectManager(); for(String recipient:recipients) { Date postdate = new Date(); Project project = projectManager.getProject(projectId); Information info = new Information(postdate,author,recipient,subject,message,project); session.save(info); } tr.commit(); } catch(Exception e) { if(tr != null) { tr.rollback(); } throw new HibouTechnicalException(e); } finally { session.close(); } return true; } COM: <s> create a new information for the team of a project </s>
funcom_train/26485121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SectionArea getSectionArea(int area) { switch (area) { case SectionArea.REPORT_HEADER: return reportHeaders; case SectionArea.REPORT_FOOTER: return reportFooters; case SectionArea.PAGE_HEADER: return pageHeaders; case SectionArea.PAGE_FOOTER: return pageFooters; case SectionArea.DETAIL: return details; default: return null; } } COM: <s> returns the section area corresponding to var area var but </s>
funcom_train/32061701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructor() { System.out.println("testConstructor"); Game game = new Game(1, 1); Player colonyowner = new Player(true, game); Starsystem starsystem = new Starsystem("sys1", 20); Colony instance = new Colony(starsystem, 0, -1, colonyowner); assertEquals(starsystem, instance.getSystem()); } COM: <s> test of constructor of class colony </s>
funcom_train/1996851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadFunctions() { JavaScriptFunction aFunction = new JavaScriptFunction(); addFunction(new JavaScriptFunction(integerFunctionSource())); addFunction(new JavaScriptFunction(decimalFunctionSource())); addFunction(new JavaScriptFunction(floatFunctionSource())); addFunction(new JavaScriptFunction(isIntegerSource())); addFunction(new JavaScriptFunction(isDecimalNumberSource())); addFunction(new JavaScriptFunction(isFloatSource())); return; } COM: <s> loads the java script functions used by this object </s>
funcom_train/18654087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSubcontextCreationOfDuplicates() throws NamingException { // Try to create duplicate subcontext try { initialCtx.createSubcontext("java:comp"); fail(); } catch (NameAlreadyBoundException ex) {} // Try to create duplicate subcontext using multi-component name try { compCtx.createSubcontext("env/ejb"); fail(); } catch (NameAlreadyBoundException ex) {} } COM: <s> tests inability to create duplicate subcontexts </s>
funcom_train/18345235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeObject( ObjectOutputStream out ) throws IOException { // Call the default write object method. out.defaultWriteObject(); // Write out the number of tables we are going to write out. int size = tdb.size(); out.writeInt( size ); // Now loop over all the tables and write out each one. for (int i=0; i < size; ++i) { FloatTable theTable = (FloatTable)tdb.get(i); out.writeObject( theTable ); } } COM: <s> during serialization this will write out the serialized </s>
funcom_train/9237036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delPlugin(final String filename) { if (!knownPlugins.containsKey(filename.toLowerCase())) { return false; } PluginInfo pluginInfo = getPluginInfo(filename); try { pluginInfo.unloadPlugin(); } catch (Exception e) { Logger.userError(ErrorLevel.MEDIUM, e.getMessage(), e); } knownPlugins.remove(filename.toLowerCase()); pluginInfo = null; return true; } COM: <s> remove a plugin </s>
funcom_train/38861867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void keyPressed(int keyCode) { if(keyCode == 52) { addCommand(LEFT_COMMAND); l.commandAction(LEFT_COMMAND,display.getCurrent()); } else if(keyCode == 54) { addCommand(RIGHT_COMMAND); l.commandAction(RIGHT_COMMAND,display.getCurrent()); } } COM: <s> called when a key is pressed </s>
funcom_train/44869629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTable getVelTable() { if (velTable == null) { TableModel tm = new VelTableModel(); velTable = new JTable(tm); velTable.setGridColor(Color.BLACK); JLabel renderer = ((JLabel) velTable .getDefaultRenderer(Object.class)); renderer.setHorizontalAlignment(SwingConstants.CENTER); getMainPanel().getController().add(tm); if (presentation) { velTable.setRowMargin(10); velTable.setRowHeight(30); } else { velTable.setRowMargin(5); velTable.setRowHeight(17); } } return velTable; } COM: <s> this method initializes vel table </s>
funcom_train/45466628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStringValue() { if (_children.isEmpty()) { return ""; } StringBuffer sb = new StringBuffer(); for (Iterator i = _children.iterator(); i.hasNext(); ) { XMLNode child = (XMLNode) i.next(); sb.append(child.getStringValue()); } return sb.toString(); } COM: <s> returns the string value of this parent node </s>
funcom_train/26143743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buf = new StringBuffer(); buf.append(group).append(", ").append(project).append(", ").append(name); if (version != null) { buf.append("-").append(version); } buf.append(".").append(type); return buf.toString(); } COM: <s> converts this artifact to a string </s>
funcom_train/36149759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double RegressionEqYInt() { double sumX = SumX(); double sumY = SumY(); double sumXSq = SumXSq(); return (sumY * sumXSq - sumX * SumXY()) / (n * SumXSq() - sumX * sumX); } COM: <s> returns the y intercept of the regression equation b0 </s>
funcom_train/22081891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showHelp () { System.out.println("Parameters for jsrcpd\n"); System.out.println("usage: jsrcpd <cmd> [<args>]"); System.out.println("<cmd> is:"); System.out.println("\t -h display this help"); System.out.println("\t -d display configuration"); System.out.println("\t -s <key> <value> set configuration"); } COM: <s> show command line parameter help </s>
funcom_train/34357128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ParameterList partitionParameters(ParameterList parameterList) { final String keyFlag = resourceFlag; ParameterList resourceList = new ParameterList(); ParameterList removeList = new ParameterList(); for ( Parameter param : parameterList ) { String name = param.getName(); if ( name.startsWith(keyFlag) ) { name = name.substring(keyFlag.length(),name.length()); resourceList.add(new Parameter(name,param.getValue())); removeList.add(param); } } parameterList.removeAll(removeList); return resourceList; } COM: <s> partition the parameter list by removing and returning a list of those </s>
funcom_train/25523595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJbSend() { // Initialise if(jbSend == null) { jbSend = new JButton(); // Set the label. jbSend.setText("Send"); // Add the action listener for clicking. jbSend.addActionListener(new ActionListener() { /** * Called when an action is performed on the button. * * @param e The action events. */ @Override public void actionPerformed(ActionEvent e) { // Send the message. sendMessage(); // Reset tab completion. resetTabCompletion(); } }); } return jbSend; } COM: <s> get the send button button </s>
funcom_train/28117979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String sendMessage (String message) { //Have Security Manager check the message to be sure it is "safe". String newMessage = securityMgr.checkMessage(message); if (newMessage.equals("OK")){ send(message); } //If the message is OK now that it has been modified... else if (newMessage.startsWith("OK:")) { send(message.substring(3,message.length())); } //Otherwise, return the error message. return (newMessage); } COM: <s> send a message to the server </s>
funcom_train/4479588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addField(String type, String name, String initialValue) { typeList.addElement(type); nameList.addElement(name); if ( initialValue == null || initialValue.equals("") ) initList.addElement(null); else { initList.addElement(initialValue); makeDefaultConstructor = true; } } COM: <s> use this method to generate a default constructor where this field value </s>
funcom_train/14585336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SeasonStandings subset(int[] ids) { SeasonStandings standings = new SeasonStandings(); Hashtable records = standings.getTeamRecords(); // retrieves team records only for the given teams for (int i = 0; i < ids.length; i++) { if (hasRecordForTeam(ids[i])) { records.put(new Integer(ids[i]), getTeamRecord(ids[i])); } } return standings; } COM: <s> gathers a subset of team records for the given </s>
funcom_train/49076147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean startArchiver() { boolean isDone = false; try { JamesqService.archiver = SystemLoader.getJobArchiver(); JamesqService.archiver.init(); isDone = true; } catch (JobArchiveError exp) { logger.severe("archiver initialization error: " + exp.getMessage()); } catch (Exception exp) { logger.severe("archiver configuration error: " + exp.getMessage()); } return isDone; } COM: <s> starts the job message archiver </s>
funcom_train/20232294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertChildAt(int index, Concept<T> child) throws IndexOutOfBoundsException { if (index == getNumberOfChildren()) { // this is really an append addChild(child); return; } else { _children.get(index); //just to throw the exception, and stop here _children.add(index, child); } } COM: <s> inserts a node t at the specified position in the child list </s>
funcom_train/3889195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateHrefType_MaxLength(String hrefType, DiagnosticChain diagnostics, Map context) { int length = hrefType.length(); boolean result = length <= 2000; if (!result && diagnostics != null) reportMaxLengthViolation(ImscpRootv1p1p2Package.Literals.HREF_TYPE, hrefType, length, 2000, diagnostics, context); return result; } COM: <s> validates the max length constraint of em href type em </s>
funcom_train/49760746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJCheckBoxComputation() { if (jCheckBoxComputation == null) { jCheckBoxComputation = new JCheckBox(); jCheckBoxComputation.setBounds(new Rectangle(5, 60, 121, 24)); jCheckBoxComputation.setText("Computation"); jCheckBoxComputation.addItemListener(myListener); } return jCheckBoxComputation; } COM: <s> this method initializes j check box computation </s>
funcom_train/49760476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JEditorPane getJEditorPaneBackEndDescription() { if (jEditorPaneBackEndDescription == null) { jEditorPaneBackEndDescription = new JEditorPane(); jEditorPaneBackEndDescription.setBounds(new Rectangle(15, 225, 256, 61)); jEditorPaneBackEndDescription.setEnabled(false); } return jEditorPaneBackEndDescription; } COM: <s> this method initializes j editor pane back end description </s>
funcom_train/27952054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processAttribute(final Attr attr) { if (isURIAttribute(attr)) { String uriString = attr.getValue(); Link link = new Link(currentResource, attr); links.add(link); URL u = link.getURL(); if (u != null) { addResource(new Resource(u)); } } } COM: <s> process an attribute </s>
funcom_train/2442747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void viewFile(File file) { if (viewer == null) { WaitLock waitLock = appWin.startWait(); try { viewer = createViewer(file); viewer.show(); } finally { waitLock.release(); } } else { viewer.addFile(file); viewer.forceToFront(); } } COM: <s> opens the specified file in this xml viewer </s>
funcom_train/7270137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeFileFromPlaylist(final int index) { if( index < 0 || index > MODEL.getRowCount() ) return false; synchronized(PLAY_LOCK) { removeRow(index); } if( MODEL.getRowCount() <= 0) { GUIMediator.safeInvokeLater(new Runnable(){ public void run(){ setButtonEnabled( PlaylistButtons.CLEAR_BUTTON, false ); } }); } return true; } COM: <s> removes a file from the playlist model at a given index </s>
funcom_train/41582070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void returnResult() { // Close the keyboard and return the entered text. Intent intent = new Intent(this, RouteInput.class); intent.putExtra(PhoneWandActivity.TEXT_ENTERED_EXTRA, mCurrentString); setResult(RESULT_OK, intent); PhoneWandActivity.ttsSpeak("Returning " + mCurrentString, TextToSpeech.QUEUE_FLUSH); //////////////////TODO: sleep until the TTS has finished speaking? finish(); } COM: <s> return the entered text to the caller activity </s>
funcom_train/29968153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void archiveDirectories(Date date) { for (File archivingDestinationDirectory : archivingDestinationDirs) { // if the process was canceled by the user. if (isProcessCanceled()) return; backupprogress++; // Create Filename with path for the archive File archivedDirectory = new File(archivedDir.getAbsolutePath() + File.separator + df.format(date) + archivingDestinationDirectory.getAbsolutePath() .substring(destinationDirLength)); listener.onProcess(Process.WriteArchiveStart, archivingDestinationDirectory, archivedDirectory); archivedDirectory.mkdirs(); listener.onProcess(Process.WriteArchiveEnd, archivingDestinationDirectory, archivedDirectory); } } COM: <s> create all deleted changed moved directories since the last backup in </s>
funcom_train/24948483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String checkDBname(String db){ db = db.replace(" ", "_").replace(":", "_").replace("/", "_").replace("(", "_").replace(")", "_"); // TODO : make only one biopax class and check that the dbName is not already defined in the model and if it is, generate a unique one. return db; } COM: <s> control the validity of the identifier rdf br </s>
funcom_train/51539158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleDisplayPreemptStartEvent(int midletIsolateId, int midletDisplayId) { MIDletProxy preempting = new MIDletProxy(this, 0, midletIsolateId, midletDisplayId, null, null, null, MIDletProxy.MIDLET_ACTIVE); MIDletProxy nextForeground = displayController.startPreempting(preempting); if (nextForeground != null) { setForegroundMIDlet(nextForeground); } } COM: <s> process a display preempt start event </s>
funcom_train/19406768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void finishLink(Rule in_Rule) { SystemState left = in_Rule.getLeft(); SystemState right = in_Rule.getRight(); LinkProcessNode llp = left.createLinkProcessNode(); LinkProcessNode rlp = right.createLinkProcessNode(); llp.setStatus("#active"); rlp.setStatus("#finished"); in_Rule.addMapping(llp, rlp); LinkNode ll = left.createLinkNode(); LinkNode rl = right.createLinkNode(); ll.mark(); in_Rule.addMapping(ll, rl); } COM: <s> creates the finish rule from the transformation unit </s>
funcom_train/44458769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getString() { // Get as ASCII final String ENCODING = "US-ASCII"; try { return getString(ENCODING); // This should never happen: ASCII encoding is not supported } catch (UnsupportedEncodingException exception) { String detail = "Default encoding \"" + ENCODING + "\" is unsupported."; throw Utils.logProgrammingError(detail, exception); } } COM: <s> returns the returned data as a code string code </s>
funcom_train/37829680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendGroupChangeEvent() { StendhalRPRuleProcessor ruleProcessor = SingletonRepository.getRuleProcessor(); List<String> members = new LinkedList<String>(membersAndLastSeen.keySet()); RPEvent event = new GroupChangeEvent(leader, members, lootmode); for (String playerName : membersAndLastSeen.keySet()) { Player player = ruleProcessor.getPlayer(playerName); if (player != null) { player.addEvent(event); } } } COM: <s> tell the clients about changes in the group </s>
funcom_train/31080327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void before(int index) { if (index < 0 || index >= _size) throw new IndexOutOfBoundsException(String.valueOf(index)); CodeEntry entry = _head; for (int i = 0; i < index; entry = entry.next, i++); _ci = new CodeIterator(entry, index - 1); } COM: <s> place the iterator before the given list index </s>
funcom_train/45774096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void nextStep(int stepIndex) { if ((getStepText() == null) || getStepText().equals("")) { JOptionPane.showMessageDialog(this, m_errorDescreption, m_errorName, JOptionPane.ERROR_MESSAGE); return; } openStepDialog(++stepIndex); } COM: <s> get the next step data and refresh the step frame </s>
funcom_train/41254803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean nextTurn() { if (isOver()) { this.activePlayer = null; this.phase = null; return false; } // The game is not over if (this.playerTwo.equals(this.activePlayer)) { // Player two just had their turn; it's the end of the round this.round++; } // Toggle the active player this.activePlayer = getOpponent(this.activePlayer); nextPhase(); return true; } COM: <s> performs the housekeeping at the end of the active players turn </s>
funcom_train/5381307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String format(final int key) { final IKeyLookup lookup = KeyLookupFactory.getDefault(); if (lookup.isModifierKey(key)) { String formattedName = Util.translateString(RESOURCE_BUNDLE, lookup .formalNameLookup(key), null); if (formattedName != null) { return formattedName; } } return super.format(key).toLowerCase(); } COM: <s> formats an individual key into a human readable format </s>
funcom_train/2903318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseDragged(MouseEvent e){ isDragged = true; oldvalueX = valueX; oldvalueY = valueY; valueX = e.getX(); valueY = e.getY(); if(isMoveX){ sumx = sumx+(valueX-oldvalueX); } else{ sumx = 0; } if(isMoveY){ sumy = sumy+(valueY-oldvalueY); } else{ sumy = 0; } setLocation(getX()+sumx, getY()+sumy); } COM: <s> move window following mouse position </s>
funcom_train/37198958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(JInternalFrame frame) throws SQLException { if(frame != null) { if(frame.getName().startsWith(resources.NEW_STRING)) saveAs(frame); else { if(frame instanceof FormReportEditor) editor.save((FormReportEditor)frame, null, null, null); if(frame instanceof QueryEditor) query.save(frame.getName()); if(frame instanceof ClassEditor2) editor.save((ClassEditor2)frame); } } } COM: <s> save the data from a form report editor or from a query </s>
funcom_train/40701372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String permString(Permission[] permissions) { StringBuilder permString = new StringBuilder (); for (int i = 0; i < permissions.length; i++) { permString.append ( permissions[i].toString () ); if (i < permissions.length - 1) { permString.append ( "," ); } } return permString.toString (); } COM: <s> create a commaseparated string </s>
funcom_train/43924588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteUpdate(long id) throws BlipConnectorException { URI uri; try { StringBuilder sb = new StringBuilder().append(baseUrl) .append(PATH_UPDATES).append("/").append(id); uri = new URI(sb.toString()); } catch (URISyntaxException e1) { throw new BlipConnectorException("Error creating URI"); } HttpResponse<?> res = execute(METHOD_DELETE, uri, null, true); handleResult(res); } COM: <s> deletes update with given id </s>
funcom_train/31358757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton createToolBarButton(String act) { // get icon and action for the button URL url = ResourceManager.getResource("tb." + act + "Icon"); Action action = getAction(act); if (url == null || action == null) return null; // create the button JButton button = new JButton(action); button.setIcon(new ImageIcon(url)); button.setText(null); button.setToolTipText(ResourceManager.getResourceString("tb." + act + "Tip")); return button; } COM: <s> creates a tool bar button </s>
funcom_train/25493580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLinkType(int linkType) { this.linkType = linkType; if (options == null || options.length() == 0) { switch (linkType) { case DBDConstants.DBF_OUTLINK: { options = "NPP NMS"; break; } case DBDConstants.DBF_FWDLINK: { options = "PP NMS"; break; } case DBDConstants.DBF_INLINK: { options = "NPP NMS"; break; } } } } COM: <s> function sets link type inlink outlink fwdlink and update options </s>
funcom_train/18864633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { if (isSelected) { setBackground(table.getSelectionBackground()); } else { setBackground(table.getBackground()); } if (column == 0) { setBorder(firstColumnBorder); } else { setBorder(regColumnBorder); } visibleRow = row; return this; } COM: <s> tree cell renderer method </s>