__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/25180538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() throws IdealizeInputException { try { // open the Lucene index previously created luceneSearcher = new LuceneSearcher(luceneIndexer.getDirectory(), analyser); } catch (Exception e) { throw new IdealizeInputException("CBDataModel.initialize():" + e.toString(), e); } // define the term weight function if (weightFunction == null) weightFunction = new TFIDF(); // initialize the term weights cache cachedTermWeights = new HashMap<Term, TermWeightData>(); // generate the itemID to docID mapper generateIDMapper(); } COM: <s> initialize the cbdata model components </s>
funcom_train/42442592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void recordMoveAttempt( String X, String Y ){ generalFunctions gf = new generalFunctions( syslog ); engineModobo modobo = new engineModobo( gf.getGameSerializedFromDB( gameid ), true, syslog, gameid ); modobo.doMove( X, Y, username ); modobo.persistGame2DB(); } COM: <s> record a move </s>
funcom_train/20784561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPxlScoreThreshold(float pxlScoreThreshold) { getPrefs().putFloat("FilterLaserline.pxlScoreThreshold", pxlScoreThreshold); getSupport().firePropertyChange("pxlScoreThreshold", this.pxlScoreThreshold, pxlScoreThreshold); this.pxlScoreThreshold = pxlScoreThreshold; } COM: <s> sets pxl score threshold </s>
funcom_train/28296391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveNonExistent() throws Exception { Entry entry = dvm.new Entry(Package.class, Sphere.class, Package.NAME, Sphere.NAME); Entry entry2 = dvm.new Entry(IsClassOf.class, Sphere.class, IsClassOf.NAME, Sphere.NAME); dvm.set(entry); TestListener listener = new TestListener(); dvm.addListener(listener); boolean result = dvm.remove(entry2); assertFalse(result); assertFalse(listener.wasRemoved()); } COM: <s> test remove non existent </s>
funcom_train/8067082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseWheelMoved(MouseWheelEvent e) { if (e.isAltDown() || e.isControlDown()) { if (e.getWheelRotation() < 0) this.zoomOut.actionPerformed(null); else if (e.getWheelRotation() > 0) this.zoomIn.actionPerformed(null); e.consume(); } } COM: <s> zooms diagram in and out when mousewheel is rolled while holding down </s>
funcom_train/331241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PamSettings findOwner(ArrayList<PamSettings> ownersList, String unitType, String unitName) { PamSettings owner; for (int i = 0; i < ownersList.size(); i++) { owner = ownersList.get(i); if (owner.getUnitType().equals(unitType) == false) continue; if (unitName != null && owner.getUnitName().equals(unitName) == false) continue; return owner; } return null; } COM: <s> find the owner of some pamguard settings </s>
funcom_train/7637639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleNewInput(IEditorInput input) { if (input instanceof FileEditorInput) { FileEditorInput fileInput = (FileEditorInput) input; IFile file = fileInput.getFile(); setPartName(String.format("%1$s", file.getName())); } } COM: <s> handles a new input and update the part name </s>
funcom_train/3790607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isConsistent() { if( this.isEmpty() ) return false; for (int i = 0; i < _pathVector.size()-1; i++) if( !((PathPlace)_pathVector.elementAt(i)).isAdjacent((PathPlace)_pathVector.elementAt(i+1)) ) return false; return true; } COM: <s> check for path consistency </s>
funcom_train/9430820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SuggestionData build() { return new SuggestionData( mSource, mFormat, mTitle, mDescription, mIcon1, mIcon2, mIntentAction, mIntentData, mIntentQuery, mActionMsgCall, mIntentExtraData, mIntentComponentName, mShortcutId, mBackgroundColor, mPinToBottom, mSpinnerWhileRefreshing); } COM: <s> builds a suggestion using the values set in the builder </s>
funcom_train/310977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRing(int r) { ringNo = r; if (ringView && ringGroup!=null) ringGroup.detach(); ringGroup = new BranchGroup(); // Show one zone HealSphere s = new RingSphere(nside,ringNo); ringGroup.addChild(s); ringGroup.setCapability(BranchGroup.ALLOW_DETACH); objTrans.addChild(ringGroup); if (!ringView) ringGroup.detach(); } COM: <s> sets the ring </s>
funcom_train/45715434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStringResult(String columnName, int index, String value) { OJ.getData().getResults().getColumns().getColumnByName(columnName).setStringResult(index, value); OJ.getEventProcessor().fireResultChangedEvent(columnName, index, ResultChangedEventOJ.RESULTS_EDITED); } COM: <s> sets a string result into an unlinked or linked column </s>
funcom_train/5358564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object readChar() { try { if (isPushedChar) { isPushedChar = false; if (pushedChar == -1) return EOF; else return chr((char)pushedChar); } else { int ch = in.read(); if (ch == -1) return EOF; else return chr((char)ch); } } catch (IOException e) { warn("On input, exception: " + e); return EOF; } } COM: <s> read and return a scheme character or eof </s>
funcom_train/39216858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNext() { CharTokenizer tokenizer = new CharTokenizer("one, two, three", ','); for(int i=0; tokenizer.hasMoreTokens(); i++) { String s = tokenizer.nextToken(); if(i<3) assertNotNull(s); else assertNull(s); } } COM: <s> test method next </s>
funcom_train/28344539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double betaFinal(IProbe probe) { // Get probe parameters at initial energy double Er = probe.getSpeciesRestEnergy(); double Wi = probe.getKineticEnergy(); double dW = this.energyGain(probe); double Wf = Wi + dW; double beta = RelativisticParameterConverter.computeBetaFromEnergies(Wf, Er); return beta; } COM: <s> compute and return the final normalized velocity for the </s>
funcom_train/43294136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateProcesses(ProcessLibrary processLibrary) { // get process manager ProcessesManager processManager = getProcessesManager(); // process manager valid? if (processManager == null) { OutputHandler .writeError(20101, "", OutputHandler.EL_HIGH, new String[] { }, this); // not successful return false; } // update processes return processManager.updateProcesses(processLibrary); } COM: <s> p update processes with process library entries </s>
funcom_train/646337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAvailable() { if (getView() == null) return false; for (SQLConnection connection: getView().getSelectedConnections(true)) try { if (!connection.getAutoCommit()) return true; }catch(SQLException e) { // SQLExplorerPlugin.error("Cannot query auto commit state", e); } return false; } COM: <s> action is available when there is at least one session without autocommit </s>
funcom_train/3683530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPortletExceptionWhileInit() { GenericPortlet p = null; try { p = (GenericPortlet) proxy.getPortlet(portletContext, "PortletWithPortletExceptionWhileInit"); } catch (Exception e) { assertEquals(e.getMessage(), "exception while initializing portlet"); assertTrue(e instanceof PortletException); } assertNull(p); assertFalse(portletMonitor.isInitialized("hello", "PortletWithPortletExceptionWhileInit")); } COM: <s> test v test portlet exception thrown in init method </s>
funcom_train/21498328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(TreeSelectionEvent e) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree .getLastSelectedPathComponent(); if (node == null) return; Object nodeInfo = node.getUserObject(); if (node.isLeaf()) { if (DEBUG) { // System.out.print(); } } else { // } if (DEBUG) { System.out.println(nodeInfo.toString()); } } COM: <s> required by tree selection listener interface </s>
funcom_train/37597982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_jettison0() { java.util.Date dt = calendar.getTime(); Satchel satchel = new Satchel(dt, 1, null); XStream xstream = new XStream(new JettisonMappedXmlDriver()); xstream.setMode(XStream.NO_REFERENCES); xstream.alias("satchel", Satchel.class); System.out.println(xstream.toXML(satchel)); } COM: <s> another unnecessary test </s>
funcom_train/8399883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int optInt(int index, int defaultValue) { Object o = opt(index); if (o != null) { if (o instanceof Number) { return ((Number)o).intValue(); } try { return Integer.parseInt((String)o); } catch (Exception e) { return defaultValue; } } return defaultValue; } COM: <s> get the optional int value associated with an index </s>
funcom_train/24434908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String formatHash(byte[] digest) { StringBuffer hexValue = new StringBuffer(); for (int i = 0; i < digest.length; i++) { int b = digest[i] & 0xff; if (Integer.toHexString(b).length() == 1) hexValue = hexValue.append("0"); hexValue.append(Integer.toHexString(b)); } return hexValue.toString(); } COM: <s> formats the hash into a string </s>
funcom_train/12773914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean shouldRefine(IField field, PointerKey basePtr, PointerKey val, IFlowLabel label, StateMachine.State state) { // make code explicit to avoid subtle reliance on short-circuiting boolean AshouldRefine = A.shouldRefine(field, basePtr, val, label, state); if (AshouldRefine) { return true; } else { return B.shouldRefine(field, basePtr, val, label, state); } } COM: <s> returns code true code if </s>
funcom_train/14615629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Expression parseVariableOrList() throws ParseException { skipWhitespace(); char nextChar = text.charAt(parsePos); if( nextChar == LIST_LITERAL_START_CHAR ) { parsePos++; return parseListLiteral(); } if( isIdentifierStartChar(nextChar)) { return parseVariable(); } throw new ParseException( "Expected variable or list literal" ); } COM: <s> parses either a variable name or a list literal </s>
funcom_train/7258947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void complete(boolean bOnlyNonDelayed, boolean success, Object data) { //System.out.println("complete called with " + bOnlyNonDelayed); if (completed || (bOnlyNonDelayed && completeDelayed)) { //System.out.println("exit early" + completed); return; } triggerCompletionListeners(success, data); completed = true; } COM: <s> sets the message complete and fires of the listeners who are waiting </s>
funcom_train/28227239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processModel(MDAContext context) { this.context = context; try { initialize(); loadModel(); runScript(); } catch (Exception e) { e.printStackTrace(); } finally { try { destroy(); } catch (Exception ee) { ee.printStackTrace(); } } } COM: <s> main processing method for the groovy mda object </s>
funcom_train/42712078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getJButtonAssignBank() { if (jButtonAssignBank == null) { jButtonAssignBank = new JButton(); jButtonAssignBank.setBounds(new Rectangle(640, 30, 111, 21)); jButtonAssignBank.setText("Assign"); jButtonAssignBank.setActionCommand("UpdateAdress"); } return jButtonAssignBank; } COM: <s> this method initializes j button assign bank </s>
funcom_train/28502461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static final public String checkAndConvert_ordertype( final String pOrderType ) throws Exception { String o = pOrderType; if ((pOrderType.equalsIgnoreCase( "DESC" )==true) || (pOrderType.equalsIgnoreCase( "ASC" )==true)) return o; throw new Exception( "[ORDERBYTYPE] Only DESC|ASC as values allowed" ); } COM: <s> check and convert ordertype </s>
funcom_train/36552880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUp(int[] optionList) { numberOfPlayers = optionList[2]; numberOfDecks = optionList[3]; ArrayList<BlackJackPlayer> playerList = createPlayers(numberOfPlayers); myWatcher = new Watcher(); myDebug = new DebugWindow(); myLucky = new LuckyWindow(numberOfPlayers); myDealer = new Dealer(numberOfDecks, optionList[0], playerList, myWatcher, myDebug); myDealer.setThresh(optionList[1]); } COM: <s> sets up game options </s>
funcom_train/13951622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream getWarrior( String name ) throws WarriorNotFoundException, IOException { CompiledWarrior warrior = warriors.get( name ); if( warrior == null ) throw new WarriorNotFoundException(); PipedInputStream in = new PipedInputStream(); PipedOutputStream out = new PipedOutputStream(); in.connect( out ); out.connect( in ); warrior.write( out ); return in; } COM: <s> this method returns the warrior file as an input stream </s>
funcom_train/48261154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDelete() throws Exception { /* System.out.println("delete"); String managedItemListId = "/a/b.txt"; ManagedItemListDAO instance = new ManagedItemListDAO(); instance.delete(managedItemListId); // TODO review the generated test code and remove the default call to fail. //fail("The test case is a prototype."); */ } COM: <s> test of delete method of class managed item list dao </s>
funcom_train/12074726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void decreaseHealth() { health = Math.max(health - 1, 0); if (health == 1) { Server.getLogger().info(getName() + " gets all pools and attributes halved!"); } if (health < 1) { Server.getLogger().info(this.getName() + " has bled to death!"); addCondition(new Defeated()); } } COM: <s> reduce the characters health by 1 </s>
funcom_train/1280433
/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(BluetoothChat.MESSAGE_TOAST); Bundle bundle = new Bundle(); bundle.putString(BluetoothChat.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/24379323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setModelProperty(String propertyName, Object newValue) { for (AbstractModel model : registeredModels) { try { Method method = model.getClass().getMethod( "call" + propertyName, new Class[] { newValue.getClass() } ); method.invoke(model, newValue); } catch (Exception ex) { MQMain.logger.error("setModelProperty",ex); } } } COM: <s> convenience method that subclasses can call upon to fire off property </s>
funcom_train/42875306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object apply(List<Object> args) throws WrongArgumentCountException { checkArgs("pair?", args, 1); if ((args.get(0) instanceof LispCons) && args.get(0) != LispCons.emptyList) { return LispBoolean.trueValue; } else { return LispBoolean.falseValue; } } COM: <s> processes i pair i expression </s>
funcom_train/3741418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prerelax() { suspend(); int i = 0; if (layout.isIncremental()) { // then increment layout for half a second long timeNow = System.currentTimeMillis(); while (System.currentTimeMillis() - timeNow < 500 && !layout.incrementsAreDone()) { i++; layout.advancePositions(); } } System.out.println("Prerelax : " + i + " iterations"); unsuspend(); } COM: <s> runs the visualization forward a few hundred iterations for half a </s>
funcom_train/40927402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setForegroundColor(final String color) { if (this.isNullOrEmpty(color)) { this .log( "Attribute \"foregroundcolor\" is empty, use default color", Project.MSG_WARN); } else { this.setOption(Parameter.MATHCOLOR, color); } } COM: <s> sets foreground color </s>
funcom_train/11721082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initSupportedReports() { if (exists()) { supportedReports = new SupportedReportSetProperty(new ReportType[] { ReportType.EXPAND_PROPERTY, NodeTypesReport.NODETYPES_REPORT, LocateByUuidReport.LOCATE_BY_UUID_REPORT, RegisteredNamespacesReport.REGISTERED_NAMESPACES_REPORT, RepositoryDescriptorsReport.REPOSITORY_DESCRIPTORS_REPORT }); } } COM: <s> define the set of reports supported by this resource </s>
funcom_train/29325377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset(StringPool stringPool, XMLEntityHandler.CharBuffer literalData) throws Exception { fStringPool = stringPool; fLiteralData = literalData; fParseTextDecl = false; fSeenRootElement = false; fSeenDoctypeDecl = false; fStandalone = false; fDispatcher = new XMLDeclDispatcher(); fScannerState = SCANNER_STATE_XML_DECL; fScannerMarkupDepth = 0; } COM: <s> reset the parser so that the instance can be reused </s>
funcom_train/19537118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static final FileFilter SCRIPT_FILTER = new FileFilter() { @Override public String getDescription() { return "JavaScript Files (*.js)"; } @Override public boolean accept(File file) { if (file.isDirectory()) return true; String name = file.getName(); if (name.endsWith(".js")) return true; return false; } }; COM: <s> file filter for named script files </s>
funcom_train/14328118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BEXI_Object getObject(String objectName) { if (objectName == null) return null; if (_objects == null) return null; for (int i = 0; i < _objects.size(); i++) { BEXI_Object currentObj = (BEXI_Object) _objects.get(i); if (currentObj.get_objectName().equals(objectName)) { return currentObj; } } return null; } COM: <s> get bexi object according object name </s>
funcom_train/51642969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createJavadoc() throws JavaModelException { TagElement tag= getDelegateJavadocTag(fDeclaration); Javadoc comment= fDeclaration.getJavadoc(); if (comment == null) { comment= getAst().newJavadoc(); comment.tags().add(tag); fDelegateRewrite.getASTRewrite().set(fDeclaration, getJavaDocProperty(), comment, null); } else fDelegateRewrite.getASTRewrite().getListRewrite(comment, Javadoc.TAGS_PROPERTY).insertLast(tag, null); } COM: <s> creates the javadoc for the delegate </s>
funcom_train/23057882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJobAddedjContentPane() { if (JobAddedjContentPane == null) { JobAddedjLabel = new JLabel(); JobAddedjLabel.setText("Status Pending..."); JobAddedjContentPane = new JPanel(); JobAddedjContentPane.setLayout(new BorderLayout()); JobAddedjContentPane.add(JobAddedjLabel, BorderLayout.CENTER); JobAddedjContentPane.add(getJobAddedOKjButton(), BorderLayout.SOUTH); } return JobAddedjContentPane; } COM: <s> this method initializes job addedj content pane </s>
funcom_train/45850737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isIncludeCat(String catName) { catName = catName.replaceFirst("top/", ""); for (String includeCatName : ConfigParser.getIncludeCats()) { includeCatName = includeCatName.replaceFirst("top/", ""); if (catName.startsWith(includeCatName)) return true; } return false; } COM: <s> returns true if cat belongs to one of the remove categories </s>
funcom_train/3287768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Daemon getDaemon( String classname ) throws DaemonException { DaemonEntry[] entries = this.getDaemonEntries(); for (int i = 0; i < entries.length; ++i) { if ( entries[i].getClassname().equals( classname ) ) { return getDaemon( entries[i] ); } } throw new DaemonException( "daemon not found: " + classname ); } COM: <s> get a daemon with the given classname </s>
funcom_train/34633436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void highlight(List<Node> nodes, String annotationText) { if (logger.isDebugEnabled()) logger.debug("highlight nodes"); if (nodes == null) throw new ArgumentNullException("nodes"); if (logger.isTraceEnabled()) logger.trace("highlight nodes:" + nodes); for (Node node : nodes) this.highlight(node, annotationText); } COM: <s> highlight all nodes from the list </s>
funcom_train/3784171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getWeekDayName(int weekDay) { String weekDayName = null; if (isWeekDayValid(weekDay)) { weekDayName = weekDayNames[weekDay]; } else { throw new IllegalArgumentException("Day " + weekDay + " MUST be a value between " + Calendar.SUNDAY + " and " + Calendar.SATURDAY); } return weekDayName; } COM: <s> gets short weekday string </s>
funcom_train/1834195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String normalize(String str) { str = str.trim().toLowerCase(); if (str.indexOf('-') != -1 && str.indexOf(' ') != -1) { // e.g. "E-Mail Adresse" -> "E Mail Adresse" so the error can be detected: str = str.replace('-', ' '); } return str; } COM: <s> replaces dashes with whitespace </s>
funcom_train/44282391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendPatch (Patch p){ ((Patch)p).sysex[5]=(byte)0x08; ((Patch)p).sysex[6]=(byte)0x00; ((Patch)p).sysex[7]=(byte)0x00; try {Thread.sleep(sleepTime); } catch (Exception e){} sendPatchWorker(p); } COM: <s> send patch to the temporary edit memory of the gp 16 </s>
funcom_train/20678421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCell(String columnName, Object value, int rowNumber) { cacheDbRecords(rowNumber); if (isColumnDefined(columnName)) { List column = getColumn(columnName); if (column == null) { throw new DatabaseException(new ErrMsg( "error.db.invalidcolumn", columnName)); } column.set(rowNumber, value); } else { throw new DatabaseException(new ErrMsg("error.db.invalidcolumn", columnName)); } } COM: <s> sets individual cell in recordset </s>
funcom_train/18955775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean existsRule(String ruleid) throws MCRException { Session session = MCRHIBConnection.instance().getSession(); List l = session.createCriteria(MCRACCESSRULE.class).add(Restrictions.eq("rid", ruleid)).list(); if (l.size() == 1) { return true; } return false; } COM: <s> method checks existance of rule in db </s>
funcom_train/8336703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeDelimiter(char newDelimiter) throws BadDelimiterException { if (delimiterChar == newDelimiter) return; // no need to do anything. if (newDelimiter == '\n' || newDelimiter == '\r' || newDelimiter == delimiterChar || newDelimiter == quoteChar){ throw new BadDelimiterException(); } delimiterChar = newDelimiter; } COM: <s> change this printer so that it uses a new delimiter </s>
funcom_train/16818376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Stream invoke(RemoteCall remoteCall, RemoteReference ref) throws NetworkException { RmeRequestSender rs = getSender(remoteCall); if(this.ch != null) { if(timeHasExpired()) { if(isAlive(this.ch)) { rs.open(this.ch); } else { this.ch.close(); createConnection(rs, ref); } } else { rs.open(this.ch); } } else { createConnection(rs, ref); } return rs.getFuture(); } COM: <s> this method performs the invocation of a remote operation </s>
funcom_train/48906102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchMarket(long rowId) throws SQLException { Cursor result = mDb.query(true, DATABASE_TABLE, new String[] { KEY_ROWID, KEY_NAME, KEY_DESCRIPTION }, KEY_ROWID + "=" + rowId, null, null, null, null); if ((result.count() == 0) || !result.first()) { throw new SQLException("No market matching ID: " + rowId); } return result; } COM: <s> return a cursor positioned at the note that matches the given row id </s>
funcom_train/9389315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProgress(final int value) { if (!mDialogShell.isDisposed()) { mDialogShell.getDisplay().syncExec(new Runnable() { public void run() { if (!mProgressBar.isDisposed()) { mProgressBar.setSelection(value); } } }); } } COM: <s> sets the current value of the progress bar </s>
funcom_train/32979908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeTmpVectors(int n) { /* makeTmpVectors */ nEP= n; /* update it */ cv1Tmp= new float[nEP]; cv2Tmp= new float[nEP]; cv1TmpEP= new float[nEP]; cv2TmpEP= new float[nEP]; } /* makeTmpVectors */ COM: <s> make tmp vectors create temp vectors if needed </s>
funcom_train/24269998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseMoved(MouseEvent e) { String pos = "(" + e.getX() + "," + e.getY() + ") "; label.setText(pos + dj.getPixelInfo()); // Update the label with the // DisplayJAIWithPixelInfo instance info. } COM: <s> this method will be executed when the mouse is moved over the extended </s>
funcom_train/50390745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void process(){ if(getCommandLine().hasOption(OPT_HELP)){ printUsage(); endProcessing(); } if(getCommandLine().hasOption(OPT_VERBOSE)){ verbose=true; } loadUserProperties(); //re-init verbosity after loading user prefs verbose=getBooleanOption(OPT_VERBOSE_LONG, OPT_VERBOSE); timing=getBooleanOption(OPT_TIMING_LONG, OPT_TIMING); if(timing){ startTime=System.currentTimeMillis(); verbose("Timing mode."); } setOutputLocation(); } COM: <s> process this command br </s>
funcom_train/16218750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(long elapsedTime) { for (int i = 0; i < this.size; i++) { if (this.sprites[i].isActive()) { this.sprites[i].update(elapsedTime); } } if (this.scanFrequence.action(elapsedTime)) { // remove all inactive sprites this.removeInactiveSprites(); } } COM: <s> updates all active sprites in this group and check the schedule for </s>
funcom_train/23180881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test2001830() throws UnsupportedEncodingException { String paramStr = "cht=bhs&chco=ff0000|00ff00|0000ff,&chs=200x125" + "&chd=s:elo&chxt=x,y&chxl=1:|Dec|Nov|Oct|0:||20K||60K||100K|"; Map params = Parameters.parseQueryString(paramStr); /* JFreeChart chart = */ ChartEngine.buildChart(params); } COM: <s> a test for bug report 2001830 </s>
funcom_train/11708171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean builtInXmlSerializationSupportsCRs() { String javaVendor = System.getProperty("java.vendor"); if( javaVendor.startsWith("Sun") ) { String javaVersion = System.getProperty("java.version"); if( javaVersion.startsWith("1.3") || javaVersion.startsWith("1.4") ) return false; } return true; } COM: <s> checks the java vendor and version and returns true if running a version </s>
funcom_train/17700337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean inSameManager() { Class[] cc = getClassContext(); // skip past current set of calls to this manager int i = 0; while (i < cc.length && cc[0] == cc[i]) i++; // check if there is another call to this manager while (i < cc.length) { if (cc[0] == cc[i]) return true; i++; } return false; } COM: <s> returns true if this manager is called while there </s>
funcom_train/3925569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCenterLocation() { x = 0; y = 0; z = 0; int numberEntities = getNumberEntities(); for ( int i = 0; i < numberEntities; i++ ) { SpacePrimitive sp = getEntity( i ); x += sp.getX(); y += sp.getY(); z += sp.getZ(); } x = x/numberEntities; y = y/numberEntities; z = z/numberEntities; } COM: <s> calculate then set the center location for all entities in the set </s>
funcom_train/51812208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBasicCreate() { MutableInterface obj = (MutableInterface) MapBackedBean.createBean(MutableInterface.class); assertNotNull("Returned object is null", obj); obj.setString("Apple"); assertEquals("Wrong value retrieved", "Apple", obj.getString()); } COM: <s> test that performs a basic create no copying and verifies that storing retrieving </s>
funcom_train/9063909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JaretDate getMidDate(TimeBarViewer tbv) { TimeBarViewerDelegate delegate = (TimeBarViewerDelegate) tbv.getData("delegate"); Rectangle diagramRect = TimeBarViewer.convertRect(delegate.getDiagramRect()); JaretDate midDate = tbv.dateForX(diagramRect.x + diagramRect.width / 2); return midDate; } COM: <s> helper retrieving the date displayed in the middle of a viewer </s>
funcom_train/15421559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("AmazonSearchPort".equals(portName)) { setAmazonSearchPortEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/5381285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (string == null) { final StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append("Binding("); //$NON-NLS-1$ stringBuffer.append(getTriggerSequence()); stringBuffer.append(','); stringBuffer.append(command); stringBuffer.append(','); stringBuffer.append(schemeId); stringBuffer.append(','); stringBuffer.append(contextId); stringBuffer.append(','); stringBuffer.append(locale); stringBuffer.append(','); stringBuffer.append(platform); stringBuffer.append(','); stringBuffer.append((type == SYSTEM) ? "system" : "user"); //$NON-NLS-1$//$NON-NLS-2$ stringBuffer.append(')'); string = stringBuffer.toString(); } return string; } COM: <s> the string representation of this binding for debugging purposes only </s>
funcom_train/5458209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawBuffRectangle(int x1, int y1, int x2, int y2, Color c) { Point2D.Double a = new Point2D.Double(x1, y1); Point2D.Double b = new Point2D.Double(x2, y2); drawBuffRectangle(a, b, c); } COM: <s> draws a rectangle out of 2 sets of coordinates for corner points </s>
funcom_train/9883252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DefaultMutableTreeNode createClassificationGUIResult() { DefaultMutableTreeNode root = new DefaultMutableTreeNode(new LeafInfo("SVM Classification Result", // new SVMClassifyViewer( framework, experiment, data, discriminantMatrix, info, this.data.classifyGenes ))); new SVMClassifyViewer(experiment.getExperiment(), discriminantMatrix, this.data.classifyGenes))); return root; } COM: <s> creates analysis result to be inserted into the framework tree node </s>
funcom_train/26525193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hookUpNode(Node localNode) { if( this.localNode != null ) { // first shutdown existing node } this.localNode = localNode; if( console != null ) { console.dreamNameField.setText( localNode.getJob() ); //console.connectAction.setConnect( false ); } requestHandler.setNode( localNode ); } COM: <s> gives a new local node to the console </s>
funcom_train/37763980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addParameter(Parameter parameter) { if (m_parameters == null) m_parameters = new LinkedList<Parameter>(); m_parameters.add(parameter); if (m_parameterByName == null) m_parameterByName = new HashMap<String, Parameter>(); m_parameterByName.put(parameter.getName(), parameter); } COM: <s> adds a parameter to this property </s>
funcom_train/4312165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getJMenu() { if (jMenu == null) { jMenu = new JMenu(); jMenu.setText("File"); jMenu.add(getNewQuestionItem()); jMenu.add(getOpenItem()); jMenu.addSeparator(); jMenu.add(getJMenuItem()); jMenu.add(getSaveSelectedItem()); jMenu.addSeparator(); jMenu.add(getExitEditorItem()); } return jMenu; } COM: <s> this method initializes j menu </s>
funcom_train/16474924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveDocument (String filePath) { FileWriter fWriter; BufferedWriter bWriter; try { fWriter = new FileWriter(filePath); bWriter = new BufferedWriter(fWriter); bWriter.write(doc.getdata()); bWriter.close(); fWriter.close(); } catch (IOException e) { e.printStackTrace(); } } COM: <s> save the current document to a file </s>
funcom_train/8461577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(byte b, Collection c) { if ((c != null) && (c.size() > 0)) { String s2 = get(b); Iterator it = c.iterator(); while (it.hasNext()) { String s = (String) it.next(); if (s2 == null) s2 = s; else s2 += lineSeparator + s; } set(b, s2); } } COM: <s> add each element of collection c as new lines in field b </s>
funcom_train/42188413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToggleButton getJPriceButton() { if (jPriceButton == null) { jPriceButton = new JToggleButton(); jPriceButton.setText("Precio"); jPriceButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { selectedChart = priceChart; showGains(selectedHarvest, selectedChart); } }); } return jPriceButton; } COM: <s> this method initializes j price button </s>
funcom_train/17145899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fix() { List<Part> fixedParts = new ArrayList<Part>(); for (Part p : parts) { if (p.isViable()) { BoundingBox bb1 = p.getBoundingBox(); p.translateToOrigin(); fixedParts.add(p); BoundingBox bb2 = p.getBoundingBox(); } } parts = fixedParts; } COM: <s> translate everything to the origin and remove degenerate parts </s>
funcom_train/16911961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PPath getLine(final Point2D center) { if (isSelfConnection()) { return new PPath(new Arc2D.Double(getX(), getY() - 7, 22, 15, 1, 355, Arc2D.OPEN)); } else { return new PPath(new Line2D.Double(globalToLocal(source.getCenter()), center)); } } COM: <s> create the line depending on whether this is self connected or not </s>
funcom_train/1561869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public GeoList TTest2(String label, GeoList sampleList1, GeoList sampleList2, GeoText tail, GeoBoolean pooled) { AlgoTTest2 algo = new AlgoTTest2(cons, label, sampleList1, sampleList2, tail, pooled); GeoList result = algo.getResult(); return result; } COM: <s> ttest2 with sample data </s>
funcom_train/45692336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEventInfoPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SongEvent_eventInfo_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SongEvent_eventInfo_feature", "_UI_SongEvent_type"), EsxPackage.Literals.SONG_EVENT__EVENT_INFO, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the event info feature </s>
funcom_train/46077440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNumMaps(int num) { Map[] res = new Map[num]; int count = 0; //Copy old maps if (maps != null) { for (; count<maps.length && count<num; count++) { res[count] = maps[count]; } } //Init new maps for (; count<num; count++) { res[count] = null; } maps = res; } COM: <s> resizes the map array keeping old entries </s>
funcom_train/14059863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean doStep() { DefaultList<IConfigItem<?>> ics; int i; ics = this.m_items; for (i = (ics.size() - 1); i >= 0; i--) { if (!(ics.get(i).step())) { return false; } } this.m_runIndex++; return true; } COM: <s> perform one step of the configuration item </s>
funcom_train/21844467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(final InstructionContext env) throws JBasicException { final Value value1 = env.popForUpdate(); if( env.codeStream.registers == null ) env.codeStream.registers = new RegisterArray(100); final int idx = env.instruction.integerOperand; if ((idx < 0) | (idx >= env.codeStream.registers.size())) throw new JBasicException(Status.FAULT, new Status(Status.REGNUM, idx)); env.codeStream.registers.set(idx, value1); } COM: <s> store top of stack in temporary register </s>
funcom_train/45271349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getIndexInChain(List<FilterSliceNode> chain, String taskName) { for (Iterator<FilterSliceNode> i = chain.iterator(); i.hasNext(); ) { FilterSliceNode fsn = i.next(); if (taskName.equals(StreamScheduler.getTaskNameFromFSN(fsn))) return chain.indexOf(fsn); } return -1; } COM: <s> returns the index of the entry in the provided list chain that has </s>
funcom_train/10010078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object getBO(PrevalentRoot root) { if (packedBO instanceof Long) { return root.load((Long)packedBO); } else if (packedBO instanceof Persistent) { Persistent bo=(Persistent)packedBO; if (bo.id==0) { root.register(bo); } return bo; } else { return null; } } COM: <s> returnes the stored busness object </s>
funcom_train/32869884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void execute() throws IllegalAccessException, InvocationTargetException { REST adviceRest = new REST(); Object [] restParams = new Object[stackArgsLength - 1 ]; System.arraycopy(stackArgs,1,restParams,0,restParams.length); adviceRest.setObject(restParams); advice.methodObj.invoke(constructorCut,new Object[]{stackArgs[0],adviceRest}); } COM: <s> pass the target as the first argument of the advice method </s>
funcom_train/3464678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LinkedList getVisibleChildren() { LinkedList children = getChildren(); Iterator iter = children.iterator(); LinkedList l = new LinkedList(); while(iter.hasNext()) { Node n = (Node)iter.next(); if(n.isVisible()) { l.add(n); } } return l; } COM: <s> returns a linked list of the visible children </s>
funcom_train/9558455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User breakFriendship(String username) throws TwitterException { String page = fetchWebPage("http://twitter.com/friendships/destroy/" //$NON-NLS-1$ + username + ".json", null, true); //$NON-NLS-1$ User user; try { user = new User(new JSONObject(page), null); } catch (JSONException e) { throw new TwitterException(e); } return user; } COM: <s> destroy discontinues friendship with the user specified in the id </s>
funcom_train/28366696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setChoosingGraphMode() { graphChoosingYes = true; graphChosenYes = false; synchronized (graphDataV) { synchronized (graphColorV) { for (int i = 0, n = graphColorV.size(); i < n; i++) { graphColorV.set(i, lineDefaultColor); } } } clickedPoint.setDisplayed(false); updateGraphJPanel(); chooseModeButton.setSelected(graphChoosingYes); } COM: <s> sets the choosing graph mode attribute of the function graphs jpanel object </s>
funcom_train/17206744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Operand getLocalDual(int i) { if (VM.VerifyAssertions) VM._assert(_localState[i + 1] == DUMMY); Operand local = _localState[i]; if (DBG_LOCAL || DBG_SELECTED) db("getting local " + i + " for use: " + local); return local.copy(); } COM: <s> gets the specified local variable long double </s>
funcom_train/40679148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect(final HANDOFF listener) { connect(HANDOFF.class, listener, new GstAPI.GstCallback() { @SuppressWarnings("unused") public void callback(BaseSink sink, Buffer buffer, Pad pad) { listener.handoff(sink, buffer, pad); } }); } COM: <s> add a listener for the code handoff code signal on this sink </s>
funcom_train/37015580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isGroup(String what) { try { String[] groups = listGroups(); for (int i = 0; i < groups.length; i++) { if (what.equals(groups[i])) { return true; } } } catch (Exception e) { e.printStackTrace(); } return false; } COM: <s> tests if the string is a group </s>
funcom_train/36764487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int isOperator(String check_operator){ String[] operators = {"+","-","*","/"}; for(int index=0; index<operators.length; index++){ if(operators[index].contentEquals(check_operator)){ return 1; } } return 0; } COM: <s> this function checks if the parameter string is an operator out of </s>
funcom_train/22368951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteFile(ILocalAudioObject file) { // Only do this if file is in repository if (getFolderForFile(file, osManager, repositoryHandler) != null) { removeFromRepository(file); } // File is on a device else if (deviceHandler.isDevicePath(file.getUrl())) { Logger.info("Deleted file ", file, " from device"); } } COM: <s> permanently deletes an audio file from the repository meta information </s>
funcom_train/27947075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ChemFile read() throws IOException { ChemFile file = new ChemFile(); while (true) { ChemFrame cf = readFrame(); if (cf == null) { break; } file.addFrame(cf); Enumeration propIter = cf.getFrameProps().elements(); while (propIter.hasMoreElements()) { file.addProperty((String)propIter.nextElement()); } } return file; } COM: <s> read the xyz file </s>
funcom_train/46874225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createNumbers() { final int size = map.size(); edgeListPositions = new int[size]; edgeListMaximums = new int[size]; /* get all maximum-values and set the initial positions */ for (int i = 0; i < size; i++) { edgeListPositions[i] = 0; edgeListMaximums[i] = map.get(keys[i]).size() - 1; } /* set the initial (global) position */ position = size - 1; } // createNumbers() COM: <s> creates the position and maximum arrays used for the further </s>
funcom_train/19227862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedTool( VueTool pTool) { if( pTool != null) { PaletteButton button = (PaletteButton) mToolButtons.get( pTool.getID() ); if( button != null) { mButtonGroup.setSelected( button.getModel(), true); } } } COM: <s> set selected tool </s>
funcom_train/636795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHits() { m_resultsType = LOCATIONS; // clear out current cells clearResultsView(); // If we got no hits, say so if (GMap.s_hits.size() == 0) { showHelp("No results found."); return; } Enumeration hits = GMap.s_hits.elements(); while (hits.hasMoreElements()) { Hit hit = (Hit) hits.nextElement(); addHit(hit); // Invalidate our view m_results.invalidate(); // a little spacing never hurt anyone //m_currentY += 3;p } buildActionMenu(); invalidate(); } COM: <s> sets and displays the hits in our table </s>
funcom_train/46739823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTermCategoryRef(DisplayModel termCategoryRef) { if (Converter.isDifferent(this.termCategoryRef, termCategoryRef)) { DisplayModel oldtermCategoryRef= new DisplayModel(this); oldtermCategoryRef.copyAllFrom(this.termCategoryRef); this.termCategoryRef.copyAllFrom(termCategoryRef); setModified("termCategoryRef"); firePropertyChange(String.valueOf(APPLICATIONCONTROLVALUES_TERMCATEGORYREFID), oldtermCategoryRef, termCategoryRef); } } COM: <s> category for this control </s>
funcom_train/26397530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String login(final String userKey, final String applicationKey) throws XmlRpcException, IOException { final Vector<Object> params = new Vector<Object>(); params.addElement(userKey); params.addElement(applicationKey); return (String) call("user.login_key", params); } COM: <s> login for a user </s>
funcom_train/17274643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColor() { String returnString = ""; if(colorOverride){ return color; } if(vertex.currentVertex() == true){ returnString = "red"; }else{ if (vertex.active() == true || vertex.finalized() == true){ returnString = "white"; } else { if (vertex.inUse() == true) { returnString = "yellow"; } else { returnString = "green"; } } } return returnString; } COM: <s> gets the color of the background for the vertex </s>
funcom_train/26466972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void parseTemplate() throws ParseException { parsedContent = templateParser.parseTemplate(source, this, this, lax); timeStamp = System.currentTimeMillis(); generatedFunction = makeFunction(parsedContent, makeFunctionName(source.getName())); keepParsedTemplate(source.getName(), generatedFunction); functionEvaluated = false; } COM: <s> parses the template and set parsed content and generated function </s>