__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/31431019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IntArray getElementFromTerm(Term t) { final Term[] terms = getTerms(); final int size = terms.length; int i = 0; for ( ; i < size; i++) { if (terms[i].equals(t)) break; } if (i < size) return (IntArray)getElement(i); return null; } COM: <s> get the element associate with a term </s>
funcom_train/9759618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RangeDifference getRangeDifferenceForRightLine(int rightLine) { final List differences= fDifferences; synchronized (differences) { for (Iterator it= differences.iterator(); it.hasNext();) { RangeDifference d= (RangeDifference) it.next(); if (rightLine >= d.rightStart() && rightLine < d.rightEnd()) { return d; } } } return null; } COM: <s> gets the range difference for a line on the right hand side </s>
funcom_train/42943772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValid() { /* check proper size */ if ((id & 0xFFFF000000000000L) != 0) { return false; } /* check checksum */ int c = 0; //for (int i = 0; i < 6; i++) { // c ^= (int)id[i] & 0xFF; //} return (c == 0) ? true : false; } COM: <s> checks if id is valid </s>
funcom_train/51011167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void modifyAnswer() throws Exception { if (answer.equals("")) throw new IllegalDataException("survey.emptyanswer"); try { Connection con = connect(); try { con.setAutoCommit(false); adb.update(con, qid, aid, answer, order); con.commit(); } catch (Exception e) { con.rollback(); throw e; } finally { con.close(); } } catch (Exception e) { Log.error(e); throw e; } } COM: <s> modifies the current answer in the current question </s>
funcom_train/31406458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateObject(ResultSet rs) throws SQLException { _row = getInt(rs, 2); _column = getInt(rs, 3); _abbreviation = rs.getString(4); _name = rs.getString(5); _type = rs.getString(6); } COM: <s> update the object based on a result set </s>
funcom_train/48562342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public void onChange(ChangeEvent event) { Label isSavedInfo = saveInfoDisplay.getIsSavedInfo(); if (isSavedInfo != null) { isSavedInfo.setText(textToDisplay); isSavedInfo.setStyleName("textNotSaved"); if (eventBus != null && saveInfoDisplay.isAutoSave()) { eventBus.fireEvent(new SaveAllEvent()); } } } COM: <s> changes display label style to text not saved and displays text to display </s>
funcom_train/8264661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void allInvalidated() { ArrayList listenersList = this.documentNotificationListeners; int size; synchronized(listenersList) { size = listenersList.size(); } // Traverse list outside synchronized block. // (Shouldn't call listener methods in synchronized block. // Deadlock is possible). But assume list could have // been changed. for(int i = 0; i < size; i++) { try { DocumentNotificationListener dnl = (DocumentNotificationListener) listenersList.get(i); dnl.allInvalidated(); } catch(IndexOutOfBoundsException iob) { // ignore } } } COM: <s> informs listeners that the whole document has been </s>
funcom_train/3081361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void renderRemovePaneDirective(RenderContext rc, ServerComponentUpdate update, StackedPaneEx stackedPane, Component child) { String elementId = ContainerInstance.getElementId(stackedPane); Element removePaneElement = rc.getServerMessage().appendPartDirective(ServerMessage.GROUP_ID_REMOVE, "EPStackedPaneEx.MessageProcessor", "remove-pane"); removePaneElement.setAttribute("eid", elementId); removePaneElement.setAttribute("pane-id", child.getRenderId()); } COM: <s> renders a directive to the code server message code to remove a pane </s>
funcom_train/26383605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void breakpointModified(BreakpointEvent be) { if (logCategory.isEnabled()) { Log.log(Log.DEBUG, this, "modifying breakpoint '" + be.getBreakpoint() + "' in " + sourceFile.getName()); } // Have to rebuild the entire list from scratch since we can't // rely on the breakpoint staying in the same location. setBreakpoints(); } // breakpointModified COM: <s> invoked when a breakpoint has been modified </s>
funcom_train/28977957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteOldData(InputStream in) throws SQLException, DatabaseUnitException, ClassNotFoundException, IOException { logger.info("importing data..."); ConnectionFactory factory = ConnectionFactory.getFactory(); factory.setProperties(System.getProperties()); logger.info("create connection..."); Connection connection = factory.getConnection(); try { deleteOldData(in, connection); } finally { factory.close(connection); } } COM: <s> throws an exception in case something goes wrong </s>
funcom_train/9363454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopSync() { if (DebugFlags.WEB_SYNC_MANAGER) { Log.v(LOGTAG, "*** WebSyncManager stopSync ***, Ref count:" + mStartSyncRefCount); } if (mHandler == null) { return; } if (--mStartSyncRefCount == 0) { mHandler.removeMessages(SYNC_MESSAGE); } } COM: <s> stop sync requests sync manager to stop sync </s>
funcom_train/34355761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isMediaTypeAcceptable(MediaType mediaType) { // check for all used MIME types of JSON (including the non-standard ones // (if the client requests something that is not standard, and we understand it, // we will still honor the request) return mediaType.toString().equals("application/json") || mediaType.toString().equals("application/x-javascript") || mediaType.toString().equals("text/javascript") || mediaType.toString().equals("text/x-javascript") || mediaType.toString().equals("text/x-json") || mediaType.toString().equals("text/json"); } COM: <s> checks whether this writer can produce serialization in the specified mime type </s>
funcom_train/4112051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBack4Band() { if (back4Band == null) {//GEN-END:|52-getter|0|52-preInit // write pre-init user code here back4Band = new Command("Back", Command.BACK, 0);//GEN-LINE:|52-getter|1|52-postInit // write post-init user code here }//GEN-BEGIN:|52-getter|2| return back4Band; } COM: <s> returns an initiliazed instance of back4 band component </s>
funcom_train/3812141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String stateToString(long state) { StringBuilder buf = new StringBuilder(); if ((state & Synthesizer.QUEUE_EMPTY) != 0) buf.append(" QUEUE_EMPTY "); if ((state & Synthesizer.QUEUE_NOT_EMPTY) != 0) buf.append(" QUEUE_NOT_EMPTY "); return super.stateToString(state) + buf.toString(); } COM: <s> returns a string of the names of all the states implied </s>
funcom_train/23232461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIdByImage(Image i) { Iterator<String> itr = imageCache.keySet().iterator(); int searchId = -1; if (i != null) { while (itr.hasNext()) { Image img = imageCache.get(itr.next()); searchId++; if (img.equals(i)) { break; } } } return searchId; } COM: <s> this function uses the crc32 checksums to find the cached version of the </s>
funcom_train/5669749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateEntityProperties(BufferedReader in, EntityProperty[] eProps) throws IOException { for (int x = 0; x< eProps.length; x++) { float f = Float.parseFloat(in.readLine()); eProps[x].addValue(f, bec.timeStep); updateIndices(in, eProps[x]); } } COM: <s> updates the properties of the entity property array as read from the file </s>
funcom_train/8335166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setTrainingState(TrainingState trainingState) { TrainingState oldTrainingState = this.trainingState; this.trainingState = trainingState; //abc: this next line is firing & causing reaction; not 2nd time propertyChangeSupport.firePropertyChange(PROP_TRAININGSTATE, oldTrainingState, trainingState); } COM: <s> set the value of training state </s>
funcom_train/46748552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setResourceId(Long resourceId) { if (!(this.resourceId.longValue() == resourceId.longValue())) { Long oldresourceId= 0L; oldresourceId = this.resourceId.longValue(); this.resourceId = resourceId.longValue(); setModified("resourceId"); firePropertyChange(String.valueOf(RESOURCESCHEDULES_RESOURCEID), oldresourceId, resourceId); } } COM: <s> resource slot with this schedule </s>
funcom_train/14402721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyExceptionListener(boolean isError, Throwable pEx) { if (!mListeners.isEmpty()) { Vector targets; synchronized (mListeners) { targets = (Vector) mListeners.clone(); } Enumeration e = targets.elements(); while (e.hasMoreElements()) { if (isError) { ((IErrorHandler) e.nextElement()).error(pEx); } else { ((IErrorHandler) e.nextElement()).warning(pEx); } } } } COM: <s> notifies all registered listener of exceptions </s>
funcom_train/1342577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHttpErrorStringThrowable() throws Exception { InternalServerError_500 testObj=new InternalServerError_500("This it the message...",new ArithmeticException("I'm nested..")); assertTextPresent(testObj,"This it the message..."); assertTextPresent(testObj,"I'm nested.."); assertTextPresent(testObj,"java.lang.ArithmeticException"); assertTextPresent(testObj,getClass().getName()); } COM: <s> test for void http error string throwable </s>
funcom_train/23467514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addImplementPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GroundTemplate_implement_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GroundTemplate_implement_feature", "_UI_GroundTemplate_type"), TemplatePackage.Literals.GROUND_TEMPLATE__IMPLEMENT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the implement feature </s>
funcom_train/35673356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHostToJsonTransform() throws HostTransformException { DfhcommareaJsonTransformers transformers = new DfhcommareaJsonTransformers(); StringWriter writer = new StringWriter(); transformers.toJson(HostData .toByteArray(LsfileaeCases.getHostBytesHex()), writer); assertEquals(LsfileaeCases.getJson(), writer.toString()); } COM: <s> transform host data and test json result </s>
funcom_train/10925691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumItems() { int numItems = -1; String numItemsStr = getText(); if (numItemsStr != null && numItemsStr.length() > 0) { try { numItems = new Integer(numItemsStr); } catch(NumberFormatException e) { /* NOTE: default to unknown */ } } return numItems; } COM: <s> gets number of items </s>
funcom_train/37242015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasNote(Note note){ for (int i = 0; i < phraseList.size(); i++) { Phrase phr = (Phrase)phraseList.get(i); Note[] notes = phr.getNoteArray(); for (int j = 0; j < notes.length; j++) { Note n = (Note)notes[j]; if(note.getNote().equals(n.getNote())) return true; } } return false; } COM: <s> checks against the phrase list for a particular note </s>
funcom_train/2615262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { inputManager.resetAllGameActions(); board = new Board(); //Sets up the starting position off the game. board.setUpStart(); //Sets if the diffrent players should be human or computer. player1 = new HumanPlayer(inputManager, DiskColor.BLACK, board); //player1 = new ComputerPlayer(DiskColor.BLACK, board); //player2 = new HumanPlayer(inputManager, DiskColor.WHITE, board); player2 = new ComputerPlayer(DiskColor.WHITE, board); } COM: <s> sets up so that the game can begin </s>
funcom_train/46301594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BlockState bestState(Observation observation, BlockState blockState) { BlockInstance blockInstance = blockState.getBlockInstance(); BlockConfigurationEntry blockConfig = blockInstance.getBlock(); return _blockStateService.getBestBlockLocation(observation, blockInstance, 0, blockConfig.getTotalBlockDistance()); } COM: <s> finds the best block state assignment along the entire length of the block </s>
funcom_train/11942425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireProgressEvent(ProgressEvent evt) { Object[] listeners = listenerList.getListenerList(); // Each listener occupies two elements - the first is the listener class // and the second is the listener instance for (int i=0; i<listeners.length; i+=2) { if (listeners[i]==ProgressEventListener.class) { ((ProgressEventListener)listeners[i+1]).ProgressEventOccurred(evt); } } } COM: <s> private class to let subscribers know when progress is made </s>
funcom_train/2289976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDateExpired(String resourcename, long dateExpired, boolean recursive) throws CmsException { CmsResource resource = readResource(resourcename, CmsResourceFilter.IGNORE_EXPIRATION); getResourceType(resource).setDateExpired(this, m_securityManager, resource, dateExpired, recursive); } COM: <s> changes the expire date of a resource </s>
funcom_train/21607659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected BeanWrapper instantiateBean(String beanName, RootBeanDefinition mbd) { try { Object beanInstance = getInstantiationStrategy().instantiate(mbd, beanName, this); BeanWrapper bw = new BeanWrapperImpl(beanInstance); initBeanWrapper(bw); return bw; } catch (Throwable ex) { throw new BeanCreationException(mbd.getResourceDescription(), beanName, "Instantiation of bean failed", ex); } } COM: <s> instantiate the given bean using its default constructor </s>
funcom_train/5428032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean printErrors() { if (!errors.isEmpty()) { System.err.println("Errors in the input, the statement is skipped."); for (String e : errors) { System.err.println(e); } errors.clear(); return true; } return false; } COM: <s> print errors that encountered during parsing </s>
funcom_train/34909795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCommand(Request request) { if (request instanceof ReconnectRequest) { Object view = ((ReconnectRequest) request).getConnectionEditPart() .getModel(); if (view instanceof View) { Integer id = new Integer(BzVisualIDRegistry .getVisualID((View) view)); request.getExtendedData().put(VISUAL_ID_KEY, id); } } return super.getCommand(request); } COM: <s> extended request data key to hold editpart visual id </s>
funcom_train/39915358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTextField31() { System.out.println("getTextField31"); Page1 instance = new Page1(); TextField expResult = null; TextField result = instance.getTextField31(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get text field31 method of class timesheetmanagement </s>
funcom_train/11653123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayMessage(String message, boolean isError) { int type = 0; if (isError) { type = JOptionPane.ERROR_MESSAGE; } else { type = JOptionPane.INFORMATION_MESSAGE; } JOptionPane.showMessageDialog(null, message, isError ? "Error" : "Information", type); } COM: <s> shows a message using a dialog box </s>
funcom_train/41965342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSelectionInterval(int index0, int index1) { mAnchorIndex = index0; mLeadIndex = index1; int[] indices = order(index0, index1); index0 = indices[0]; index1 = indices[1]; if (0 <= index0) { updateUnselection(index0, index1); } } COM: <s> changes the selection to be the set difference of the current selection and </s>
funcom_train/27862136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void Krelease(int keysym) { if(locked)return; if(keysym==Keysym.ControlL){ if(controlHasBeenPressed){ toggleMenu(); controlHasBeenPressed =false; } }else{ controlHasBeenPressed = false; } currentwindow = detectWindow(); if(((MasterViewer) viewer).getBouncer().testOwnership(owner, currentwindow)&&viewer.getFrameManager().get(currentwindow)!=null) viewer.getFrameManager().get(currentwindow).endResize(); if(testRight()) ((MasterViewer) viewer).getBouncer().handleKey(keysym,false,currentwindow); } COM: <s> callback for key released event </s>
funcom_train/40102976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addFileToRepository(final File newFile) { DocumentService docService = new DocumentServiceImpl(); docService.saveDocument(teamdocsSession.getDirectory(), teamdocsSession.getUser(), newFile, getFileName(), getSummary()); feedback.info("Document uploaded successfully"); } COM: <s> save the file into the repository </s>
funcom_train/43674438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OSCMessage moveBeforeMsg(Node aNode) { // removed 02-oct-05 // this.setGroup( aNode.getGroup() ); return (new OSCMessage("/n_before", new Object[] { new Integer(this.getNodeID()), new Integer(aNode.getNodeID()) })); } COM: <s> creates an osc code n before code message </s>
funcom_train/863038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDeclareBeanJython() throws Exception { TestBean testBean = new TestBean(); this.mgr.declareBean("testBean", testBean, TestBean.class); this.mgr.exec("jython", PYTHON_TESTBEANSCRIPT, 0, 0, IOUtils .getStringFromReader(new FileReader(PYTHON_TESTBEANSCRIPT))); System.out.println("Supervalue: " + testBean.getSuperValue()); assertEquals(testBean.getSuperValue(), "MySuperValue"); } COM: <s> test declare bean jython </s>
funcom_train/14243836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSelection() { Vector choices = getChoices(); _choices.removeAll(choices); for (int i = 0; i < choices.size(); i++) { ((DefaultListModel)_choicesList.getModel()).removeElement(choices.get(i)); } _selected.addAll(choices); for (int i = 0; i < choices.size(); i++) { ((DefaultListModel)_selectedList.getModel()).addElement(choices.get(i)); } } COM: <s> adds the selected elements in the choices list to the selected list </s>
funcom_train/47135601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSpreadPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_HistPrice_spread_feature"), getString("_UI_PropertyDescriptor_description", "_UI_HistPrice_spread_feature", "_UI_HistPrice_type"), TradingPackage.Literals.HIST_PRICE__SPREAD, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the spread feature </s>
funcom_train/3840123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillHand(String playername) { int missingLetters, i; Hand currentHand = _usernamesHands.get(playername); if (getNumLettersLeft() > 0) { missingLetters = _handLength - currentHand.length() - 1; for (i = 0; i <= missingLetters; i++) { try { currentHand.addTile(_pioche.pickTile()); } catch (IndexOutOfBoundsException e) { /* Last letter! */ _logger.info("Last turn!"); } } } setHand(playername, currentHand); } COM: <s> fills the hand of a specific player </s>
funcom_train/29612064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRefBean() throws Exception { RegionInfo r = (RegionInfo) factory.getBean("region"); CityScape cityFinder = (CityScape) factory.getBean("cityFinder"); assertEquals("Singleton test", cityFinder, r.getCityFinder()); } COM: <s> test ref id </s>
funcom_train/37449124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetInteraction(Interaction interaction) { setKD(interaction.getKD()); // Only set the short labels if the interaction has non null values. BioSource biosrc = interaction.getBioSource(); setOrganism(biosrc != null ? biosrc.getShortLabel() : null); CvInteractionType inter = interaction.getCvInteractionType(); setInteractionType(inter != null ? interaction.getCvInteractionType().getShortLabel() : null); } COM: <s> resets this interaction with give interaction object </s>
funcom_train/4971950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInterleavedDoubles(double[] rhs){ // Checks to make sure this size is correct for (int i = 0; i < this.re.length; i++) { this.re[i] = rhs[i*2]; this.im[i] = rhs[i*2 + 1]; } } COM: <s> todo add comments </s>
funcom_train/20751519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Image getImage(Template template) { ImageRegistry registry= CMakeEditorUI.getDefault().getImageRegistry(); Image image= registry.get(TEMPLATE_IMAGE); if (image == null) { ImageDescriptor desc= CMakeEditorUI.imageDescriptorFromPlugin("com.cthing.cmakeed.ui", TEMPLATE_IMAGE); //$NON-NLS-1$ registry.put(TEMPLATE_IMAGE, desc); image= registry.get(TEMPLATE_IMAGE); } return image; } COM: <s> always return the default image </s>
funcom_train/48107432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void test(){ //System.out.println("reading " + irSensors.getReading(LEFT_REAR)); //testSonarReading(); //this.testIr(); //this.setLedDifference( irSensors.getReading( LEFT_FRONT ) - irSensors.getReading( LEFT_REAR) ); } COM: <s> empty function to run arbitrary tests </s>
funcom_train/41976263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void bubblesort(Cluster[] arr) { for (int i = arr.length - 1; i >= 0; i--) { for (int j = 0; j < i; j++) { if (arr[j].rStoreID > arr[j + 1].rStoreID) { Cluster t = arr[i]; arr[i] = arr[j]; arr[j] = t; } } } } COM: <s> sorts an array of clusters with bubblesort </s>
funcom_train/42182923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pathToNodeChanged(T node) { if (node != null) { TreePath toRoot = getPathToRoot(node); do { nodeChanged((T) toRoot.getLastPathComponent()); toRoot = toRoot.getParentPath(); } while (toRoot != null); } } COM: <s> notifies model that all nodes in path to current node inclusive was changed </s>
funcom_train/32018315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateColors(){ String label = "name"; graphView = new GraphView(frame, graph, label, "graph"); treeView = new GraphView(frame, graph, label, "tree"); loadDisplay(frame.getGraphType()); } COM: <s> redraws the graph </s>
funcom_train/19537091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addKnownSettingsFile(File file) { if (!knownSettingsFiles.contains(file)) { knownSettingsFiles.add(file); pcs.firePropertyChange(KNOWN_SETTINGS_FILES_PROP_NAME, null, file); ps.saveFileList(KNOWN_SETTINGS_FILES_PROP_NAME, knownSettingsFiles); } } COM: <s> add a new known settings file </s>
funcom_train/1849454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setHeaders(Request request, String sha1, String md5, String timestampModified, String type) { RestletUtils.addHeaders(request, "sha1", sha1); RestletUtils.addHeaders(request, "md5", md5); RestletUtils.addHeaders(request, "lastModified", timestampModified); RestletUtils.addHeaders(request, "type", type); } COM: <s> sets the headers of a request object </s>
funcom_train/2389459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getBusinessRatioMenuItem() { if (businessRatioMenuItem == null) { businessRatioMenuItem = new JMenuItem(); businessRatioMenuItem.setText("Kennzahl"); businessRatioMenuItem.setIcon(new ImageIcon(getClass().getResource("/images/icons/award_star_add.png"))); businessRatioMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { btnActionPerformedCreateBRatio(); } }); } return businessRatioMenuItem; } COM: <s> this method initializes business ratio menu item </s>
funcom_train/22309740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String defineSelectedFileName(int fileIndice, String format) { String imageFileName = chooser.getSelectedFile().getAbsolutePath(); // defineFileName if (fileIndice == NEGATIVE_INDICE) return imageFileName + POINT + format; else { return imageFileName + FILE_INDEX_SEPARATOR + fileIndice + POINT + format; } } COM: <s> verify the selected file by user and define the file name and </s>
funcom_train/14240794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getExtension(File f) { if (f == null) return null; String filename = f.getName(); int i = filename.lastIndexOf('.'); if (i>0 && i<filename.length()-1) { return filename.substring(i+1).toLowerCase(); } return null; } COM: <s> return the extension portion of the files name </s>
funcom_train/9810262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (!(o instanceof ServiceList)) { return false; } ServiceList list = (ServiceList) o; if (list.size() != this.size()) { return false; } for (int i = 0; i < this.size(); i++) { if (!(this.getService(i).equals(list.getService(i)))) { return false; } } return true; } COM: <s> compares the specified object with this code service list code </s>
funcom_train/32779431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVelocityAttribute(String v, long time) throws ModelException{ if(this.entityTyp.existPossibleAttribut(v)){ Attribute last = this.velocity.lastElement(); if(last != null && !last.getValue().equals(v.trim())){ this.velocity.add(new Attribute("velovity", v, time)); } }else{ throw new ModelException("Entity.setVelocityAttribute: "+v+" isn't a possibleAttribute"); } } COM: <s> set new value of velocity attribute </s>
funcom_train/44950368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAddable(String imageFormat, Dimension imageSize) { boolean result = (imageFormat != null); if (result && isExcludeThumbPages()) { Dimension portraitSize = getPortraitSize(imageSize); result = (portraitSize.width > getMaxThumbWidth()) && (portraitSize.height > getMaxThumbHeight()); } return result; } COM: <s> yield code true code if file should be added to comic archives </s>
funcom_train/6208995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public interface Listener { /** * Indicates that a remote party with address 'sa' requests a connection. * * @param sa physical address of orginator. * @param tc the new created connection. * @return the listener object for this connection or * null, if the connection shall be refused. */ public T_Connection.Listener connected( int sa, T_Connection tc ); } COM: <s> listener interface for this service </s>
funcom_train/8689845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object createDynamicElement(String name) { Object cond = ComponentHelper.getComponentHelper(getProject()) .createComponent(CONDITION_ANTLIB + name); if (!(cond instanceof Condition)) { return null; } log("Dynamically discovered '" + name + "' " + cond, Project.MSG_DEBUG); add((Condition) cond); return cond; } COM: <s> create a dynamically discovered condition </s>
funcom_train/29985700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public void filterHTML (HTMLBlock block) { List<Token> tokens = block.getTokens (); int tsize = tokens.size (); for (int i = 0; i < tsize; i++) { Token t = tokens.get (i); switch (t.getType ()) { case Token.TAG: Tag tag = t.getTag (); if (tag.getTagType () == TagType.IMG) { tag.removeAttribute ("lowsrc"); } break; } } } COM: <s> remove the lowres tags </s>
funcom_train/17007108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOffset(long offDelta) { long temp = (new Date()).getTime() + offset; if (NtpTimeService.isCheckLastUTC()) { if (lastUTCTime > (temp + offDelta)) { return; } } delta = offDelta; offset = offset + offDelta; } COM: <s> adjusts the offset value by delta </s>
funcom_train/45896082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void log(final String level, final String message, final Throwable t) { if (SwingUtilities.isEventDispatchThread()) { logInternal(level, message, t); } else { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { logInternal(level, message, t); } }); } } COM: <s> log a given event </s>
funcom_train/5714279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInstantiation(){ CapiBProtocolInformation c3p = new CapiBProtocolInformation(3,7,15); assertEquals("check b1-protocol", 3, c3p.getB1()); assertEquals("check b1-protocol", 7, c3p.getB2()); assertEquals("check b1-protocol", 15, c3p.getB3()); } COM: <s> tests the values being set after instantiation </s>
funcom_train/50314322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void intersect (Region region) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (region == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (region.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); try { lockToolkit(); Fox.FXRegion_intersect(handle, region.handle); } finally { unlockToolkit(); } } COM: <s> intersects all of the polygons which make up the area covered </s>
funcom_train/10008809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendStream(String ip, String port) throws SinkNoProcessorException, SinkDataSourceConnectionException, SinkUnknownException, SinkProcessorConfigurationException, SinkNoTracksFoundException, SinkNoValidRTPTracksFoundException, CannotRealizeException { //create AVTransmit avt = new AVTransmit(ip, port); avt.start(ds); } COM: <s> this method starts sending the audio stream to the specified ip and port </s>
funcom_train/11705715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean subsumes(Type superType, Type subType) { // assert(superType != null); // assert(subType != null); return this.subsumes(((TypeImpl) superType).getCode(), ((TypeImpl) subType).getCode()); } COM: <s> does one type inherit from the other </s>
funcom_train/41101614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerProtocol(byte protNr, IProtocolManager protMan) { if (getProtocolFor(protNr) != null) { throw new IllegalArgumentException("Cannot add multiple protocol managers for " + protNr); } protocolTable.put(protNr, protMan); System.out.println("registerProtocol: added protocol " + protNr); } COM: <s> register a protocol manager to send and receive packets </s>
funcom_train/48212422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long nextLong(String sequenceTable) throws SQLException { StringBuffer sql = new StringBuffer(); sql.append("SELECT ").append(sequenceTable).append( ".nextval FROM dual"); Statement stmt = null; long nextval; try { stmt = con.createStatement(); ResultSet rs = stmt.executeQuery(sql.toString()); if (!rs.next()) { throw new SQLException("The sequence returned nothing!"); } nextval = rs.getLong(1); } finally { if (stmt != null) stmt.close(); } return nextval; } COM: <s> retrieves a unique long integer value from the specified </s>
funcom_train/47712523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getWork(String block) { try { JSONArray parameters = new JSONArray().element(block); JSONObject request = createRequest("getwork", parameters); JSONObject response = session.sendAndReceive(request); return response.getBoolean("result"); } catch (JSONException e) { throw new BitcoinClientException("Exception when trying to solve a block with getwork", e); } } COM: <s> tries to solve the block and returns true if it was successful </s>
funcom_train/43496087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean performOk() { Iterator<FieldEditor> i = fieldEditors.iterator(); while (i.hasNext()) { FieldEditor pe = i.next(); pe.store(); //this method is protected so have no access to it in this package //pe.setPresentsDefaultValue(false); } return true; } COM: <s> the field editor preference page implementation of this </s>
funcom_train/11406790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generate() throws JiBXException, IOException { CodeGen codegen = new CodeGen(customRoot, schemaRoot, generatePath); codegen.generate(verbose, usingNamespace, nonamespacePackage, bindingName, fileset, includePaths, modelFile, problemHandler); setPostGenerateInfo(codegen); } COM: <s> generates code based on parameters set </s>
funcom_train/5812564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean domainExists(String name) { for (Iterator<CollectdPackage> it = getPackages().iterator(); it.hasNext();) { CollectdPackage wpkg = it.next(); if ((wpkg.ifAliasDomain() != null) && wpkg.ifAliasDomain().equals(name)) { return true; } } return false; } COM: <s> returns true if collection domain exists </s>
funcom_train/2903879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initFunction(String p){ if(p.compareTo("function-highlight") == 0){ part = 38; } else if(p.compareTo("function-grayout") == 0){ part = 39; } else if(p.compareTo("function-pressed-highlight") == 0){ part = 40; } else if(p.compareTo("function-pressed-grayout") == 0){ part = 41; } } COM: <s> function button texture </s>
funcom_train/35613491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getJMenuEdition() { if (jMenuEdition == null) { jMenuEdition = new JMenu(); jMenuEdition.setText("Edition"); jMenuEdition.setBackground(menuBarColor); jMenuEdition.setForeground(textBarColor); jMenuEdition.setVerticalTextPosition(buttonTextHorizontale); jMenuEdition.setHorizontalTextPosition(buttonTextVerticale); jMenuEdition.setMnemonic(KeyEvent.VK_E); jMenuEdition.setIcon(Ressources.getImageIcon("edit-select-all.png")); } return jMenuEdition; } COM: <s> this method initializes j menu edition </s>
funcom_train/50358255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean saveThumbnailImage(BasicJpeg im, OutputStream os/*, Dimension size*/) throws IOException { if (os == null || im == null) return false; //if (photoorganizer.Controller.getAdvancedImage() != null) { // try { // try advanced image API // photoorganizer.Controller.getAdvancedImage().saveThumbnailImage(im.getLocationName(), os, null); // return true; // } catch(Throwable e) { // } //} return false; } COM: <s> saves thumbnail image to specified path </s>
funcom_train/36164900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CompilerErrorDescriptorNode getSelectedErrorNode() { Node[] nodes = mgr.getSelectedNodes(); CompilerErrorDescriptorNode error = null; if (nodes != null) { if (nodes.length != 0) { if (nodes[0] instanceof CompilerErrorDescriptorNode) { error = (CompilerErrorDescriptorNode) nodes[0]; } } } return error; } COM: <s> get the selected error in the output window </s>
funcom_train/3027038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FieldSummary getField(String name) { Iterator iter = getFields(); if (iter != null) { while (iter.hasNext()) { FieldSummary next = (FieldSummary) iter.next(); if (next.getName().equals(name)) { return next; } } } return null; } COM: <s> gets a field by a name </s>
funcom_train/6279833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void searchInFrom(Vector v, String s){ int i=0; FemailMessageHeader fmh; InternetAddress ia; String address; while (i < v.size()){ fmh = (FemailMessageHeader)v.elementAt(i); ia = fmh.getSender(); if (ia != null) { address = ia.getAddress() + " " + ia.getPersonal(); if (address.toLowerCase().indexOf(s.toLowerCase()) != -1) results.add(fmh); } i++; } } COM: <s> method search in from </s>
funcom_train/32769983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMenuItemClose() { if (menuItemClose == null) { menuItemClose = new JMenuItem(); menuItemClose.setText(OpenJCADLanguage.getString("_close_")); // Generated menuItemClose.addActionListener(new OpenJCADCloseDesignAction(this.tabbedPane)); } return menuItemClose; } COM: <s> this method initializes menu item close </s>
funcom_train/32057297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetItems() { System.out.println("testGetItems"); GPGraphpad graphpad = new GPGraphpad(); FormatTextFontSizeList textSizeList = new FormatTextFontSizeList(graphpad); try { textSizeList.getItems(); } catch( Exception e ) { fail(); } } COM: <s> test of get items method of class format text font size list </s>
funcom_train/44166866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FreeColGameObject getFreeColGameObject(String id) { if (id != null && id.length() > 0) { final WeakReference<FreeColGameObject> ro = freeColGameObjects.get(id); if (ro != null) { final FreeColGameObject o = ro.get(); if (o != null) return o; freeColGameObjects.remove(id); } } return null; } COM: <s> gets the code free col game object code with the given id </s>
funcom_train/36108704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireStepPerformed() { if (getStepListeners().isEmpty()) return; //Do nothing. //Creating event. MacroSolverEvent stepEvent = new MacroSolverEvent(this, getCurrentTime(), MacroSolverEvent.STEP_PERFORMMED, null); //TO DO: //Notifying all listeners. Iterator<StepListener> iterator = getStepListeners().iterator(); while (iterator.hasNext()) iterator.next().stepPerformed(stepEvent); } COM: <s> overridden to set current processor to event </s>
funcom_train/13580900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMinorActivityFilename() { //TODO Get rid of the threshold in the filename. It can be in the path, but not the filename!! return this.getRoot() + studyAreaName + "/" + version + "/" + threshold + "/Sample" + sample + "/Activities/" + studyAreaName + "_MinorLocations.txt"; } COM: <s> gets the filename of the minor activity file that will be clustered </s>
funcom_train/8992213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List getWorkflowRecordList() throws Exception { List tempList = new ArrayList(); WorkflowRecordDAObject wfrDAObj = new WorkflowRecordDAObject (sessionContainer,conn); try{ tempList = wfrDAObj.getFullList(); }catch(Exception e){ throw new Exception(e); } return tempList; } COM: <s> get workflow record list </s>
funcom_train/31984516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copy() throws IOException { if( done ) { throw new IllegalStateException( "Copy already done" ) ; } done = true ; InputStream inputStream = inputStreamInitializer.getInputStream() ; OutputStream outputStream = outputStreamInitializer.getOutputStream() ; performCopy( inputStream, outputStream ) ; } COM: <s> copies tt source tt content to tt destination file tt </s>
funcom_train/11050658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AxisService deployClassAsService(String name, Class myClass) throws Exception { AxisService service = new AxisService(name); service.addParameter(Constants.SERVICE_CLASS, myClass.getName()); Utils.fillAxisService(service, serverConfig, null, null); serverConfig.addService(service); return service; } COM: <s> deploy a class as a service </s>
funcom_train/40855897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toInternal(String val) { final int len=val.length(); if (val.charAt(len-1) == Z) { // check common case first, simple datetime // NOTE: not parsed to ensure correctness return val.substring(0,len-1); } return toInternal(parseMath(null, val)); } COM: <s> overrides the super class to short circut and do no enforcing of </s>
funcom_train/51128917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAsElementToParent(Element parent) { Element element = ToolsXML.appendElement(parent, XMLKEY); ToolsXML.appendElement(element, XMLPROBABILITY, probability); ToolsXML.appendElement(element, XMLDURATION, duration); ToolsXML.appendElement(element, XMLMSGKEY, msgKey); ToolsXML.appendElement(element, XMLMASTERTRANSLATION, masterTranslation); } COM: <s> adds the as element to parent </s>
funcom_train/44695445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addText(final String text, final ModificationCallback callback) { ElementGenerator generator = new ElementGenerator() { public AbstractElement generateElement(DocumentManager docManager) { String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI; AbstractElement textElement = (AbstractElement)docManager.getSVGDocument() .createElementNS(svgNS, "text"); textElement.appendChild( docManager.getSVGDocument().createTextNode(text)); return textElement; } }; addCenteredElement(generator, callback); } COM: <s> adds text to a document </s>
funcom_train/44602237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_signalsonly_15(){ compileAndExecGivenStatementExpectRuntimeError( "X.java", "public class X {\n" + " //@ signals_only_redundantly ArithmeticException;\n"+ " X() {\n" + " throw new RuntimeException();\n" + " }\n" + "}\n", "new X()", null, JMLInternalExceptionalPostconditionError.class); } COM: <s> is signals only redundantly clause supported </s>
funcom_train/17640316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DefaultMutableTreeNode addObject(Object child) { DefaultMutableTreeNode parentNode = null; TreePath parentPath = tree.getSelectionPath(); if (parentPath == null) { parentNode = rootNode; } else { parentNode = (DefaultMutableTreeNode) (parentPath.getLastPathComponent()); } return addObject(parentNode, child, true, false); } COM: <s> add child to the currently selected node </s>
funcom_train/26379896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PutPopupMenu (JFrame parent, JList jList, Point point, ItemReset itemReset, Area area) { super(); _jList = jList; _point = point; _parent = parent; _itemReset = itemReset ; _area = area ; initializeData() ; } COM: <s> creates new programs popup menu without a default item selected </s>
funcom_train/31660114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRedirectURL(String pseudotopicName) { String redirectURL = getMappings().getProperty(pseudotopicName); String msg = ((redirectURL == null) ? "no pseudotopic redirect for " + pseudotopicName : "pseudo topic found for " + pseudotopicName + ": " + redirectURL ); logger.fine(msg); return redirectURL; } COM: <s> return a redirect url for the given topic </s>
funcom_train/4853393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPagePredicate (PagePredicate pred) { if (pred == pagePredicate || (pred != null && pred.equals (pagePredicate))) return; if (pagePredicate != null) pagePredicate.disconnected (this); pagePredicate = pred; if (pagePredicate != null) pagePredicate.connected (this); } COM: <s> set page predicate </s>
funcom_train/49319746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getDateForHour(double hour) { Calendar cal = Calendar.getInstance(ElevationPlotUtil.UT); cal.setTime(_startDate); int h = cal.get(Calendar.HOUR_OF_DAY); boolean nextDay = (hour < h); CalendarUtil.setHours(cal, hour, nextDay); return cal.getTime(); } COM: <s> return the date time given the ut hour between 0 and 24 </s>
funcom_train/12962813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Object value) { m_value = value; boolean sel = false; if (value == null) sel = false; else if (value.toString().equals("Y")) sel = true; else if (value.toString().equals("N")) sel = false; else if (value instanceof Boolean) sel = ((Boolean) value).booleanValue(); else { try { sel = Boolean.getBoolean(value.toString()); } catch (Exception e) { } } this.setSelected(sel); } // setValue COM: <s> set editor to value </s>
funcom_train/42337455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void clearSavedDelta() { for (Iterator i = saveParticipants.keySet().iterator(); i.hasNext();) { String pluginId = ((Plugin) i.next()).getDescriptor().getUniqueIdentifier(); masterTable.setProperty(CLEAR_DELTA_PREFIX + pluginId, "true"); } } COM: <s> marks the current participants to not receive deltas next time they are registered </s>
funcom_train/25374307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void stratStep (int numFolds){ ArrayList<Instance> newVec = new ArrayList<Instance>(m_Instances.size()); int start = 0, j; // create stratified batch while (newVec.size() < numInstances()) { j = start; while (j < numInstances()) { newVec.add(instance(j)); j = j + numFolds; } start++; } m_Instances = newVec; } COM: <s> help function needed for stratification of set </s>
funcom_train/42112011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double calculateReward() { int scoreDiff = model_.m_player.m_score - prevScore_; prevScore_ += scoreDiff; // Including -10000 if survival environment if (StateSpec.getInstance().getGoalName().equals("survive") && model_.m_nLives < prevLives_) scoreDiff -= (prevLives_ - model_.m_nLives) * 10000; prevLives_ = model_.m_nLives; return scoreDiff; } COM: <s> calculates the reward </s>
funcom_train/22308055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setParent( final Container newParent ) { assertNotNull("newParent", newParent); if( ( parent_ != null ) && ( newParent != parent_ ) ) { throw new DetailedIllegalArgumentException( "newParent", newParent, "Attempt to reassign parent" ); } parent_ = newParent; } COM: <s> set the parent container for this layout </s>