__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/39197953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getIdValue(O object) { Object returnValue = PropertyResolver.getValue(idProperty,object); if (returnValue == null) { throw new IllegalArgumentException("Id property " + idProperty + " could not be extracted from object " + object); } return returnValue.toString(); } COM: <s> get id of the object to render </s>
funcom_train/47302002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { // here we create the session context and a session within it, // then call another method to do all the interesting work sessionContext = new ArchitectSwingSessionContextImpl(); session = sessionContext.createSession(); createSampleProject(); } catch (Exception ex) { ex.printStackTrace(); } finally { // if you don't close the session, the VM will be left running session.close(); } } COM: <s> this method is expected to be invoked in the awt event dispatch thread </s>
funcom_train/16914212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Sensor getSensor(final String entityId, final String sensorId) { OdorWorldEntity entity = getEntity(entityId); if (entity == null) { return null; } for (Sensor sensor : entity.getSensors()) { if (sensor.getId().equalsIgnoreCase(sensorId)) { return sensor; } } return null; } COM: <s> returns the sensor with the given id or null if none is found </s>
funcom_train/36249668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testValidData() { assertNull(rule.checkError("5")); assertNull(rule.checkError("-54")); assertNull(rule.checkError("5.5")); assertNull(rule.checkError("0")); assertNull(rule.checkError("-0.0")); assertNull(rule.checkError("-5.5")); assertNull(rule.checkError(".")); assertNull(rule.checkError("-.")); assertNull(rule.checkError(".5")); assertNull(rule.checkError("-.5")); assertNull(rule.checkError("565.")); assertNull(rule.checkError("-565.")); assertNull(rule.checkError("45345345")); assertNull(rule.checkError("1234567890123456789012345678901234567890")); } COM: <s> yav works like that </s>
funcom_train/8078735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone () { PaceMatrix X = new PaceMatrix(m,n); double[][] C = X.getArray(); for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { C[i][j] = A[i][j]; } } return (Object) X; } COM: <s> clone the pace matrix object </s>
funcom_train/9209559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValues(int id, String name, String desc, String cat, int qty) { Product prod = new Product(); prod.setID(id); prod.setName(name); prod.setDesc(desc); prod.setCategory(cat); prod.setQty(qty); //Determined by user input/orders add(prod); } COM: <s> set values int string string string int is used for initialising the </s>
funcom_train/37450860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getCvTerms( Class cvObjectClass ) { Collection roots = (Collection) intact2psi.get( cvObjectClass ); Set terms = new HashSet(); for ( Iterator iterator = roots.iterator(); iterator.hasNext(); ) { CvTerm root = (CvTerm) iterator.next(); if ( root == null ) { throw new IllegalStateException(); } terms.addAll( root.getAllChildren() ); } return terms; } COM: <s> get all cv terms of a specific int act cv class </s>
funcom_train/18758446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changeState(String state) { String oldState = this.state; this.state=state; propertyChangeSupport.firePropertyChange("State", oldState, state); if (oldState.equals(STATE_OPEN) && state.equals(STATE_RUNNING)) { // started droppedPlayers.clear(); } } COM: <s> updates the game state </s>
funcom_train/2868624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setChar (StringBuffer buf, int width, int x, int y, char ch) { int index = y * (width + 1) + x; if (index >= 0 && index < buf.length()) buf.setCharAt (index, ch); } COM: <s> changes one character in the given string buffer </s>
funcom_train/14401345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addImageToItem(int pState) { if (pState != mState) { Image img; switch (pState) { case ReportMessage.STATUS_PASS: img = UiPlugin.getDefault().getImageRegistry().get( UiPlugin.IMAGE_PASS); break; case ReportMessage.STATUS_INCONCLUSIVE: img = UiPlugin.getDefault().getImageRegistry().get( UiPlugin.IMAGE_INCONCLUSIVE); break; case ReportMessage.STATUS_FAIL: img = UiPlugin.getDefault().getImageRegistry().get( UiPlugin.IMAGE_FAIL); break; default: img = UiPlugin.getDefault().getImageRegistry().get( UiPlugin.IMAGE_INCONCLUSIVE); } mItem.setImage(img); mState = pState; } } COM: <s> sets to the item a text and image </s>
funcom_train/31209563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendRow(Object[] data) { Object[][] newdata=new Object[rowCount+1][]; System.arraycopy(this.data,0,newdata,0,rowCount); newdata[rowCount]=data; rowCount++; this.data=newdata; reset(); } COM: <s> adds one row at the end </s>
funcom_train/50558964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isChildOf(String typeId) throws CanyamoException{ if (typeId==null) return false; Type parent = getParent(); while(parent!=null){ if (typeId.equals(parent.getId())){ return true; } parent = parent.getParent(); } return false; } COM: <s> return true if one type is an ancestor of this </s>
funcom_train/38938794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object getBackingBean(String nameBackingBean, Class<?> classBackingBean){ return getApplication().getExpressionFactory().createValueExpression(getFacesContext().getELContext(), "#{"+nameBackingBean+"}", classBackingBean).getValue(getFacesContext().getELContext()); } COM: <s> return the instance of a backing bean by name and definition class </s>
funcom_train/33277570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renderMozillaStyle(StringBuilder sb) { if (functionName != null) { sb.append(functionName).append("()"); } sb.append('@').append(fileName); if (lineNumber > -1) { sb.append(':').append(lineNumber); } } COM: <s> render stack element in mozilla firefox style </s>
funcom_train/18028753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsMonotonic() { System.out.println("isMonotonic"); QDataSet ds = null; boolean expResult = false; boolean result = DataSetUtil.isMonotonic(ds); 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 is monotonic method of class data set util </s>
funcom_train/2026405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getProjectPanel() { if (projectPanel == null) { projectPanel = new JPanel(); projectPanel.setLayout(new BoxLayout(getProjectPanel(), BoxLayout.X_AXIS)); projectPanel.add(getJProjectNameBox(), null); projectPanel.add(getJProjectAreaBox(), null); projectPanel.add(getJProjectTaskBox(), null); } return projectPanel; } COM: <s> this method initializes project panel </s>
funcom_train/37607293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void noLeft(int tlg) { this.setPhUsed(false, 0); for (int kkk=0; kkk < xleg.size(); kkk++) pint.useLeg(kkk).setROLap(false, tlg*2); OFragment frag = this.getFrag(); if (frag != null) frag.clearLanes(-1); // make left turn lanes thru } // end noLeft() COM: <s> removes left turn percentages if needed </s>
funcom_train/38514081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMenuItem getMenuComponentForAction(String pName) { BaseAction p = (BaseAction)getActionByName(pName); if (p == null) { return null; } JMenuItem comp = p.isTogglable() ? new JCheckBoxMenuItem() : new JMenuItem(); comp.setAction(p); comp.setText(p.getLocaleName()); return comp; } COM: <s> returns the corresponding menu component for an action </s>
funcom_train/5009543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RSession detach() throws RserveException { if (!connected || rt==null) throw new RserveException(this,"Not connected"); RPacket rp=rt.request(RTalk.CMD_detachSession); if (rp==null || !rp.isOk()) throw new RserveException(this,"Cannot detach",rp); RSession s = new RSession(this, rp); close(); return s; } COM: <s> detaches the session and closes the connection requires rserve 0 </s>
funcom_train/22178792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changeTypeSelection() { labFilter.setVisible(radTypeRgbf.getSelection() || radTypeRgbft.getSelection()); txtFilter.setVisible(radTypeRgbf.getSelection() || radTypeRgbft.getSelection()); labTransmit.setVisible(radTypeRgbt.getSelection() || radTypeRgbft.getSelection()); txtTransmit.setVisible(radTypeRgbt.getSelection() || radTypeRgbft.getSelection()); showColor(); } COM: <s> shows or hides the filter and transmit widgets according to the </s>
funcom_train/5427392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ClassLoader getClassLoader() { ClassLoader classLoader = null; try { classLoader = Thread.currentThread().getContextClassLoader(); } catch (final Exception ex) { if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, "There is a security problem with loading classLoader", ex); } } if (classLoader == null) { classLoader = getClass().getClassLoader(); } return classLoader; } COM: <s> this method tries to detect class loader that should be used by this </s>
funcom_train/10660195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNameSpecialChars_RFC1779_01() throws Exception { //FIXME see testNameSpecialChars_RFC2253_01 // String dn = "CN=\\\nB"; // X500Principal principal = new X500Principal(dn); // String s = principal.getName(X500Principal.RFC1779); // assertEquals("CN=\"\nB\"", s); } COM: <s> inits x500 principal with the string with special characters n b </s>
funcom_train/22549300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Socket connect(InetSocketAddress addr, int timeout, ConnectObserver observer) throws IOException { int proxyType = ProxyUtils.getProxyType(addr.getAddress()); if (proxyType != ConnectionSettings.C_NO_PROXY) return connectProxy(proxyType, addr, timeout, observer); else return connectPlain(addr, timeout, observer); } COM: <s> makes a connection to the given inet socket address </s>
funcom_train/21413861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HotelBooking createHawaiiBooking() { GregorianCalendar bookCal = new GregorianCalendar(2006, 7, 9); GregorianCalendar arrivalCal = new GregorianCalendar(2006, 10, 16); GregorianCalendar checkoutCal = new GregorianCalendar(2006, 10, 26); HotelBooking booking = new HotelBooking( new Integer(138990), "Honolulu", "Tijs Rademakers", "High Tech Campus 52", bookCal.getTime(), RoomType.DoubleRoom, Boolean.FALSE, arrivalCal.getTime(), checkoutCal.getTime() ); return booking; } COM: <s> creates a hotel booking for the hawaii hotel </s>
funcom_train/20272497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkDelete(NodeTraversal t, Node n) { if (n.getFirstChild().getType() == Token.NAME) { Var v = t.getScope().getVar(n.getFirstChild().getString()); if (v != null) { t.report(n, DELETE_VARIABLE); } } } COM: <s> checks that variables functions and arguments are not deleted </s>
funcom_train/6474354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRadiusInSteps() { int dist = 0; for (Observation o : cows) { int tempDist = (int) Math.sqrt(Math.pow(this.x - o.x, 2) + Math.pow(this.y -o.y, 2)); dist = Math.max(tempDist, dist); } return dist; } COM: <s> get a non geometric radius measured as the number of steps required to </s>
funcom_train/9104353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand() { if (exitCommand == null) {//GEN-END:|18-getter|0|18-preInit // write pre-init user code here exitCommand = new Command("Wyj\u015Bcie", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit // write post-init user code here }//GEN-BEGIN:|18-getter|2| return exitCommand; } COM: <s> returns an initiliazed instance of exit command component </s>
funcom_train/28270624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected FacesMessage getFacesMessage(Object args[]) { String summary = MessageFormat.format(getSummaryMessage(), args); String details = MessageFormat.format(getDetailMessage(), args); FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR,summary,details); return msg; } COM: <s> gets the faces message </s>
funcom_train/50356831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReferences(List list) { Iterator i = list.iterator(); SimpleList al = new SimpleList(); while (i.hasNext()) { al.add(new SimpleScalar(i.next().toString())); } values.put("references", al); } COM: <s> sets the references attribute of the question object </s>
funcom_train/15379344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StatusStream getFirehoseStream(int count) throws TwitterException { ensureBasicEnabled(); try { return new StatusStream(http.post(conf.getStreamBaseURL() + "statuses/firehose.json" , new HttpParameter[]{new HttpParameter("count" , String.valueOf(count))}, auth)); } catch (IOException e) { throw new TwitterException(e); } } COM: <s> returns a status stream of all public statuses </s>
funcom_train/48588040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteEmailList(String emailList, String domainName) throws AppsForYourDomainException, ServiceException, IOException, Exception { prepareEmailListService(domainName); emailList = emailList.toLowerCase(); LOGGER.log(Level.INFO, "Attempting to delete emailList '" + emailList + "'."); URL deleteUrl = new URL(domainUrlBase + "emailList/" + SERVICE_VERSION + "/" + emailList); emailListService.delete(deleteUrl); } COM: <s> deletes an email list </s>
funcom_train/11641219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object getInt(int columnIndex) throws SQLException { Object obj = this.currentRow[columnIndex - 1]; this.setWasNull(obj); try { return (obj == null) ? Integer.valueOf(0) : Integer.valueOf(obj.toString()); } catch (NumberFormatException e) { throw new SQLException(e.getMessage()); } } COM: <s> gets the int value at the given column index </s>
funcom_train/13717667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMean() { System.out.println("testMean"); Assert.assertEquals(emptyl1.mean(), 0.0); Assert.assertEquals(emptyl2.mean(), 0.0); Assert.assertEquals(l3a.mean(), 7.0); Assert.assertEquals(l3b.mean(), 5.0); } COM: <s> test of mean method of class be </s>
funcom_train/45133423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean next() throws ChainedException { String METHOD_ID = "004"; try { position++; if (position >= rows.size()) { return false; } else { return true; } } catch (Exception e) { throw new ChainedException(this.getClass().getName(), "Internal Error", METHOD_ID, e); } } COM: <s> if there is a next element we move one position </s>
funcom_train/21189264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void compilePattern() throws CruiseControlException { if (fileNameFilter == null && pattern != null) { try { fileNameFilter = new GlobFilenameFilter(pattern); } catch (MalformedCachePatternException e) { ValidationHelper.fail("Invalid filename pattern " + pattern, e); } } } COM: <s> compiles the pattern in the a filename filter </s>
funcom_train/3603532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getTargetLabel(ITypedElement target, ITypedElement item) { String format= null; if (target instanceof ResourceNode) format= Utilities.getString(fBundle, "workspaceTargetLabel", null); //$NON-NLS-1$ if (format == null) format= Utilities.getString(fBundle, "targetLabel"); //$NON-NLS-1$ if (format == null) format= "x{0}"; //$NON-NLS-1$ return MessageFormat.format(format, new Object[] { target.getName() }); } COM: <s> returns a label for identifying the target side of a compare viewer </s>
funcom_train/31953114
/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 { Category category = null; currentIndex++; if (currentIndex >= categories.length) { throw new java.util.NoSuchElementException(); } try { category = factory.getCategory(categories[currentIndex]); } catch (Exception e) { e.printStackTrace(); } return category; } COM: <s> returns the next category </s>
funcom_train/19422881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeMember(String resourceCollectionId) { if (members != null) { Iterator i = members.iterator(); ResourceGroupMember memberToRemove = null; while (i.hasNext()) { ResourceGroupMember member = (ResourceGroupMember) i.next(); if (resourceCollectionId.equals(member.getResourceCollection().getIdString())) { memberToRemove = member; } } if (memberToRemove != null) { members.remove(memberToRemove); } } } COM: <s> p removes the specified member from to the group </s>
funcom_train/32057710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInsertCells() { System.out.println("testInsertCells"); // Add your test code below by replacing the default call to fail. Object[] o = null; Map m = null; ConnectionSet c = new ConnectionSet(); boolean b = true; BasicGraphUI x = new BasicGraphUI(); x.insertCells(o, m, c, b, 1, 1); } COM: <s> test of insert cells method of class basic graph ui </s>
funcom_train/4865267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File getNextAvailableScreenShotFile(String fileExtension) { File pFile = null; int ssNumber = 0; String fileName="screenshot_%d." + fileExtension; /* * Find the next available file name */ while ( ssNumber < MAX_SCREENIES ) { String name = String.format(fileName, ssNumber); pFile = new File(name); if ( ! pFile.exists() ) { break; } ssNumber++; } return (pFile); } COM: <s> get the next available image file </s>
funcom_train/44852287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QueryResult select(Long inMemberID) throws BOMChangeValueException { try { KeyObject lKey = new KeyObjectImpl(); lKey.setValue(LinkMemberRoleHome.KEY_MEMBER_ID, inMemberID); return select(lKey); } catch (VException exc) { throw new BOMChangeValueException(exc.getMessage()); } catch (SQLException exc) { throw new BOMChangeValueException(exc.getMessage()); } } COM: <s> returns the roles for the specified member </s>
funcom_train/46492376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPathCount(Node nodeA, Node nodeB, int maxDepth) { if(maxDepth >= 1 && getHops(nodeA, nodeB) > 0) { int cycleSum = 0; for(Node neighbour : nodeA.getNeighbours()) { if(maxDepth > 1) cycleSum += getPathCount(neighbour, nodeB, maxDepth - 1); else if(getHops(neighbour, nodeA) > 0) cycleSum++; } return cycleSum; } else return 0; } COM: <s> returns the numbers of potential paths found by examining the neighbours of the </s>
funcom_train/23971605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XAConnection getXAConnection() throws SQLException { // Comment out before public release: /* System.err.print("Executing " + getClass().getName() + ".getXAConnection()..."); */ // Use JDBCDriver directly so there is no need to regiser with DriverManager JDBCConnection connection = (JDBCConnection) JDBCDriver.getConnection(url, connectionProps); JDBCXAConnection xaConnection = new JDBCXAConnection(this, connection); return xaConnection; } COM: <s> get new xaconnection connection to be managed by a connection manager </s>
funcom_train/50153624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFindActions() { ActionFactory factory = ActionFactory.getInstance(); Action action = factory.lookupAction(new AddRowAction()); assertNotNull(action); Action action2 = factory.lookupAction(new AddRowAction()); assertNotNull(action2); assertSame(action, action2); action.setEnabled(false); assertEquals(false, action2.isEnabled()); } COM: <s> method test find actions </s>
funcom_train/51101955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ExtendedType getRegisteredType(String javaClassName) { ExtendedType type = (ExtendedType) typeMap.get(javaClassName); if (type != null) { return type; } type = getDefaultType(javaClassName); if (type != null) { // register to speed up future access registerType(type); return type; } return getDefaultType(); } COM: <s> returns a type registered for the class name </s>
funcom_train/8685600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readSource(Reader reader, String name) { BufferedReader in = null; try { in = new BufferedReader(reader); script += FileUtils.safeReadFully(in); } catch (IOException ex) { throw new BuildException("Failed to read " + name, ex); } finally { FileUtils.close(in); } } COM: <s> read some source in from the given reader </s>
funcom_train/4969316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connectSpecialSectors() throws EIllegalGateConnection { Vector<Sector> sectors = new Vector<Sector>(); Race.getByIdentifier(X2RaceIdentifier.XENON).addAllSectors(sectors); Race.getByIdentifier(X2RaceIdentifier.KHAAK).addAllSectors(sectors); Race.getByIdentifier(X2RaceIdentifier.UNKNOWN).addAllSectors(sectors); for (Sector sector : sectors) { ((Sector) sector.getBuilderInfo()).connectTo(sector); } } COM: <s> connects the special sectors according to their builder info see </s>
funcom_train/4925744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unwatchStock(Stock stock) { // Stop interest in the Stock this.filter.removeMarketId(stock.getMarketId()); // Remove stock from display for (Iterator<StockEntry> iterator = this.displayedPrices.getList() .iterator(); iterator.hasNext();) { StockEntry entry = iterator.next(); if (entry.getStock().equals(stock)) { iterator.remove(); } } } COM: <s> flags to stop watching the particular </s>
funcom_train/22348376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initDestiFileChooser(final String defaultPath) { // initialize file chooser destiFileChooser = new JFileChooser(); destiFileChooser.setFileSelectionMode( JFileChooser.DIRECTORIES_ONLY); destiFileChooser.setMultiSelectionEnabled(false); destiFileChooser.setAcceptAllFileFilterUsed(true); if (defaultPath != null) { destiFileChooser.setSelectedFile(new File(defaultPath)); } } COM: <s> initializes the file chooser for the destination path </s>
funcom_train/21317941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TestObject getParent() { //@KAE - comment out the following lines (WHICH CAN BE REMOVED) and added the one line // SWTToolBar parent = null; // TestObject obj = super.getParent(); TestObject parent = super.getParent(); // if (obj != null) { // parent = new SWTToolBar((ScrollTestObject)obj); // } return parent; } COM: <s> provides access to the parent control of the tool item p </s>
funcom_train/34083873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void toRouteView (String route, GeoPoint loc) { Intent i = new Intent(this, RouteView.class); i.putExtra(sROUTE_KEY, route); i.putExtra(sROUTE_LAT_KEY, loc.getLatitudeE6()); i.putExtra(sROUTE_LON_KEY, loc.getLongitudeE6()); startActivity(i); } COM: <s> fires an intent to route view and passes a routes id </s>
funcom_train/33850465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected VertexType getNextSearchTreeRoot() { // FIXME: slow linear search, should improve for (Iterator<VertexType> i = graph.vertexIterator(); i.hasNext();) { VertexType vertex = i.next(); if (visitMe(vertex)) return vertex; } return null; } COM: <s> choose the next search tree root </s>
funcom_train/6475789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialise(String data) { super.initialise(data); String[] vals = data.split("="); if (vals[0].equals("authority")) { Logger.detail("Authority: " + vals[1], CLASS_LOG_LEVEL); eventQueue.add(new Event("authorityRegistration")); } } COM: <s> this method overrides the default initialize </s>
funcom_train/16849073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void read() { String line; BufferedReader in = null; try { in = getDataReader(); while ((line = in.readLine()) != null) { data.add(line); } } catch (IOException e) { throw new SeismoException(e); } finally { if (in != null) Util.close(in); } } COM: <s> reads all the data from a catalog into </s>
funcom_train/44314454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isObjectMoved(int idf, int ido) { IDSPFObject o = getObject(idf,ido); if(o == null || o.getWFObject() == null) return false; IWFObject wf = (IWFObject)o.getWFObject(); return (wf.getX() != o.getX() || wf.getY() != o.getY() ); } COM: <s> checks whether a given dspf has been moved in wf or not </s>
funcom_train/1822854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString () { if (coordinates.length == 0) return "()"; String result = "Pnt(" + coordinates[0]; for (int i = 1; i < coordinates.length; i++) result = result + "," + coordinates[i]; result = result + ")"; return result; } COM: <s> create a string for this pnt </s>
funcom_train/42885565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMinMaxActions(JMenu menu) { try { wrap=true; OurUtil.makeMenuItem(menu, "Minimize", KeyEvent.VK_M, doMinimize(), iconNo); OurUtil.makeMenuItem(menu, "Zoom", doZoom(), iconNo); } finally { wrap=false; } } COM: <s> this method inserts minimize and maximize entries into a jmenu </s>
funcom_train/50154210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initAndShowSplash() { // First, display the splash screen... splash = new SplashScreen(this, "com/greendiamond/rivernorth/resources/SplashScreen.gif", new String[]{ "project RiverNorth", "beta version 0.4 Build 1", "release date: June 3, 2002" }); Thread splashThread = new Thread(splash); splashThread.start(); } COM: <s> method show splash </s>
funcom_train/37559991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRow(int row, Object[] values) { if (values.length != columns()) throw new IndexOutOfBoundsException("Too many values for a row !"); for (int i = values.length - 1; i >= 0; i--) { setQuick(row, i, values[i]); } } COM: <s> set an entire row of data got by get row </s>
funcom_train/42237518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PushSourceStream getDataInputStream() { if (dataInStrm == null) { dataInStrm = new SimpleSocketInputStream(dataSock); dataInStrm.setName("SimpleSocketInputStream [data], port " + port); dataInStrm.start(); } return dataInStrm; } COM: <s> returns an input stream to receive the rtp data </s>
funcom_train/23276600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(final SubjectPredicate sp, final Value v) { if (sp.predicate.equals(PREDICATE_IS_NAMESPACE_PREFIX)) { // invalidate namespace cache namespaces = null; } options.put(sp, v); Set<SubjectPredicate> coll = subjectsForPredicate.get(sp.predicate); if (coll == null) { coll = new TreeSet<SubjectPredicate>(); subjectsForPredicate.put(sp.predicate, coll); } coll.add(sp); } COM: <s> sets the value for the given subject predicate pair </s>
funcom_train/2731443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int rating(WrappedMethod m1, WrappedMethod m2) { int rating = 0; Class<?>[] params1 = m1.getParameterTypes(); Class<?>[] params2 = m2.getParameterTypes(); for (int i = 0; i < params1.length; i++) { Class<?> p1 = params1[i]; Class<?> p2 = params2[i]; if (!p1.equals(p2)) { if (p2.equals(Value.class)) { rating++; } else { return -1; } } } return rating; } COM: <s> computes a measure of compatibility between two function declarations </s>
funcom_train/49403141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SAMFileSpan getContentsFollowing() { if(chunks.isEmpty()) throw new SAMException("Unable to get the file pointer following this one: no data present."); validateSorted(); return new BAMFileSpan(new Chunk(chunks.get(chunks.size()-1).getChunkEnd(),Long.MAX_VALUE)); } COM: <s> gets a file span over the data immediately following this span </s>
funcom_train/44799616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(final Graphics g) { if (Logger.getLogger("org.form4j.form.painter").isDebugEnabled() || ToolTipUtil.isLayoutGridActive((FormLayout)getForm().getContainer().getLayout())) { g.setColor(Color.cyan); g.fillRect(0,0,width,height); } else super.paint(g); } COM: <s> diagnostics painting when the logger for org </s>
funcom_train/46328249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setPhoneVibrate() { AudioManager audioManager =(AudioManager) getSystemService(Context.AUDIO_SERVICE); audioManager.setRingerMode(AudioManager.RINGER_MODE_VIBRATE); ResultProcessor.process(this, intent, ResultProcessor.RESULT_SUCCESS, getString(R.string.phone_set_on_vibrate)); } COM: <s> set the phone to vibrate </s>
funcom_train/7270041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setItemChecked(E key) { if (key == null) { throw new IllegalArgumentException(); } if (!this.checked.contains(key)) { this.checked.add(key); this.unchecked.remove(key); } this.bolded.add(key); this.update(); this.ensureRowVisible(key); (new Timer(2000, new BoldRemoveListener(key))).start(); return true; } COM: <s> checks an item returns true if the item has changed state </s>
funcom_train/6453055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean socAcc(Message m) { if (m.getIlForce().equals("achieve") && m.getSender().startsWith("mds")) { return true; } else { System.out.println("CustomAgentClass: CPH agent is not allowed to handle message "+m); return false; } } COM: <s> only accepts achieve messages from mds robots </s>
funcom_train/32634298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StructuredBlock prevCase(StructuredBlock block) { for (int i=caseBlocks.length-1; i>=0; i--) { if (caseBlocks[i].subBlock == block) { for (i--; i>=0; i--) { if (caseBlocks[i].subBlock != null) return caseBlocks[i].subBlock; } } } return null; } COM: <s> find the case that precedes the given case </s>
funcom_train/26216647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSameState( BSPPathBox rhs ) { // same state in a maze search is simply when (x,y) are the same if( (x == rhs.x) && (y == rhs.y) && (z == rhs.z)) { return true; } return false; } // END isSameState COM: <s> returns true if the given path box equals this path box </s>
funcom_train/20333630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj instanceof Target) { Target cmp=(Target)obj; if (getLocation()!=cmp.getLocation() && (getLocation()==null || !getLocation().equals(cmp.getLocation())) ) return false; return true; } return false; } COM: <s> test the equality of this code target code </s>
funcom_train/50181760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(int time, Node[] n) { if( OverlayNetwork.size() == 0 ) return; if( center == null || center.getFailState()!=Fallible.OK ) { center = OverlayNetwork.get(0); } for(int i=0; i<n.length; ++i) { ((Linkable)n[i].getProtocol(protocolID)).addNeighbor(center); } } COM: <s> for all nodes sets a fixed node as center </s>
funcom_train/29728670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean inserir(EventoUnidadeDto dto) throws SQLException{ PreparedStatement ps = conn.prepareStatement(INSERIR); ps.setInt(1, dto.getCd_unidade()); ps.setString(2, dto.getDs_evento()); ps.setDate(3, new Date(dto.getDt_evento().getTime())); ps.setInt(4, acharProximo()); return ps.execute(); } COM: <s> m todo para inserir eventos </s>
funcom_train/22234948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SceneGraphObjectState createState( SceneGraphObject obj, SymbolTableData symbol ) { if (obj==null) return nullObject; if (symbol!=null) { symbol.incrementReferenceCount(); symbolTable.setBranchGraphID( symbol ); if (symbol.getNodeState()!=null) return symbol.getNodeState(); } else symbol = symbolTable.createSymbol( obj ); return createState( symbol ); } COM: <s> given a scene graph object instantiate the correct state class </s>
funcom_train/12802802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rating getParameter(int index) { Rating rating; try { rating = (Rating)parameters.get( index ); } catch( IndexOutOfBoundsException ioobe ) { rating = new Rating(); parameters.ensureCapacity( index ); parameters.add( index, rating ); } //return it return rating; } COM: <s> indexed getter for property parameter </s>
funcom_train/16270183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMergeSomeParameters(){ String expected = "// The quick @fox.colour@ fox @fox.action@ the small yappy-type dog."; Map parameters = new HashMap(); parameters.put("fox.type", "quick"); parameters.put("dog.type", "small yappy-type"); Writer writer = new StringWriter(); try { writer = templateMerger.merge(TEMPLATE, parameters, writer); } catch (MergeException e) { fail(e.getMessage()); } String content = writer.toString(); assertTrue("Content should match expected",content.equals(expected)); log.debug(content); } COM: <s> check behaviour when only some tokens match </s>
funcom_train/33267262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawString(String str, int x, int y) { Font font = getFont(); if (font instanceof SpecialFont) { ((SpecialFont)font).drawString(this,str,x,y); } else { awtGraphics.drawString(str,x+xOffset,y+yOffset); } } COM: <s> draws the specified string using the current font and color </s>
funcom_train/7655240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List valueOfSubjectAlternativeName() throws IOException { Extension extn = getExtensionByOID("2.5.29.17"); //$NON-NLS-1$ if (extn == null) { return null; } return ((GeneralNames) GeneralNames.ASN1.decode(extn.getExtnValue())) .getPairsList(); } COM: <s> returns the value of subject alternative name oid 2 </s>
funcom_train/39063608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void applyAll() { Iterator keys = idPageMap.keySet().iterator(); while (keys.hasNext()) { String key = (String)keys.next(); AbstractStrategySettingsPage page = (AbstractStrategySettingsPage) idPageMap.get(key); if (!uninitializedList.contains(page) && dirtyPages.contains(page)) { page.doApply(); editor.setSettingsForStrategy(key, page.getSettings()); } } applyButton.setEnabled(false); } COM: <s> run when the mark all button is pressed </s>
funcom_train/32056774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testisDataFlavorSupported(){ TextCell x = new TextCell(new Object()); assertNotNull(x); DataFlavor[] ret =x.getTransferDataFlavors(); assertFalse(x.isDataFlavorSupported(null)); assertTrue(x.isDataFlavorSupported(DataFlavor.stringFlavor)); assertFalse(x.isDataFlavorSupported(DataFlavor.imageFlavor)); } COM: <s> tests is data flavor supported </s>
funcom_train/15520189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyBindPose() { this.pos.x = this.bindPosePos.x; this.pos.y = this.bindPosePos.y; this.pos.z = this.bindPosePos.z; this.orient.w = this.bindPoseOrient.w; this.orient.x = this.bindPoseOrient.x; this.orient.y = this.bindPoseOrient.y; this.orient.z = this.bindPoseOrient.z; } COM: <s> this method is called internally by the md5 mesh parser to actually </s>
funcom_train/10876983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasProx() { if (isReadOnly()) { return hasProx; } // mutable FIs must check! for (FieldInfo fi : this) { if (fi.isIndexed && fi.indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) { return true; } } return false; } COM: <s> returns true if any fields do not positions </s>
funcom_train/6236899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isUniqueName(IWikiTableConfiguration config) { boolean unique; Object[] configArray = wikiConfigListModel.toArray(); unique = true; for (Object conf : configArray) { // This must be a check, if the references are identical. if(conf != conf){ if(StringUtils.equalsIgnoreCase(config.getName(), ((IWikiTableConfiguration) conf).getName())){ unique = false; } } } return unique; } COM: <s> checks if the name of a configuration is unique in the system </s>
funcom_train/43410435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean existeTelefone(Telefone tel, ArrayList<Telefone> lista) { boolean result = false; if (!lista.isEmpty()) { for (int i = 0; i < lista.size(); i++) { if (tel.getCodigoTelefone() == lista.get(i).getCodigoTelefone()) { result = true; break; } } } return result; } COM: <s> checks if a phone already exists in a phones list </s>
funcom_train/47514311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MatlabMatrix meanCentreColumns() { MatlabMatrix meanCentredMat = new MatlabMatrix(numRows, numCols); String command = meanCentredMat.matlabMatContents + " = " + matlabMatContents + " - repmat(mean(" + matlabMatContents + "), " + "size(" + matlabMatContents + ", 1), 1);"; engine.engEvalString(command); return meanCentredMat; } COM: <s> mean centres columns of this matrix and returns the result </s>
funcom_train/28429331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void process(String args[]) { setAwait(true); setCatalinaHome(); setCatalinaBase(); try { if (arguments(args)) { if (starting) { load(args); start(); } else if (stopping) { stopServer(); } } } catch (Exception e) { e.printStackTrace(x.java.lang.System.out()); } } COM: <s> the instance main program </s>
funcom_train/3320871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BTSocket guiConnect(SDPRecord rec) { if(!clientUp()) throw new BTException("Client needs to be set up"); BTSocketSymbian sock = null; int err = guiConnectNative(clientptr, rec.getChannel()); if (err == KErrNone) { sock = new BTSocketSymbian(); sock.setSocket(clientptr); } // else { user canceled } return sock; } COM: <s> invokes a device selection gui and connects to whatever device the user selects </s>
funcom_train/8660929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { for (Iterator poolIter = pools.values().iterator(); poolIter.hasNext();) { try { ((ObjectPool) poolIter.next()).close(); } catch (Exception closePoolException) { //ignore and try to close others. } } InstanceKeyObjectFactory.removeInstance(instanceKey); } COM: <s> close pool s being maintained by this datasource </s>
funcom_train/45622665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addVersionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FormatVersionType_version_feature"), getString("_UI_PropertyDescriptor_description", "_UI_FormatVersionType_version_feature", "_UI_FormatVersionType_type"), MSBPackage.eINSTANCE.getFormatVersionType_Version(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the version feature </s>
funcom_train/29031309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { long nextCheck = System.currentTimeMillis(); while (true) { long currentTime = System.currentTimeMillis(); long diff = nextCheck - currentTime; nextCheck += this.interval; if (shouldTerminate()) { break; } this.receiver.tick(); if (shouldTerminate()) { break; } try { if (interval + diff > 0) { Thread.sleep(this.interval + diff); } } catch (InterruptedException e) { logger.debug("Servertick interrupted."); } } } COM: <s> start the thread </s>
funcom_train/18058795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFieldExplanation(UID objectId, String fieldName) throws RemoteException { synchronized(SO) { SO.rmcCount++; try { CategorySource cat = (CategorySource) SO.objectMap.get(objectId); return cat.getFieldExplanation(fieldName); } catch(PerformanceException e) { throw new RemoteException(e.getMessage()); } } } COM: <s> return the field explanation given the field name </s>
funcom_train/3417593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int activeGroupCount() { int ngroupsSnapshot; ThreadGroup[] groupsSnapshot; synchronized (this) { if (destroyed) { return 0; } ngroupsSnapshot = ngroups; if (groups != null) { groupsSnapshot = Arrays.copyOf(groups, ngroupsSnapshot); } else { groupsSnapshot = null; } } int n = ngroupsSnapshot; for (int i = 0 ; i < ngroupsSnapshot ; i++) { n += groupsSnapshot[i].activeGroupCount(); } return n; } COM: <s> returns an estimate of the number of active groups in this </s>
funcom_train/21154256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayHTML(final String url, final int selectedIndex) { uiController_.beginWaitScreenRequested(uiController_.getLocale().getString(Constants.STR_Loading), true); new Thread(new Runnable() { public void run() { displayHTML_(url, selectedIndex); } }).start(); } COM: <s> displays links list or page from given location </s>
funcom_train/3318875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParent(Category parent) { // TODO Check that the new parent isn't the same as this. // remove this from the current parents tree if (this.parent != null) { try { this.parent.removeCategory(this); } catch (CategoryNotFoundException e) { // ignore - as doing this will repair the damage that // caused the problem } } this.parent = parent; } COM: <s> this method sets the parent category to the given category </s>
funcom_train/12914801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void testSetBasisElementParameters() { // System.out.println("setBasisElementParameters"); // double gridSpacing = 0.0; // double basisElementSeparation = 0.0; // SquarePixel instance = new SquarePixel(); // instance.setBasisElementParameters(gridSpacing, basisElementSeparation); // fail("The test case is a prototype."); // } COM: <s> test of set basis element parameters method of class square pixel </s>
funcom_train/20313347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeVersionInfo( String info ) { checkProfile( getProfile().VERSION_INFO(), "VERSION_INFO" ); Literal infoAsLiteral = ResourceFactory.createPlainLiteral( info ); getModel().remove( this, getProfile().VERSION_INFO(), infoAsLiteral ); } COM: <s> p remove the statement that the given string provides version information about </s>
funcom_train/25826539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Number getSumValue(int variable) { Double sum; if (step == 1) { return vars.get(variable).getLastValue(); } else { sum = Double.parseDouble(vars.get(variable).getStatsVarUIMap().get( StatisticVar.SUM)) + vars.get(variable).getLastValue().doubleValue(); } return sum; } COM: <s> usage return the sum of the i th statistic variable </s>
funcom_train/9502177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public GeoPoint PointIn(String label, Region region, double x, double y) { AlgoPointInRegion algo = new AlgoPointInRegion(cons, label, region, x, y); Application.debug("PointIn - \n x=" + x + "\n y=" + y); GeoPoint p = algo.getP(); return p; } COM: <s> point in region with cartesian coordinates x y </s>
funcom_train/47089369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load() throws IOException { FileReader r = new FileReader(file) ; BufferedReader br = new BufferedReader(r) ; String text = "" ; String line = null ; while((line = br.readLine() ) != null) { text += line+"\n" ; } setControlScoreText(text) ; br.close() ; r.close() ; } COM: <s> load the control score from the file to the text area </s>
funcom_train/3881892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element pasteElementUndoable(Object source, Element element, Element newParent, boolean doSelect) { Element newElement = (Element)element.clone(); addElement(this, newParent, newElement, doSelect); if(_undoHandler != null) { UndoableAction action = new UndoablePasteAction(newParent, newElement); _undoHandler.addUndoableAction(action); } return newElement; } COM: <s> paste an element to a new parent </s>
funcom_train/14654393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showNoDataWarning() { JFrame x = new JFrame(); x.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //System.out.println("java.lang.OBJECT NOT ALLOWED AS SLOTDATA, BE // MORE SPECIFIC"); JOptionPane.showMessageDialog(x, "This Procedure has no history", "Procedure history", JOptionPane.INFORMATION_MESSAGE); } COM: <s> show a message dialog with the fact that there is no data </s>