__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/17458267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDaemonUpTime() throws MPDConnectionException, MPDAdminException { try { return (Integer.parseInt(mpd.getServerStat(MPD.StatList.UPTIME))); } catch (MPDResponseException re) { throw new MPDAdminException(re.getMessage(), re.getCommand()); } catch (Exception e) { throw new MPDAdminException(e.getMessage()); } } COM: <s> returns the daemon uptime in seconds </s>
funcom_train/2369725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addThemeFile(final File file) { final int count = this.getThemeCount() - ThemeManager.GENERIC_THEME_COUNT; Prefs.setString(Preference.THEME_FILE, Preference.THEME_FILE.getString() + GlobalConstants.PROP_ARRAY_DELIM + file.getAbsolutePath()); this.setCurrentTheme(count + ThemeManager.GENERIC_THEME_COUNT); } COM: <s> this method registers a new theme file </s>
funcom_train/46999285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getNanoseconds() { String ts = matcher.group(1); // check number format try { double t = new Double(matcher.group(1)).doubleValue(); return (long) (NANOS_PER_SECOND * t); } catch (NumberFormatException e) { System.err.println("ERROR: number format exception in unix time: " + matcher.group(1)); } return 0; } COM: <s> if matches return time in nanoseconds </s>
funcom_train/6289924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(long time) { long thisTimeFrom = getTime(); // TODO: +- 1 error? long thisTimeTo = thisTimeFrom + MILISECONDS_A_DAY-1; if (time < thisTimeFrom) return 1; else if (time > thisTimeTo) return -1; return 0; } COM: <s> compares this object with with the date specified with unix timestamp for </s>
funcom_train/3375181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCursor(Cursor c) { AccessibleContext ac = getCurrentAccessibleContext(); if (ac instanceof AccessibleComponent) { ((AccessibleComponent) ac).setCursor(c); } else { Component cp = getCurrentComponent(); if (cp != null) { cp.setCursor(c); } } } COM: <s> sets the code cursor code of this object </s>
funcom_train/12103382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createData4Collision() { //trunk bb branchBoundingBoxes.add(new BoundingBox(false)); //3 child branches branchBoundingBoxes.add( new BoundingBox(false) ); branchBoundingBoxes.add( new BoundingBox(false) ); branchBoundingBoxes.add( new BoundingBox(false) ); //54 leaf triangles for (int index = 0; index < 54; index++) { leafTriangles.add(new Triangle()); } } COM: <s> populates data for avatar tree collision detection </s>
funcom_train/28897576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void preCommit() { preCommitStart = System.currentTimeMillis(); if (reconstruct) { if (PARALLEL_COMMIT) { synchronized(mutex) { if (parallelCommitInProgress) return; parallelCommitInProgress = true; new Thread(r).start(); return; } } createBuffers(false); } if (isNeedsPrecommit()) { doPreCommit(); } preCommitTime+=System.currentTimeMillis() - preCommitStart; } COM: <s> calculates aabbs for all instances and then </s>
funcom_train/7511034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getJMenuHelp() { if (jMenuHelp == null) { jMenuHelp = new JMenu(); jMenuHelp.setText(Messages.getString("MainFrame.menu.help")); //$NON-NLS-1$ jMenuHelp.add(getJMenuItemHelp()); jMenuHelp.addSeparator(); jMenuHelp.add(getJMenuItemAbout()); } return jMenuHelp; } COM: <s> this method initializes j menu help </s>
funcom_train/49044764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addClazzPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CustomReaction_clazz_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CustomReaction_clazz_feature", "_UI_CustomReaction_type"), EventPackage.Literals.CUSTOM_REACTION__CLAZZ, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the clazz feature </s>
funcom_train/2034913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateScroll() { if (connectedView != null && !muteScrollUpdate){ Point loc = this.getFigureCanvas().getViewport().getViewLocation(); connectedView.muteScrollUpdate = true; //Avoid event listener loops connectedView.getFigureCanvas().getViewport().setViewLocation(loc); connectedView.muteScrollUpdate = false; //System.out.println(this + ": View-Location auf " + loc + " gesetzt."); //getFigureCanvas().redraw(); } } COM: <s> updates the scroll position of the connected view </s>
funcom_train/41506069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { if (o == null || o.getClass() != SVNNodeKind.class) { return -1; } int otherID = ((SVNNodeKind) o).myID; return myID > otherID ? 1 : myID < otherID ? -1 : 0; } COM: <s> compares this object with another one </s>
funcom_train/15493896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMLConfiguration getConfig(Class classRef) { XMLConfiguration configuration = new XMLConfiguration( classRef.getName()); copyConfig((XMLConfigInfo)configSections.get(GENERAL_SECTION), configuration); copyConfig((XMLConfigInfo)configSections.get( classRef.getName()),configuration); return configuration; } COM: <s> this method returns a reference to the configuration class object </s>
funcom_train/7929392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Query like(int docNum) throws IOException { if (fieldNames == null) { // gather list of valid fields from lucene Collection fields = ir.getFieldNames( IndexReader.FieldOption.INDEXED); fieldNames = (String[]) fields.toArray(new String[fields.size()]); } return createQuery(retrieveTerms(docNum)); } COM: <s> return a query that will return docs like the passed lucene document id </s>
funcom_train/20066914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyFrom(ReadSet aSet) { if (aSet.size > this.size) { elements = new Transaction[aSet.size]; this.size = aSet.size; } System.arraycopy(aSet.elements, 0, this.elements, 0, aSet.next); this.next = aSet.next; } COM: <s> initialize one object from another </s>
funcom_train/10980980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSimpleShort() { Object value = dynaForm.get("shortProperty"); assertNotNull("Got a value", value); assertTrue("Got correct type", (value instanceof Short)); assertEquals("Got correct value", ((Short) value).shortValue(), (short) 987); } COM: <s> test get simple property on a short property </s>
funcom_train/34838454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WiWcMediator createWiWcMediator(String identifier) throws GlueException { if ((identifier==null)||(identifier=="")) return null; if (langType.equalsIgnoreCase(wsml_lang)) return ((WiWcMediator) new WSML_WiWcMediator(identifier)); //if (langType.equalsIgnoreCase(rdf_lang)) return new (identifier); return null; } COM: <s> create a new wi wc mediator </s>
funcom_train/33236700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isMethodBody() { ASTNode firstParent = ((ASTNode)fNodes.get(0)).getParent(); if (firstParent == null) { return false; } final ASTNode candidate= firstParent.getParent(); if (candidate == null || candidate.getNodeType() != ASTNode.METHOD_DECLARATION) { return false; } final MethodDeclaration method= (MethodDeclaration)candidate; return method.getBody().statements().size() == fNodes.size(); } COM: <s> tests if the whole duplicate is the full body of a method </s>
funcom_train/25096277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCommand(Request request) { if (request instanceof ReconnectRequest) { Object view = ((ReconnectRequest) request).getConnectionEditPart() .getModel(); if (view instanceof View) { Integer id = new Integer(TransactioneditorVisualIDRegistry .getVisualID((View) view)); request.getExtendedData().put(VISUAL_ID_KEY, id); } } return super.getCommand(request); } COM: <s> extended request data key to hold editpart visual id </s>
funcom_train/16768785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void returnMessage(String message, HttpServletResponse resp) throws IOException { log.debug("returnMessage {}", message); resp.setStatus(HttpServletResponse.SC_OK); resp.setHeader("Connection", "Keep-Alive"); resp.setHeader("Cache-Control", "no-cache"); resp.setContentType(CONTENT_TYPE); resp.setContentLength(message.length()); resp.getWriter().write(message); resp.flushBuffer(); } COM: <s> return a message to the client </s>
funcom_train/44718593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _setSenderAllTasks(Workflow wf, User user) { Iterator itr = wf.getTasks(); UserTask userTask = null; while (itr.hasNext()) { userTask = (UserTask)itr.next(); userTask.setNotificationSender(user); userTask.save(); } } COM: <s> set all tasks to have the same notification sender </s>
funcom_train/21793590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { // Notify listeners for (IChatStatusListener l : chatListeners) l.chatClosed(this); // clean-up now if (service != null) { service.close(); // The chat service will clean-up all us as // listeners too service = null; } // Good bye, friends chatListeners.clear(); chatListeners = null; chatServiceAction.CloseChat(getBuddyId()); getBackendHelper().unregisterBackendListener(this); } COM: <s> close the chat this includes disconnecting from the underlying chat </s>
funcom_train/22222606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void PanSE( int percentage ) { double deltaX = (this.getWidth() * (double)percentage / 100.0f); double deltaY = (this.getHeight() * (double)percentage / 100.0f); this.minY -= deltaY; this.maxY -= deltaY; this.minX += deltaX; this.maxX += deltaX; } COM: <s> implements pan se method </s>
funcom_train/46790214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNodeAfter(PDPageNode newNode, PDPageNode destination) { int destinationIndex = -1; COSArray cosKids = cosGetField(DK_Kids).asArray(); if ((cosKids != null) && (destination != null)) { destinationIndex = cosKids.indexOf(destination.cosGetDict()); } int newNodeIndex = -1; if (destinationIndex > -1) { newNodeIndex = destinationIndex + 1; } addNode(newNodeIndex, newNode); } COM: <s> add a page after the designated destination page </s>
funcom_train/7298258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDescriptionByFileExt(String fileExt) { // Removes the leading '.' character from the file extension if exists. fileExt = AppUtility.removeDotFromFileExtension(fileExt); if (getMimeTypeByFileExt(fileExt) == null) { return null; } else { return getDescriptionByMimeType(getMimeTypeByFileExt(fileExt)); } } COM: <s> returns the description associated with the given file extension </s>
funcom_train/35728272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUp() throws Exception { xmltvsi = new XMLTVScheduleInspector(); File f1 = new File("examples/tv_grab_update.xml"); FileWriter fw = new FileWriter(f1); Calendar c = Calendar.getInstance(); c.add(Calendar.DATE, 1); fw.write("<programme start=\"" + DateFormatter.formatDate(new Date())); fw.write("<programme start=\"" + DateFormatter.formatDate(c.getTime())); fw.close(); UserPreferences.setXmltvConfigFile("examples/tv_grab.conf"); UserPreferences.setXmltvOutputFile(f1.toString()); } COM: <s> prepare an updated and a non updated schedule to test the class </s>
funcom_train/44223048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onAbout(){ String msg = "Diagrammar\n" + "Version: " + VPDMfApp.version + " (build " + VPDMfApp.build + ")\n\n" + "Copyright(c) 2003 - 2006\n" + "Knowledge Management Research Group\n" + "University of Southern California\n"; JOptionPane.showMessageDialog(this, msg, "About Diagrammar", JOptionPane.INFORMATION_MESSAGE); } COM: <s> event handler for about menu item </s>
funcom_train/22388107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getBuildChangedFiles(int buildId) { // Get the build for the passed buildId Build build = getBuild(buildId); return subversionDao.getBuildChangedFiles(branchDao.getBranchSummary(build.getBranchId().intValue()), buildDao.getBuild(buildId)); } COM: <s> get the union of all changed files for all projects in this build </s>
funcom_train/21623675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setSubtitle(String text) { if (text == null || text.length() == 0) { getShell().setText(fTitle); } else { getShell().setText(Messages.format(JavaUIMessages.FilteredTypeSelectionDialog_titleFormat, new String[] { fTitle, text })); } } COM: <s> adds or replaces subtitle of the dialog </s>
funcom_train/43245261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEffectiveDate() { System.out.println("getEffectiveDate"); FamilyDemographicDependentObject instance = new FamilyDemographicDependentObject(); Calendar expResult = null; Calendar result = instance.getEffectiveDate(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get effective date method of class org </s>
funcom_train/5862279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addUuidChanged(Component comp, boolean addOnlyMoved) { if ((!addOnlyMoved || _moved.contains(comp)) && (_idChgd == null || !_idChgd.containsKey(comp)) && !isCUDisabled(comp)) { if (_idChgd == null) _idChgd = new LinkedHashMap(23); _idChgd.put(comp, comp.getUuid()); } } COM: <s> called before changing the components uuid </s>
funcom_train/43579906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getFeeder() { if (feeder == null) { feeder = new JButton(); feeder.setBounds(new Rectangle(181, 20, 73, 22)); feeder.setText("Go"); feeder.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { FeederURLDefinerWindow definerWindow = new FeederURLDefinerWindow(); definerWindow.setVisible(true); hideMe(); } }); } return feeder; } COM: <s> this method initializes feeder </s>
funcom_train/6329135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SortedSet headSet(Object to) { // TODO: replace when FakeFactoryGenerator is ready // return NodeTreeSetImplFactory.getDefault().create(map.headMap(to)); SortedMap headMap = map.headMap(to); return (NodeTreeSet) database().createObject( NodeTreeSetImpl.class, new Class[] {SortedMap.class}, new Object[] {headMap} ); } COM: <s> returns a view of this set including all elements less than </s>
funcom_train/27822930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Term getFreeTerm(int index) { List freeTerms=getFreeTermsList(); while (freeTerms.size()<=index) freeTerms.add(null); Term term=(Term)freeTerms.get(index); if (term==null) { term=newVariable(); freeTerms.set(index,term); } return term; } COM: <s> returns the free term with given index </s>
funcom_train/38542695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setShort(int parameterIndex, short x) throws SQLException { try { ((PreparedStatement) this.realStatement) .setShort(parameterIndex, x); if (parameterIndex <= this.currentParams.length) { this.currentParams[parameterIndex - 1] = new Integer(x); } } catch (SQLException e) { manageException(e); throw generateException(e); } } COM: <s> sets the designated parameter to the given java code short code </s>
funcom_train/38286290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { if (rootFile != null) { try { rootFile.close(); ((DefaultFileSystemManager) VFS.getManager()).closeFileSystem(rootFile.getFileSystem()); } catch (FileSystemException e) { // Nothing } finally { rootFile = null; } } } COM: <s> close session release ressources </s>
funcom_train/18026655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Canvas getCanvasForPlot() { Canvas[] cc= dom.getCanvases(); for ( Canvas c: cc ) { for ( Row r: c.getRows() ) { if ( r.getId().equals(plot.getRowId()) ) { return c; } } } return null; } COM: <s> return the canvas containing this plot or null if this cannot be resolved </s>
funcom_train/46848181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node appendChild(Node newChild) { if (!(newChild instanceof INode)) throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, "New child node is of the wrong class"); ((INode)newChild).setParent(this); children.add(newChild); this.size += ((INode)newChild).getSize(); return this; } COM: <s> appends the given child to this node returning this node </s>
funcom_train/22053590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BaseCharData getBaseChar() { GenericDataManager base_char_manager = BirMail.getDatabase().GetManager( GenericDataManager.TYPE_BASE_CHAR_DATA); //return (BaseCharData)base_char_manager.FindByID( GetCharacterOwnerID() ); return (BaseCharData)getCharacterOwner(); } COM: <s> get a pointer to the base character object for this character </s>
funcom_train/36782989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String checkResult(String userId, String path, Context context) { // TODO: environment information: context Map<String, Permission> pathPermission = pathPermissions.get(userId); if (pathPermission != null) { Permission permission = pathPermission.get(path); if (permission != null && permission.recordCondition != null) { return permission.recordCondition.execute(context); } } return null; } COM: <s> get the filter condition </s>
funcom_train/49822044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Term evalExpression(Term term) { if (term == null) return null; Term val = term.getTerm(); if (val instanceof Struct) { Struct t = (Struct) val; if (term != t) if (!t.isPrimitive()) engine.identifyFunctor(t); if (t.isPrimitive()) { PrimitiveInfo bt = t.getPrimitive(); // check for library functors if (bt.isFunctor()) return bt.evalAsFunctor(t); } } else if (val instanceof Number) { return val; } return null; } COM: <s> evaluates an expression </s>
funcom_train/12643676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillRoundRect(int x, int y, int w, int h, int arcWidth, int arcHeight) { pFillRoundRect(psd, x + originX, y + originY, w, h, arcWidth, arcHeight); } COM: <s> draws a filled rounded rectangle </s>
funcom_train/47677541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pollOnce(int p_id, String p_endpointURI) { for (MessageReceiver receiver : getReceivers().values()) { if (receiver instanceof SaddleJDBCMessageReceiver && receiver.getEndpointURI().toString().equals(p_endpointURI)) { ((SaddleJDBCMessageReceiver) receiver).pollOnce(p_id); } } } COM: <s> poll the database once </s>
funcom_train/10532998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddExistingChild() { org.apache.beehive.controls.runtime.webcontext.ControlBeanContextSupport cbcs = getContext(); org.apache.beehive.controls.runtime.webcontext.ControlBeanContextChildSupport child = new ControlBeanContextChildSupport(); assertTrue(cbcs.add(child)); assertFalse(cbcs.add(child)); } COM: <s> attempt to re add an existing child </s>
funcom_train/2285130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadGivenHandledCharts() { final Map<HandledChart, List<ValuePoint>> handledChartsWithPoints = descriptor.getHandledChartMapPoints(); for (HandledChart hc : handledChartsWithPoints.keySet()) { hc.init(this, handledChartsWithPoints.get(hc)); } givenHandledChartsLoaded = true; } COM: <s> load given handled chart map by descriptor this method could be called </s>
funcom_train/41740742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void injectProperties(BeanDefinition definition, Object beanInstance) { Dependency[] dependencies = definition .getDependencies(DependencyTarget.Property); Object[] resolved = this.resolveDependencies(dependencies); ObjectProxy<Object> bean = Reflect.on(beanInstance); for (int i = 0; i < resolved.length; i++) { String setter = "set" + StringUtils.capitalize(dependencies[i].getPropertyName()); bean.method(setter, dependencies[i].getType()).invoke(resolved[i]); } } COM: <s> inject the dependencies using setter methods </s>
funcom_train/48407218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addWorkProductDefinitionContextPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_WorkProductDefinition_workProductDefinitionContext_feature"), getString("_UI_PropertyDescriptor_description", "_UI_WorkProductDefinition_workProductDefinitionContext_feature", "_UI_WorkProductDefinition_type"), SpemxtcompletePackage.eINSTANCE.getWorkProductDefinition_WorkProductDefinitionContext(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the work product definition context feature </s>
funcom_train/39314649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTransferDataFlavors() { System.out.println("testGetTransferDataFlavors"); flavor = clip.getTransferDataFlavors(); assertNotNull(flavor); //System.out.print("This test method can't be done because getTransferDataFlavor"); //System.out.println(" is synchronized."); } COM: <s> test of get transfer data flavors method of class umclip obj </s>
funcom_train/8485357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMirrorBaseNotModifiedOnClone() { ATObject result = evalAndReturn( "def origMirror := mirror: { nil };\n" + "def origBase := origMirror.base;\n" + "def newBase := object: { nil } mirroredBy: origMirror; \n" + "(origMirror.base) == origBase\n"); assertEquals(NATBoolean._TRUE_, result); } COM: <s> this test ensures that the base field of a mirror is not modified </s>
funcom_train/11012519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHorizontallyCenter() { HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet s = wb.createSheet(); HCenterRecord record = s.getSheet().getPageSettings().getHCenter(); assertEquals(false, record.getHCenter()); s.setHorizontallyCenter(true); assertEquals(true, record.getHCenter()); } COM: <s> test horizontally centered output </s>
funcom_train/22549366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addQuery(QueryRequest qr) { LOG.trace("entered SearchResultHandler.addQuery(QueryRequest)"); if (!qr.isBrowseHostQuery() && !qr.isWhatIsNewRequest()) SpamManager.instance().startedQuery(qr); GuidCount gc = new GuidCount(qr); GUID_COUNTS.add(gc); } COM: <s> adds the query to the list of queries kept track of </s>
funcom_train/13803092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MetricValue getOrCalculateValue() { if (metricValue == null) { metricValue = calculateValue(); if (metricValue != null) { graph.updateStatistics(this); } } /** This exposes the metricValue for evaluation in boolean expressions (requirements, etc.) */ // KeyContainer container = new KeyContainer(this.getName(), this.graph); // element.setProperty(container, metricValue); return metricValue; } COM: <s> this method should be the only accessor to the actual value stored </s>
funcom_train/14012612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Method getWriteMethod(String propertyName) { PropertyDescriptor propertyDescriptor = getPropertyDescriptor(propertyName); if (propertyDescriptor == null) { return null; } else { if (propertyDescriptor instanceof IndexedPropertyDescriptor) { return ((IndexedPropertyDescriptor) propertyDescriptor).getIndexedWriteMethod(); } else { return propertyDescriptor.getWriteMethod(); } } } COM: <s> returns a write setter method for a specific property </s>
funcom_train/1676384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void shiftEntriesLeft(int byHowMuch) { for (int i = 0; i < nEntries - byHowMuch; i++) { setEntryInternal(i + byHowMuch, i); } for (int i = nEntries - byHowMuch; i < nEntries; i++) { clearEntry(i); } setDirty(true); } COM: <s> shift entries starting at the by how muchth element to the left thus </s>
funcom_train/42190140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToLog(String str) { if (str.charAt(str.length() - 1) != '\n') { str = str.concat("\n"); } this.logTextArea.append(str); this.logTextArea.setCaretPosition(this.logTextArea.getDocument().getLength()); } COM: <s> adds provided string to the log panel </s>
funcom_train/2278345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doProxyConfiguration(boolean used, String host, int port, String userName, String userPassword) { System.setProperty("http.proxySet", Boolean.toString(used)); if (used){ System.setProperty("http.proxyHost", host); System.setProperty("http.proxyPort", String.valueOf(port)); if (userName != null && !userName.isEmpty()){ Authenticator.setDefault(new ProxyAuth(userName, userPassword)); } } } COM: <s> do proxy configuration </s>
funcom_train/43827851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTimePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CPNToolsTransitionAddin_time_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CPNToolsTransitionAddin_time_feature", "_UI_CPNToolsTransitionAddin_type"), ModelPackage.Literals.CPN_TOOLS_TRANSITION_ADDIN__TIME, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the time feature </s>
funcom_train/21180495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String S = "["; java.util.Iterator iter = iterator(); while (iter.hasNext()) { java.lang.Object o = iter.next(); if (o == null) S += "null "; else S += o.toString() + " "; } S += "]"; return S; } COM: <s> generate a printable version of the queue </s>
funcom_train/8072544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NodeComplement findComplementNode(OWLObjectComplementOf complement, OWLEntity entity){ NodeComplement n = null; for (Object o : getNodes()){ NodeComplement aux = ((OWLNode) o).asNodeComplement(); if (aux != null && aux.getOWLObjectComplementOf().equals(complement) && aux.getOWLEntity().equals(entity)){ n = aux; } } return n; } COM: <s> search for the complement node of an owlentity </s>
funcom_train/38464067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDuplicateKeyCodes(String codes) throws IllegalArgumentException { StringTokenizer tokenizer = new StringTokenizer(codes,","); while(tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); try { duplicateKeyCodes.add(new Integer(token)); } catch(Exception e) { throw new IllegalArgumentException("Invalid code: " + token); } } } COM: <s> sets sql error codes for duplicate keys </s>
funcom_train/14356954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reinit(int startHeight, int stopHeight) { synchronized (ANIMATION_MUTEX) { JCollapsiblePane.this.firePropertyChange(ANIMATION_STATE_KEY, null, "reinit"); this.startHeight = startHeight; this.finalHeight = stopHeight; animateAlpha = animationParams.alphaStart; currentHeight = -1; wrapper.showImage(); } } COM: <s> reinitializes the timer for scrolling up down the component </s>
funcom_train/42667088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String replace(String input, char search, String replace) { String formatString = input; int pos = formatString.indexOf(search); while (pos != -1) { StringBuffer tmp = new StringBuffer(formatString.substring(0, pos)); tmp.append(replace); tmp.append(formatString.substring(pos + 1)); formatString = tmp.toString(); pos = formatString.indexOf(search, pos + replace.length()); } return formatString; } COM: <s> replaces all instances of search with replace in the input </s>
funcom_train/33606736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToString() { System.out.println("toString"); R2 instance = new R2(); String expResult = ""; String result = instance.toString(); 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 to string method of class r2 </s>
funcom_train/38520128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connectDatabase() throws TemplateProcessorException { try { this.sqlLogic.connect( mappingProcessor.getJdbcDriver(), mappingProcessor.getJdbcUrl(), mappingProcessor.getUsername(), mappingProcessor.getPassword()); } catch (SQLException e) { throw new TemplateProcessorException( "Not connected to database: SQL state " + e.getSQLState(), e); } catch (ClassNotFoundException e) { throw new TemplateProcessorException( "Not connected to database: driver not found", e); } } COM: <s> connection to database </s>
funcom_train/31985597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sample() { incrementObservations(); // increase count of samples boolean newSample = ( randomGenerator.nextDouble() < trueProbability ); // direct mapping between probability [0,1] and sample from randomgenerator [0,1] // probability indicates level when to return "true". if ( antithetic ) // inverted computation return !newSample; else // normal computation return newSample; } COM: <s> returns the next bernoulli distributed sample of the distribution </s>
funcom_train/21990204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyActivity(String activityId, Document donorSummary) { if (log.isTraceEnabled()) { log.trace("Starting DonorSVCController.notifyActivity(" + activityId + ", " + XMLUtil.transformToString(donorSummary) + ")"); } manager.getDonorService().notifyActivity(activityId,donorSummary); this.log.trace("Finishing notifyActivity"); } COM: <s> notify the donor service that an activity occurred </s>
funcom_train/44803553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Entity readJoinedEntity(Element element) { JoinedEntity entity = new JoinedEntity(); readBaseEntity(entity, element); entity.setClassName(getValue(element, XML_CLASS_ATTR)); entity.setHeaderClassName(getValue(element, XML_HEADER_CLASS_ATTR)); entity.setTableName(getValue(element, XML_TABLE_ATTR)); entity.setExtendsClassName(getValue(element, XML_EXTENDS_CLASS_ATTR)); return entity; } COM: <s> read joined entity more tables </s>
funcom_train/5022195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unregisterControl(EditorContext editorContext) { if (getId().length() != 0) { ComponentManager.removeControl(editorContext.getContainer(), getId()); } if (propertyName.length() != 0) { editorContext.getElementEditor().unregisterPropertyField(editorContext.getRecord(), propertyName); } } COM: <s> unregister the xprocess widget from the editor </s>
funcom_train/37608698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reCenter() { OCity ccc = CMapDriver.getCity(); Dimension sdim = pp1.getViewportSize(); if (ccc.getIntrsCount() <= 0) { pp1.setScrollPosition((int)(ccc.MAXD/2-sdim.width/2), (int)(ccc.MAXD/2-sdim.height/2)); return; } OIntersection intrs = ccc.useIntrs(ccc.getIntrSave()); pp1.setScrollPosition((int)(intrs.getChartX()-sdim.width/(2)), (int)(intrs.getChartY()-sdim.height/(2))); } // end reCenter() COM: <s> this centers the map on the reference intersection </s>
funcom_train/9389351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void adjustColumnsWidth() { // Add a listener to resize the column to the full width of the table ControlAdapter resizer = new ControlAdapter() { @Override public void controlResized(ControlEvent e) { Rectangle r = mTablePackages.getClientArea(); mColumnPackages.setWidth(r.width); } }; mTablePackages.addControlListener(resizer); resizer.controlResized(null); } COM: <s> adds a listener to adjust the columns width when the parent is resized </s>
funcom_train/20774784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getDisparity(int num){ float ret = 0; float count = 0; for(int i = 0; i<num; i++){ if(path.size() - 1 - i >= 0){ ret += path.get(path.size() - 1 - i).getStereoDisparity(); count++; } else break; } return ret/count; } COM: <s> returns the average disparity of most recent num points </s>
funcom_train/42828828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImagePlus openImage(String path) { if (path==null || path.equals("")) { OpenDialog od = new OpenDialog("Open", ""); String dir = od.getDirectory(); String name = od.getFileName(); if (name==null) return null; path = dir+name; } ImagePlus img = null; if (path.indexOf("://")>0) img = openURL(path); else img = openImage(getDir(path), getName(path)); return img; } COM: <s> attempts to open the specified file as a tiff bmp dicom fits </s>
funcom_train/18598257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkSvnTask(Dbms dbms, String id, String sessionLogMessage, Map<String,String> props) throws Exception { SvnTask task = tasks.get(dbms); if (task == null) { task = new SvnTask(); task.ids = new HashSet<String>(); task.sessionLogMessage = sessionLogMessage; task.props = props; tasks.put(dbms, task); } Set<String> ids = task.ids; if (!ids.contains(id)) { ids.add(id); } } COM: <s> check and create if not present a subversion commit task for a </s>
funcom_train/46616981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getNameTextField() { if (nameTextField == null) { nameTextField = new JTextField(); nameTextField.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); nameTextField.setPreferredSize(new Dimension(100, 19)); } return nameTextField; } COM: <s> this method initializes name text field </s>
funcom_train/42818566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkColor(Color c) { if (c.getRed() > trackingColor.getRed() - colorTolerance && c.getGreen() > trackingColor.getGreen() - colorTolerance && c.getBlue() > trackingColor.getBlue() - colorTolerance) { return true; } return false; } COM: <s> checks if a color is within the tracking tolerance </s>
funcom_train/40678898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getVideoSinkFrameRate() { for (Element sink : getSinks()) { for (Pad pad : sink.getPads()) { Fraction frameRate = Video.getVideoFrameRate(pad); if (frameRate != null) { return frameRate.toDouble(); } } } return 0; } COM: <s> retrieves the framerate from the caps of the video sinks pad </s>
funcom_train/7581598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getDestinationAccountComboBox() { if (destinationAccountComboBox == null) { destinationAccountComboBox = new JComboBox(); User selectedUser = (User) getDestinationUserCombobox() .getSelectedItem(); populateDestinationAccounts(selectedUser); destinationAccountComboBox .setBounds(new Rectangle(155, 60, 160, 30)); } return destinationAccountComboBox; } COM: <s> this method initializes destiny account combo box </s>
funcom_train/26440467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDefaultValue(String name, String value,int type){ Hashtable prop=null; if (type == PROPERTIES) prop=getProperties(); else if (type == GRAPHICPROPERTIES) prop=getGraphicProperties(); else if (type == ACTIONPROPERTIES) prop=getActions(); if ((prop!=null) && (prop.containsKey(name)) && (value != null) && value.equals(prop.get(name))) return true; else return isStandardDefaultValue(name,value,type); } COM: <s> test if a pair key value is a default value of the table </s>
funcom_train/39378865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEscapeValue() { MockContext.initContext(); Form form = new Form("form"); Menu menu = new Menu("menu"); form.add(menu); String value = "<script>"; String expected = "title=\"&lt;script&gt;\""; menu.setTitle(value); menu.setLabel(value); assertTrue(menu.toString().indexOf(expected) > 1); } COM: <s> check that file field value is escaped </s>
funcom_train/25187376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEncoding() throws Exception { System.out.println("getEncoding"); URLResolver instance = new JSONSchemaURIResolverImpl(); assertEquals("UTF-8", instance.getEncoding(null)); assertEquals("UTF-8", instance.getEncoding("UTF-8")); assertEquals("AAA", instance.getEncoding("AAA")); } COM: <s> test of get encoding method of class jsonschema uriresolver </s>
funcom_train/3888752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNumberToSelectPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ActivityStructureType_numberToSelect_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ActivityStructureType_numberToSelect_feature", "_UI_ActivityStructureType_type"), ImsldV1p0Package.Literals.ACTIVITY_STRUCTURE_TYPE__NUMBER_TO_SELECT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the number to select feature </s>
funcom_train/8685776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object other) { if (isReference()) { return ((Comparable) getCheckedRef()).compareTo(other); } if (!(other instanceof Resource)) { throw new IllegalArgumentException( "Can only be compared with Resources"); } return toString().compareTo(other.toString()); } COM: <s> delegates to a comparison of names </s>
funcom_train/36106947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IFile getFile() { String filePath = fTestText.getText().trim(); if (filePath.length() < 1) { return null; } IFile returnFile= null; try { returnFile = getWorkspaceRoot().getFile(new Path(filePath)); } catch (RuntimeException e) { //this does not resolve to a path so let's blank it out... fTestText= null; } return returnFile; } COM: <s> return the ifile corresponding to the selected file </s>
funcom_train/13304579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTimePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TimeEvent_time_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TimeEvent_time_feature", "_UI_TimeEvent_type"), NegotiationPackage.Literals.TIME_EVENT__TIME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the time feature </s>
funcom_train/44025230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public boolean changePassword(String cookie, String newPass) { try { String url = cosAddr + "/people/@me/@self?person%5Bpassword%5D=" + newPass; HttpClient client = new HttpClient(); PutMethod method = new PutMethod(url); method.addRequestHeader("Cookie", cookie); client.executeMethod(method); int responseCode = method.getStatusCode(); method.releaseConnection(); if (responseCode == 200) { return true; } else { System.out.println("ASI-error: " + method.getResponseBodyAsString()); return false; } } catch (Exception e) { e.printStackTrace(); return false; } } COM: <s> change users password in asi </s>
funcom_train/9886813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValue() { if(valueComponent != null) { if(valueComponent instanceof JTextField) return ((JTextField)valueComponent).getText(); if(valueComponent instanceof JComboBox) return (String)(((JComboBox)valueComponent).getSelectedItem()); } return null; } COM: <s> returns the edited line </s>
funcom_train/16177792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setButtons(boolean visible) { if (_fillButton == null) { _fillButton = new Button("fill"); _fillButton.addActionListener(new FillButtonListener()); add(_fillButton); } _fillButton.setVisible(visible); // Request the focus so that key events are heard. requestFocus(); } COM: <s> if the argument is true make a fill button visible at the upper </s>
funcom_train/214788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttribute(String attribute, String value) { try { //check if the attribute is a valid column in the repository pStmt = conn.prepareStatement( "SELECT attr_id from component_attributes"); ResultSet rs = pStmt.executeQuery(); while(rs.next()){ if(rs.getString("attr_id").equals(attribute)){ //if it is then add this to the list of attributes. attributeTable.put(attribute, value); } } } catch (SQLException e) { e.printStackTrace(); } } COM: <s> sets the attributes values for the component objects code attribute table code </s>
funcom_train/26627383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFile(String file) { // remove leading and trailing whitespace this.file = file.trim(); try { fileHandle = new FileHandle(this.file); } catch (Exception e) { // XXX error e.printStackTrace(); } setChanged(); notifyObservers(new Integer(FILE_CHANGE)); } COM: <s> setter for property file </s>
funcom_train/13997822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createNewOption(JMenu file) { JMenuItem mi; mi = (JMenuItem) file.add(new JMenuItem("New", createImageIcon( "images/new.gif", "New"))); mi.setMnemonic('w'); mi.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W, InputEvent.CTRL_MASK)); mi.getAccessibleContext().setAccessibleName("Make a new JFlash file"); mi.addActionListener(newFileAction); } COM: <s> creates the file new option </s>
funcom_train/15605203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PropertySortInfo getPropertySortInfo(String filterName) { if (filterName == null) return null; if (propertySortCollection.get(filterName)!=null) return (PropertySortInfo)propertySortCollection.get(filterName); else { if (DEBUG) System.out.println("That PropertySortInfo "+filterName+" does not exist."); return null; } } COM: <s> returns the object that contains the settings that should be used when a </s>
funcom_train/41024645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getJComboBox() { if (jComboBox == null) { jComboBox = new JComboBox(); jComboBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { final Object item = ((JComboBox)e.getSource()).getSelectedItem(); if (item instanceof ImageProvider) { setImageProvider(ImageProvider.class.cast(item)); } } }); } return jComboBox; } COM: <s> this method initializes j combo box </s>
funcom_train/44853039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFirstOrSecondOrBoth(String inFirst, String inSecond, String inLink) { boolean hasFirst = inFirst.length() != 0; boolean hasSecond = inSecond.length() != 0; if (hasFirst && hasSecond) { return inFirst + inLink + inSecond; } if (hasFirst) { return inFirst; } return inSecond; } COM: <s> returns the first item or the second or both linked if needed </s>
funcom_train/16565309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setType(int index, Object type) { if (type != MOVE_TO && type != LINE_TO) throw new IllegalArgumentException("unknown type"); if (this.type[index] == null) throw new ArrayIndexOutOfBoundsException(index); if (index == 0 && type != MOVE_TO) throw new IllegalArgumentException("type[0] must always be MOVE_TO"); this.type[index] = type; } COM: <s> sets the type of the point at the specified index </s>
funcom_train/38937798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createCategorie(String catName) throws SQLException, IllegalArgumentException { for (int i = 0; i < getSize(); ++i) { Categorie c = (Categorie) getElementAt(i); if (catName.equals(c.toString())) { throw new IllegalArgumentException("category " + catName + " already exists"); } } addElement(new Categorie(catName)); } COM: <s> create and add a new categorie in this manager </s>
funcom_train/21942128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Field70 getField70() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("70"); if (t == null) { log.fine("field 70 not found"); return null; } else { return new Field70(t.getValue()); } } } COM: <s> iterates through block4 fields and return the first one whose name matches 70 </s>
funcom_train/3376009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isXIncludeAware() { throw new UnsupportedOperationException( "This parser does not support specification \"" + this.getClass().getPackage().getSpecificationTitle() + "\" version \"" + this.getClass().getPackage().getSpecificationVersion() + "\"" ); } COM: <s> p get state of xinclude processing </s>
funcom_train/41385527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBotonReporte() { if (botonReporte == null) { botonReporte = new JButton(); botonReporte.setBounds(new Rectangle(530, 260, 150, 30)); botonReporte.setText("Generar PDF"); botonReporte.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { listener.Action(e); } }); } return botonReporte; } COM: <s> this method initializes boton reporte </s>
funcom_train/43753131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AxisTable size(int pixelWidth, int pixelHeight) { if (tableTargetType == TableTargetType.TABLE) { setPixelSize(pixelWidth, pixelHeight); }else{ // XXX: Change this. throw new IllegalStateException("Cannot set sizes for individual rows/colums/cells"); } return this; } COM: <s> set the pixel size of target table cell content </s>
funcom_train/31467590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object visit(SubtractAssignExpression node) { Node left = node.getLeftExpression(); LeftHandSideModifier mod = NodeProperties.getModifier(left); Object lhs = mod.prepare(this, context); // Perform the operation Object result = InterpreterUtilities.subtract (NodeProperties.getType(node), lhs, node.getRightExpression().acceptVisitor(this)); // Cast the result result = performCast(NodeProperties.getType(left), result); // Modify the variable and return mod.modify(context, result); return result; } COM: <s> visits an subtract assign expression </s>
funcom_train/40526267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String expand(String item, String abbrev) { int seplen = sep.length(); int suffixStart = item.length() - (abbrev.length() + 1); int slash = item.lastIndexOf(sep, suffixStart - seplen); return slash >= 0 ? item.substring(slash + seplen) : item; } COM: <s> returns a longer suffix of original </s>