__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/22919401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setMob(int x, int y, Player player) { if(isValid(x,y)) { final int index = y * width + x; mobs[index] = player; if(player != null) { player.posX = (byte)x; player.posY = (byte)y; } return true; } return false; } COM: <s> place mob on location x y </s>
funcom_train/5474956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextField3() { if (jTextField3 == null) { jTextField3 = new JTextField(); jTextField3.setPreferredSize(new java.awt.Dimension(4,19)); jTextField3.setEditable(false); jTextField3.setBounds(new java.awt.Rectangle(262,409,84,20)); jTextField3.addFocusListener(new FocusAdapter(){ public void focusGained(FocusEvent e){ jTextField3.setBackground(color_getfocus); } public void focusLost(FocusEvent ev){ jTextField3.setBackground(color_lostfocus); } }); } return jTextField3; } COM: <s> this method initializes j text field3 </s>
funcom_train/34529826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Object value) throws DataSourceException{ if ((value != null) && !value.getClass().equals(valueClass)) { String msg = "The value \"" + value.toString() + "\" + of the \"" + name + "\"property cannot be converted to a\"" + valueClass.toString() + "\" type."; throw new DataSourceException(msg); } this.value = value; } COM: <s> sets the value of this property </s>
funcom_train/8631250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSet read(String inputFileName, String[] colNames, String charset) throws SQLException { init(inputFileName, charset); try { return readResultSet(colNames); } catch (IOException e) { throw convertException("IOException reading " + inputFileName, e); } } COM: <s> reads from the csv file and returns a result set </s>
funcom_train/39382905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void closeSocket(Socket s){ if(DEBUG) logger.debug("entering closeSocket(Socket)"); if(s != null && !s.isClosed()){ try { s.close(); } catch (IOException e) { logger.error("IOException occured while closing the socket",e); } } if(DEBUG) logger.debug("exiting closeSocket(Socket)"); } COM: <s> closes the given socket </s>
funcom_train/29982636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String remove() { FacesContext context = FacesContext.getCurrentInstance(); Map map = context.getExternalContext().getRequestParameterMap(); String id = (String) map.get("id"); UserDTO uDTO = UserManager.getUser(id); UserManager.removeUser(uDTO); return "success"; } COM: <s> removes a user from the system </s>
funcom_train/22862434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(GraphState gs, Matrix4d t, int minPathLength) { init(gs, t, disp.getView3D(), false); worldToViewInv.invert(t); this.minPathLength = minPathLength; if (lineCache == null) { lineCache = new LineSegmentizationCache(gs, 1); } rend = 0; all = 0; } COM: <s> initializes the visitor for visiting a graph </s>
funcom_train/3762338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getString(String key, String value) { try { String string = getString(key); return MessageFormat.format(string, new String[] {value}); } catch (IllegalArgumentException e) { return "Could not find or format String associated with key '" + key + "'"; } } COM: <s> get a string for a key and format it with the supplied value </s>
funcom_train/39281547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(IStageWrapper stage, ThreadPool tp) { ISystemConfig config = mgr.getConfig(); int thresh = config.getInt("stages." + stage.getStage().getName() + ".threadPool.sizeController.threshold", controllerThreshold); tpvec.addElement(new tpcClient(stage, tp, null, thresh)); } COM: <s> register a thread pool with this controller using the queue threshold </s>
funcom_train/15958001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invalidateTimeouts() { long now = System.currentTimeMillis(); synchronized(cache) { Iterator<LRUEntry<K,TimeoutValue<V>>> iter = cache.orderedKeysIter(); while (iter.hasNext()) { LRUEntry<K,TimeoutValue<V>> entry = iter.next(); if (now > entry.getValue().timeoutStamp) { invalidate(entry.getKey()); } } } } COM: <s> mucks up the lru ordering to invalidate everything thats timed out </s>
funcom_train/24194722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void internalTerminate() { /* * This null check is necessary. Keep in mind that the static priority * list may not have an active child, since the spawning process may * have failed or not started yet. In such a case, if it is terminated, * "this.activeChild" will be null. */ if (this.activeChild != null) { this.activeChild.terminate(); } /* Terminate the guards executors. */ for (IBTExecutor guardExecutor : this.guardsExecutors) { if (guardExecutor != null) { guardExecutor.terminate(); } } } COM: <s> just terminates the currently active child if there is one </s>
funcom_train/25423560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HjRecords selectAll(String[] uuids) throws SQLException { RequestContext context = RequestContext.extract(null); try { HjLoadAllRequest loadAllRequest = new HjLoadAllRequest(context, uuids); loadAllRequest.execute(); return loadAllRequest.getQueryResult().getRecords(); } finally { context.onExecutionPhaseCompleted(); } } COM: <s> selects all records </s>
funcom_train/13815767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReadNonImage() { File f = new File ( "testfiles", "testconfig.xml" ); ImageIOImage img = null; PhotovaultImageFactory fact = new PhotovaultImageFactory(); try { img = (ImageIOImage) fact.create(f, false, false); } catch (PhotovaultException ex) { fail( "Could not load image: " + ex.getMessage() ); } assertNull( img ); } COM: <s> test that reading a file that is not a recognized iamge works correctly </s>
funcom_train/31363225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean openLog(String strLogName, String programID) { try { strProgramID = programID; FileWriter temp = new FileWriter( strLogName , true ); logWriter = new BufferedWriter( temp ); isOpenBool = true; writeLog( new Date(), LogUtility.ENTRYTYPE_NOTE, "Opening Text Log" ); } catch( Exception e ) { e.printStackTrace(); return false; } return true; } COM: <s> opens the text log so that entries can be made </s>
funcom_train/10642427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClosable(final boolean b) { boolean oldValue = isClosable(); closable = b; LookAndFeel.markPropertyNotInstallable(this, StringConstants.INTERNAL_FRAME_CLOSABLE_PROPERTY); firePropertyChange(StringConstants.INTERNAL_FRAME_CLOSABLE_PROPERTY, oldValue, b); } COM: <s> sets the code closable code property </s>
funcom_train/18032035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InboxBean getImageBean(int index) { if (m_images == null) { try { m_images = InboxBean.getCategoryEntries(this); } catch (SQLException e) { m_images = new ArrayList<InboxBean>(); LOG.log(Level.SEVERE, "Failed to select images for category", //$NON-NLS-1$ e); } } if (index < 0 || index >= m_images.size()) { return null; } return m_images.get(index); } COM: <s> returns the inbox bean with the specified index </s>
funcom_train/28752528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRemarks(String newVal) { if ((newVal != null && this.remarks != null && (newVal.compareTo(this.remarks) == 0)) || (newVal == null && this.remarks == null && remarks_is_initialized)) { return; } this.remarks = newVal; remarks_is_modified = true; remarks_is_initialized = true; } COM: <s> setter method for remarks </s>
funcom_train/8956153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkZoomRange() { if (dZoomFactor <= 0.4) { dZoomFactor = 0.4; jZoomOutButton.setEnabled(false); } else if (dZoomFactor >= 3) { dZoomFactor = 3; jZoomInButton.setEnabled(false); } else { jZoomInButton.setEnabled(true); jZoomOutButton.setEnabled(true); } } COM: <s> check if zoom factor is valid and correct if needed </s>
funcom_train/50066729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCancelCommand() { if (cancelCommand == null) {//GEN-END:|99-getter|0|99-preInit // write pre-init user code here cancelCommand = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|99-getter|1|99-postInit // write post-init user code here }//GEN-BEGIN:|99-getter|2| return cancelCommand; } COM: <s> returns an initiliazed instance of cancel command component </s>
funcom_train/46680449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllGaps(){ for (int pos=0; pos<getCommonTimeline().getNumberOfTimelineItems(); pos++){ TimelineItem tli = getCommonTimeline().getTimelineItemAt(pos); if (isGap(tli.getID())) { removeGap(tli.getID()); pos--; } } } COM: <s> remove all gaps in the transcription </s>
funcom_train/13363259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTaskList(String taskList) { HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); Collection collection = (Collection) request.getAttribute(taskList); if((collection != null) && (collection instanceof TaskList)) { this.taskList = (TaskList) collection; } } COM: <s> set the task list for the gantt chart </s>
funcom_train/47177712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addListener(IFutureListener<V> listener) { if (listener == null) { throw new IllegalArgumentException("Listener cannot be null."); } synchronized(listenerList) { if (!listenerList.contains(listener)) { listenerList.add(listener); } } if (isDone()) { fireListeners(); // fire this one } } COM: <s> adds a listener to this task </s>
funcom_train/8409819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StrBuilder appendWithSeparators(Object[] array, String separator) { if (array != null && array.length > 0) { separator = (separator == null ? "" : separator); append(array[0]); for (int i = 1; i < array.length; i++) { append(separator); append(array[i]); } } return this; } COM: <s> appends an array placing separators between each value but </s>
funcom_train/44308416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void expandDirectories(File[] files,List list) { for (int i=0;i<files.length;i++) { File file=files[i]; if (file.isDirectory()) expandDirectories(file.listFiles(),list); else list.add(file); } } COM: <s> expands the supplied list of files into directories </s>
funcom_train/4557855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSignUpClickForgotPasswordLink() { repEng.newStep("310", "Sign up-Click Forgot Password link"); //1. Launch http://hobbes.ontometrics.com/magnetportal/ //2. Click the Manage You Assets link. //3. Click the Publish Magnet link in the Albums/Tracks page. //4. Click the cart icon. //5. Click Sign up button. //6. Click Forgot Password link. // There will popup "Forgot Password" window. // OK button is disabled by default. } COM: <s> 310 sign up click forgot password link </s>
funcom_train/21018757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeObject(HT handle) { requireNotNull(handle, "@require (handle != null)"); CacheRef cacheRef = _cachedObjects.remove(handle); if (cacheRef != null) { OT object = cacheRef.getObject(); if (object != null) { removeFromProtection(new Pair<HT, OT>(cacheRef.handle, object)); } } } COM: <s> removes the object with the given handle from the cache </s>
funcom_train/22430805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMenuHelpAbout() { if (menuHelpAbout == null) { menuHelpAbout = new JMenuItem(); menuHelpAbout.setText("About Paros"); menuHelpAbout.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { AboutDialog dialog = new AboutDialog(View.getSingleton().getMainFrame(), true); dialog.setVisible(true); } }); } return menuHelpAbout; } COM: <s> this method initializes menu help about </s>
funcom_train/42638545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storePoint(MutableODESolution sol, Number x, Vector y, int state, int pointIndex, Inexactitude inexact) { if(solutionComponents!=null){ int n = solutionComponents.length; Vector Y = createVector(n); for (int i = 0; i < n; i++)Y.set(i, y.get(solutionComponents[i])); y = Y; } super.storePoint(sol, x, y, state, pointIndex, inexact); } COM: <s> overriden to store only selected components </s>
funcom_train/50335406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addBlockDenyList(String pName){ Block blk = jmri.InstanceManager.blockManagerInstance().getBlock(pName); NamedBeanHandle<Block> namedBlock = jmri.InstanceManager.getDefault(jmri.NamedBeanHandleManager.class).getNamedBeanHandle(pName, blk); if(!blockDenyList.contains(namedBlock)) blockDenyList.add(namedBlock); } COM: <s> the block deny list is used by higher level code to determine if </s>
funcom_train/23278680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int numReports(Project project) { if(!validate(project)) throw new NullPointerException("Must specify project"); project=projectDAO.getProject(project.getTitle()); int amount=0; for(ProjectFunds f : project.getFunds()) { amount+=f.getReport().size(); } return amount; } COM: <s> returns the number of reports needed for the project </s>
funcom_train/9887626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void characters(char ch[], int start, int length) throws SAXException { try { if (getCurrentElement().equals("job-data")) { m_mageStorage.write( ch, start, length ); } else { m_chars.append( ch, start, length ); } } catch (Exception ex) { processError( ex ); } } COM: <s> invoked to handle a chunk of characters </s>
funcom_train/24122850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testDefined(final SymbolLiteral symbol) { if(!fDefinedVariables.isDefined(symbol)) { MessageHub.getInstance().sendWarning("undefined variable: " + symbol.getSymbolName()); symbol.setProperty(SymbolLiteral.UNDEFINED_GLOBAL_VARIABLE, MarkerPropertyValue.VALUE); } } COM: <s> tests if the variable is defined somewhere </s>
funcom_train/22945732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String resultsToString(boolean detailed) { try { evaluation = new Evaluation(instances); evaluation.evaluateModel(classifier, instances); return evaluation.toSummaryString(detailed); } catch (Exception ex) { //this shouldn't happen, all potential exceptions should be thrown upon construction ex.printStackTrace(); return ("Error ocurred: " + ex.getMessage()); } } COM: <s> this is where the weka evaluation methods are actually called </s>
funcom_train/40729443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNextDocument_skipped() throws RepositoryException { DocumentList list = getObjectUnderTest(MockConstants.DOCUMENT_OBJECT_ID, 1); try { Document doc = list.nextDocument(); fail("Expected a RepositoryDocumentException"); } catch (RepositoryDocumentException e) { assertNotNull(list.checkpoint()); } } COM: <s> tests a document where fetch version should throw a </s>
funcom_train/18591288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int finishRunningGridlets() { int itemsFinished = 0; double now = GridSim.clock(); Iterator<SSGridlet> iter = runningJobs.iterator(); while (iter.hasNext()) { SSGridlet gridlet = iter.next(); if(gridlet.getActualFinishTime() <= now) { gridletFinish(gridlet, Gridlet.SUCCESS); iter.remove(); itemsFinished++; } } return itemsFinished; } COM: <s> this method finalises the jobs in execution whose time </s>
funcom_train/31658903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void authenticate(Request request, String usr, String pass){ if(usr != null){ ChallengeScheme scheme = ChallengeScheme.HTTP_BASIC; ChallengeResponse cresp = new ChallengeResponse(scheme,usr,pass.toCharArray()); request.setChallengeResponse(cresp); } } COM: <s> adds authentication information to code request code according to code usr code and </s>
funcom_train/584257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTable getScrolljTable() { if ( ScrolljTable == null ) { /* String[] headers = new String[] { "Module" , "DefinitionType", "Name" }; TableModelCustom model = new TableModelCustom( new Vector(), headers ); model.setShowID( true ); */ ScrolljTable = CustomizationLib.MultipleConnectorTableModel .initTable( setup ); } return ScrolljTable; } COM: <s> this method initializes scrollj table </s>
funcom_train/32893023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getEditorClass() { if( editorClass != null ) { return editorClass; } if("".equals(editorClassName)) editorClassName="net.sourceforge.liftoff.builder.StringEditor"; try { editorClass = Class.forName( editorClassName ) ; } catch ( ClassNotFoundException e ) { System.err.println("Editor for field " + label + " not found" ); } return editorClass; } COM: <s> return a class that can be used to edit this field </s>
funcom_train/44703193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String arrayToString(Object[] a, String delimiter) { String s = ""; if (a != null) { StringBuffer buf = new StringBuffer(128); for (int i = 0; i < a.length; i++) { if (i > 0) { buf.append(delimiter); } buf.append(a[i]); } s = buf.toString(); } return s; } COM: <s> create string from the array separated by the delimiter </s>
funcom_train/42642889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSourceURIPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ISourceReference_sourceURI_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ISourceReference_sourceURI_feature", "_UI_ISourceReference_type"), DigitalHPSPackage.Literals.ISOURCE_REFERENCE__SOURCE_URI, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the source uri feature </s>
funcom_train/21952909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopServers() { Vector v = getOutgoingMailServerList(); VariableBundle resources = Pooka.getResources(); for (int i = 0; i < v.size(); i++) { OutgoingMailServer oms = (OutgoingMailServer) v.get(i); oms.stopThread(); resources.removeValueChangeListener(oms); } resources.removeValueChangeListener(manager); } COM: <s> stops all mail server threads </s>
funcom_train/28616656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseDown(MouseEvent e, int x, int y) { last = null; Figure f = drawing().findFigureInside(x, y); if ((f != null) && (f instanceof ComponentViewRectangleFigure)) { showDialog((ComponentViewRectangleFigure) f); } else super.mouseDown(e, x, y); } COM: <s> attempt to re edit on mouse down </s>
funcom_train/20875247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBounds(int minX, int maxX, int minY, int maxY) { iMinX = minX; iMaxX = maxX; iMinY = minY; iMaxY = maxY; if (getInitialAssignment() != null && !values().contains(getInitialAssignment())) setInitialAssignment(null); } COM: <s> set the bounds minimal and maximal values of x and y coordinates </s>
funcom_train/3024487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addTypesFromFile(FileSummary fileSummary, LinkedList list) { Iterator typeIterator = fileSummary.getTypes(); if (typeIterator != null) { while (typeIterator.hasNext()) { TypeSummary next = (TypeSummary) typeIterator.next(); if (next.isPublic() && !isInFilter(next)) { list.add(next.getName()); } } } } COM: <s> adds a feature to the types from file attribute of the </s>
funcom_train/29922710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object next() throws java.util.NoSuchElementException { Forum forum = null; currentIndex++; if (currentIndex >= forums.length) { throw new java.util.NoSuchElementException(); } try { forum = factory.getForum(forums[currentIndex]); } catch (Exception e) { e.printStackTrace(); } return forum; } COM: <s> returns the next forum the user has read access for </s>
funcom_train/3183911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendInfoSheet(Element root, GIO gio) throws XelemException { if (infoSheet == null) { infoSheet = loadInfoSheet(); } root.appendChild(root.getOwnerDocument().importNode(infoSheet, true)); gio.getStyleIDSet().addAll(issStyles); } COM: <s> appends a worksheet element with general information to the root element </s>
funcom_train/10801921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QueryMetaData getQueryMetaData(Class<?> cls, String name, ClassLoader envLoader, boolean mustExist) { if (_locking) { synchronized (this) { return getQueryMetaDataInternal(cls, name, envLoader, mustExist); } } else { return getQueryMetaDataInternal(cls, name, envLoader, mustExist); } } COM: <s> return query metadata for the given class name and classloader </s>
funcom_train/42706005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndexOfDec(ITypeDec t) { ListIterator<T> it = getEpisode().listIterator(); while (it.hasNext()) { T t2 = it.next(); if (t.compareTo(t2) == 0) return it.previousIndex(); } throw new ArrayIndexOutOfBoundsException("\"" + t + "\" does not exist in " + this.episode + "."); } COM: <s> compares the an event declaration to each of the episode of this </s>
funcom_train/17204307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Address getSymbol(String symbolName) { // Convert file name from unicode to filesystem character set // (assume file name is ascii, for now). // byte[] asciiName = StringUtilities.stringToBytesNullTerminated(symbolName); return SysCall.sysCall.sysDlsym(libHandler, asciiName); } COM: <s> look up this dynamic library for a symbol </s>
funcom_train/46983278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setup(Control source) { int size; this.controlGroup_.clear(); size = source.controlGroup_.size(); for (int i = 0;i < size;i++) { addControlGroup((ControlGroup)source.getControlGroup(i).clone()); } } COM: <s> initializes the code control code by the control code source code </s>
funcom_train/41318718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double function (Manipulator functor) { VVector<T> v2 = new VVector<T> (); for (T key : map.keySet ()) { VVector<T> v = map.get (key); double d = v.function (functor); v2.set (d); } return v2.function (functor); } COM: <s> function working on all mapped value vectors for all keys </s>
funcom_train/38995878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveDatabase() { try { if (database == null) { System.err.println("Can't save null karma database, skipping..."); return; } File f = getDatabaseFile(); File p = f.getParentFile(); if (!p.exists()) { p.mkdirs(); } if (f.exists()) { f.delete(); } FileWriter out = new FileWriter(f); xstream.toXML(database, out); out.close(); } catch (Exception ex) { System.err.println("Couldn't save karma database: " + channel.getName()); } } COM: <s> saves the karma database to the database file get database file </s>
funcom_train/11345104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addServiceListener(ServiceListener listener, String filter) throws InvalidSyntaxException { if (m_policy == LOCAL || m_policy == LOCAL_AND_GLOBAL) { m_local.addServiceListener(listener, filter); } if (m_policy == GLOBAL || m_policy == LOCAL_AND_GLOBAL) { m_global.addServiceListener(listener, filter); } } COM: <s> adds a service listener according to the policy </s>
funcom_train/26092401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void imageReady( String imageName) { // The Looper.prepare() method is needed for a thread to get a handler, otherwise it crashes Looper.prepare(); Message msg = ActivityUserDetails.instance.getImageUpdateHandler().obtainMessage(); msg.obj = imageName; Log.d(LOG_TAG, "Image received: " + imageName); // Update activity with user image ActivityUserDetails.instance.getImageUpdateHandler().sendMessage(msg); } COM: <s> when receiving from the leader a picture of another user the </s>
funcom_train/25418184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkExclusiveOpenStatus() { boolean bFoundOpen = false; for (Section member: values()) { if (member.getObligation().equalsIgnoreCase(Section.OBLIGATION_EXCLUSIVE)) { if (member.getOpen()) { if (bFoundOpen) { member.setOpen(false); } else { bFoundOpen = true; } } } } } COM: <s> checks to ensure that no more than one mutually exclusive section is open </s>
funcom_train/4970303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addParameter(Parameter parameter) { for (Parameter param : parameters) { if (param.getName().equalsIgnoreCase(parameter.getName())) throw new IllegalArgumentException( "Duplicate parameter '" + parameter.getName() + "' in section '" + getName() + "'!"); } parameters.add(parameter); } COM: <s> adds a new parameter to the section </s>
funcom_train/31873430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddLong(){ Value v = _lv1.add(_lv2); assertTrue("Return type check.", v instanceof LongValue); assertEquals(7, ((LongValue)v).longValue()); assertEquals(new LongValue(7), v); } COM: <s> tests addition of two long values </s>
funcom_train/42763806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void renameOldMappingfile() { File old = new File(Constants.APPDATA_PROGRAMDIR + Constants.SEP + "mapping.config"); if (old.exists()) { File newone = new File(Constants.DEFAULT_MAPPING_FILE); if (!old.renameTo(newone)) { log.error("Old 'mapping.config' could not be renamed! Rename it manually to '" + Constants.DEFAULT_MAPPING_FILE + "' or delete it."); } } } COM: <s> checks if a mapping file with the old filename exists and renames it </s>
funcom_train/8132541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ICompound surroundingCompound() { if (compound == null) { BaseControl sb = this; while (!(sb instanceof ICompound) && !(sb instanceof Table)) { sb = sb.getParent(); if (sb == null) break; } if( sb instanceof ITable ) compound = ((Table)sb).getRowCompound(); else compound = (Compound) sb; } return compound; } COM: <s> retrieve the surrounding compound </s>
funcom_train/48390021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addBackgroundMouseDownHandler(com.smartgwt.client.widgets.calendar.events.BackgroundMouseDownHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.calendar.events.BackgroundMouseDownEvent.getType()) == 0) setupBackgroundMouseDownEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.calendar.events.BackgroundMouseDownEvent.getType()); } COM: <s> add a background mouse down handler </s>
funcom_train/13537081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean logout() throws LoginException { principals.clear(); credentials.clear(); Iterator i; // remove the principals the login module added i = subject.getPrincipals(HibernatePrincipal.class).iterator(); while (i.hasNext()) { HibernatePrincipal p = (HibernatePrincipal) i.next(); subject.getPrincipals().remove(p); } // remove the public credentials the login module added i = subject.getPublicCredentials(HibernateCredential.class).iterator(); while (i.hasNext()) { HibernateCredential c = (HibernateCredential) i.next(); subject.getPublicCredentials().remove(c); } return true; } COM: <s> user is logging out clear our information from the subject </s>
funcom_train/884826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStringEnumerationInstance(StringEnumerationInstance di) { // if stringEnumeration instance doesn't change, do nothing if (di != stringEnumerationInstance) { // deregister for old instance changes if (stringEnumerationInstance != null) { stringEnumerationInstance.deregister(this); } // set new instance (or no instance when null) stringEnumerationInstance = di; // register for new instance changes if (stringEnumerationInstance != null) { stringEnumerationInstance.register(this, InstanceObserver.INSTANCE_REMOVED | InstanceObserver.VALUE_CHANGED); } } } COM: <s> base implementation for setting the string enumeration instance to be </s>
funcom_train/7421725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element createCatchAllElement(Handler handler) { Element result = this.document.createElement("catchAll"); Element sequenceFlow = new SequenceFlowFactory( this.diagram, this.document, handler.getSubProcess(), this.output).transformSequenceFlow(); if (sequenceFlow != null) { // create additional scope if fault handler has // additional variables defined result.appendChild(createHandlerScope(handler, sequenceFlow)); } return result; } COM: <s> creates a catch all element that is represented by the given fault event </s>
funcom_train/29792994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delSlot(SlotBean slot) throws InvalidOperationException { if (slot.getType().equals("LECTURE")) { this.delLecture(slot); } else if (slot.getType().equals("PRACTICAL")) { this.delPractical(slot); } else { this.delTutorial(slot); } } COM: <s> removes any type of slot from the course </s>
funcom_train/15608755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void computeAdvanceBit(int[] cmptrace) { if (bitp >= 7) { cval = cmptrace[traceCtr++]; bitp = 0; } else { cval >>= 1; bitp += 1; } //System.out.println("bitp: " + bitp + " cval: " + cval); } COM: <s> translated from c code </s>
funcom_train/7848238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayTopBottomResult(Source source) { CursorManagerSpecification cursorMngrSpec = dp.createCursorManagerSpecification(source); SpecifiedCursorManager cursorManager = dp.createCursorManager(cursorMngrSpec); ValueCursor valueCursor = (ValueCursor) cursorManager.createCursor(); cpw.printTopBottomResult(valueCursor); // Close the CursorManager. cursorManager.close(); } COM: <s> creates a cursor for the source produced by a top bottom template and </s>
funcom_train/17002716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBytes(String name, byte[] value) throws JMSException { checkIfEntryAlreadyPresent(name); if (value == null) { throw new JMSException(moduleName + "Specified value for map [" + name + "] is NULL"); } mappedEntries.put(name, value); } COM: <s> sets a byte array value with the specified name into the map </s>
funcom_train/39533613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fitSelectedNodesToViewport(){ Collection<Element> selectedNodes= new HashSet<Element>(canvas.getSVGHandle(). getSelection().getSelectedElements()); Rectangle2D bounds=null; Rectangle2D wholeBounds=null; for(Element element : selectedNodes){ if(element!=null){ bounds=canvas.getSVGHandle(). getSvgElementsManager().getSensitiveBounds(element); if(wholeBounds==null){ wholeBounds=new Rectangle2D.Double( bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight()); }else{ wholeBounds.add(bounds); } } } if(wholeBounds!=null){ scaleTo(wholeBounds); } } COM: <s> scales the canvas so that the selected nodes take the whole viewport </s>
funcom_train/28773617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getAdd_account() { if (add_account == null) {//GEN-END:|41-getter|0|41-preInit // write pre-init user code here add_account = new Command("Add Account", "Add a new account", Command.OK, 0);//GEN-LINE:|41-getter|1|41-postInit }//GEN-BEGIN:|41-getter|2| return add_account; } COM: <s> returns an initiliazed instance of add account component </s>
funcom_train/11009638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XSSFPicture createPicture(XSSFClientAnchor anchor, int pictureIndex) { PackageRelationship rel = getDrawing().addPictureReference(pictureIndex); CTPicture ctShape = ctGroup.addNewPic(); ctShape.set(XSSFPicture.prototype()); XSSFPicture shape = new XSSFPicture(getDrawing(), ctShape); shape.parent = this; shape.anchor = anchor; shape.setPictureReference(rel); return shape; } COM: <s> creates a picture </s>
funcom_train/3813809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Node addNode(Token token, int beginTime, int endTime) { assert (token.getSearchState() instanceof WordSearchState); Word word = ((WordSearchState) (token.getSearchState())) .getPronunciation().getWord(); return addNode(Integer.toString(token.hashCode()), word, beginTime, endTime); } COM: <s> add a node corresponding to a token from the result token tree </s>
funcom_train/4283996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRepresentedParameterPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Variable_representedParameter_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Variable_representedParameter_feature", "_UI_Variable_type"), ExpressionsPackage.Literals.VARIABLE__REPRESENTED_PARAMETER, true, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the represented parameter feature </s>
funcom_train/19780376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setType(FTPTransferType type) throws IOException, FTPException { // determine the character to send String typeStr = FTPTransferType.ASCII_CHAR; if (type.equals(FTPTransferType.BINARY)) typeStr = FTPTransferType.BINARY_CHAR; // send the command String reply = control.sendCommand("TYPE " + typeStr); lastValidReply = control.validateReply(reply, "200"); // record the type transferType = type; } COM: <s> set the transfer type </s>
funcom_train/5721032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createDefaultEditToolBar() { editToolBar = new FSLLearningUnitViewElementsStructureEditToolBar(); editToolBar.init(learningUnitViewManager, learningUnitEventGenerator, this, editMode, FSLLearningUnitViewElementsStructureEditToolBar.DEFAULT_EDIT_TOOLBAR_SORTABLE_EXPORT); buildIndependentUI(); } COM: <s> creates default edit tool bar </s>
funcom_train/20798116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cancelItem(final QueueItem item) { final int id = item.getId(); final Object source = item.getSource(); final SpeakableListener listener = item.getListener(); final SpeakableEvent event = new SpeakableEvent( source, SpeakableEvent.SPEAKABLE_CANCELLED, id); final BaseSynthesizer synthesizer = queueManager.getSynthesizer(); synthesizer.postSpeakableEvent(event, listener); queue.removeElement(item); } COM: <s> removes the given item from the queue and sends the corresponding event </s>
funcom_train/15490699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImageStack getStack() { ImageStack s; if (stack==null) { s = createEmptyStack(); ImageProcessor ip2 = getProcessor(); String info = (String)getProperty("Info"); String label = info!=null?getTitle()+"\n"+info:null; s.addSlice(label, ip2); s.update(ip2); } else { s = stack; s.update(ip); } if (roi!=null) s.setRoi(roi.getBounds()); return s; } COM: <s> returns the image stack </s>
funcom_train/51649286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setChecked (boolean value) { checkWidget (); if ((parent.getStyle () & SWT.CHECK) == 0) return; if (checked == value) return; checked = value; if ((parent.style & SWT.VIRTUAL) != 0) cached = true; if (isInViewport ()) { Rectangle bounds = getCheckboxBounds (); parent.redraw (bounds.x, bounds.y, bounds.width, bounds.height, false); } } COM: <s> sets the checked state of the receiver </s>
funcom_train/13224700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Vector loadFilters(Properties config) { Enumeration e = config.keys(); Vector ret = new Vector(); while (e.hasMoreElements()) { String key = (String)e.nextElement(); if (key.startsWith("filter")) { try { Class clas = Class.forName((String)config.get(key)); IJVMFilter filter = (IJVMFilter)clas.newInstance(); ret.add(filter); } catch (Exception ex) { ex.printStackTrace(); } } } return ret; } COM: <s> builds and returns a list of jvm filters </s>
funcom_train/22783377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void beanPropertyChanged(BeanChangeEvent<SmartList> event) { // get source SmartList source = event.getSource(); // to be save if (source != list) { source.removeListener(this); } // it is the right source if (event.getProperty() == BeanProperty.ALBUM_NAME) { setTitel(list.getName()); } // inform TreeModel listener // done by root } COM: <s> if the smartlist changes its name update the titel of this node </s>
funcom_train/3844530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("SecurityServices".equals(portName)) { setSecurityServicesEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/21016057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void resetComposite(IComposite composite) { if (composite != _composite || ((composite == _composite) && (_modCount != composite .getModificationCount()))) { reset(); _locations = new Rectangle2D[composite.getElementCount()]; _composite = composite; _modCount = composite.getModificationCount(); _locationCalculator.reset(); _composite.accept(_locationCalculator); completeLayout(); } } COM: <s> resets the laid out composite to code composite code if it is </s>
funcom_train/37594507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFactory() { PlatformSupport ps = PlatformFactory.ONLY; String psClassName = ps.getClass().getName(); assertEquals("PlatformFactory produced the appropriate PlatformSupport?", "edu.rice.cs.drjava.platform.MacPlatform", psClassName); } COM: <s> gets the platform support implementation for this platform from the </s>
funcom_train/1958725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveSelectedNodes(int x, int y) { if (! gui.isModifyAllowed()) return; for(int i = 0; i < getComponentCount(); i++) { if (getComponent(i) instanceof NwNode) { NwNode current = (NwNode)getComponent(i); if (current.isSelected()) { current.moveComponent(x,y); } } } } COM: <s> move all selected nodes in the panel </s>
funcom_train/16818489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getParamsDesc() { String s = "("; if (params != null) { int i; for (i = 0; i < params.length; i++) { s = s + params[i].getTypeName() + " " + params[i].getName(); if (i != params.length-1) { s = s + ", "; } } } s = s + ")"; return s; } COM: <s> return a parenthesized string representing the parameters to this </s>
funcom_train/31300731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { if (onStartupWait != null) { log.debug("LuceneModule waiting for " + onStartupWait + " seconds"); try { Thread.sleep(onStartupWait.intValue() * 1000L); } catch (InterruptedException e) { // ignore } // only wait the first time onStartupWait = null; } log.info("LuceneModule thread started"); startIndexing(); } COM: <s> the thread in which the external links will be checked </s>
funcom_train/49638365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean pump() throws IOException { boolean cont = stream != null && stream.read() != -1; if (!cont) { Logging.logProcess(this.getClass().getSimpleName(), "Calling close due to pump() being finished", Logging.LogLevel.TRACE, this); close(); } return cont; } COM: <s> pumps the underlying stream for one byte if a stream is present </s>
funcom_train/21637378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MessageRecipient getMessageRecipient(Plugin plugin) throws DomainException { try { return (MessageRecipient) Class.forName(plugin.getRecipient()).newInstance(); } catch (ClassNotFoundException e) { throw new DomainException(e); } catch (IllegalAccessException e) { throw new DomainException(e); } catch (InstantiationException e) { throw new DomainException(e); } } COM: <s> creates an instance of message recipient for plug in </s>
funcom_train/23713345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public mxRectangle getStartSize(Object swimlane) { mxRectangle result = new mxRectangle(); Hashtable style = getCellStyle(swimlane); if (style != null) { double size = mxUtils.getDouble(style, mxConstants.STYLE_STARTSIZE); if (mxUtils.isTrue(style, mxConstants.STYLE_HORIZONTAL, true)) { result.setHeight(size); } else { result.setWidth(size); } } return result; } COM: <s> returns the start size of the given swimlane that is the width or </s>
funcom_train/12071534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ElemTree subTreeForSpan(WordSpan w) { if (this.isSkipped()) { throw new SkippedSentenceException(this); } if (!spansComputed) computeSpans(); if (!spanTableComputed) computeSpanTable(); if (spanTable.containsKey(w)) { return (ElemTree) spanTable.get(w); } else { return null; } } COM: <s> returns the code elem tree code whose yield is the given word span </s>
funcom_train/11361287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInvalid(Set<Class<?>> createSet) { for (Class<?> iface : createSet) { try { Class<?> newIFace = Class.forName(iface.getName(), false, this); if (!!!newIFace.equals(iface)) return true; } catch (ClassNotFoundException cnfe) { return true; } } return false; } COM: <s> test whether the classloader is invalidated by the set of classes </s>
funcom_train/1482480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCFSFile(String name) { int i = name.lastIndexOf('.'); if (i != -1) { String extension = name.substring(1+i); if (extensionsInCFS.contains(extension)) { return true; } if (extension.startsWith("f") && extension.matches("f\\d+")) { return true; } } return false; } COM: <s> returns true if this is a file that would be contained </s>
funcom_train/20272351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean mimimizeCost(FunctionState fs) { if (!inliningLowersCost(fs)) { // Try again without Block inlining references if (fs.hasBlockInliningReferences()) { fs.setRemove(false); fs.removeBlockInliningReferences(); if (!fs.hasReferences() || !inliningLowersCost(fs)) { return false; } } else { return false; } } return true; } COM: <s> determines if the function is worth inlining and potentially </s>
funcom_train/20271956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getMethodFromDeclarationName(String fullDeclarationName) { String[] parts = fullDeclarationName.split("\\.prototype\\."); Preconditions.checkState(parts.length == 1 || parts.length == 2); if (parts.length == 2) { return parts[1]; } return null; } COM: <s> from a provide name extract the method name </s>
funcom_train/42251987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void include(ServletRequest request, ServletResponse response) throws ServletException, IOException { if (Globals.IS_SECURITY_ENABLED) { try { PrivilegedInclude dp = new PrivilegedInclude(request, response); AccessController.doPrivileged(dp); } catch (PrivilegedActionException pe) { Exception e = pe.getException(); if (e instanceof ServletException) throw (ServletException) e; throw (IOException) e; } } else { doInclude(request, response); } } COM: <s> include the response from another resource in the current response </s>
funcom_train/15810806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SIPHeader parse() throws ParseException { MinSE minse = new MinSE(); if (debug) dbg_enter("parse"); try { headerName(TokenTypes.MINSE_TO); String nextId = lexer.getNextId(); try { int delta = Integer.parseInt(nextId); minse.setExpires(delta); } catch (NumberFormatException ex) { throw createParseException("bad integer format"); } catch (InvalidArgumentException ex) { throw createParseException(ex.getMessage()); } this.lexer.SPorHT(); super.parse(minse); return minse; } finally { if (debug) dbg_leave("parse"); } } COM: <s> parse the header </s>
funcom_train/17892334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector createEventPanels() { final Vector panels = new Vector(3); sourcePanel = createSourcePanel(); targetPanel = createTargetPanel(); argsPanel = createArgsPanel(); panels.addElement(sourcePanel); panels.addElement(targetPanel); panels.addElement(argsPanel); return panels; } COM: <s> construct the panels for an event adapter hookup </s>
funcom_train/9994190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCommandAction() throws AssertionFailedException { System.out.println("commandAction"); Deleter instance = null; Command c_1 = null; Displayable d_1 = null; instance.commandAction(c_1, d_1); fail("The test case is a prototype."); } COM: <s> test of test command action method of class deleter </s>
funcom_train/13646964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PrintStream createPrintStream( Font font, int x, int y, Color fontColor ){ StringBuffer buffer = new StringBuffer(); StringBufferOutputStream outStream = new StringBufferOutputStream( this, buffer ); this.out = new SplashPrintStream( outStream, buffer, font, x, y, fontColor ); return( this.out ); } COM: <s> defines where to write the output to with which properties </s>
funcom_train/31079750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Property getProperty(String name) { if (_properties == null) return null; Property prop; for (int i = 0; i < _properties.size(); i++) { prop = (Property) _properties.get(i); if (prop.getName().equals(name)) return prop; } return null; } COM: <s> return the property with the given name or null if none </s>
funcom_train/25099275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsGroundPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_HardwarePin_isGround_feature"), getString("_UI_PropertyDescriptor_description", "_UI_HardwarePin_isGround_feature", "_UI_HardwarePin_type"), HardwaremodelingPackage.Literals.HARDWARE_PIN__IS_GROUND, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is ground feature </s>