__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/38827270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkStringConsistancy() throws IndexOutOfBoundsException { List<PointString<E>> tlist = getList(); int numPointsPerString = tlist.get(0).size(); int numStrings = tlist.size(); for (int i=0; i < numStrings; ++i) { PointString str = tlist.get(i); if (str.size() != numPointsPerString) throw new IndexOutOfBoundsException(RESOURCES.getString("arrStringSizeErr"). replace("<NUM/>",String.valueOf(i))); } } COM: <s> determines if each string in this array has the same number of points </s>
funcom_train/2321469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object invoke(final String method, final Object args) throws Exception { final Thread thread = Thread.currentThread(); final int priority = thread.getPriority(); thread.setPriority(fast ? Thread.MAX_PRIORITY : Thread.MIN_PRIORITY); try { return Remote.invoke(item, method, args); } finally { thread.setPriority(priority); } } COM: <s> this method intercepts the remote invocation thread and alters its </s>
funcom_train/16454077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public YASLErrorHandler getErrorHandler() { YASLErrorHandler errorHandler; if (singletonMap.containsKey(KEY_ERROR_HANDLER)) { errorHandler = (YASLErrorHandler) singletonMap.get( KEY_ERROR_HANDLER); } else { errorHandler = createErrorHandler(); singletonMap.put(KEY_ERROR_HANDLER, errorHandler); } return errorHandler; } COM: <s> returns the error handler for this application </s>
funcom_train/18826540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String mutualAuthentication(String piggyBackMSG) throws TransportException{ try{ Handler h=new Handler(); return myClient.mutualAuthentication(piggyBackMSG,h); }catch(TransportException e){ System.out.println("Mutualauthentication Fail: "+e.getMessage()); throw e; } } COM: <s> mutual authentication set piggy back msg as null if no piggyback </s>
funcom_train/7713879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void failEdge(int fishAddrA, int fishAddrB) { EmulatedNode nodeA = this.getEmulatedNode(fishAddrA); EmulatedNode nodeB = this.getEmulatedNode(fishAddrB); if(nodeA != null && nodeB != null) { nodeA.removeEdge(fishAddrB); nodeB.removeEdge(fishAddrA); } } COM: <s> an edge was removed </s>
funcom_train/8661016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefaultTransactionIsolation(int v) { assertInitializationAllowed(); switch (v) { case Connection.TRANSACTION_NONE: case Connection.TRANSACTION_READ_COMMITTED: case Connection.TRANSACTION_READ_UNCOMMITTED: case Connection.TRANSACTION_REPEATABLE_READ: case Connection.TRANSACTION_SERIALIZABLE: break; default: throw new IllegalArgumentException(BAD_TRANSACTION_ISOLATION); } this.defaultTransactionIsolation = v; } COM: <s> set the value of default transaction isolation which defines the state of </s>
funcom_train/50342908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void resumeAutomaticRunning() { if ( (_activeTrain.getStatus()==ActiveTrain.WORKING) || (_activeTrain.getStatus()==ActiveTrain.READY) ) { _autoTrainAction.cancelDoneSensor(); if (initialize()) { _resumingAutomatic = true; } else { log.error("Failed to initialize throttle when resuming automatic mode."); } } } COM: <s> resumes automatic running after a working session using an external throttle </s>
funcom_train/41151715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isComplete() { int i; boolean result; result = true; if (!m_Complete) { for (i = 0; i < m_NeighborList.length; i++) { if (m_NeighborList[i].getInstance().classIsMissing()) { result = false; break; } } m_Complete = result; } return result; } COM: <s> returns true if the neighborhood has no more unlabeled neighbors </s>
funcom_train/5344325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeImpl(LongInterval i) { int point = Collections.binarySearch(intervals, i, LongIntervalComparator.INSTANCE); if(point < 0) throw new IllegalStateException("interval (" + i + ") doesn't exist in list: " + intervals); intervals.remove(point); } COM: <s> removes from the list quickly </s>
funcom_train/4970962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Source getDataSource() { Source source; Resource resource = new ServletContextResource(getServletContext(), "/WEB-INF/xml/homePage.xml"); try { source = new StreamSource(resource.getInputStream()); } catch (IOException e) { logger.error("IOException"); source = null; } return source; } COM: <s> returns associated data </s>
funcom_train/31651507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkPassphrase(String passphrase) { try { String digest1 = DigestTools.hexDigest(passphrase,"MD5"); //SM.debug( "given pp = " + passphrase ); //SM.debug( "given digest = " + digest1 ); //SM.debug( "this pp = " + this.passphrase ); if (this.passphrase.equals(digest1)) { return true; } }catch (Exception e) { SM.warning("MD5 algorithm does not exist"); } return false; } COM: <s> returns true if the passphrase matches the users passphrase </s>
funcom_train/50301841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean supportsTransactionIsolationLevel(int level) throws SQLException { switch (level) { case Connection.TRANSACTION_NONE: return false; case Connection.TRANSACTION_READ_COMMITTED: return true;//true soon case Connection.TRANSACTION_READ_UNCOMMITTED: return false; case Connection.TRANSACTION_REPEATABLE_READ: return true;//?? case Connection.TRANSACTION_SERIALIZABLE: return true;//???? default: return false; } } COM: <s> does this database support the given transaction isolation level </s>
funcom_train/1535974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TriListElem add(float[] vertices, float[] normals) { // if (!inputValid(vertices, normals)) // return null; TriListElem t = new TriListElem(); t.setPrev(back); if (front == null) front = t; if (back != null) back.setNext(t); back = t; int index = chunkSize * count; setFloats(vertices, normals, index); t.setIndex(index); count++; return t; } COM: <s> adds a triangle to the list </s>
funcom_train/5395369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetOutFile() { System.out.println("setOutFile"); File file = null; XsbcSerializer instance = null; instance.setOutFile(file); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set out file method of class org </s>
funcom_train/10749643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void allocate() { trace("a"); List a = new LinkedList(); long allocated = 0; while (allocated < allocate_size) { if (System.currentTimeMillis() > end) break; a.add(allocate_chunk(allocate_chunk_size)); allocated += allocate_chunk_size; if (a.size() > allocate_chunk_list_size) a.remove(0); } } COM: <s> allocates garbage at high rate </s>
funcom_train/17420030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTextFromPage(int page) throws IOException { PdfDictionary pageDic = reader.getPageN(page); PdfDictionary resourcesDic = pageDic.getAsDict(PdfName.RESOURCES); extractionProcessor.processContent(getContentBytesForPage(page), resourcesDic); return (String) extractionProcessor.getResultantText(TextExtractingPdfContentStreamProcessor.RETURN_STRING); } COM: <s> gets the text from a page </s>
funcom_train/12244900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String ret = "["; for (Iterator iter = phonemes.iterator(); iter.hasNext();) { Phoneme element = (Phoneme) iter.next(); ret += element.getName(); if (iter.hasNext()) { ret += " "; } } ret += "] stress: " + printStress() + ", f0: " + getF0Mean(); return ret; } COM: <s> retrieve a string representation of the syllable </s>
funcom_train/44025345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUniqueUserName() { String sessionID = null; if (Config.storeCredentialsInSession()) { sessionID = getInfoFromSession(USR_NAME, getSession()); } else { if (authorizedUsers.containsKey(getCookieValue())) { sessionID = authorizedUsers.get(getCookieValue()).getUserName(); } } return sessionID; } COM: <s> gets username which identifies a user in asi depending on the method of </s>
funcom_train/8904422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleActiveMonitorPresent(DataFrame ampFrame) throws IOException { _claimState = CLAIM_STARTING_STATE; _upstreamNeighborAddress = ampFrame.getSrcAddress(); _upstreamNeighborPort = ampFrame.getSrcPort(); AMPTimer.getInstance().restartOpenTimer(); sendFrame(createSMPFrame(ampFrame)); } COM: <s> copy the upstream neighbor address and port </s>
funcom_train/21015707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFrame getFrame() { if (jFrame == null) { jFrame = new JFrame(); jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jFrame.setJMenuBar(getFrameMenuBar()); jFrame.setSize(initialWidth, initialHeight); jFrame.setContentPane(getFrameContentPane()); jFrame.setTitle("Sweet Home 3D"); } return jFrame; } COM: <s> this method initializes j frame </s>
funcom_train/50446649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProxyRunner getInstance() { ProxyRunner mostAvailable = null; int minSize = 0; for (int i = 0; i < maxRunners; ++i) { if ((mostAvailable == null) || (pool[i].sessionCount() < minSize)) { mostAvailable = pool[i]; minSize = pool[i].sessionCount(); } } return (mostAvailable); } COM: <s> returns the proxy runner that should process the next smtp </s>
funcom_train/34781542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initStopProgressListeners() { if (stopProgressListeners == null && progressListenerFactory != null) { stopProgressListeners = progressListenerFactory .createCommonProgressListeners(command, this); } else if (stopProgressListeners == null) { stopProgressListeners = new ArrayList<ProgressListener>(); } } COM: <s> init stop progress listeners </s>
funcom_train/39189219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getProjectList () { if ( theProjectList == null ) { boolean useLDAP = ( 0 != (UserAccount.getOptions() & UserData.Keywords_LDAPAuth)); theProjectList = ProjectList.getList( UserAccount.getACCS_Id(), useLDAP ); } return theProjectList; } COM: <s> gets the list of all accessible projects </s>
funcom_train/12722454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String retrieveName() { String s = ""; if(this.getFirstname() != null) s += this.getFirstname(); if(this.getMiddlename() != null) { if(!s.equals("")) s += " "; s += this.getMiddlename(); } if(this.getLastname() != null) { if(!s.equals("")) s += " "; s += this.getLastname(); } if(s.equals("")) if(this.getUsername() != null) s += this.getUsername(); return s; } //end retrieveName COM: <s> returns the firstname middlename and lastname of the user </s>
funcom_train/136739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void speciesCBChanged() { String speciesName = (String) speciesCB.getSelectedItem(); // Populate the versionName CB refreshVersionCB(speciesName); // Select the null group (and the null seq), if it's not already selected. if (curGroup != null) { gmodel.setSelectedSeqGroup(null); // This method is being called on purpose to fire group selection event. gmodel.setSelectedSeq(null); // which in turns calls refreshTreeView method. } } COM: <s> the species combo box changed </s>
funcom_train/44297306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate(final Identifier object) { if (object == null) { return; } mandatory("Identifier: must have a code.", object.getCode()); final Citation citation = object.getAuthority(); if (citation != this) { // Avoid never ending loop (TODO: find a better way). container.validate(citation); } } COM: <s> validates the given identifier </s>
funcom_train/3382600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WritableRaster createCompatibleWritableRaster(int w, int h) { if (w <= 0 || h <=0) { throw new RasterFormatException("negative "+ ((w <= 0) ? "width" : "height")); } SampleModel sm = sampleModel.createCompatibleSampleModel(w,h); return new ShortBandedRaster(sm, new Point(0,0)); } COM: <s> creates a raster with the same layout but using a different </s>
funcom_train/24361541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doRemove() { if (locateableList != null) { // copy locateableList into array Object [] locs = locateableList.toArray(); locateableList.clear(); // tell all locateables for (int i=0; i < locs.length; i++) { Locateable loc = (Locateable) locs[i]; loc.removeStartPoint(this); loc.toGeoElement().updateCascade(); } } super.doRemove(); } COM: <s> tells locateables that their start point is removed </s>
funcom_train/35041818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean seekInObject(String key) throws SyntaxException { for (Enumeration elems = objectElements(); elems.hasMoreElements(); ) { try { eat(Json.KEY); } catch (FormatException e) { throw new SyntaxException("" + e); } if (getString().equals(key)) { return true; } } return false; } COM: <s> skips forward inside an object until finds the given key </s>
funcom_train/49321120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSelectionCount() { int result = 0; if (_menuItems != null && _menuItems.length != 0) { for (int i = 0; i < _menuItems.length; i++) { if (_menuItems[i].isSelected()) { result++; } } } return result; } COM: <s> returns the number of selected items </s>
funcom_train/21875106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEncode() { System.out.println("testEncode"); for (int len = 0; len < 1000; len++) { byte[] a = new byte[len]; rnd.nextBytes(a); byte[] k = Base64.encode(a); assertEquals(new String(k), new String(org.apache.commons.httpclient.Base64.encode(a))); } } COM: <s> test of encode method of class org </s>
funcom_train/26662521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFreeDiskSpaceInterval(String interval) throws Exception { freeDiskSpaceInterval = RetryIntervalls.parseIntervalOrNever(interval); if (getState() == STARTED) { scheduler.stopScheduler(timerID, freeDiskSpaceListenerID, freeDiskSpaceListener); freeDiskSpaceListenerID = scheduler.startScheduler(timerID, freeDiskSpaceInterval, freeDiskSpaceListener); } } COM: <s> set the timer interval for scheduling free disk space </s>
funcom_train/17145511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertCommandTextAtBottom(String what) { Document doc = textArea.getDocument(); try { textArea.getCaret().setDot(doc.getLength()); doc.insertString(doc.getLength(), what, null); } catch (BadLocationException ex) { Debug.out("TextEntryOld", "Bad Location"); } } COM: <s> programmatically add text to the bottom of the terminal as though </s>
funcom_train/4741989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperties(String username, String password, String cloud) { properties = new HashMap<String, Object>(); properties.put("username", username); properties.put("password", password); properties.put("cloud", cloud); } COM: <s> the method to get the private key pair information for a singel user </s>
funcom_train/51617301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*private void refreshDowntimes() { DefaultListModel model = new DefaultListModel(); for( int i=0; i<downtimes.size(); i++ ) model.addElement( downtimes.getScheduledDowntime(i).toString() ); lstDowntimes.setModel( model ); }*/ COM: <s> refreshes the list box with the current downtimes </s>
funcom_train/31031059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void txtOpBalFocusLost(FocusEvent e) { gopdr = new Double(0); // To clear any previous data gopcr = new Double(0); // To clear any previous data try { if (optOpDr.isSelected()) { gopdr = validateNumericField(txtOpBal ,lblOpBal,"gopdr"); } else if (optOpCr.isSelected()) { gopcr = validateNumericField(txtOpBal ,lblOpBal,"gopdr"); } } catch (VValidateException ve) {} } COM: <s> opening balance field lost focus event handler </s>
funcom_train/36921198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTitle() { if(title==null) { File fileObj=new File(file); try { BufferedReader in = new BufferedReader(new FileReader(fileObj)); title=in.readLine(); } catch(FileNotFoundException e) { System.err.println(file + " not found" + e.getMessage()); } catch(IOException e) { System.err.println(file + " read error" + e.getMessage()); } } return title; } COM: <s> gets the documents title </s>
funcom_train/13811444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testNoFailure() { try { this.init("testNoFailure"); SIPAgent caller = createAgent("caller"); SIPAgent subscriber = createAgent("subscriber"); // set (bogus) non-failure status code setFailureStatusCode(0); Thread.sleep(1000); caller.setProxy(appServer); caller.call(subscriber); pause(2000); assertThat(subscriber, has(recvdRequest("INVITE"))); subscriber.answer(); pause(2000); assertThat(caller, is(connectedTo(subscriber))); subscriber.end(); pause(2000); assertThat(subscriber, is(disconnected())); assertThat(caller, is(disconnected())); } catch(Exception e) { logger.error("testing failed ", e); fail(e.toString()); //throw e; } } COM: <s> confirms that callers call is forwarded to subscriber </s>
funcom_train/6429915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void event (SchedEvent evt) { // don't really do much here... if (evt instanceof PrologEvent) { // ... except initialize // get the NodeDaemon nodeDaemon = (NodeDaemon)evt.getSource(); // start the thread only if we can multicast if (multicast) { Thread thread = new Thread(this); thread.setName("UDP/Multicast Listener"); thread.start(); } else { Log.err.println("NO MULTICAST! NOTHING TO DO!"); } } } COM: <s> the scheduler sent us an event </s>
funcom_train/28298171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPointSelection() { TransBaseSelection sel=map.getSelection(); if (sel!=null && sel.isPoint()) { TransBaseNode n=map.getNode(sel.getFrom()); if (n!=null) addNodeToSel(n,true); } } COM: <s> add a new selection if a point is selected </s>
funcom_train/14373222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getValue(SplitAxis axis, int frameNum) { if (this == axis.minStuckLine) return axis.minStuckLine.absoluteValue; else if (this == axis.maxStuckLine) return axis.maxStuckLine.absoluteValue; if (frameNum > computedFrame) axis.computePlaceThisFrame(this, frameNum); return absoluteValue; } COM: <s> returns the absolute value of this split line </s>
funcom_train/42012815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPanelBoton() { if (panelBoton == null) { FlowLayout flowLayout = new FlowLayout(); flowLayout.setVgap(37); flowLayout.setHgap(63); panelBoton = new JPanel(); panelBoton.setLayout(flowLayout); panelBoton.add(getBotonCarta(), null); panelBoton.add(getBotonReserva(), null); panelBoton.add(getBotonFacturacion(), null); panelBoton.add(getBotonBalance(), null); } return panelBoton; } COM: <s> this method initializes panel boton </s>
funcom_train/15623390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String formatString(String printString) { if (printString == null) printString = "<null>"; final int length = printString.length(); for (int i=0; i<length; i += LINESIZE) { int end = i + LINESIZE; if (end > length) { end = length; } String oneLine = printString.substring(i, end); } return printString; } COM: <s> this method prints a string to the screen or a to a logfile </s>
funcom_train/49044649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMaxBranchesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EventSet_MaxBranches_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EventSet_MaxBranches_feature", "_UI_EventSet_type"), EventPackage.Literals.EVENT_SET__MAX_BRANCHES, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the max branches feature </s>
funcom_train/41633643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean readElement(IConfigurationElement element) { String name = element.getName(); if ("palette".equals(name)) { PaletteDefinition palette = new PaletteDefinition(element); IConfigurationElement[] toolElements = element.getChildren("tool"); for (IConfigurationElement toolElement : toolElements) { ToolDefinition tool = new ToolDefinition(toolElement); palette.addTool(tool); } registry.addPalette(palette); return true; } return false; } COM: <s> reads a single configuration element </s>
funcom_train/4745314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean createSecurityGroup(String name, String description) { // initialize the interface Jec2 ec2 = new Jec2(getCredentials().getAwsAccessKeyId(), getCredentials().getSecretAccessKey()); try { ec2.createSecurityGroup(name, description); return true; } catch (Exception ex) { Logger logger = Logger.getLogger(this.getClass().getName()); logger.log(Level.SEVERE, "Creating security group failed: " + ex.getMessage()); return false; } } COM: <s> create a security group that can be assigned to an instance </s>
funcom_train/13996570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBasic01() { DefaultURI testURI = new DefaultURI(STRINGS[0], STRINGS[1], STRINGS[2]); assertEquals("invalid scheme", STRINGS[0], testURI.getScheme()); assertEquals("invalid scheme specific part", STRINGS[1], testURI.getSchemeSpecificPart()); assertEquals("invalid fragment", STRINGS[2], testURI.getFragment()); } COM: <s> tests that the basic constructor and getters work correctly </s>
funcom_train/7660128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean addIfUnderCorePoolSize(Runnable firstTask) { Thread t = null; final ReentrantLock mainLock = this.mainLock; mainLock.lock(); try { if (poolSize < corePoolSize) t = addThread(firstTask); } finally { mainLock.unlock(); } if (t == null) return false; t.start(); return true; } COM: <s> create and start a new thread running first task as its first </s>
funcom_train/37238430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hardStop() { if(_log.isInfoEnabled()) { _log.info("Initiating a HARD STOP in the kernel."); } try { this.stop(); } catch (StoppingException e) { if(_log.isErrorEnabled()) { _log.error("Cought a Stopping Exception when trying" + "to hard stop the Kernel, exiting.", e); } System.exit(1); } } // end method hardStop() COM: <s> this effectively kills the server </s>
funcom_train/24537818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test2() { CodeExpressionRef exp = createExpression(bp1, false, false, false, getPriority(-1,true)); try { method.updateExpressionOrder(); } catch (CodeGenException e) { e.printStackTrace(); } assertEquals("Failed to add low priority expression to bp1",exp,getExp(3)) ; } COM: <s> add element with high priority to bp1 </s>
funcom_train/10836346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { final StringBuilder buf = new StringBuilder(getClass().getName()); buf.append(": path="); buf.append(getSafePath()); buf.append(", name="); buf.append(getName()); return buf.toString(); } COM: <s> returns the code string code representation of this resource </s>
funcom_train/36851831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writePacked(BigDecimal value, int integerDigits, int fractionalDigits) throws IOException { if (value.scale() != 0) { value = value.scaleByPowerOfTen(fractionalDigits); } writePacked(Util.format(value, 0, '.', true), integerDigits + fractionalDigits); } COM: <s> writes a tt big decimal tt in packed format </s>
funcom_train/11012285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEvaluateSimple() { HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("testNames.xls"); HSSFSheet sheet = wb.getSheetAt(0); HSSFCell cell = sheet.getRow(8).getCell(0); HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(wb); CellValue cv = fe.evaluate(cell); assertEquals(HSSFCell.CELL_TYPE_NUMERIC, cv.getCellType()); assertEquals(3.72, cv.getNumberValue(), 0.0); } COM: <s> test that the hssfformula evaluator can evaluate simple named ranges </s>
funcom_train/18200634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean getReadRight(String userName) { for (JCheckBox check : containterRead) { if (check.getActionCommand().replaceFirst("READ_", "").equals(userName)) { return check.isSelected(); } else { continue; } } return false; } COM: <s> returns the reading right of a specific user </s>
funcom_train/21253551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(AcceptanceExTO to) { competenceAuthzBO.grantAnyUserCompetence(to.getUserID(), to .getProjectID(), "owner", "canExecuteAcceptance"); Execution ex = persistence.findById(Execution.class, to.getModelID(), false); if (ex != null) persistence.makeTransient(ex); } COM: <s> deletes the execution history by id </s>
funcom_train/47584421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addQueryLanguagePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ProcessInformation_queryLanguage_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ProcessInformation_queryLanguage_feature", "_UI_ProcessInformation_type"), PimPackage.Literals.PROCESS_INFORMATION__QUERY_LANGUAGE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the query language feature </s>
funcom_train/51338326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_variableSingletonFactory() { final Var u = Var.var("u"); // same instance. assertTrue(u == Var.var("u")); // different instance. assertTrue(u != Var.var("x")); assertTrue(u.equals(Var.var("u"))); assertFalse(u.equals(Var.var("x"))); } COM: <s> test the singleton factory for </s>
funcom_train/14081464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean shouldProcessField(CtField f) { int modifiers = f.getModifiers(); if (isStatic(modifiers) || InstrumentationManager.isKoratField(f.getName())) return false; return FilterManager.getFilter().allowProcessing(f.getDeclaringClass().getName()); } COM: <s> helper returns if the given field should be processed i </s>
funcom_train/3836120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelScroll() { if (jPanelScroll == null) { jPanelScroll = new JPanel(); jPanelScroll.setLayout(new BorderLayout()); jPanelScroll.setVisible(false); jPanelScroll.add(getJTextFieldFrom(), java.awt.BorderLayout.WEST); jPanelScroll.add(getJScrollBarTimeScroll(), java.awt.BorderLayout.CENTER); jPanelScroll.add(getJTextFieldTo(), java.awt.BorderLayout.EAST); } return jPanelScroll; } COM: <s> this method initializes j panel scroll </s>
funcom_train/41383552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private AudioTrack getMusic(final String resource) { AudioTrack sound = audio.createAudioTrack(Macadam.class .getResource(resource), true); sound.setType(TrackType.ENVIRONMENT); sound.setVolume(0.7f); sound.setLooping(true); // TODO: ((StreamedAudioPlayer)sound.getPlayer()).setStream() // workaround for setting length of track: // ((StreamedAudioPlayer)sound.getPlayer()).getStream().setLength(10.0f); return sound; } COM: <s> gets the music track by providing the resource </s>
funcom_train/47515700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void issueColourScaleCommand() { double max; double min; double thresh; double[] colours = mInputPanel.getColourScale(); max = colours[0]; min = colours[1]; thresh = colours[2]; if (mRepository.getUseGlobalScale() ) { ResultsCommandManager.setGlobalColourScale(max, min, thresh); } else { ResultsCommandManager.setColourScale(max, min, thresh); } repaint(); } COM: <s> executes a colour scale command based on the current values in the max </s>
funcom_train/20891752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupSuppressElement(Element config) throws ConfigurationException { if (configuration.getValue("suppressNeighborhoodDetection", null) != null) { Element suppress = new Element("suppress"); Element neighborhoodDetection = new Element("neighborhoodDetection"); neighborhoodDetection.setText(configuration.getValue("suppressNeighborhoodDetection").toString()); suppress.addContent(neighborhoodDetection); config.addContent(suppress); } } COM: <s> sets up the suppress element </s>
funcom_train/30075649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ModelAndView onSubmit(Object command) throws ServletException { // the edited object OS os = (OS) command; // delegate the update to the Business layer getGpir().storeOS(os); return new ModelAndView(getSuccessView(), "osId", Integer.toString(os.getId())); } COM: <s> method updates an existing code os code when the form is committed </s>
funcom_train/47673454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Integer getIntegerAttribute(String p_objectName, String p_attribute) throws NullPointerException, MalformedObjectNameException, MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException { ObjectName objectName = null; objectName = new ObjectName(p_objectName); return (Integer) server.getAttribute(objectName, p_attribute); } COM: <s> gets an integer attribute from mules mbean server </s>
funcom_train/3561581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadFinishText(String fileName) throws WizardException { String tempString; try { tempString = ScriptCatcher.textFile2String(fileName); } catch (FileNotFoundException e) { throw new WizardException(e.getMessage()); } if (wizPanels != null && wizPanels[3] != null) { wizPanels[3].setValue("PresentationText", tempString); } } COM: <s> loads the text to be displayed in the last panel </s>
funcom_train/12304853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getTimeLeft() { Date earliestTime = null; for (int i=0;i<this.certs.length;i++) { Date time = this.certs[i].getNotAfter(); if (earliestTime == null || time.before(earliestTime)) { earliestTime = time; } } long diff = (earliestTime.getTime() - System.currentTimeMillis())/1000; return (diff < 0) ? 0 : diff; } COM: <s> returns time left of this credential </s>
funcom_train/50086032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double calculateMassT(List<IIsotope> isoToCond_new, int[] value_In) { double result = 0; for(int i = 0; i < isoToCond_new.size() ; i++){ if(value_In[i] != 0){ result += isoToCond_new.get(i).getExactMass()*value_In[i]; } } return result; } COM: <s> calculate the mass total given the elements and their respective occurrences </s>
funcom_train/9279471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connectionClosed(ConnectionEvent event) { PooledConnection pce = (PooledConnection) event.getSource(); assertSame(pc, pce); try { // open a new logical connection and pass // back to the fixture. newConn[0] = pce.getConnection(); } catch (SQLException e) { // Need to catch the exception here because // we cannot throw a checked exception through // the api method. Wrap it in a RuntimeException. throw new RuntimeException(e); } } COM: <s> mimic a pool handler that returns the pooled connection </s>
funcom_train/1481278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Token reinit(char[] newTermBuffer, int newTermOffset, int newTermLength, int newStartOffset, int newEndOffset, String newType) { clearNoTermBuffer(); payload = null; positionIncrement = 1; setTermBuffer(newTermBuffer, newTermOffset, newTermLength); startOffset = newStartOffset; endOffset = newEndOffset; type = newType; return this; } COM: <s> shorthand for calling </s>
funcom_train/8605457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setLegionPermissions(int legionarPermission2, int centurionPermission1, int centurionPermission2) { if (checkPermissions(legionarPermission2, centurionPermission1, centurionPermission2)) { this.legionarPermission2 = legionarPermission2; this.centurionPermission1 = centurionPermission1; this.centurionPermission2 = centurionPermission2; return true; } return false; } COM: <s> this method will set the permissions </s>
funcom_train/15407444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLdapObjectClasses(Attributes attributes) { if (ldapObjectclasses != null) { BasicAttribute ocAttrs = new BasicAttribute("objectclass"); for (int i = 0; i < ldapObjectclasses.length; i++) { ocAttrs.add(ldapObjectclasses[i]); } attributes.put(ocAttrs); } } COM: <s> set the ldap object classes to the attributes </s>
funcom_train/323648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkTable() { DBControlUnit dbControlUnit = DBControlUnit.findDatabaseControl(); if (dbControlUnit == null) { return false; } Connection con = DBControlUnit.findConnection(); if (con == null) { return false; } if (con == checkedTableConnection) { return true; } checkedTableConnection = null; if (dbControlUnit.getDbProcess().checkTable(lutTableDef)) { checkedTableConnection = con; return true; } return false; } COM: <s> check the database module is present and that </s>
funcom_train/31651766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeUserFromRole(String roleName, String user) throws Exception { init( ); server.invoke( configuration.getStateManager(), "removeUserFromRole", new Object[] {roleName, user}, new String[]{ "java.lang.String", "java.lang.String" }); } COM: <s> remove a user from a role </s>
funcom_train/2329342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printMatrixSize(MatrixSize size, MatrixInfo info) { format("%10d %10d", size.numRows(), size.numColumns()); if (info.isCoordinate()) format(" %19d", size.numEntries()); println(); } COM: <s> prints the matrix size </s>
funcom_train/10343976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void SendMessageToUser(String from, String message) { try { MailboxWindow.sendMail(new String[]{getMain().getPlayerAccount().getUsername()}, null, "Message from " + from, message); } catch (SQLException e) { getMain().showErrorDialog("Error trying to send a mail thru script!" + e.getMessage()); } } COM: <s> jython scripting language </s>
funcom_train/23411162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPlayerIDPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Player_playerID_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Player_playerID_feature", "_UI_Player_type"), OMPackage.Literals.PLAYER__PLAYER_ID, true, false, false, ItemPropertyDescriptor.TEXT_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the player id feature </s>
funcom_train/47104165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPlayerShooting(boolean bool) { if (GameWorld.getInstance().getLocalPlayer().getReadiedWeapon().getDamageType().isMarksman() || GameWorld.getInstance().getLocalPlayer().getReadiedWeapon().usesRockets()) { GameWorld.getInstance().getLocalPlayer().setIsShooting(bool); return; } } COM: <s> sets whether or not the local player is shooting </s>
funcom_train/16821938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object createEntityManager(final Resource resource) { logger.info("Creating <" + resource.getType() + ">"); final Map<String, String> props = new HashMap<String, String>(); for (Property property : resource.getProperty()) { props.put(property.getName(), property.getValue()); } final EntityManagerFactory emf = Persistence .createEntityManagerFactory(resource.getName(), props); return emf.createEntityManager(); } COM: <s> creates a jpa entity manager </s>
funcom_train/38251123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addNewTask(String taskName,String user_id,int access_id,String description, String parameter_info,String className, String taskInfoAttributes) throws OmnigeneException,RemoteException { return daoInstance.addNewTask(taskName,user_id,access_id,description, parameter_info,className, taskInfoAttributes) ; } COM: <s> to create a new regular task </s>
funcom_train/28375064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMetadatumFactories(Map<String, MetadatumFactory> map) { metadatumFactoryMap.putAll(map); for (MetadatumFactory metadatumFactory : map.values()) { for (Archive a : archives.values()) { try { a.registerMetadatumFactory(metadatumFactory); } catch (LowLevelStorageException ex) { log.error(null,ex); } } } } COM: <s> bulk register metadatum factories this will normally be called by spring </s>
funcom_train/29275386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefaults(ILaunchConfigurationWorkingCopy _launchConfiguration) { _launchConfiguration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_SOURCE_PATH, (String) null); _launchConfiguration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH, (List) null); _launchConfiguration.setAttribute(JavaUISourceLocator.ATTR_FIND_ALL_SOURCE_ELEMENTS, (String) null); } COM: <s> set the default values for the configuration org </s>
funcom_train/13647038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sortColumn(int col, boolean ascending) { this.actualColumn = col; this.actualAscending = ascending; if( this.data == null || col < 0 ) return; Collections.sort( this.data, new JTableSortableComparator(col, ascending)); this.fireTableDataChanged(); } COM: <s> starts the sorting process of a specified column </s>
funcom_train/32612328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void map(URI boid, BindingFaultReference reference) { URI id = ComponentIDs.id(reference); n3(boid, Constants.WSDL_bindingFaultReference, id); n3(id, Constants.RDF_TYPE, Constants.WSDL_BindingFaultReference); n3(id, Constants.WSDL_binds, ComponentIDs.id(reference.getInterfaceFaultReference())); mapExtensions(reference); } COM: <s> maps binding fault reference components </s>
funcom_train/9708486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addServiceContext(ServiceContext srvctx) { if (srvctx == null) { return; } AxisService axisService = srvctx.getAxisService(); if (axisService == null) { return; } if (serviceContextMap == null) { serviceContextMap = new HashMap<String, ServiceContext>(); } serviceContextMap.put(axisService.getName(), srvctx); } COM: <s> adds the specified service context object to the </s>
funcom_train/19905618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize(int blockSize, int recordSize){ debug = false; this.blockSize = blockSize; this.recordSize = recordSize; recsPerBlock = this.blockSize / this.recordSize; blockBuffer = new byte[this.blockSize]; if(inStream != null){ currBlkIdx = -1; currRecIdx = recsPerBlock; }else{ currBlkIdx = 0; currRecIdx = 0; } } COM: <s> initialization common to all constructors </s>
funcom_train/9433045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int removeTrack(long id) { int numremoved = 0; synchronized (this) { for (int i = 0; i < mPlayListLen; i++) { if (mPlayList[i] == id) { numremoved += removeTracksInternal(i, i); i--; } } } if (numremoved > 0) { notifyChange(QUEUE_CHANGED); } return numremoved; } COM: <s> removes all instances of the track with the given id </s>
funcom_train/37503930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireMapInventoryRemoved(int index, Item item) { if (listenerList == null) return; fireMapInventoryChange(new MapInventoryEvent(this, toX(index), toY(index), item, getItemCountAt(index, item), MapInventoryEvent.ITEM_REMOVED)); } COM: <s> fire a map inventory event for a removed item </s>
funcom_train/38286252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected FileService getFileService(EntryPoint ep) throws FileServiceException { FileService fileService = (FileService) fileServicesMap.get(ep.getFileServiceId()); if (fileService == null) { throw new FileServiceException("Invalid EntryPoint : " + ep.getEntryPointId()); } return fileService; } COM: <s> returns the file service for ep throw exception if not extsts </s>
funcom_train/20997756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SimpleVector center() { Logger.print(d_ID() + ".center()", true); SimpleVector temp = new SimpleVector(x1 + (x2-x1)/2, y1 + (y2-y1)/2 ); Logger.print(d_ID() + ".center()", false); return temp; } COM: <s> gets a simple vector pointing to the center of this rectangle </s>
funcom_train/2387327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttrValueTable (int page, String [] attrValueTable) { // clear entries in this.table! for(int i=0;i < attrValueTable.length;i++) { if(attrValueTable[i] != null) { Integer idx = new Integer(i+0x085); this.attrValueTable.put(attrValueTable[i],idx); } } if (page != 0) throw new RuntimeException ("code pages curr. not supp."); } COM: <s> sets the attribute value table for a given page </s>
funcom_train/24171436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void recusiveDelete(final File file) throws IOException { if (file.isDirectory()) { /* Delete all the nested directories and files. */ for (File f : file.listFiles()) { if (f.isDirectory()) { this.recusiveDelete(f); } else { f.delete(); } } } file.delete(); } COM: <s> recursively delete directory and contents </s>
funcom_train/46767020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long store(final ScriptModel script, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { IChainStore chain = new ChainStore(); try { Long scriptId = store(script, chain, call); chain.execute(); // return primary key return scriptId; } catch (Exception ex) { Log.exception(ex); Log.error(script); chain.rollback(); throw ex; } }}; return (Long) call(method, call); } COM: <s> save the script model model creating a new script or updating existing rows </s>
funcom_train/25048457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Message getMessage() { if(message == null) { //Obtain page data Integer messageId = getPageParameters().get(PARAM_MESSAGE_ID).toInteger(); message = messageReader.getUserMessage(messageId, authorizedUserService.getCurrentUserId()); if(message == null) { throw new BusinessLogicException("Cannot find message #" + messageId + " for the current user!"); } } return message; } COM: <s> returns the current message </s>
funcom_train/5395468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetDeserializationTime() { System.out.println("setDeserializationTime"); long value = 0L; CubbyHole instance = new CubbyHole(); instance.setDeserializationTime(value); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set deserialization time method of class org </s>
funcom_train/35562486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkRecursive(WjrTreeItem treeItem, boolean value) { treeItem.setChecked(value, false); for (int i = 0; i < treeItem.getChildCount(); i++) { checkRecursive(treeItem.getChild(i), value); } } COM: <s> checks or unchecks the tree item and its children recursively </s>
funcom_train/45018431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addThumbnailPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NXentry_thumbnail_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NXentry_thumbnail_feature", "_UI_NXentry_type"), NexusPackageImpl.Literals.NXENTRY__THUMBNAIL, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the thumbnail feature </s>
funcom_train/28261830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() { // Jump is relative to _next_ instruction, but by the time we change // the IP, it has already been incremented thrice, so no extra // arithmetic necessary displacement = cpu.getWordFromCode(); cpu.ip = Util.addWords(cpu.ip, displacement, 0); } COM: <s> execute unconditional relative near jump indicated by immediate signed </s>
funcom_train/44898655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void causeNoExceptionRemote() { logger.info("causeNoException"); try { getExTestRemote().causeNoException(); } catch (Throwable t) { logger.error("Unexpected exception 6", t); throw new RuntimeException("Unexpected exception 6", t); } } COM: <s> calls cause no exception in the remote bean </s>
funcom_train/38737319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMenu(String path, Callback callback) throws Exception { if ( path == null ) { log.error("Null path - skipping."); return; } if ( callback == null ) { log.error("Null callback - skipping."); return; } menus.add( new MenuRegistration(path, callback) ); } COM: <s> add menu entries with their callbacks </s>
funcom_train/50552244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void configure(boolean logging) { if (logging) { StreamLogger logger = new StreamLogger(System.out); WebsiteProcessor.attachLogger(logger); Document.attachLogger(logger); DocType.attachLogger(logger); SectionType.attachLogger(logger); ImageGroup.attachLogger(logger); ImageGenerator.attachLogger(logger); } } COM: <s> this configures the website creation process </s>