__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/50869095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getExtentSize() { if (extentSize < 0) { // not yet calculated extentSize = 0; Iterator<Concept<O,A>> it = ideal.iterator(); while (it.hasNext()) { Concept<O,A> cur = it.next(); extentSize += cur.getObjectContingentSize(); } } return extentSize; } COM: <s> calculates the extent size based on the contingent sizes in the ideal </s>
funcom_train/13390953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deregister(RemoteServiceEventListener listener) { WeakReference wRef = null; for (Object eventSubscriber : eventSubscribers) { WeakReference wr = (WeakReference) eventSubscriber; if (wr.get().equals(listener)) { wRef = wr; break; } } if (wRef == null) return (false); boolean removed = removeWeakReference(wRef); return (removed); } COM: <s> de registers a registered remote service event listener from this </s>
funcom_train/43245071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetReligionOptions() throws Exception { System.out.println("getReligionOptions"); String securitytoken = secToken; org.vistaoutreach.voe.refdata.ws.RefDataServicesImpl instance = new org.vistaoutreach.voe.refdata.ws.RefDataServicesImpl(); String[] expResult = null; String[] result = instance.getReligionOptions(securitytoken); assertTrue(result.length>0); } COM: <s> test of get religion options method of class org </s>
funcom_train/45775520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeTextContent(Object oTextContent){ try { XTextContent xTextContent = (XTextContent) UnoRuntime.queryInterface(XTextContent.class, oTextContent); xText.removeTextContent(xTextContent); return true; } catch (NoSuchElementException e) { e.printStackTrace(System.out); return false; } } COM: <s> removes an arbitrary object which supports the xtext content interface </s>
funcom_train/140931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addHelpActions(final JMenu help_menu){ MenuUtil.addToMenu(help_menu, new JMenuItem(Actions.getAboutAction())); MenuUtil.addToMenu(help_menu, new JMenuItem(Actions.getReportBugAction())); MenuUtil.addToMenu(help_menu, new JMenuItem(Actions.getFeatureAction())); MenuUtil.addToMenu(help_menu, new JMenuItem(Actions.getShowConsoleAction())); } COM: <s> adds help menu item to help help menu </s>
funcom_train/26554838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Connection getConnection() throws DAOException { try { if (connection == null || connection.isClosed()) { openConnection(); } } catch (SQLException e) { throw new DAOException("SQL error on getting the connection", e); } catch (DAOException e) { throw e; } catch (Exception e) { throw new DAOException("Other error on getting the connection", e); } return connection; } COM: <s> zibog auto generated method </s>
funcom_train/43467204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEscapeHtml() { for (int i = 0; i < htmlEscapes.length; ++i) { String message = htmlEscapes[i][0]; String expected = htmlEscapes[i][1]; String original = htmlEscapes[i][2]; assertEquals(message, expected, StringEscapeUtils.escapeHtml(original)); } } COM: <s> test escaping a string for html usage </s>
funcom_train/25827443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { this.inheritedProperty = new InheritedProperty(); // contains the total time of activity which allocated this object this.resourceUtilizationTime = new HashMap<String, Long>(); // contains the start time of resource-allocation of an activity this.resourceAllocationStartTime = new HashMap<Activity, Long>(); } COM: <s> make some initialization of the data </s>
funcom_train/11389205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void xdr_int(int i) { buffer[offset++] = (byte)((i >> 24) & 0xff); buffer[offset++] = (byte)((i >> 16) & 0xff); buffer[offset++] = (byte)((i >> 8) & 0xff); buffer[offset++] = (byte)(i & 0xff); } COM: <s> puts an integer into the buffer as 4 bytes big endian </s>
funcom_train/3740152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRealName(AllUser user) throws UserManagerException { String ret=null; try { Session sess= HibernateUtil.currentSession(); if (user.getUser()==null) { ret = user.getDeletedUser().getRealName(); } else { ret = user.getUser().getRealName(); } } catch (HibernateException e) { throw new UserManagerException(); } return ret; } COM: <s> return realname field of the given user </s>
funcom_train/18340994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TLV getTLV(int tlvid) { TLV tlv = null; if (tlvList != null && !tlvList.isEmpty() ) { for (Iterator iter = tlvList.iterator(); iter.hasNext();) { TLV element = (TLV)iter.next(); if (tlvid == element.getType()) { tlv = element; break; } } } return tlv; } COM: <s> get the tlv for the type requested from the command </s>
funcom_train/571520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectRow( int index ) { try { table.scrollRectToVisible( table.getCellRect( index, 0, true ) ); table.setRowSelectionInterval( index, index ); table.setColumnSelectionInterval( 0, table.getColumnCount( ) - 1 ); } catch ( Throwable t ) { } // Ignore if empty } COM: <s> select a row </s>
funcom_train/28266184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void store(String title, Date theDate) { try { Session session = sessionFactory.openSession(); Transaction tx = session.beginTransaction(); Event theEvent = new Event(); theEvent.setTitle(title); theEvent.setDate(theDate); session.save(theEvent); tx.commit(); session.close(); } catch (HibernateException e) { e.printStackTrace(); } } COM: <s> stores an instance of a event </s>
funcom_train/12128937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void signalBoundsChanged() { invalidateFullBounds(); setBoundsChanged(true); firePropertyChange(PROPERTY_CODE_BOUNDS, PROPERTY_BOUNDS, null, bounds); int count = getChildrenCount(); for (int i = 0; i < count; i++) { PNode each = (PNode) children.get(i); each.parentBoundsChanged(); } } COM: <s> this method should be called when the bounds of this node are changed </s>
funcom_train/42709741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveFile(File file) throws JAXBException, IOException { preSave(); // relativize(file); sourceFile = file; JAXBContext context = JAXBContext.newInstance(FileRelationship.class); Marshaller m = context.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); m.marshal(this, file); sourceFileTime = new Date(file.lastModified()); } COM: <s> write all data into a new file </s>
funcom_train/41728424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(String fromAddress, long timestamp, long timestamp_provider, String body) { boolean equals = false; if (PhoneNumberUtils.compare(this.fromAddress, fromAddress) && this.compareTimeStamp(timestamp, timestamp_provider) && this.compareBody(body)) { equals = true; } return equals; } COM: <s> check if this message is sufficiently the same as the provided parameters </s>
funcom_train/4875691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateInventoryGraphics() { if (isBuilt()) { assert getTransGroup() != null : "getTransGroup() is null"; assert getGraphicShape() != null : "getGraphicShape() is null"; getTransGroup().removeChild(getGraphicShape()); setGraphicShape(null); getTransGroup().addChild(getGraphicShape()); } } COM: <s> this method updates the inventory shape if it has been built </s>
funcom_train/46633985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRosterString() { String reply; if (name.length() > 0) reply = name; else reply = jid; if ((msgHistory != null) && (msgHistory.size() > 0)) { reply = reply + " (" + msgHistory.size() + ")"; } return (reply); } COM: <s> returns the string to be displayed in the roster </s>
funcom_train/26072830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restore() { if (getMonitor().isSingleThreadMode()) { Runnable runner = new Runnable() { public void run() { fastContinue(); } }; setSingleThread(new Thread(runner)); getSingleThread().start(); } else { this.start(); getMonitor().runAgain(); } } COM: <s> continue the execution of the network after the stop method is called </s>
funcom_train/29538677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToggleButton getPlayingToggleButton() { if (playingToggleButton == null) { playingToggleButton = new JToggleButton(); playingToggleButton.setIcon(new ImageIcon(getClass().getResource("/g/pplaying.gif"))); playingToggleButton.setSelected(true); playingToggleButton.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { changeROP(); } }); } return playingToggleButton; } COM: <s> this method initializes playing toggle button </s>
funcom_train/3711474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getYMax (double x1, double x2) { double result = Constant.DMIN; for (int i = 0; i < xdata.length; i++) { if (isValidDatum(ydata, i) && isValidDatum(xdata, i)) { if (xdata[i] > x1 && xdata[i] <= x2 && ydata[i] >= result) { result = ydata[i]; } } } return result; } COM: <s> gets the maximum y value within a given x range </s>
funcom_train/2332654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSortedFromTo(int from, int to) { if (size == 0) return true; checkRangeFromTo(from, to, size); Object[] theElements = elements; for (int i = from + 1; i <= to; i++) { if (((Comparable) theElements[i]).compareTo(theElements[i - 1]) < 0) return false; } return true; } COM: <s> determines whether the receiver is sorted ascending according to the </s>
funcom_train/44590669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeDefaults() { this.astKind = K_COMPILATION_UNIT; this.rawSource = null; this.typeRoot = null; this.resolveBindings = false; this.sourceLength = -1; this.sourceOffset = 0; this.workingCopyOwner = DefaultWorkingCopyOwner.PRIMARY; this.unitName = null; this.project = null; this.partial = false; Map options = JavaCore.getOptions(); options.remove(JavaCore.COMPILER_TASK_TAGS); // no need to parse task tags this.compilerOptions = options; } COM: <s> sets all the setting to their default values </s>
funcom_train/18551037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClassDataExtractor_resolveClassNameFN() { ClassDataExtractor classDataExtractor = new ClassDataExtractor(); Object obj = null; try { obj = PrivateAccessor.invoke( classDataExtractor, "resolveClassName", new Class[] { String.class }, new Object[] { testpackage }); } catch (Throwable e) { fail(); } assertEquals(obj, returnedClass); } COM: <s> tests the resolve class name method functionality </s>
funcom_train/24951494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MAP getThisItemsMAP() throws MAPNotFoundException { log.debug("getThisItemsMAP()"); String mapPid = null; try { mapPid = getMAP(); } catch (FedoraAPIException e) { throw new MAPNotFoundException("Error obtaining pid of MAP",e); } log.debug("MAP pid = " + mapPid); MAP map = null; if (mapPid != null) { RepositoryFactory rf = new RepositoryFactory(); map = rf.getMAP(rc,mapPid); } return map; } COM: <s> returns the corresponding map for this item </s>
funcom_train/19066247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Source getData(CharSequence data) { if( data.length() == 0 ) return new CharSequenceSource(data); literalMatcher.reset(data); if( literalMatcher.matches() ) { return getLiteral(Integer.parseInt(literalMatcher.group(1))); } else { // remove "" if( data.charAt(0) == '"') { return new CharSequenceSource( data.subSequence(1,data.length()-1) ); } else { return new CharSequenceSource( data ); } } } COM: <s> gets the data </s>
funcom_train/25637470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMemberDescription(FieldDoc field, Content contentTree) { if (field.inlineTags().length > 0) { writer.addInlineComment(field, contentTree); } Tag[] tags = field.tags("serial"); if (tags.length > 0) { writer.addInlineComment(field, tags[0], contentTree); } } COM: <s> add the description text for this member </s>
funcom_train/32316806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPropertyURIPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PropertyAssertion_propertyURI_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PropertyAssertion_propertyURI_feature", "_UI_PropertyAssertion_type"), OdmPackage.Literals.PROPERTY_ASSERTION__PROPERTY_URI, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the property uri feature </s>
funcom_train/31648279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setValue(String field, Object value) { if (!this.writable) return false; if(value == null){ this.fields.remove(new AttrName(field)); }else{ this.fields.put(new AttrName(field), value); } return true; } COM: <s> modify the value of a field </s>
funcom_train/67810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getXMLText() throws ExecuteException { String r = ""; // TBD: should start from attributes? for(int i=0; i<jjtGetNumChildren(); i++) if(children[i] instanceof ASTXMLObject && !(children[i] instanceof ASTXMLAttribute)) r = r+((ASTXMLObject)children[i]).getXMLText(); return r; } COM: <s> this returns only the static text to evaluate </s>
funcom_train/3349491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setSuperClass(VmNormalClass<? super T> superClass) { if (superClass == null) { throw new IllegalArgumentException("superClass cannot be null"); } if (this.superClass == null) { this.superClass = superClass; } else { throw new IllegalArgumentException("Cannot overwrite superClass"); } } COM: <s> sets the super class </s>
funcom_train/38291111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int checkSessions(ACLMessage reply) { if (skipNextRespFlag) { sessions.clear(); } int ret = (step == 1 ? ALL_RESPONSES_RECEIVED : ALL_RESULT_NOTIFICATIONS_RECEIVED); if (reply != null) { if (sessions.size() > 0) { // If there are still active sessions we haven't received // all responses/result_notifications yet ret = -1; } } else { // Timeout has expired or we were interrupted --> clear all remaining sessions sessions.clear(); } if (ret != -1) { step++; } return ret; } COM: <s> check the status of the sessions after the reception of the last reply </s>
funcom_train/3140302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getImage(String key) { Image image = getImageRegistry().get(key); if (image == null) { try { URL imageUrl = new URL(getInstallURL(), key); ImageDescriptor descriptor = ImageDescriptor.createFromURL(imageUrl); getImageRegistry().put(key, descriptor); image = getImageRegistry().get(key); } catch (MalformedURLException e) { handleException(e); } } return image; } COM: <s> todo document jscheme plugin </s>
funcom_train/22687343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getChkAddToCurrent() { if (chkAddToCurrent == null) { chkAddToCurrent = new JCheckBox(); chkAddToCurrent.setText(ADD_TO_CURRENT_TEXT); chkAddToCurrent.setEnabled(false); chkAddToCurrent.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { refreshGeneratedText(); } }); } return chkAddToCurrent; } COM: <s> this method initializes chk add to current </s>
funcom_train/12176234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ContainerInstance getCurrentContainerInstance() { ContainerInstance instance; if (containerInstanceStack == null || containerInstanceStack.isEmpty()) { instance = null; } else { instance = (ContainerInstance) containerInstanceStack.peek(); } if (logger.isDebugEnabled()) { logger.debug("CONTAINER INSTANCE STACK: Current " + instance); } return instance; } COM: <s> get the current container instance from the top of the stack </s>
funcom_train/50557750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List select(DbQuery query) throws PersistenceException{ OreoDbQuery oreoQuery = (OreoDbQuery)query; return select(oreoQuery,oreoQuery.getDbOrder(),oreoQuery.getStartingFrom(), oreoQuery.getMaxResultSize(), oreoQuery.getTable()); } COM: <s> select dbobjects using db query </s>
funcom_train/19410678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(final String value) throws ParseException { // value can be either a date-time or a date.. if (Value.DATE.equals(getParameter(Parameter.VALUE))) { // ensure timezone is null for VALUE=DATE properties.. updateTimeZone(null); this.date = new Date(value); } else { this.date = new DateTime(value, timeZone); } } COM: <s> default set value implementation </s>
funcom_train/37658273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void warning(SAXParseException e) throws SAXException { int l, c; l = e.getLineNumber(); c = e.getColumnNumber(); if(!"".equals(errors.toString())) { errors.append("\n"); } log.debug("[line " + l + ", col " + c + "]: " + e.getMessage()); } COM: <s> handle warning but take no further action </s>
funcom_train/26324762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetFCObject() throws Exception { loadStack(SIMPLE_PROJECT); FCObject obj = _store.getFCObject(); assertNotNull("No root FCObject.", obj); assertTrue(obj instanceof Stack); assertEquals(obj.getProperty(FCObject.NAME), "Simple Stack"); } COM: <s> tests the retrieval of the document element </s>
funcom_train/14520097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ISignSessionLocal getSignSession() { if(signsession == null){ try{ ISignSessionLocalHome signsessionhome = (ISignSessionLocalHome) getLocator().getLocalHome(ISignSessionLocalHome.COMP_NAME); signsession = signsessionhome.create(); }catch(Exception e){ throw new EJBException(e); } } return signsession; } //getSignSession COM: <s> gets connection to sign session bean </s>
funcom_train/1242234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeViewPort(List featureList) throws IOException { writeTableStart("VPORT"); writeGroup(5, "8"); writeOwnerHandle("0"); writeSubClass("AcDbSymbolTable"); writeSize(1); writeViewPortItem("*ACTIVE", featureList); writeTableEnd(); } COM: <s> writes the viewport table </s>
funcom_train/23992046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StrBuilder appendWithSeparators(Iterable<?> iterable, String separator) { if (iterable != null) { separator = ObjectUtils.toString(separator); Iterator<?> it = iterable.iterator(); while (it.hasNext()) { append(it.next()); if (it.hasNext()) { append(separator); } } } return this; } COM: <s> appends a iterable placing separators between each value but </s>
funcom_train/31729572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pruneDuplicateSubtrees() { HashMap map = new HashMap(); map.put(((PersonNode)root).getPerson(), root); for(Iterator i=((Collection)spouses.get(root)).iterator(); i.hasNext();) { PersonNode spouse = (PersonNode)i.next(); map.put(spouse.getPerson(), spouse); } pruneDuplicateSubtrees(map, (PersonNode)root, 1); } COM: <s> if the same person appears in the tree twice remove them from one </s>
funcom_train/32969220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton10() { if (jButton10 == null) { jButton10 = new JButton(); jButton10.setToolTipText("Help"); jButton10.setRolloverIcon(new ImageIcon(getClass().getResource("/buttons1/help2.gif"))); jButton10.setPressedIcon(new ImageIcon(getClass().getResource("/buttons1/help3.gif"))); jButton10.setIcon(new ImageIcon(getClass().getResource("/buttons1/help1.gif"))); jButton10.setDoubleBuffered(true); jButton10.setBounds(new java.awt.Rectangle(152,70,34,34)); jButton10.setBorderPainted(false); } return jButton10; } COM: <s> this method initializes j button10 </s>
funcom_train/17850632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int findRowWithChannel(final Channel channel) { final int size = mData.size(); for (int i = 0; i < size; i++) { final ListTableModelData data = mData.get(i); if (data.mChannel.equals(channel)) { return i; } } return -1; } COM: <s> trys to find a row with a specific channel and returns its index </s>
funcom_train/651958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void select(ISourceReference element) { TreeViewer viewer = getTreeViewer(); if (viewer != null) { ISelection selection = viewer.getSelection(); if (selection instanceof IStructuredSelection) { IStructuredSelection structuredSelection = (IStructuredSelection) selection; List elements = structuredSelection.toList(); if (!elements.contains(element)) { if (element == null) { selection = StructuredSelection.EMPTY; } else { selection = new StructuredSelection(element); } viewer.setSelection(selection, true); } } } } COM: <s> selects a specific element in the outline page </s>
funcom_train/32762661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setProblem(Problem problem) { _problem = problem; final List variables = _problem.getVariables(); final MutableTrialPoint trialPoint = new MutableTrialPoint(variables.size()); final Iterator variableIter = variables.iterator(); while (variableIter.hasNext()) { final Variable variable = (Variable) variableIter.next(); final double value = variable.getInitialValue(); trialPoint.setValue(variable, value); } reset(trialPoint.getTrialPoint()); } COM: <s> sets the problem </s>
funcom_train/47546587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add (int[] pointArray) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); int /*long*/ polyRgn = OS.gdk_region_polygon(pointArray, pointArray.length / 2, OS.GDK_EVEN_ODD_RULE); OS.gdk_region_union(handle, polyRgn); OS.gdk_region_destroy(polyRgn); } COM: <s> adds the given polygon to the collection of polygons </s>
funcom_train/3337767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleDir(File file) { log("handleDir: " + file); if (currentDir == null || currentDir.equals(file)) { currentDir = root; return; } while (!currentDir.equals(file.getParentFile())) { log("in while"); currentDir = currentDir.getParent(); } currentDir = currentDir.addDirectory(file); } COM: <s> add the currently handled directory file to the correct position in the hierarchy </s>
funcom_train/24379253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getTypeAsNode(Node node, InlineChoiceType type) { if (type != null) { QName qname = new QName("http://www.imsglobal.org/xsd/imsqti_v2p1", "inlineChoice"); JAXBElement<InlineChoiceType> jaxbe = new JAXBElement<InlineChoiceType>(qname, InlineChoiceType.class, type); node = getNode(node, jaxbe); } return node; } COM: <s> gets the inline choice type as a dom </s>
funcom_train/2919369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GrammarAST findFirstType(int ttype) { // check this node (the root) first if ( this.getType()==ttype ) { return this; } // else check children GrammarAST child = (GrammarAST)this.getFirstChild(); while ( child!=null ) { GrammarAST result = child.findFirstType(ttype); if ( result!=null ) { return result; } child = (GrammarAST)child.getNextSibling(); } return null; } COM: <s> return a reference to the first node depth first that has </s>
funcom_train/28277483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createFileSelectionControl(Composite parent) { Group group = new Group(parent, SWT.SHADOW_ETCHED_IN); GridLayout gl = new GridLayout(1, false); group.setLayout(gl); GridData gridData = new GridData(GridData.FILL_HORIZONTAL); group.setLayoutData(gridData); group.setText("Select data to export:"); taskListCheckBox = createCheckBox(group, LABEL_TASK_LIST); taskActivationHistoryCheckBox = createCheckBox(group, LABEL_ACTIVITY_HISTORY); taskContextsCheckBox = createCheckBox(group, LABEL_TASK_CONTEXTS); } COM: <s> create widgets for selecting the data files to export </s>
funcom_train/40418733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPath(String contentid) { Resolvable linkedObject = null; Datasource ds = null; try { ds = this.conf.getDatasource(); // initialize linked Object linkedObject = PortalConnectorFactory.getContentObject(contentid,ds); return getPath(linkedObject); } catch (DatasourceNotAvailableException e) { log.error("Datasource error generating url for " + contentid); } finally{ CRDatabaseFactory.releaseDatasource(ds); } // if the linked Object cannot be initialized return a dynamic URL // this.log.info("Use dynamic url for " + contentid); // return getDynamicUrl(contentid); return(null); } COM: <s> initializes a resolvable object an calls get path resolvable linked object </s>
funcom_train/9708691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read() throws IOException { if (isDebug) { log.debug("invoking read()"); } // Determine how many bytes are left in the current data chunk updateChunkAvail(); int ret = 0; if (isEOD) { ret = -1; } else { chunkAvail--; ret = in.readByte(); } log.debug("returning " + ret); return ret; } COM: <s> read a single logical byte </s>
funcom_train/28871659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void beforeInvoke(int inum) { MulticastInterruptProbe probe = probes[inum]; if ( globalProbe != null ) globalProbe.fireBeforeInvoke(state, inum); if ( probe != null ) probe.fireBeforeInvoke(state, inum); Notification n = notify[inum]; if ( n != null ) n.invoke(inum); } COM: <s> the code before invoke code method is called by the interpreter before it </s>
funcom_train/51360225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SR74xx595 (int dataPin, int clockPin, int latchPin) { this.dataPin = dataPin; this.clockPin = clockPin; this.latchPin = latchPin; // initialize pins -- make low for high-going pulses CPU.writePin(dataPin, false); CPU.writePin(clockPin, false); CPU.writePin(latchPin, false); } COM: <s> creates 75xx595 serial in parallel out shift register object </s>
funcom_train/34664467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createOptionsGroup(Composite parent) { // options group Group optionsGroup = new Group(parent, SWT.NONE); GridLayout layout = new GridLayout(); optionsGroup.setLayout(layout); optionsGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL)); optionsGroup.setText("Options"); optionsGroup.setFont(parent.getFont()); createOptionsGroupButtons(optionsGroup); } COM: <s> create the options specification widgets </s>
funcom_train/3080509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TableCellRenderer getDefaultRenderer(Class columnClass) { TableCellRenderer renderer = null; while (renderer == null && columnClass != null) { renderer = (TableCellRenderer) defaultRenderers.get(columnClass); if (renderer == null) { columnClass = columnClass.getSuperclass(); } } if (renderer == null) { renderer = DEFAULT_TABLE_CELL_RENDERER; } return renderer; } COM: <s> returns the table cell renderer that is used for the specified column </s>
funcom_train/15490984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawPixels(ImageProcessor ip) { Font font = new Font(name, style, size); ip.setFont(font); ip.setAntialiasedText(true); FontMetrics metrics = ip.getFontMetrics(); int fontHeight = metrics.getHeight(); int descent = metrics.getDescent(); int i = 0; int yy = 0; while (i<MAX_LINES && theText[i]!=null) { ip.drawString(theText[i], x, y+yy+fontHeight); i++; yy += fontHeight; } } COM: <s> renders the text on the image </s>
funcom_train/20307450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int nextClauseIndex() { if (ruleInstance.clausesReordered) { if (clauseIndex == (ruleInstance.secondClause + 1) ) { // go back to do first clause return ruleInstance.secondClause - 1; } else if (clauseIndex == ruleInstance.secondClause) { return clauseIndex + 1; } } return clauseIndex; } COM: <s> return the index of the next body clause to try </s>
funcom_train/51749945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File createIconFile(File videoFile, File iconFile) { AbstractLogWriter.getInstance().write(this, "create a new icon", 0); MessageFormat cmdFormat=new MessageFormat(CREATE_ICON_COMMAND); String command=cmdFormat.format(new Object[] {videoFile, iconFile, CREATE_ICON_RESOLUTION}); try { Runtime.getRuntime().exec(command); } catch (IOException e) { e.printStackTrace(); } if(!iconFile.exists()) { iconFile=new File(CREATE_ICON_STD_ICON); } return iconFile; } COM: <s> creates a new icon file and stores it into the file system </s>
funcom_train/7525978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void _close(boolean disconnect, boolean close_mq) { if(closed) return; if(disconnect) disconnect(); // leave group if connected if(close_mq) closeMessageQueue(false); stopStack(true, true); closed=true; connected=false; notifyChannelClosed(this); init(); // sets local_addr=null; changed March 18 2003 (bela) -- prevented successful rejoining } COM: <s> disconnects and closes the channel </s>
funcom_train/28694214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getTotalGap() { int totalGap = 0; if ( topLeftComponent != null && topLeftComponent.isVisible()) { totalGap += gap; } if ( bottomRightComponent != null && bottomRightComponent.isVisible()) { totalGap += gap; } if ( centerComponent == null || !centerComponent.isVisible()) { totalGap -= gap; } if ( totalGap < 0) { totalGap = 0; } return totalGap; } COM: <s> returns the the total gap </s>
funcom_train/44221904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void prepareLookup() { ViewStateMachine vsm = this.questionnaire.get_vpdmfApp().get_vsm(); this.parentVi = vsm.get_currentViewInstance(); vsm.set_currentViewInstance(new ViewInstance(this.targetVd)); vsm.set_currentViewType(this.targetVd.get_Name()); vsm.set_displayViewType(this.targetVd.get_Name()); } COM: <s> prepare for the lookup query by setting up the current view in the </s>
funcom_train/37588100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemembersOneEditedEntry() { _history.add("some text"); _history.movePrevious(""); String newEntry = "some different text"; _history.moveNext(newEntry); _history.movePrevious(""); // Utilities.clearEventQueue(); assertEquals("Did not remember the edited entry correctly.", newEntry, _history.getCurrent()); } COM: <s> tests that the history remembers one edited entry for the given command </s>
funcom_train/23671706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void moveSelectionUp(TreeItem sel) { TreeItem parent = sel.getParentItem(); if (parent == null) { parent = root; } int idx = parent.getChildIndex(sel); if (idx > 0) { TreeItem sibling = parent.getChild(idx - 1); onSelection(findDeepestOpenChild(sibling), true); } else { onSelection(parent, true); } } COM: <s> moves the selected item up one </s>
funcom_train/19865682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getSelectedItems() { ISelection sel = getSelection(); if (!(sel instanceof IStructuredSelection)) { return Collections.EMPTY_LIST; } List elements = ((IStructuredSelection) sel).toList(); List tracks = new ArrayList(elements.size()); for (Iterator i = elements.iterator(); i.hasNext();) { Object elem = i.next(); if (elem instanceof Track) { tracks.add(elem); } else if (elem instanceof Album) { tracks.add(elem); } else if (elem instanceof Artist) { tracks.add(elem); } else if (elem instanceof Playlist) { tracks.add(elem); } else { return Collections.EMPTY_LIST; } } return tracks; } COM: <s> returns the list of selected items </s>
funcom_train/18026469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDasPeersToApp() { if ( !applet ) { BeansUtil.registerEditor(RenderType.class, EnumerationEditor.class); } new ApplicationController(this, dom); canvas = dom.getController().addCanvas(); this.application = canvas.getApplication(); dom.getController().addPlotElement(null, null); } COM: <s> this needs to be called after the application model is initialized and </s>
funcom_train/37904015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int xupdateResource(String resource, byte[] xupdate, String encoding) throws PermissionDeniedException, EXistException { try { return xupdateResource(XmldbURI.xmldbUriFor(resource), new String(xupdate, encoding)); } catch (Throwable e) { handleException(e); return -1; } } COM: <s> the method code xupdate resource code </s>
funcom_train/23335331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean prefire() throws IllegalActionException { if ((inputSingle.getWidth() > 0) && inputSingle.hasToken(0)) { if ((_filter != null) && !canStream()) return true; if (canStream()) return true; } if ((input.getWidth() > 0) && (input.hasToken(0))) return true; return false; } COM: <s> return false if no tokens available on either batch or single input port </s>
funcom_train/34838285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GoalInstance createGoalInstance(String identifier) throws GlueException { if ((identifier==null)||(identifier=="")) return null; if (langType.equalsIgnoreCase(wsml_lang)) return ((GoalInstance) new WSML_GoalInstance(identifier)); //if (langType.equalsIgnoreCase(rdf_lang)) return new (identifier); return null; } COM: <s> create a new goal instance </s>
funcom_train/47869157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getDocOPS(String number) { try { if (ops == null) ops = new OPSService(); description = ops.descriptionRetrieval(number); if (description == null) return false; else if (description.length() < 600) return false; else return true; } catch (Exception e) { // e.printStackTrace(); throw new GrobidException("An exception occured while running Grobid.", e); } } COM: <s> get a patent description by its number and ops </s>
funcom_train/9977726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIntToOctal() { System.out.println("intToOctal"); Integer value = 189; String expResult = "275"; String result = new String(); try { result = NumeralSystem.intToOctal(value); } catch(Exception ex) { System.out.println("Exception"); assertEquals(true, false); } assertEquals(expResult, result); } COM: <s> test of int to octal method of class numeral system </s>
funcom_train/2414569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearAttributes() { for (Iterator it = this.attributes.entrySet().iterator(); it.hasNext();) { Map.Entry entry = (Map.Entry) it.next(); String name = (String) entry.getKey(); Object value = entry.getValue(); it.remove(); if (value instanceof HttpSessionBindingListener) { ((HttpSessionBindingListener) value).valueUnbound(new HttpSessionBindingEvent(this, name, value)); } } } COM: <s> clear all of this sessions attributes </s>
funcom_train/36859208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getItemPoint(final int slot) { // And I will strike down upon thee with great vengeance and furious // anger those who attempt to replace the following code with fixed // constants! if (slot < 0) throw new IllegalArgumentException("slot < 0 " + slot); final RSInterfaceComponent item = getItem(slot); if (item != null) return item.getPosition(); return new Point(-1, -1); } COM: <s> gets the point on the screen for a given item </s>
funcom_train/3340076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParent(Container container_) { _parent = new WeakReference<Container>(container_); // If this component's colors have not been set yet, inherit // the parent container's colors. if (getForeground() == null) setForeground(container_.getForeground()); if (getBackground() == null) setBackground(container_.getBackground()); } COM: <s> set the parent container of this component </s>
funcom_train/32746429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMatch(Match m, int index) { times_[index]++; if (m.isWin()) wins_[index]++; else if(m.isDraw()) draws_[index]++; else if(m.isLoss()) losses_[index]++; } COM: <s> updates the times and results indexes </s>
funcom_train/1239450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllParameters() { //if (parmAndRetReq) { operation = new OperationDesc(); operationSetManually = false; parmAndRetReq = true; //} //else { //throw new JAXRPCException(Messages.getMessage("noParmAndRetReq")); //} } COM: <s> clears the list of parameters </s>
funcom_train/50433441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEqual(Object obj1, Object obj2) { if (! (obj1 instanceof Number) ) { throw new NumberFormatException("First parameter is not a number"); } if (! (obj2 instanceof Number) ) { throw new NumberFormatException("Second parameter is not a number"); } Number num1 = (Number) obj1; Number num2 = (Number) obj2; return (num1.doubleValue() == num2.doubleValue()); } // of isEqual COM: <s> sees if two numbers are equal or not </s>
funcom_train/7275177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private GGEP addLocale(GGEP ggep, String locale, int slots) { byte[] payload = new byte[3]; byte[] s = locale.getBytes(); payload[0] = s[0]; payload[1] = s[1]; payload[2] = (byte) slots; ggep.put(GGEP.GGEP_HEADER_CLIENT_LOCALE, payload); return ggep; } COM: <s> adds the locale ggep </s>
funcom_train/48152222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(Graphics g){ double t; super.paintComponent(g); //Draw x axis g.setColor(axisColor); drawAxis(g, domain, 0, HORIZONTAL); //Draw data g.setColor(currentTimeColor); drawTick(g, currentTime, 0, 10, 10, VERTICAL); if (! times.isEmpty()){ for (int i = 0; i < times.size(); i++){ g.setColor(getColor(i)); t = getTime(i); if (t <= currentTime) drawPoint(g, t, 0); } } } COM: <s> this method paints the timeline as an axis with the data points as </s>
funcom_train/2331955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOfFromTo(short element, int from, int to) { checkRangeFromTo(from, to, size); for (int i = from; i <= to; i++) { if (element == getQuick(i)) return i; // found } return -1; // not found } COM: <s> returns the index of the first occurrence of the specified element </s>
funcom_train/17145396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceChild(Turtle oldTurtle, Turtle baby) { int idx = childTurtles.indexOf(oldTurtle); if (idx >= 0) { oldTurtle.setParent(null); baby.setParent(this); childTurtles.set(idx, baby); } else { Debug.out("Turtle", "Can't find index of oldTurtle"); } } COM: <s> replaces a branch off of this turtle </s>
funcom_train/33718308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void keyLowerE() { switch (command.cmd) { case 0 : cursor.anchor(cursor.cp.getNextWord(command.getCount(), true, false)); vimCursorMoved(); command.finish("move word"); break; case 'c' : case 'd' : case 'y' : case '<' : case '>' : command.dst = 'e'; command.lined = false; exec(command); break; default : command.cancel(); } } COM: <s> moves to next end of word splitting char classes </s>
funcom_train/50084836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFitted(double[][] fitted) { this.fitted = new double[fitted.length][this.noutput]; for (int i = 0; i < fitted.length; i++) { for (int j = 0; j < this.noutput; j++) { this.fitted[i][j] = fitted[i][j]; } } } COM: <s> set the fitted values </s>
funcom_train/12195479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mapPatternAndDevice(String pattern, String deviceName) { Integer key = getPatternMapKey(pattern, true, 0); TreeSet set = (TreeSet) cache.get(key); if (set == null) { set = new TreeSet(); } set.add(new DevicePattern(pattern, deviceName)); cache.put(key, set); } COM: <s> map the pattern to a device name in the cache </s>
funcom_train/27684190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent event) { if (event.getSource() == close) { dispose(); } else if (event.getSource() == ok) { for (int i = 0; i < 8; i++) { options.allowedTypes[i] = checkBoxes[i].getState(); } options.uncutAllowed = uncutAllowed.getState(); dispose(); } } COM: <s> listener for the dialogs components </s>
funcom_train/331333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean saveSettingsFileData() { if (settingsFileData == null) { return false; } if (PamSettingManager.RUN_REMOTE == false) { settingsFileData.showTipAtStartup = TipOfTheDayManager.getInstance().isShowAtStart(); } ObjectOutputStream os; try { os = new ObjectOutputStream(new FileOutputStream(settingsListFile)); os.writeObject(settingsFileData); } catch (Exception Ex) { System.out.println(Ex); return false; } try { os.close(); } catch (IOException ex) { ex.printStackTrace(); } return true; } COM: <s> save the list of recently used settings files </s>
funcom_train/21238980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void have(int index) { byte[] indArr = new byte[4]; indArr = ToolKit.intToBigEndianBytes(index, indArr, 0); try { os.write(new byte[] { 0, 0, 0, 5, 4 }); os.write(indArr); os.flush(); } catch (IOException e) { System.err.println("[peer.java] have error"); setConnected(5); } DEBUG("sending have"); } COM: <s> pre index of piece that we have </s>
funcom_train/5585397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getAttrInfoLength() { int length = CONSTANT_FIELD_SIZE + getCodeLength() + getExceptionTableLength() * ExceptionInfo.CONSTANT_FIELD_SIZE; for (int i = 0; i < getAttributesLength(); i++) { length += AttrInfo.CONSTANT_FIELD_SIZE + getAttributes()[i].getAttrInfoLength(); } return length; } COM: <s> return the length in bytes of the attribute </s>
funcom_train/25877718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String formatTag(Metadata meta) { if( meta.getValue() == null ) { return meta.getName() + "="; } // strip commas and newlines for now. String fixed = meta.getValue().replace("\n", ""); fixed = fixed.replace( ",", "" ); return meta.getName() + "=" + fixed; } COM: <s> formats a tag value for passing in the header </s>
funcom_train/26526778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initFormData() { FormData formData = getFormData(); formData.clear(); // initializes number of copies formData.setParameter(C_Bookstore.C_OrderNumber, "1"); // initializes hidden parameter with the idNumber of this article formData.setParameter(C_Bookstore.C_Item, "" + item.getIdNumber()); } COM: <s> initializes form data in the jsp page </s>
funcom_train/21114815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HashMap scrubData(HashMap hashMap) { Iterator it = hashMap.keySet().iterator(); String key = null; while(it.hasNext()) { key = (String) it.next(); hashMap.put(key, scrubString(((String) hashMap.get(key)))); } return hashMap; } COM: <s> scrub all the data in the hash map so that it can </s>
funcom_train/9373068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleEcmTimer(int action) { phone.handleTimerInEmergencyCallbackMode(action); switch(action) { case CDMAPhone.CANCEL_ECM_TIMER: mIsEcmTimerCanceled = true; break; case CDMAPhone.RESTART_ECM_TIMER: mIsEcmTimerCanceled = false; break; default: Log.e(LOG_TAG, "handleEcmTimer, unsupported action " + action); } } COM: <s> handle ecm timer to be canceled or re started </s>
funcom_train/9993887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFileChooser getJFileChooser() { if (jFileChooser == null) { jFileChooser = new JFileChooser(); jFileChooser.setMultiSelectionEnabled(false); jFileChooser.setDialogTitle("Open playlist files"); jFileChooser.setAcceptAllFileFilterUsed(false); jFileChooser.setFileFilter(new ExampleFileFilter("m3u", "Winamp playlist files")); } return jFileChooser; } COM: <s> initialize start parameters for jfile chooser component as filter selection model </s>
funcom_train/9546846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void flashEdge(NetID from, NetID to, Map<String, Serializable> attributes, Color color, String typeName) { // Neue Kante zwischen den zwei Clienten herstellen (Dies ist Beginn eines Downloads) //Attribute setzen attributes.put("overlay", this.getOverlayName()); attributes.put("type", typeName); getTranslator().overlayEdgeFlash(from, to, color, attributes); } COM: <s> paints an overlay edge along with specified attributes and class name </s>
funcom_train/42382210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String report() { StringBuffer ret = new StringBuffer(); ret.append("Processor: org.archive.crawler.extractor.ExtractorPDF\n"); ret.append(" Function: Link extraction on PDF documents\n"); ret.append(" CrawlURIs handled: " + getURICount() + "\n"); ret.append(" Links extracted: " + numberOfLinksExtracted + "\n\n"); return ret.toString(); } COM: <s> provide a human readable textual summary of this processors state </s>
funcom_train/17545549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPositionReachedEnabledBreakpoint() throws Exception { String sessionId = "test"; Position position = initTestSessionAndBreakpoint(sessionId, 44); instance.positionReached(position, sessionId); testSession(position, new String[] { TestSessionListener.SESSION_CREATED+sessionId, TestSessionListener.SESSION_BREAKPOINT_REACHED+sessionId }); } COM: <s> test of position reached method of class pl </s>
funcom_train/11653160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resolveReplacementSubTree(JMeterTreeNode context) { if (selectedNode == null) { List<?> nodePathList = getNodePath(); if (nodePathList != null && nodePathList.size() > 0) { traverse(context, nodePathList, 1); } } } COM: <s> compute the replacement tree </s>
funcom_train/7284478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAuthenticationMethod(Object authenticationMethod) { if (!(authenticationMethod instanceof String)) { this.authenticationMethod = NO_PASSWORD; } else if (authenticationMethod.equals(PASSWORD) || authenticationMethod.equals(USERNAME_AND_PASSWORD)) { this.authenticationMethod = authenticationMethod; } else { this.authenticationMethod = NO_PASSWORD; } } COM: <s> sets the authentication method </s>