__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/37205168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map processStream(InputStream stream) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(stream), this.bufferSize); String str; String lineEnding = System.getProperty("line.separator"); BufferedWriter out = new BufferedWriter(new FileWriter(this.file), this.bufferSize); while ((str = in.readLine()) != null) { out.write(str); out.write(lineEnding); } out.close(); return null; } COM: <s> this method processes an input stream and outputs the result to a file </s>
funcom_train/43691248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateList(Vector<DemoEntry> demoEntries) { // Make a new list full of our demos demoList = new JList(demoEntries); // now take care of some odds and ends // first we'll need to use our own rendered to use imgs demoList.setCellRenderer(new ImgTextCellRenderer()); // make each cell 10px taller than our images for padding demoList.setFixedCellHeight(138); } COM: <s> makes the swing list object from a vector of demo entries </s>
funcom_train/51196973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testtoRgb() { System.out.println("toRgb"); byte R = (byte) (0xf0 + Byte.MIN_VALUE); byte G = (byte) (0x80 + Byte.MIN_VALUE); byte B = (byte) (0x04 + Byte.MIN_VALUE); int expectedResult = 0x00f08004; int result = RgbVal.toRgb(R,G,B); assertEquals(expectedResult, result); } COM: <s> test of to rgb method of class jjil </s>
funcom_train/28999676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void accumulateReportTotals(String record[]) { double totals[] = new double[reportColumns.length]; for (int c = 0; c < reportColumns.length; c++) { ReportColumn column = (ReportColumn) reportColumns[c]; if (column.isSubTotaled() || column.isSubMaximum() || column.isSubMinumum() || column.isSubAveraged()) totals[c] = Double.parseDouble(record[c]); } bottomA.accumulateTotals(totals); } COM: <s> h2 code accumulate report totals code h2 </s>
funcom_train/27835930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel2() { if (jPanel2 == null) { jPanel2 = new JPanel(); jPanel2.setToolTipText("Refresh the model"); jPanel2.add(getOpenButton(), null); jPanel2.add(getSaveButton(), null); jPanel2.add(getRefreshButton(), null); jPanel2.add(getValidateButton(), null); jPanel2.add(getFilterComboBox(), null); } return jPanel2; } COM: <s> this method initializes j panel2 </s>
funcom_train/31675907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public Connection fileConnect(String host1, String host2) throws ParseException { Connection c = new Connection.File(host1, host2); jj_consume_token(FILE); connect_files(c); Debug.println(Bug.PARSE, "fileConnect = "+c); {if (true) return c;} throw new Error("Missing return statement in function"); } COM: <s> connect by writing to a file and let the user move it over </s>
funcom_train/10948278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClose() throws IOException { shielded.close(); assertFalse("closed", closed); try { shielded.write('x'); fail("write(b)"); } catch (IOException e) { // expected } original.write('y'); assertEquals(1, original.size()); assertEquals('y', original.toByteArray()[0]); } COM: <s> test the code close code method </s>
funcom_train/8008531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRegularExpressionRule(String regExp, String errorMessage, HtmlFormComponent focusComp) throws DataStoreException { _regExpressionRules = true; HtmlComponentValidator val = getValidator(); String name = focusComp.getFullName(); if (_ds != null) name = _ds.getColumnName(focusComp.getColumnNumber()); val.addRegularExpressionRule(name, regExp, errorMessage, focusComp); indexOtherRule(); } COM: <s> adds a regular expression rule to the validator </s>
funcom_train/14312235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(int row, int col) { FileInformation info = (FileInformation) files.get(row); switch (col) { case NAME: return info.getFileName(); case TYPE: return info.isDirectory() ? TYPE_DIRECTORY : TYPE_FILE; case SIZE: if (info.isDirectory()) return new Long(0); return formatSize(info.getFileSize()); case MODIFIED: DateFormat df = DateFormat.getInstance(); return df.format(new Date(info.getLastModified())); default: return ""; } } COM: <s> gets the value of the specified cell </s>
funcom_train/3512898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUseGroupID(boolean useGroupID, byte groupID) { boolean oldValue = this.useGroupID; boolean newValue = useGroupID; if (!spec.supportsFrameGroupID() && newValue) { testChange(); tag.requestSpecWhich("supportsFrameGroupID"); } this.useGroupID = newValue; this.groupID = groupID; changeSupport.firePropertyChange( USE_GROUP_ID_PROPERTY, oldValue, newValue); if (tag != null) tag.notifyFlagChanged(this); } COM: <s> tries to set a group id for this frame </s>
funcom_train/46529089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemClose() { if (closeMenuItem == null) { closeMenuItem = new JMenuItem(); closeMenuItem.setText(Language.getString("Close")); closeMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { Diagram.this.setVisible(false); } }); } return closeMenuItem; } COM: <s> this method initializes j menu item </s>
funcom_train/48024223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Writer write(Writer writer) throws JSONException { try { boolean b = false; int len = length(); writer.write('['); for (int i = 0; i < len; i += 1) { if (b) { writer.write(','); } Object v = myArrayList.elementAt(i); if (v instanceof JSONObject) { ((JSONObject) v).write(writer); } else if (v instanceof JSONArray) { ((JSONArray) v).write(writer); } else { writer.write(JSONObject.valueToString(v)); } b = true; } writer.write(']'); return writer; } catch (IOException e) { throw new JSONException(e); } } COM: <s> write the contents of the jsonarray as json text to a writer </s>
funcom_train/5373863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTopIndex (int index) { checkWidget (); /* int result = OS.SendMessage (handle, OS.LB_SETTOPINDEX, index, 0); if (result == OS.LB_ERR) { int count = OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0); index = Math.min (count - 1, Math.max (0, index)); OS.SendMessage (handle, OS.LB_SETTOPINDEX, index, 0); } */ } COM: <s> sets the zero relative index of the item which is currently </s>
funcom_train/34505165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putProperty(ConfigurationKeys key, Rectangle bounds) { putProperty(key.getKey()+".x", bounds.x); putProperty(key.getKey()+".y", bounds.y); putProperty(key.getKey()+".width", bounds.width); putProperty(key.getKey()+".height", bounds.height); } COM: <s> puts the rectangle into the properties </s>
funcom_train/51376095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Controller getRegistrationObject() throws DBException { StringUtil.assertNotBlank(this.getField("ControllerClass"), "Invalid Registration ControllerClassname for this object"); try { return ConfigManager.getControllerFactory().getController(this.getField("ControllerClass")); } catch (com.jcorporate.expresso.core.controller.ControllerException ce) { throw new DBException("Error creating Registration controller", ce); } } COM: <s> instantiates the controller based upon the current controller value </s>
funcom_train/4447905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WeblogWrapper getWeblog(String handle) { WeblogWrapper wrappedWebsite = null; try { Weblogger roller = WebloggerFactory.getWeblogger(); UserManager umgr = roller.getUserManager(); Weblog website = umgr.getWebsiteByHandle(handle); wrappedWebsite = WeblogWrapper.wrap(website, urlStrategy); } catch (Exception e) { log.error("ERROR: fetching users by letter", e); } return wrappedWebsite; } COM: <s> get website object by handle </s>
funcom_train/22189414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SourceViewerConfig (BaseTextEditor editor) { IPreferenceStore prefs = SLIDEPlugin.getDefault().getPreferenceStore(); closer = new AutoCloser (); closer.setAutoCloseQuote(prefs.getBoolean(PreferenceConstants.QUOTE_COMPLETION)); closer.setAutoCloseBrace(prefs.getBoolean(PreferenceConstants.BRACE_COMPLETION)); closer.setAutoCloseParen(prefs.getBoolean (PreferenceConstants.BRACE_COMPLETION)); prefs.addPropertyChangeListener(this); this.editor = editor; } COM: <s> source viewer config shared configuration fro all viewers to share </s>
funcom_train/27667357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(final Association a) { log.debug("Start check for idle {}", a); TimerTask task = new TimerTask() { @Override public void run() { a.checkIdle(System.currentTimeMillis()); } }; TimerTask previous = timerTasks.put(a, task); if (previous != null) { previous.cancel(); } schedule(task); } COM: <s> register an code association code with this reaper </s>
funcom_train/42567819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildList(List<T> list, T node) { if (getEdgesTo(node).isEmpty()) { list.add(node); //iterator is needed here so that we can safely //remove the iterated node from the underlying list Iterator<T> it = getEdgesFrom(node).iterator(); while(it.hasNext()){ T target = it.next(); it.remove(); getEdgesTo(target).remove(node); buildList(list, target); } } } COM: <s> if the node has no more incoming edges add it to the list </s>
funcom_train/37240628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPhrase(Phrase phrase){ if (phrase.getAppend()) { Phrase newPhrase = phrase.copy(); newPhrase.setStartTime(this.getEndTime()); newPhrase.setAppend(false); this.phraseList.addElement(newPhrase); } else this.phraseList.addElement(phrase); } COM: <s> add a phrase to this part </s>
funcom_train/25472092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Subscriber (String s, Integer i) throws InvalidSubscriberException { name = s; provider = i; String emailValidatorRegex = "^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$"; //Use a regular expression for e-mail validation if (s.matches(emailValidatorRegex)) { type = EMAIL; } else { // Check if its 10 digits and first digit is not zero if (s.length() == 10 && s.indexOf('0') != 0) { type = SMS; } else { throw new InvalidSubscriberException(); } } } COM: <s> instantiates a new subscriber </s>
funcom_train/37611499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeExternal(ObjectOutput out) throws IOException { synchronized (this) { out.writeInt(m_data.size()); for (Entry<Test, StatisticsSet> entry : m_data.entrySet()) { out.writeInt(entry.getKey().getNumber()); // Its a class invariant that our StatisticsSets are all // StatisticsSetImplementations. m_statisticsSetFactory.writeStatisticsExternal( out, (StatisticsSetImplementation)entry.getValue()); } } } COM: <s> efficient externalisation method </s>
funcom_train/33886415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Component getGraphComponent() { Component component = graphView.visViewer; int selectedIndex = mainPane.getSelectedIndex(); if (selectedIndex == BETWEENNESS_TAB_INDEX) { component = betweennessView.getVisualizer(); // component = betweennessApplet.getVisualizer(); } else if (selectedIndex == AGG_CLUSTERING_TAB_INDEX) { component = aggClusteringView.getVisualizer(); } else if (selectedIndex == SPANNING_FOREST_TAB_INDEX) { component = spanningForestView.getVisualizer(); } return component; } COM: <s> return the component containing the graph in the currently selected </s>
funcom_train/46040750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getContent() { if (content == null) { if (contentSource != null) { content = contentSource.getResponseAsString(); // Clear on first use contentSource = null; } else if (document != null) { content = HtmlSerializer.serialize(document); } } return content; } COM: <s> retrieves the current content for this object in string form </s>
funcom_train/49695484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MessageDigest getDigest() { if (digest == null) { try { digest = MessageDigest.getInstance(algorithm); } catch (NoSuchAlgorithmException ex) { try { digest = MessageDigest.getInstance(DEFAULT_ALGORITHM); } catch (NoSuchAlgorithmException ex2) { digest = null; throw new IllegalStateException( "No algorithms for IdGenerator"); } } System.out.println("Using MessageDigest: " + digest.getAlgorithm()); } return digest; } COM: <s> return the message digest object to be used for calculating session </s>
funcom_train/32316391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCardinalityPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ObjectMaxCardinality_cardinality_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ObjectMaxCardinality_cardinality_feature", "_UI_ObjectMaxCardinality_type"), OdmPackage.Literals.OBJECT_MAX_CARDINALITY__CARDINALITY, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the cardinality feature </s>
funcom_train/38316491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeTask(AbstractJLCPJob taskToRemove) { try { sched.deleteJob(taskToRemove.getName(), sched.DEFAULT_GROUP); } catch (SchedulerException e) { log.error("[Quartz] Unable to delete task " + taskToRemove.getName()); log.fatal(e); } } COM: <s> remove a given task from the scheduler </s>
funcom_train/35682008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSupportedContentType(final HttpServletRequest request) { if (request.getContentType().trim().compareToIgnoreCase( BINARY_CONTENT_TYPE) == 0 || request.getContentType().trim().compareToIgnoreCase( APPLICATION_CONTENT_TYPE) == 0) { return true; } return false; } COM: <s> check that the client is sending a content type that we understand </s>
funcom_train/28542016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireSelectionChanged(final SelectionChangedEvent event) { Object[] listeners = this.listeners.getListeners(); for (int i = 0; i < listeners.length; ++i) { final ISelectionChangedListener l = (ISelectionChangedListener)listeners[i]; SafeRunnable.run(new SafeRunnable() { public void run() { l.selectionChanged(event); } public void handleException(Throwable e) { super.handleException(e); //If an unexpected exception happens, remove it //to make sure the workbench keeps running. removeSelectionChangedListener(l); } }); } } COM: <s> notifies all registered selection changed listeners that the editors </s>
funcom_train/31782120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void receivedVER( IncomingMessage incomingMessage ) { // New MSNP8 support OutgoingMessage outgoingMsg = new OutgoingMessage( Message.CVR, getTransactionID() ); String strArgument = Message.CVR_STRING + userName; outgoingMsg.addArgument( strArgument ); sc.sendMSNPMessage( outgoingMsg ); } COM: <s> called when a ver message is </s>
funcom_train/45119575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSheet(String sheetName, Object[] row) { addAndGetNewSheetNameIndex(sheetName); if (row != null) { try { addRow(sheetName, row); } catch (Exception e) { Logger log = Logger.getLogger(ExcelFile.class.getName()); log.log(Level.SEVERE, "Cant add Sheet"); } } } COM: <s> adds a new sheet and set the given row in the fisrt row </s>
funcom_train/50157292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBadChars(List badCharList) { Element badChars = getBadCharsElement(); badChars.clearContent(); for (int i = 0; i < badCharList.size(); i++) { BadCharChecker.BadCharEntry entry = (BadCharChecker.BadCharEntry) badCharList.get(i); Element badChar = badChars.addElement("badChar"); Element xpath = badChar.addElement("xpath"); xpath.setText(entry.xpath); Element value = badChar.addElement("value"); value.setText(entry.value); } } COM: <s> sets the bad chars attribute of the dcs data record object </s>
funcom_train/31625712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add() throws DBException { super.add(); // handle inverse if (getInverseRel().length() > 0) { RelationType newinv = getInverseRelType(); if (newinv != null) { newinv.setInverseRel(getRelTypeName()); newinv.update(); } } } /* add() */ COM: <s> if the user is allowed to add invoke the superclass add </s>
funcom_train/33757559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCancelCommand3 () { if (cancelCommand3 == null) {//GEN-END:|36-getter|0|36-preInit // Insert pre-init code here cancelCommand3 = new Command ("Cancel", Command.CANCEL, 1);//GEN-LINE:|36-getter|1|36-postInit // Insert post-init code here }//GEN-BEGIN:|36-getter|2| return cancelCommand3; } COM: <s> returns an initiliazed instance of cancel command3 component </s>
funcom_train/39049732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean flush() { assert Thread.holdsLock(contextList); if (isCommitted) { for (BigInteger channelRefId : internalTaskLists.keySet()) { getCoordinator(channelRefId). addChannelNotificationTasks( internalTaskLists.get(channelRefId)); } for (BigInteger channelRefId : channelsToService) { addServiceEventQueueTask(channelRefId); } } return isCommitted; } COM: <s> if the context is committed flushes channel tasks enqueued </s>
funcom_train/2625811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsExpandableGComponentGWindow3() { OneWindow w = new OneWindow(); w.setName("blah"); dummyComponent c = new dummyComponent(w); c.setName("blah"); assertFalse(monitor.isExpandable(c, null)); AccessibleStub astub = new AccessibleStub(); JFCComponentStub d = new JFCComponentStub ( new AccessibleStub()); assertFalse(monitor.isExpandable(d, null)); } COM: <s> checks if is expandable can non clickable components </s>
funcom_train/3072287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showEchoPane(){ Container c=this.getContentPane(); c.removeAll(); visibleComponent=echoPane; c.add(visibleComponent); echoPane.invalidate(); echoPane.setVisible(true); c.validate(); Rectangle r=c.getBounds(); c.repaint((int)r.getX(),(int)r.getY(),(int)r.getWidth(),(int)r.getHeight()); } COM: <s> shows the echo pane in the applet content pane </s>
funcom_train/7789735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addFriend(UserData friend) { boolean notDuplicate = false; TwitterUserData twitterFriend = null; if (friend != null && friend instanceof TwitterUserData) { twitterFriend = (TwitterUserData) friend; if (!friendExists(twitterFriend)) { this.friends.add(twitterFriend); notDuplicate = true; } } setChanged(); notifyObservers(); return notDuplicate; } COM: <s> adds a friend by user data </s>
funcom_train/6302279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register_server(String name, String command, String host) throws IllegalServerName, DuplicateServerName { ImRServerInfo _server = new ImRServerInfo(name, host, command); server_table.putServer(name, _server); Debug.output(Debug.IMR | Debug.INFORMATION, "ImR: server " + name + " on " + host + " registered"); } COM: <s> register a logical server </s>
funcom_train/13257644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setClassData(double[] classData) { if (classData.length != classes) { throw new IllegalArgumentException("classData.length!=classes"); } if (Arrays.equals(this.classData, classData)) { return false; } this.classData = classData; changed = true; resultsOK = false; // make sure 3rd dimension of serviceTimes is ok resize(stations, classes); return true; } COM: <s> sets the data for the classes </s>
funcom_train/11074635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String parenthesize(Expression expression, boolean left) { String s = expression.toString(); if (!(expression instanceof CoreOperation)) { return s; } int compared = getPrecedence() - ((CoreOperation) expression).getPrecedence(); if (compared < 0) { return s; } if (compared == 0 && (isSymmetric() || left)) { return s; } return '(' + s + ')'; } COM: <s> wrap an expression in parens if necessary </s>
funcom_train/19230398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUrl() { try { return getFile().toURL().toString(); } catch (Throwable t) { Log.debug("failed to create URL from file: " + getFile(), t); return getFile().toString(); } //String fn = getFile().getAbsolutePath(); //return"file://" + fn; } COM: <s> return a url string for this local byte store </s>
funcom_train/22395892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeAllWizardScreens() { if(started) { throw new IllegalStateException(); } Enumeration e = wizardScreens.elements(); while(e.hasMoreElements()) { ((WizardScreen)e.nextElement()).setWizardController(null); } wizardScreens.removeAllElements(); } COM: <s> removes all wizard screens from the controller </s>
funcom_train/48338991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetCurrentReaderWriter() { int size; // Reset stack of readers. while ((size = readers.size()) > 1) { Reader in = (Reader)readers.remove(size - 1); markForCleanup(in); } // Reset stack of writers. while ((size = writers.size()) > 1) { Writer out = (Writer)writers.remove(size - 1); markForCleanup(out); } } COM: <s> reset the stacks of readers and writers </s>
funcom_train/37833704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StackableItem getMissileIfNotHoldingOtherWeapon() { StackableItem missileWeaponItem = null; boolean holdsOtherWeapon = false; for (final Item weaponItem : getWeapons()) { if (weaponItem.isOfClass("missile")) { missileWeaponItem = (StackableItem) weaponItem; } else { holdsOtherWeapon = true; } } if (holdsOtherWeapon) { return null; } else { return missileWeaponItem; } } COM: <s> gets the stack of missiles spears or similar that this entity is </s>
funcom_train/22920233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send(Serializable obj, boolean flush) throws IOException { long T0 = System.currentTimeMillis(); oout.writeObject(obj); oout.flush(); oout.reset(); long T1 = System.currentTimeMillis(); System.err.println("ObjectStreamTransport.send(): T=" + (T1-T0) + "ms"); } COM: <s> send an object </s>
funcom_train/40292094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRowPosition(int rowId) { if (this.columnPos == 0) return 0; DataRow row = this.getRow(rowId); Object posizione = row.getData()[this.columnPos].getValue(); return Integer.parseInt(posizione.toString()); } COM: <s> get the position of the row 0 if no one is setted </s>
funcom_train/46459434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveObject(XMLControl element, Object obj) { Map map = ((ParsableTextArea) obj).getCurrentMap(); Iterator it = map.keySet().iterator(); while(it.hasNext()) { String variable = (String) it.next(); element.setValue(variable, map.get(variable)); } } COM: <s> saves object data to an object element </s>
funcom_train/38977129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pop3Disconnect() throws Exception { try { pop3InboxFolder.close(true); } catch (Exception e) { throw new Exception ("Unable to close the POP3 Folder: " + e.toString()); } try { pop3Store.close(); } catch (Exception e) { throw new Exception ("Unable to disconnect from POP3 Server: " + e.toString()); } } COM: <s> disconnect from pop3 server </s>
funcom_train/6407560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void trigger( float delta, char character, float value, boolean pressed, Object data ) { for ( int i = axisTriggers.size() - 1; i >= 0; i-- ) { final ActionTrigger trigger = axisTriggers.get( i ); trigger.checkActivation( character, getIndex(), value, delta, pressed, data ); } } COM: <s> check all triggers </s>
funcom_train/638356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireSelectedSpanChanged(List<Span> selectedSpans) { if (logger.isDebugEnabled()) { StringBuffer sb = new StringBuffer(); for (Span span : selectedSpans) sb.append(" " + span.getStart() + "|" + span.getEnd()); logger.debug(sb.toString()); } SelectedSpanChangeEvent ssce = new SelectedSpanChangeEvent(manager, selectedSpans); for (SelectedSpanChangeListener sscl : selectedSpanChangeListeners) { sscl.spanSelectionChanged(ssce); } } COM: <s> the preferred way to update the currently selected spans is via </s>
funcom_train/50486001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UserBean getUserFromEmail(String email) throws SQLException { // Get the user info from the database Connection conn = dataSource.getConnection(); Row userRow = null; try { userRow = getUserPropertiesFromEmail(email, conn); } finally { try { conn.close(); } catch (SQLException e) { e.printStackTrace();} } return rowToBean(userRow); } COM: <s> returns an user bean initialized with the information </s>
funcom_train/50463036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePart(String[] parts) throws IOException { if(parts == null) return; ArrayList resources = new ArrayList(); for(int i=0;i<parts.length;i++) { List r = jnlpDesc.getJNLPNode().getResourcesForPart(parts[i]); resources.addAll(r); } } COM: <s> remove several parts </s>
funcom_train/3319935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLastModified() { if (mFile != null) { long timestamp = mFile.lastModified(); Date date = new Date(timestamp); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); return simpleDateFormat.format(date); } return null; } COM: <s> the last modified timestamp of the file formatted </s>
funcom_train/41551380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() {//GEN-END:MVDInitBegin // Insert pre-init code here getDisplay().setCurrent(get_mainForm());//GEN-LINE:MVDInitInit // Insert post-init code here _race = new Race(); }//GEN-LINE:MVDInitEnd COM: <s> this method initializes ui of the application </s>
funcom_train/32371656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void endGame(Team winner) { game.endGame(); currentCoundDownTime = game.getCoundDown(); coundDownTimeBegin = (int)timer.getTimeInSeconds(); hudState.setActive(false); killPlayer(); if(camNode != null) camNode.removeFromParent(); cam.setLocation(game.getScenario().getRandomCamSpawn()); EndWindowState endState = new EndWindowState(game, winner); endState.setActive(true); GameStateManager.getInstance().attachChild(endState); mouse.setCursor(Mouse.HUD); } COM: <s> ends the current </s>
funcom_train/41747693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getTotalExpenseActualAmount() { long total = 0; for (Iterator iterator = categories.iterator(); iterator.hasNext();) { Account account = (Account) iterator.next(); Integer accNum = new Integer(account.getAccountNum()); DetailedBudgetItem item = (DetailedBudgetItem)detExpenseItems.get(accNum); if (item != null) total += item.actualAmount; } return total; } COM: <s> total actual amount for expense accounts </s>
funcom_train/18739740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reportGraphStatistics() { printf("\n\tGraphs:\n\t\tModifiable:\t\t%d%n", AbstractGraph.getModifiableGraphCount()); printf("\t\tFrozen:\t\t\t%d%n", AbstractGraphState.getFrozenGraphCount()); printf("\t\tBytes/state:\t%.1f%n", this.gts.getBytesPerState()); } COM: <s> gives some statistics regarding the graphs and deltas </s>
funcom_train/4482015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadAppInfoValues() { setPROGNAME(AppInfo.getPROGNAME()); setCOMPANY(AppInfo.getCOMPANY(),AppInfo.getAUTHOR()); setVERSION(AppInfo.getFULLVERSION()); setCOPYRIGHT(AppInfo.getCOPYRIGHT(),AppInfo.getCOMPANY()); setDESCRIPTION(AppInfo.getDESCRIPTION()); return; } COM: <s> uses code app info code object to init the panel </s>
funcom_train/44484901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean ensureDirectoryExists(File directory) { if (!directory.exists()) { if (!queryYesNoQuestion(Messages.getString("RasterizeWizardPage1.createTargetDirectory"))) //$NON-NLS-1$ return false; if (!directory.mkdirs()) { displayErrorDialog(Messages.getString("RasterizeWizardPage1.directoryCreationError")); //$NON-NLS-1$ giveFocusToDestination(); return false; } } return true; } COM: <s> attempts to ensure that the specified directory exists on the local file system </s>
funcom_train/1420840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getItemTypeRandomly() { Random r = new Random(); if (r.nextInt(2) == 0) { int item = r.nextInt(3); if (item == 2 && nbSpeedItems != 0) { nbSpeedItems--; return 2; } else if (item == 0 && nbFlamItems != 0) { nbFlamItems--; return 0; } else if (item == 1 && nbBombItems != 0) { nbBombItems--; return 1; } } return -1; } COM: <s> get item type randomly 1 nothing 0 flam 1 bomb 2 speed </s>
funcom_train/35682243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDataPartsNumber() { if (getContent() == null || getContent().length < DATAPARTS_NUM_LEN) { return 0; } ByteBuffer bb = ByteBuffer.allocate(DATAPARTS_NUM_LEN); bb.put(getContent(), 0, DATAPARTS_NUM_LEN); bb.flip(); return bb.getInt(); } COM: <s> message parts number is extracted from the header content </s>
funcom_train/15494532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSession() throws Exception { System.out.println("getSession"); UserSession expResult = new UserSession(); CoadunationGenericPrincipal instance = new CoadunationGenericPrincipal( new CoadunationRealm(), "test", "112233",new ArrayList(), expResult); UserSession result = instance.getSession(); assertEquals(expResult, result); } COM: <s> test of get session method of class com </s>
funcom_train/1388058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TaskList loadWithName(String listName, int occurance, final ContentEntityObject contentObject, String macro) { MatchOnLoadStrategy action = new MatchOnLoadStrategy(listName, occurance); return (TaskList) TaskListUtil.onTaskListMatch(listName, occurance, contentObject, action, macro); } COM: <s> gets the list of tasks associated with the given list name and </s>
funcom_train/1824342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void surface() { if (!workbenchFrame.hasInternalFrame(this)) { workbenchFrame.addInternalFrame(this, alwaysOnTop, true); } workbenchFrame.activateFrame(this); if (isIcon()) { try { setIcon(false); } catch (PropertyVetoException e) { workbenchFrame.log(StringUtil.stackTrace(e)); } } moveToFront(); } COM: <s> brings the output window to the front </s>
funcom_train/42898629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteKeyPair(String keyName) throws EC2Exception { Map<String, String> params = new HashMap<String, String>(); params.put("KeyName", keyName); HttpGet method = new HttpGet(); DeleteKeyPairResponse response = makeRequestInt(method, "DeleteKeyPair", params, DeleteKeyPairResponse.class); if (!response.isReturn()) { throw new EC2Exception("Could not delete keypair : "+keyName+". No reason given."); } } COM: <s> deletes a public private keypair </s>
funcom_train/50955888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(java.awt.event.ActionEvent e) { GraphicsPanel gp = Application.getLastActiveGraphicsPanel(); Action proxiedAction = (gp == null) ? null : gp.getPanelActionMap().get(proxiedActionName); if(proxiedAction != null) proxiedAction.actionPerformed(e); } COM: <s> calls the action performed code of the proxied action </s>
funcom_train/36071484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPriority(String priorityValue) throws Exception { //if (priorityValue < 1 || priorityValue > 5) { // throw new Exception ("An invalid priority value of " + priorityValue + " has been specified for the email."); //} if (priorityValue != null && priorityValue.trim().length() > 0) { msg.setHeader("X-Priority", priorityValue); } } COM: <s> set the priority of a message </s>
funcom_train/45354375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton5() { if (jButton5 == null) { jButton5 = new JButton(); jButton5.setBounds(12, 147, 148, 20); jButton5.setText("Void F10"); jButton5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { if (bFinished == false) doVoid(); } }); } return jButton5; } COM: <s> this method initializes j button5 </s>
funcom_train/42777334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Cache createCache(String cacheName) { // not expiring memory cache: Cache cache = new Cache(cacheName, MAX_ELEMENTS, MemoryStoreEvictionPolicy.LFU, false, cacheName, true, TIME_TO_LIVE, TIME_TO_IDLE, false, 0, null); return cache; } COM: <s> creates tiira cache with programmatic default settings </s>
funcom_train/20497368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printText() { recieveSpace.append(printString); int printNewLine = (printString.length()/80) + 1; recieveSpace.setPreferredSize(new Dimension(400, lineSpace += 15*printNewLine)); recieveSpace.getCaret().setDot(recieveSpace.getText().length()); sp_recieveSpace.scrollRectToVisible(recieveSpace.getVisibleRect()); } COM: <s> printing the written text in the local receive space and scrolling down </s>
funcom_train/8043856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); // If data is null, UI should not be updated if(data != null) { switch (requestCode) { case WEBCAM_ADDER: // Refresh images grid when an image was added launchActivity(WEBCAMS_REFRESH); return; case WEBCAM_VIEW: launchActivity(WEBCAMS_REFRESH); return; default: return; } } } COM: <s> handler when activity finish </s>
funcom_train/12560663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int append(String str) { if (str == null) { throw new NullPointerException(); } synchronized (Display.LCDUILock) { Item item = new StringItem(null, str); int i = insertImpl(numOfItems, item); formLF.lInsert(i, item); return i; } } COM: <s> adds an item consisting of one code string code to the </s>
funcom_train/43245852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBNStreetAddr3() { System.out.println("getBNStreetAddr3"); EmergencyContactDG5Object instance = new EmergencyContactDG5Object(); String expResult = ""; String result = instance.getBNStreetAddr3(); 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 bnstreet addr3 method of class org </s>
funcom_train/43400184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void divide(Rational r) { int g = NumberTheory.gcd(r.denom, denom) * NumberTheory.gcd(r.num, num); num = num * r.denom / g; System.out.println(denom); denom = denom * r.num / g; if (denom == 0) { throw new ArithmeticException(); } if (denom < 0) { num = -num; denom = -denom; } } COM: <s> divides this number by code r code </s>
funcom_train/3291533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String applyNotNullScheme(String fieldName, String fieldType) { String scheme=applyScheme(getNotNullScheme(),fieldName, fieldType, ""); if (scheme==null) { return fieldName+" "+fieldType; } else { return scheme; } } COM: <s> applies the not null scheme if available </s>
funcom_train/21023248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void uploadFiles() { fileName = uploadForm.getFileName(); // Store some values to uploadForm uploadForm.setImportZip(importZip.getValue()); uploadForm.setDigitalSignature(digitalSignature.getValue()); uploadForm.setVersionCommnent(versionComment.getText()); uploadForm.setUsers(users.getText()); uploadForm.setRoles(roles.getText()); uploadForm.setMessage(message.getText()); uploadItem.setLoading(); uploadForm.submit(); } COM: <s> perform the uploading of a file by changing state of display widget and </s>
funcom_train/34413216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printMsg(String msg, String prefix) { if (filename != null) { try { if (bw == null) { FileWriter fw = new FileWriter(filename); bw = new BufferedWriter(fw); } bw.write("[" + getTimestamp() + "] " + prefix + ": " + msg + "\n"); bw.flush(); } catch (Exception e) { throw new DebugFileException(e); } } if (stdout) { System.out.println("[" + getTimestamp() + "] " + prefix + ": " + msg); } } COM: <s> prints a timestamped message according to the rules of the factory prefixing </s>
funcom_train/47920320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MutationEdgeData removeMutation(String mutation) { if (!mutations.contains(mutation)) ExceptionUtil.throwIllegalArgEx(getClass(), "Edge_Mutation_Absent", mutation); // a copy for the new object List<String> new_mutations = new ArrayList<>(mutations); new_mutations.remove(mutation); return new MutationEdgeData(mutations); } COM: <s> a factory method to create a new instance with the given mutation removed </s>
funcom_train/19314235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FoValue getRelativeAlign(final FObj fobj, final FoContext context) { final PdRelativeAlign property = (PdRelativeAlign) getProperty( FoProperty.RELATIVE_ALIGN); if (property != null) { return property.getValue(context, fobj); } return PdRelativeAlign.getValueNoInstance(context, fobj); } COM: <s> returns the relative align property </s>
funcom_train/24422972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActiveEditor(IEditorPart part){ super.setActiveEditor(part); ITextEditor editor = null; if (part instanceof ITextEditor) editor = (ITextEditor) part; contentAssistProposal.setAction(getAction(editor, "ContentAssistProposal")); formatProposal.setAction(getAction(editor, "ContentFormatProposal")); contentAssistTip.setAction(getAction(editor, "ContentAssistTip")); } COM: <s> sets the active editor to this contributor </s>
funcom_train/16489636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fadeOut() { // Integer prevRoIndex = (Integer) list // .getClientProperty(ROLLED_OVER_INDEX); // if (prevRoIndex == null) // return; if (rolledOverIndex < 0) return; FadeTracker.getInstance().trackFadeOut(FadeKind.ROLLOVER, list, rolledOverIndex, false, new CellRepaintCallback(list, rolledOverIndex)); } COM: <s> initiates the fade out effect </s>
funcom_train/7641783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void widgetDefaultSelected(SelectionEvent e) { if (e.item instanceof TableItem) { TableItem i = (TableItem) e.item; i.setChecked(!i.getChecked()); enforceSingleSelection(i); updateDescription(i); } if (mSelectionListener != null) { mSelectionListener.widgetDefaultSelected(e); } } COM: <s> default selection means double click on most platforms </s>
funcom_train/42347510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connectionFailed() { setState(STATE_LISTEN); // Send a failure message back to the Activity Message msg = mHandler.obtainMessage(BluetoothInterfaceActivity.MESSAGE_TOAST); Bundle bundle = new Bundle(); bundle.putString(BluetoothInterfaceActivity.TOAST, "Unable to connect device"); msg.setData(bundle); mHandler.sendMessage(msg); } COM: <s> indicate that the connection attempt failed and notify the ui activity </s>
funcom_train/20269413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeDeclaration(Reference declaration) { Node varNode = declaration.getParent(); Node grandparent = declaration.getGrandparent(); varNode.removeChild(declaration.getNode()); // Remove var node if empty if (!varNode.hasChildren()) { Preconditions.checkState(varNode.getType() == Token.VAR); NodeUtil.removeChild(grandparent, varNode); } compiler.reportCodeChange(); } COM: <s> remove the given var declaration </s>
funcom_train/9162948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLocalVariable(String name, Type type) { if (name == null) { throw new IllegalArgumentException("name cannot be null"); } if (type == null) { throw new IllegalArgumentException("name cannot be null"); } Type t = getType(name); if (t != null) { throw new IllegalArgumentException(name + " already exists."); } Map<String,Type> last = locals.get(0); last.put(name, type); } COM: <s> adds a local variable to the current scope </s>
funcom_train/27782581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Trie optimize(Trie orig) { Vector cmds = orig.cmds; Vector rows = new Vector(); Vector orows = orig.rows; int remap[] = new int[orows.size()]; Arrays.fill(remap, -1); rows = removeGaps(orig.root, rows, new Vector(), remap); return new Trie(orig.forward, remap[orig.root], cmds, rows); } COM: <s> optimize remove holes in the rows the given trie and return the </s>
funcom_train/18052646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getSvPane() { if (svPane == null) { svPane = new JPanel(); svPane.setLayout(new BorderLayout()); svPane.setBackground(new Color(248, 248, 245)); svPane.add(getSvToolBar(), BorderLayout.NORTH); svPane.add(getSvSplitPane(), BorderLayout.SOUTH); svPane.add(getSvInfoPanel(), BorderLayout.WEST); } return svPane; } COM: <s> this method initializes svpane </s>
funcom_train/19971877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SpannableStringBuilder formatCrewNames(Crew[] crew, String pref) { if (crew == null || crew.length == 0) return new SpannableStringBuilder(""); SpannableStringBuilder res = new SpannableStringBuilder(); res.append(pref); res.append(crew[0].name); res.setSpan(new StyleSpan(Typeface.BOLD), pref.length(), res.length(), SpannableString.SPAN_EXCLUSIVE_EXCLUSIVE); for (int i = 1; i < crew.length; ++i) res.append(", " + crew[i].name); return res; } COM: <s> create a string representation of a list of crew </s>
funcom_train/43390899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getWarnings() { ArrayList warnings = new ArrayList(); for (int i = 0; i < _feedback.size(); i++) { MergeFeedback fb = (MergeFeedback)_feedback.get(i); if (fb.getType() == MergeFeedback.WARNING) { warnings.add(fb); } } return warnings; } COM: <s> method to extract a list of warning messages from the merge </s>
funcom_train/29829233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSubscriptionToJID(JID jid) { String str = getRosterItemHashString(jid, "", false); RosterItem old = (RosterItem) curRoster.get(str); if (old == null) return false; String subscr = old.getSubscriptionType(); return (subscr != null && (subscr.equals("to") || subscr.equals("both"))); } COM: <s> returns true if there is subscription to presence of given jid </s>
funcom_train/25063775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getExternalAcc() { if (externalAcc == null || externalAcc.length() == 0) return null; int pipeCharLoc = externalAcc.indexOf('|'); // if no pipe char - assume no location, and whole string is an ACC return externalAcc.substring(pipeCharLoc + 1); } COM: <s> parses out an id and returns it </s>
funcom_train/10749168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetMaxPriority_CreateSubgroup() { ThreadGroup tg = new ThreadGroup("tg"); int pri = Thread.MAX_PRIORITY - 1; tg.setMaxPriority(pri); ThreadGroup tg1 = new ThreadGroup(tg, "tg1"); assertEquals("incorrect priority for the created subgroup", pri, tg1.getMaxPriority()); } COM: <s> verify that max priority is inherited by a created subgroup </s>
funcom_train/4375401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream getResponseBodyAsStream() throws IOException { if (responseStream != null) { return responseStream; } if (responseBody != null) { InputStream byteResponseStream = new ByteArrayInputStream(responseBody); LOG.debug("re-creating response stream from byte array"); return byteResponseStream; } return null; } COM: <s> returns the response body of the http method if any as an </s>
funcom_train/3558269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sketch(Template template, Graphics2D g2d, Component c) { g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); Iterator<TemplateItem> i = template.getListIterator(); while (i.hasNext()) { TemplateItem current = i.next(); current.setShape(current.getShape().deform(this)); cleanSketch(current, g2d, c); } } COM: <s> performs the actual drawing of the template on a graphics2 d object </s>
funcom_train/33017651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public Message getMessage() throws IOException { Object objIn = new Object(); try { objIn = this.input.readObject(); if (objIn instanceof Message) { return (Message)objIn; } } catch (ClassNotFoundException e) { SimpleLogger.logError("CommEndpoint read object of invalid type; returning null", e); } return null; } COM: <s> request a message from the connection </s>
funcom_train/28977952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dropUserSpace(String name) throws SQLException { Savepoint f = null; try { this.getConnection().setAutoCommit(false); f = this.getConnection().setSavepoint("before"); this.getConnection().createStatement().execute("drop user " + name); } catch (SQLException e) { this.getConnection().rollback(f); throw e; } } COM: <s> l scht einen userspace </s>
funcom_train/5668829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showClone() { ParameterWindow p = new ParameterWindow(getParamInfo(), mainWin); //Get a clone of this parameter window WinPosition w = new WinPosition(this.main); //Get the coordinates of this window w.setPlace(p.main); //Set the coordinates of the clone to the coords of this win p.show(); //Show the clone setChanged(); } COM: <s> shows a clone of this window </s>
funcom_train/25189314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMediaType() throws Exception { System.out.println("getMediaType"); JSchema instance = new JSchema(); assertNull(instance.getMediaType()); instance.setMediaType("application/json"); assertEquals("application/json", instance.getMediaType()); } COM: <s> test of get media type method of class jschema </s>
funcom_train/8984626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doStartTag() throws JspException { if (Utility.isEmpty(returnURL) && pageContext.getAttribute(RETURN_BUTTON_URL_VAR) != null) { this.setReturnURL((String)pageContext.getAttribute(RETURN_BUTTON_URL_VAR)); } return EVAL_BODY_BUFFERED; } COM: <s> constructs the default return url the following overriding sequence applies </s>