__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/49249726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String makeXML() { XMLGraphDAO graphDao; Element animationElement = getDocument().createElement("animation"); algorithm = (Algorithm) getValue(); graphDao = new XMLGraphDAO(algorithm.getGraph(),getDocument()); root = getDocument().createElement("algorithmAnimation"); graphDao.makeXML(); root.appendChild(graphDao.getRootElement()); root.appendChild(animationElement); getDocument().appendChild(root); buildAnimationSteps(animationElement); return root.toString(); } COM: <s> builds an xml document to represent the algorithm animation </s>
funcom_train/27779233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int evaluate(long uid) { // mylist == null => idf == 0 if (mylist == null) { return 0; } if (mylist.uid != uid) { return 0; } else { return (mylist.w < PRECOMPCACHE) ? cache[mylist.w] : mylist.w * idfdotboost; } } COM: <s> return the calculated similarity </s>
funcom_train/32776123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValue() { try { Number num = ((DecimalFormat) getFormat()).parse(c.getText()); if (currentClass.equals(Double.class)) return new Double(num.doubleValue()); else if (currentClass.equals(Float.class)) return new Float(num.floatValue()); else return null; } catch (java.text.ParseException ex) { JOptionPane.showMessageDialog(getComponent(), "Enter a valid floating point number!"); return null; } } COM: <s> reads and returns a floating point number from the editor component </s>
funcom_train/9957296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSingleMultiLineStringRoundTrip() throws SAXException, IOException, ParserConfigurationException{ LineStringGenerator pgc = new LineStringGenerator(); pgc.setGeometryFactory(geometryFactory); pgc.setNumberPoints(10); MultiGenerator pg = new MultiGenerator(pgc); pg.setBoundingBox(new Envelope(0,10,0,10)); pg.setNumberGeometries(3); pg.setGeometryFactory(geometryFactory); MultiLineString pt = (MultiLineString) pg.create(); checkRoundTrip(pt); } COM: <s> round trip test for a single line string </s>
funcom_train/863468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeEscapedXMLString( String s, boolean escapeControlChars ) { char[] cc = s.toCharArray(); for (int i = 0; i < cc.length; i++) { char c = cc[i]; writeDirect( escapeXMLChar( c, escapeControlChars ) ); } } COM: <s> write a string escaping the standard xml entities directly to the </s>
funcom_train/50034518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getFiniteStrings() { HashSet strings = new HashSet(); if (isSingleton()) { strings.add(singleton); } else if (!getFiniteStrings(initial, new HashSet(), strings, new StringBuffer(), -1)) { return null; } return strings; } COM: <s> returns set of accepted strings assuming this automaton has a finite language </s>
funcom_train/25290291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDepthComponent(DepthComponent depthComponent) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_DEPTH_COMPONENT_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("Raster5")); ((RasterRetained)this.retained).setDepthComponent(depthComponent); } COM: <s> sets the depth image used to copy pixels to from a canvas3 d </s>
funcom_train/8175414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void navigaActionPerformed(ActionEvent actionEvent) { JFileChooser chooser = new JFileChooser(); chooser.setMultiSelectionEnabled(false); chooser.setFileSelectionMode(JFileChooser.FILES_ONLY); chooser.setCurrentDirectory(new File("./temp/")); if(chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { File file = chooser.getSelectedFile(); pathFileTextField.setText(file.getAbsolutePath()); } } COM: <s> naviga action performed </s>
funcom_train/24485005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Calendar createStudyCalendar(DICOMObject dcm) { // get study date & time String studyTime = dcm.getValue(DICOMTagKey.getDICOMTagKey(("(0008,0030)"))); String studyDate = dcm.getValue(DICOMTagKey.getDICOMTagKey("(0008,0020)")); studyCal = getCalendar(studyDate,studyTime); return studyCal; } COM: <s> create a calendar object for the study date time </s>
funcom_train/45686201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean initPaths() { toLog(Level.CONFIG, "Search for the paths..."); File folderSC4 = searchSC4Path(); File folderPlugin = searchUserPluginPath(); if (!folderSC4.exists() || !folderPlugin.exists()) { toLog(Level.CONFIG, "> Let the User choose the folder..."); return showPathChooser(); } else { sspConfig.setSc4AppPath(folderSC4.toString()); sspConfig.setSc4PluginPath(folderPlugin.toString()); } return true; } COM: <s> initialize the paths </s>
funcom_train/8075059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildInstanceMetric(int[] attrIdxs) throws Exception { // initialize the array of metrics for each attribute m_attrIdxs = attrIdxs; m_stringMetrics = new StringMetric[m_attrIdxs.length]; for (int i = 0; i < m_stringMetrics.length; i++) { m_stringMetrics[i] = (StringMetric) m_metric.clone(); } } COM: <s> generates a new sum instance metric based on specified </s>
funcom_train/5242479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void wrapFunctions(IUseInvocation invocation) { for (Entry<String, IFunction> entry: getFunctions().entrySet()) { if(invocation.getFunctions().containsKey(entry.getKey())) { //then wrap the function with this interception's //getFunctions().put(entry.getKey(), entry.); } } } COM: <s> find any attributes matching this intcprs ifunction types and wrap </s>
funcom_train/50558577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDisplayer(Displayer displayer) { displayer.setApplication(this); Displayer prevDisplayer = DisplayerManager.getInstance().getDisplayer(displayer.getName()); if (prevDisplayer!=null){ actions.remove(prevDisplayer); logger.info("overwriting previous displayer: "+displayer.getName()); } displayers.add(displayer); } COM: <s> adds a feature to the displayer attribute of the application object </s>
funcom_train/17985533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void addContextMenuItem(String idBase, ToolbarItem tbi, boolean hideEntryView) { // If we have a ToolbarItem... if (null != tbi) { // ...and if we can generate a menu item from it... ContextMenuItem cmi = new ContextMenuItem(this, idBase, tbi, hideEntryView); if (null != cmi) { // ...add it to the popup. addContentMenuItem(cmi); } } } COM: <s> adds a context based toolbar item to the menu </s>
funcom_train/18743921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RefreshableMenuItem getCopyMenuItem() { if (this.copyGraphItem == null) { this.copyGraphItem = new RefreshableMenuItem() { @Override protected void refresh(ResourceKind resource) { setAction(getActions().getCopyAction(resource)); } }; } return this.copyGraphItem; } COM: <s> returns the menu item in the edit menu that specifies copy the currently </s>
funcom_train/5345246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InetAddress getLocalAddress() { InetAddress lip = null; try { lip = InetAddress.getByName( NetworkUtils.ip2string(_acceptor.getAddress(false))); } catch (UnknownHostException uhe) { try { lip = InetAddress.getLocalHost(); } catch (UnknownHostException uhe2) { lip = null; } } return lip; } COM: <s> do some magic to get the local address if available </s>
funcom_train/133615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyListeners( boolean checkIfChanged ) { if ( this.changed |! checkIfChanged ) { this.changed = false; // Needs to be done before notifying listeners to avoid possible loops. NeoRangeEvent evt = new NeoRangeEvent( this, this.beginning, this.end ); for (NeoRangeListener l : this.listeners) { l.rangeChanged( evt ); } } } COM: <s> notify all the listeners if this has changed since the last notice </s>
funcom_train/17805179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addImportedInterfacesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FunctionalComponent_ImportedInterfaces_feature"), getString("_UI_PropertyDescriptor_description", "_UI_FunctionalComponent_ImportedInterfaces_feature", "_UI_FunctionalComponent_type"), CtbPackage.Literals.FUNCTIONAL_COMPONENT__IMPORTED_INTERFACES, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the imported interfaces feature </s>
funcom_train/11344390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateProperties() { System.out.println("Update properties"); Date date = new Date(); DateFormat df = DateFormat.getDateTimeInstance(); // The properties will be updated in the property file property1 = property1 + " - " + df.format(date); property2 = property2 + " - " + df.format(date); } COM: <s> this method just updates managed properties </s>
funcom_train/13712575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getComponent(Component.Identifier id) { // Calls getAxes() so that subclasses may lazily set the array of axes. Component[] components = getComponents(); if (components.length == 0) { return null; } for (int i = 0; i < components.length; i++) { if (components[i].getIdentifier() == id) { return components[i]; } } return null; } COM: <s> returns a single component based on its identifier or null </s>
funcom_train/12160432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeListeners() { container.removeListener(SWT.Dispose, toolTipListener); container.removeListener(SWT.KeyDown, toolTipListener); container.removeListener(SWT.MouseDown, toolTipListener); container.removeListener(SWT.MouseExit, toolTipListener); container.removeListener(SWT.MouseHover, toolTipListener); container.removeListener(SWT.MouseMove, toolTipListener); } COM: <s> remove the listeners that were added to the container </s>
funcom_train/49319427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMinQuantity(Quantity inQ) { Quantity oldQ = fMinValue; fMinValue = inQ; updateTitle(); updateScaleMinMax((int) fMinValue.getValue()); fSlider.setValue((int) inQ.getValue()); firePropertyChange(MINQUANTITY_PROPERTY, oldQ, inQ); } COM: <s> sets the current min quantity of the range </s>
funcom_train/18654144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Pointcut getPointcut(){ /* Note that we have to use ".*" in the regexp since * the actual concrete class (subclass) is provided by CGLIB, so its name is different from * the is the PersonBean (the actual name is PersonBean$Enhanced...) */ return new MethodPatternPointcut( "PersonBean.*ejbCreate" ); } COM: <s> intercept all calls to the ejb create method of the person bean </s>
funcom_train/43368979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Script getScript(String id, Session session) throws FinderException { if (id == null) { throw new FinderException("Script not found: null"); } try { Script script = (Script) session.load(Script.class, id); if (logger.isDebugEnabled()) { logger.debug("found script with name= " + script.getName()); } return script; } catch (HibernateException e) { throw new FinderException("script not found: " + e.toString()); } } COM: <s> get a script by id </s>
funcom_train/46160689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setMainColor(float red, float green, float blue, float alpha, boolean createIfMissing) { return setColorAttribute(StandardStyleAttribute.COLOR.getName(), red, green, blue, alpha, createIfMissing); } COM: <s> set the main color of this style to the specified value </s>
funcom_train/10590514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCompatibleURL(ParsedURL purl) { String contentType = purl.getContentType(); if (contentType == null) { return false; } Iterator iter = this.getMimeTypes().iterator(); while (iter.hasNext()) { if (contentType.equals(iter.next())) { return true; } } return false; } COM: <s> check if the stream references an image that can be handled by </s>
funcom_train/8813297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHistoryTokenValue2(List<HistoryTokenDTO> values) { if (values != null) { final ArrayList<String> strings = new ArrayList<String>(); for (final HistoryTokenDTO token : values) { strings.add(token.getValue()); } setHistoryTokenValue(strings); } } COM: <s> display a history values list in this element </s>
funcom_train/1011799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int cullCheck() { if (cullval == Subdivider.CULL_ACCEPT) { // System.out.println("TODO curve.cullval"); // cullval=mapdesc.cullCheck(cpts,order,stride); } // TODO compute cullval and return the computed value // return cullval; return Subdivider.CULL_ACCEPT; } COM: <s> checks culling type </s>
funcom_train/29062201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object set(int index, Object element) { if (index < 0 || index >= this.size) { throw new IndexOutOfBoundsException("the index [" + index + "] is not valid for this list with the size [" + this.size + "]."); } Object replaced = this.storedObjects[index]; this.storedObjects[index] = element; return replaced; } COM: <s> replaces the element at the specified position in this list with the </s>
funcom_train/10912411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getBorderAndPaddingWidthBefore() { int margin = 0; BorderProps bps = (BorderProps) getTrait(Trait.BORDER_BEFORE); if (bps != null) { margin = bps.width; } Integer padWidth = (Integer) getTrait(Trait.PADDING_BEFORE); if (padWidth != null) { margin += padWidth; } return margin; } COM: <s> return the sum of region border and padding before </s>
funcom_train/43371670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMilliseconds(long msec) { // Round to nearest second long totalSeconds = (msec + 500) / 1000; long minutes = totalSeconds / 60; long seconds = totalSeconds % 60; minComboBox.setSelectedItem(new Integer((int) minutes)); secComboBox.setSelectedItem(new Integer((int) seconds)); } COM: <s> sets the minutes and seconds input components to the values appropriate </s>
funcom_train/26574415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getTextValueFromNode(Node elem) { Node node; String result = ""; if (elem != null) { node = elem.getFirstChild(); if ((node != null) && (node.getNodeType() == Node.TEXT_NODE)) { result = node.getNodeValue(); } } return result; } COM: <s> returns a string value out of a node </s>
funcom_train/18325742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addActionObjectPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Action_actionObject_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Action_actionObject_feature", "_UI_Action_type"), CoremodelPackage.Literals.ACTION__ACTION_OBJECT, false, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the action object feature </s>
funcom_train/9006896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void applyData() { for(int i = 0; i < chartXPointsArray.length; i++) { chart.insertItem("", chartYPointsArray[i].intValue(), chartXPointsArray[i].intValue(), 0, 0, 255); } } COM: <s> commits the data line not the template lines onto the actual chart widget </s>
funcom_train/49836272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createFile(String filename) throws StorageManagerException { try { File file = new File(filename); if (! file.createNewFile()) { file.delete(); file.createNewFile(); } } catch (Exception e) { throw new StorageManagerException("Could not create file " + filename + ".", e); } } // createFile() COM: <s> create a new file by the given file name </s>
funcom_train/43014742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setId(int v) { if (Revision_Type.featOkTst && ((Revision_Type) jcasType).casFeat_id == null) { jcasType.jcas.throwFeatMissing("id", "org.apache.uima.mediawiki.types.Revision"); } jcasType.ll_cas.ll_setIntValue(addr, ((Revision_Type) jcasType).casFeatCode_id, v); } COM: <s> setter for id sets internal identifier of the revision in media wiki </s>
funcom_train/31657913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private URI getResource(boolean isObject) { try { if (isObject) { return isResource() && !isAnonymous() && object != null ? new URI( ((Resource) object).toString()) : null; } else { return (predicate != null) ? new URI(((Resource) predicate) .toString()) : null; } } catch (URISyntaxException e) { e.printStackTrace(); return null; } } COM: <s> gets the resource </s>
funcom_train/25892714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeInt(SocketAddress addr, int val) throws Exception { try { outbuf.clear(); outbuf.put(STUN_MAGIC_LONG); outbuf.putInt(val); outbuf.flip(); fsock.send(outbuf, addr); } catch (Exception e) { abort(e); // Established end-to-end TCP socket is in a wierd state } } COM: <s> writes one integer to a udp socket </s>
funcom_train/46125906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLinkTimeUp() { Calendar cal = Calendar.getInstance(); cal.setTime(new Date()); cal.add(Calendar.DAY_OF_WEEK, TIME_OUT * -1); if ((tempKey != null) && (!tempKey.getCreationDate().after(cal.getTime()))) { return true; } else { return false; } } COM: <s> check if the link time up </s>
funcom_train/26317832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EntityMovementType getMovementType() { EntityMovementType moveType = movementType; // If this step's position is the end of the path, and it is not // a valid end postion, then the movement type is "illegal". if (!isLegalEndPos() && isEndPos) { moveType = EntityMovementType.MOVE_ILLEGAL; } return moveType; } COM: <s> return this steps movement type </s>
funcom_train/22686073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BufferedImage dataToRGB(byte[] data,int w,int h) { BufferedImage image=null; try { //read the image data DataBuffer rgb = new DataBufferByte(data,data.length); //convert data image=createImage(w, h, rgb); } catch (Exception ee) { image = null; LogWriter.writeLog("Couldn't convert Separation colorspace data: " + ee); } return image; } COM: <s> convert separation stream to rgb and return as an image </s>
funcom_train/17900484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { if (contentPanel instanceof ActiveComponent) { ((ActiveComponent)contentPanel).cleanup(); } contentPanel = null; GUIUtilities.deregisterDialog(this); GUIUtils.scheduleGC(); SwingUtilities.invokeLater(new Runnable() { public void run() { BaseDialog.this.superDispose(); } }); } COM: <s> removes this dialog from the application </s>
funcom_train/7433558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void generateTransactionHeader(HttpMethod method) { if (this.client == null || method == null) return; WebdavState state = (WebdavState) this.client.getState(); String txHandle = state.getTransactionHandle(); if (txHandle != null) { method.setRequestHeader("Transaction", "<" + txHandle + ">"); } } COM: <s> generates and adds the transaction header if this method is part of </s>
funcom_train/18215833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TableConfiguration createBugsActivityTableConfiguration() { final TableConfigurationMantis configuration = new TableConfigurationMantis( BugHistory.TABLE_NAME); configuration.addMandatoryColumn(BugHistory.BUG_ID); configuration.addFixedValue(BugHistory.USER_ID, "1"); configuration.addMandatoryColumn(BugHistory.DATE); configuration.addMandatoryColumn(BugHistory.FIELD_NAME); configuration.addBugHistoryColumn(BugHistory.NEW_VALUE); configuration.addBugHistoryColumn(BugHistory.OLD_VALUE); return configuration; } COM: <s> creates the configuration for the bugs activity table </s>
funcom_train/25191580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String agentName = "null"; if (agent != null && agent.getAgentRep () != null) { agentName = agent.getAgentRep().getName(); } return getClass().getName() + " [agent="+agentName+"]"; } COM: <s> to string return string information from agent </s>
funcom_train/23716669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Alert getAlert () { if (alert == null) {//GEN-END:|115-getter|0|115-preInit // write pre-init user code here alert = new Alert ("alert");//GEN-BEGIN:|115-getter|1|115-postInit alert.addCommand (getOkCommand ()); alert.setCommandListener (this); alert.setTimeout (Alert.FOREVER);//GEN-END:|115-getter|1|115-postInit // write post-init user code here }//GEN-BEGIN:|115-getter|2| return alert; } COM: <s> returns an initiliazed instance of alert component </s>
funcom_train/10984079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getURLTemplateRef(String refGroupName, String key) { String ref = null; URLTemplatesFactory urlTemplatesFactory = URLTemplatesFactory.getURLTemplatesFactory(); if (urlTemplatesFactory != null) { ref = urlTemplatesFactory.getTemplateNameByRef(refGroupName, key); } return ref; } COM: <s> returns url template name of the given type by key </s>
funcom_train/50328458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyTurnoutCreationError(String conflict,int bitNum) { javax.swing.JOptionPane.showMessageDialog(null,"ERROR - The output bit, "+ bitNum+", is currently assigned to "+conflict+". Turnout can not be "+ "created as you specified."," Assignment Conflict", javax.swing.JOptionPane.INFORMATION_MESSAGE,null); } COM: <s> public method to notify user of turnout creation error </s>
funcom_train/33606749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMultiplyElement() { System.out.println("multiplyElement"); int position = 0; double value = 0.0; R2 instance = new R2(); instance.multiplyElement(position, value); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of multiply element method of class r2 </s>
funcom_train/31041008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAllCheckedListItems() { List result = new ArrayList(); Iterator listCollectionsEnum = checkedStateStore.values().iterator(); while (listCollectionsEnum.hasNext()) { Iterator currentCollection = ((List) listCollectionsEnum.next()).iterator(); while (currentCollection.hasNext()) result.add(currentCollection.next()); } return result; } COM: <s> answer a flat collection of all of the checked elements in the </s>
funcom_train/50313942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long internal_new_GC(GCData data) { checkWidget(); if(handle == 0) SWT.error(SWT.ERROR_WIDGET_DISPOSED); long hDC = data.fxeventPtr != 0? Fox.FXCustomDCWindow_new2(handle, data.fxeventPtr): Fox.FXCustomDCWindow_new(handle); if(data != null) { data.device = display; data.drawableHandle = handle; data.foreground = foreground; data.background = background; data.fontHandle = getFontHandle(); } return hDC; } COM: <s> invokes platform specific functionality to allocate a new gc handle </s>
funcom_train/49756569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int parseFadeRate(String theFadeRate) { if ((theFadeRate == null) || (theFadeRate.length() == 0)) return -1; if (theFadeRate.equalsIgnoreCase("default")) return DEFAULT_FADE_RATE; try { return getFadeRate(Double.parseDouble(theFadeRate)); } catch (Exception numError) { return -1; } } COM: <s> given a passed textual representation of a fade rate return the </s>
funcom_train/14282650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFunction(Function function) throws JerbilException { if (!function.getReturnType().equals(TYPE_BOOLEAN)) { throw new JerbilException("Return type must be " + TYPE_BOOLEAN + " for " + FUNCTION_AND + ": " + function.toString()); } functions.add(function); } COM: <s> adds a child function to this function </s>
funcom_train/9376426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getDateTime() { String dateTimeString = mAttributes.get(TAG_DATETIME); if (dateTimeString == null) return -1; ParsePosition pos = new ParsePosition(0); try { Date date = sFormatter.parse(dateTimeString, pos); if (date == null) return -1; return date.getTime(); } catch (IllegalArgumentException ex) { return -1; } } COM: <s> returns number of milliseconds since jan </s>
funcom_train/50939961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object messageHeader) { if (!(messageHeader instanceof MessageHeader)) return false; return (cpaId.equals(((MessageHeader)messageHeader).getCpaId()) && service.equals(((MessageHeader)messageHeader).getService()) && action.equals(((MessageHeader)messageHeader).getAction())); } COM: <s> if cpa id service action parameters of the supplied message header </s>
funcom_train/11743724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String rtrim(String value) { int end = value.length() - 1; int count = end; while ((end >= 0) && (value.charAt(end) <= ' ')) { end--; } return (end == count) ? value : value.substring(0, end + 1); } COM: <s> trim right spaces </s>
funcom_train/21799351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void complete(Mission m) { if (!context.contains(m)) { System.err.println("Mission control could not mark mission " + m + " complete as it seems vanished from our records.\n" + "Current mission log:\n" + getMissionLog()); } context.add(new Mission(m.level, m.description + " - Completed")); } COM: <s> removes mission from log </s>
funcom_train/19457617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Serializable decide(int inst, long timeout) throws InterruptedException { InstanceKeeper instance = getInstance(inst,false); //got if(!instance.decided){ synchronized(instance.decision){ instance.decision.wait(timeout); } } instance.returnInstance(false); //released return instance.decision; } COM: <s> try to return the decision of instance instance inst </s>
funcom_train/36960080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object internalGetParent(Object element) { if (element instanceof IRubyProject) { return ((IRubyProject) element).getRubyModel(); } // try to map resources to the containing package fragment if (element instanceof IResource) { IResource parent = ((IResource) element).getParent(); Object jParent = RubyCore.create(parent); if (jParent != null) return jParent; return parent; } if (element instanceof IRubyElement) return ((IRubyElement) element).getParent(); return null; } COM: <s> returns the parent for the element </s>
funcom_train/16292517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mixDownChannels() { float[] firstChannel=getChannel(0); int sampleCount=getSampleCount(); int channelCount=getChannelCount(); for (int ch=channelCount-1; ch>0; ch--) { float[] thisChannel=getChannel(ch); for (int i=0; i<sampleCount; i++) { firstChannel[i]+=thisChannel[i]; } removeChannel(ch); } } COM: <s> mix down of n channels to one channel </s>
funcom_train/3081249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createDisposeDirective(ServerMessage serverMessage, Component component) { Element itemizedUpdateElement = serverMessage.getItemizedDirective(ServerMessage.GROUP_ID_PREREMOVE, "EPPU.MessageProcessor", "dispose", new String[0], new String[0]); Element itemElement = serverMessage.getDocument().createElement("item"); itemElement.setAttribute("eid", ContainerInstance.getElementId(component)); itemElement.setAttribute("targetId", findKeyTargetId(component)); itemizedUpdateElement.appendChild(itemElement); } COM: <s> renders a directive to the outgoing code server message code to </s>
funcom_train/10297130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map tableToMap(Object table) { Hashtable ht = new Hashtable(); //reverse-optimisation, we count backwards. . . //now we only store one variable //and we only get the count once! //1337! for (int rowNumber = getCount(table) - 1; rowNumber >= 0; rowNumber--) { addRowToMap(getItem(table, rowNumber), ht); } return ht; } COM: <s> converts a table to a map </s>
funcom_train/35202869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString () { String rep = ""; return String.valueOf(wYear) + "/" + String.valueOf(wMonth) + "/" + String.valueOf(wDay) + " " + String.valueOf(wHours) + ":" + String.valueOf(wMinutes) + ":" + String.valueOf(wSeconds); } COM: <s> return a iccdate time representation </s>
funcom_train/34888252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void parseSourceNodes(String fileContents, Set<String> sourceNodes) { StringBuffer startOfFile = new StringBuffer( fileContents.length() ); String endOfFile = fileContents; while ( strings.matches(sourcePattern, endOfFile) ) { endOfFile = strings.getPostMatch(); String sourceNode = strings.getGroup(1); sourceNodes.add(sourceNode); } } COM: <s> source nodes may be added by http get processor as message inserts </s>
funcom_train/22388134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getLastChangedRevisionForBranchAndProject(BranchSummary branch, Project project) { login(); try { return svnClient.info(branch.getVersionControlBase() + "/" + project.getProjectName()).getLastChangedRevision(); } catch (ClientException e) { throw new RuntimeException(e); } } COM: <s> get the last changed revision for the passed project </s>
funcom_train/943486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DefaultMutableTreeNode addObject(Object child) { DefaultMutableTreeNode parentNode = rootNode; //TreePath parentPath = tree.getSelectionPath(); // if (parentPath == null) { // parentNode = rootNode; // } else { // parentNode = (DefaultMutableTreeNode) // (parentPath.getLastPathComponent()); // } // return addObject(parentNode, child, true); } COM: <s> add child to the currently selected node </s>
funcom_train/12178083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flushComponentAssetCache() { flushLocalPolicyCache(PolicyType.AUDIO); flushLocalPolicyCache(PolicyType.CHART); flushLocalPolicyCache(PolicyType.IMAGE); flushLocalPolicyCache(PolicyType.LINK); flushLocalPolicyCache(PolicyType.SCRIPT); flushLocalPolicyCache(PolicyType.TEXT); flushLocalPolicyCache(PolicyType.VIDEO); } COM: <s> a method to flush all the component and asset cached content in mariner </s>
funcom_train/8096863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Filter getFilter(String rangelist) { try { NumericTransform af = new NumericTransform(); af.setAttributeIndices(rangelist); return af; } catch (Exception ex) { ex.printStackTrace(); fail("Exception setting attribute range: " + rangelist + "\n" + ex.getMessage()); } return null; } COM: <s> creates a specialized numeric transform </s>
funcom_train/44591097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIndex(Expression expression) { if (expression == null) { throw new IllegalArgumentException(); } // an ArrayAccess may occur inside an Expression // must check cycles ASTNode oldChild = this.indexExpression; preReplaceChild(oldChild, expression, INDEX_PROPERTY); this.indexExpression = expression; postReplaceChild(oldChild, expression, INDEX_PROPERTY); } COM: <s> sets the index expression of this array access expression </s>
funcom_train/32764937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void interpolateMissingData() throws DataProcessingException { // If the data set is complete there is nothing to do if (!this.getProcessedData().hasMissingData()) return; // Process each profile function for (ProfileData.Angle view : ProfileData.Angle.values()) this.linearInterpolate(this.getProcessedData().getProjection(view)); } COM: <s> interpolate between missing data points </s>
funcom_train/32204198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected StringBuilder build() { final Type recordType = getType(); final int typeValue = recordType == null ? 0 : recordType.getValue(); return new StringBuilder(ACH_RECORD_SIZE).append(String.format(Locale.US, RECORD_TYPE_FORMAT, typeValue)); } COM: <s> the record contents to return from </s>
funcom_train/37648831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRebuild1() throws PropertiesException { IProjectPropertiesManager mgr = PMDPlugin.getDefault().getPropertiesManager(); IProjectProperties model = mgr.loadProjectProperties(this.testProject); model.setPmdEnabled(false); model.setProjectWorkingSet(null); model.setRuleSetStoredInProject(false); model.setNeedRebuild(false); assertFalse(model.isNeedRebuild()); } COM: <s> a project may know if it should be rebuilt or not </s>
funcom_train/18493707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String arraySeedExpression(TypeName t, boolean addToSet) { if (addToSet) { _arraySeeds.add(t); } if (t instanceof ReferenceArrayName) { return "classFor" + t.identifierName(); } else { return "get" + t.identifierName() + "()"; } } COM: <s> get an expression that will produce a class of the given type </s>
funcom_train/32228997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DimThongSotpncBO getThongsotp(String f_ma_tp, Date ngay) throws Exception { List<FactDinhMucNhanCongBO> dmNCList = dmNC.getFactDinhMucNhanCongPerTPMaPerNgayPhatHanh(f_ma_tp, ngay, UIMessages.HC_LASTEST); if (dmNCList!=null && dmNCList.size()>0) { FactDinhMucNhanCongBO factDMNCBO = dmNCList.get(0); return factDMNCBO.getId_thongsotp(); } return null; } COM: <s> lay thong so thanh pham </s>
funcom_train/40311989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClose() { try { metaData = new DefaultResultSetMetaData(new IOMetaDataEntryMockImpl()); values = new Object[][]{{"hello"}}; ResultSet resultSet = new DefaultResultSet(statement, metaData, values); resultSet.close(); //to test whether close operation is successful,read data from result set //and OperationAfterClosedSQLException is expected which indicates close success. try { resultSet.getString(1); fail("Close failed: OperationAfterClosedSQLException is expected."); } catch(OperationAfterClosedSQLException e) { //pass } } catch(SQLException e) { fail("close failed"); } } COM: <s> tests close successfully </s>
funcom_train/16769436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendVODInitCM(IMessageInput msgIn, IPlayItem item) { OOBControlMessage oobCtrlMsg = new OOBControlMessage(); oobCtrlMsg.setTarget(IPassive.KEY); oobCtrlMsg.setServiceName("init"); Map<String, Object> paramMap = new HashMap<String, Object>(1); paramMap.put("startTS", (int) item.getStart()); oobCtrlMsg.setServiceParamMap(paramMap); msgIn.sendOOBControlMessage(this, oobCtrlMsg); } COM: <s> send vod init control message </s>
funcom_train/15518403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged (TreeSelectionEvent event) { if (event.getNewLeadSelectionPath () != null) { Object [] path = event.getNewLeadSelectionPath ().getPath (); if (path != null && path.length == 3 && path[2] != MATCHLESS) navigator.displayFeature ((Feature) path[2], (Genome) path[1]); } } COM: <s> when the selection in the tree changes recenters mauve frame gui on </s>
funcom_train/13685290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ASTNode getUnevaluatedMember() { // get first child ASTNode child = this.getFirst(); // while the current child exists and has been evaluated, cycle to the next child while (child != null && child.isEvaluated()) { child = child.getNext(); } // null will be returned when no children are left unevaluated, otherwise and unevaluated // child node will be returned. return child; } COM: <s> returns an unevaluated child node if any </s>
funcom_train/10213653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { this.setLayout(new BorderLayout()); Button bt = new Button("Start"); bt.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { b_start(); } }); this.add(bt, BorderLayout.SOUTH); this.add(info, BorderLayout.CENTER); b_start(); } COM: <s> initialization method that will be called after the applet is loaded </s>
funcom_train/4920131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testManagedObjectWithNoAutoWires() { ManagedObjectSourceWirer wirer = this .createMock(ManagedObjectSourceWirer.class); try { this.source.addManagedObject( ClassManagedObjectSource.class.getName(), wirer); fail("Should not be successful"); } catch (IllegalArgumentException ex) { assertEquals("Incorrect cause", "Must provide at least one AutoWire", ex.getMessage()); } } COM: <s> ensure issue if provided object type </s>
funcom_train/17256952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void render( float interpolation ) { Renderer r = display.getRenderer(); /** Reset display's tracking information for number of triangles/vertexes */ r.clearStatistics(); /** Clears the previously rendered information. */ r.clearBuffers(); // Execute renderQueue item GameTaskQueueManager.getManager().getQueue(GameTaskQueue.RENDER).execute(); } COM: <s> clears stats the buffers and renders bounds and normals if on </s>
funcom_train/16912470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createRunPanelNonIterable() { JPanel runPanel = new JPanel(); JButton apply = new JButton("Apply"); apply.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { trainer.apply(); trainer.getNetwork().getRootNetwork().fireNetworkChanged(); } }); runPanel.add(apply); return runPanel; } COM: <s> create the run panel for non iterable learning algorithms </s>
funcom_train/2842699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLayoutComponent(Component comp, Object constraints) { synchronized (comp.getTreeLock()) { if ((constraints == null) || (constraints instanceof String)) { addLayoutComponent((String) constraints, comp); } else { throw new IllegalArgumentException("cannot add to layout: constraint must be a string (or null)"); } } } COM: <s> adds the specified component to the layout using the specified </s>
funcom_train/35575535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addEntry(String sourceClass, String sourceMethod, String msg, String level){ String entry = formatEntry(sourceClass, sourceMethod, msg, level); synchronized (theLogQueue){ theLogQueue.add(entry); theLogQueue.notify(); } } COM: <s> h4 adds a log entry to the log queue </s>
funcom_train/12560145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean pointerInput(int type, int x, int y) { switch (type) { case EventConstants.PRESSED: if ( isKeyAtPointerPosition(x, y)) { return true; } break; case EventConstants.RELEASED: if ( isKeyAtPointerPosition(x, y)) { return true; } break; } return false; } COM: <s> handle input from a pen tap </s>
funcom_train/44169196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canSee(Tile tile) { if (tile == null) return false; do { synchronized (canSeeLock) { if (canSeeTiles != null) { return canSeeTiles[tile.getX()][tile.getY()]; } } } while (resetCanSeeTiles()); return false; } COM: <s> checks if this code player code can see the given code tile code </s>
funcom_train/23719388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runWizard(IWizard wizard) { IWorkbench workbench = MSSEditorPlugin.getPlugin().getWorkbench(); if (workbench.saveAllEditors(true)) { final Shell shell = workbench.getActiveWorkbenchWindow().getShell(); new WizardDialog(shell, wizard).open(); } } COM: <s> simple helper method to save all dirty editors then launch a wizard </s>
funcom_train/49753313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem3() { if (stringItem3 == null) {//GEN-END:|88-getter|0|88-preInit // write pre-init user code here stringItem3 = new StringItem("URL del archivo", null);//GEN-LINE:|88-getter|1|88-postInit // write post-init user code here }//GEN-BEGIN:|88-getter|2| return stringItem3; } COM: <s> returns an initiliazed instance of string item3 component </s>
funcom_train/21483678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertResponseGoodAndNotCached(String path, boolean fullPage) throws Exception { WebResponse firstResponse = getResponseFromAcceptGzipRequest(path); assertResponseGood(firstResponse, fullPage); WebResponse secondResponse = getResponseFromAcceptGzipRequest(path); assertResponseGood(secondResponse, fullPage); checkTimeStamps(firstResponse, secondResponse, false); } COM: <s> assert that the page cache was not used </s>
funcom_train/38419136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed(MouseEvent e) { TopiarySheet sheet = Topiary.getTopiaryUI().getCurrentWorkspace().getContent(); if(sheet instanceof ActiveMap) { if(((ActiveMap)sheet).getScenarioEditor().isVisible()) return; } if (SwingUtilities.isLeftMouseButton(e)) { grab(); } } COM: <s> called when the designer presses on the tool with the mouse button </s>
funcom_train/7869826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testKingConstructors() { Board board0 = new Board(); board0.emptyBoard(); King king0 = new King(true, board0, 5, 7); assertEquals(true, king0.getColor()); assertEquals(board0, king0.getBoard()); assertEquals("w", king0.getColorAsString()); assertEquals("R", king0.getType()); } COM: <s> it test the king constructors </s>
funcom_train/18884524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createNodes(DefaultMutableTreeNode top) { for (final String[] EXAMPLE : EXAMPLES) { DefaultMutableTreeNode category = new DefaultMutableTreeNode(EXAMPLE[0]); top.add(category); for (int e = 1; e < EXAMPLE.length; ++e) { DefaultMutableTreeNode example = new DefaultMutableTreeNode( new ExampleInfo(EXAMPLE[e])); category.add(example); } } } COM: <s> create tree nodes </s>
funcom_train/45811457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFragment(LocatorIF locator) { String retVal = locator.getAddress(); int lastHashIndex = retVal.lastIndexOf('#') + 1; if (lastHashIndex != 0) retVal = retVal.substring(lastHashIndex); else retVal = ""; if (!validate((retVal))) return null; return retVal; } COM: <s> get the fragment identifier from a locator </s>
funcom_train/16751043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFirst(T element) { size += 1; ListEntry<T> oldHead = head; // create a new head to hold the element head = new ListEntry<T>(element); entryMap.put(element, head); // organize pointers head.setNext(oldHead); if (oldHead == null) { // if the list was empty before tail = head; } else { oldHead.setPrevious(head); } } COM: <s> add an element to the front of the list </s>
funcom_train/18223642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { Melody melody = null; try { melody = (Melody) obj; } catch (Exception ex) { return (false); } if (melody == null) return (false); if (this.sequence.size() != melody.sequence.size()) return (false); for (int i = 0; i < this.sequence.size(); i++) if ((this.sequence.elementAt(i)).equals(melody.sequence.elementAt(i)) == false) return (false); return (true); } COM: <s> compare two melodies </s>
funcom_train/28592239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void testContains() { // make an object to search for Integer test = new Integer(0); // it should not be in the default collection assertFalse(collection.contains(test)); // add it collection.add(test); // not it should be in the default collection assertTrue(collection.contains(test)); } COM: <s> test that contains works as advertised </s>
funcom_train/9781617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public boolean hasChangeableCoordParentNumbers() { if (isFixed()) return false; ArrayList coords = getCoordParentNumbers(); if (coords.size() == 0) return false; Object num1 = coords.get(0); Object num2 = coords.get(1); if (num1 == null || num2 == null) return false; boolean ret = ((GeoNumeric)num1).isChangeable() && ((GeoNumeric)num2).isChangeable(); return ret; } COM: <s> returns whether this point has two changeable numbers as coordinates </s>
funcom_train/887459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void adoptAttributes(Node child) { NamedNodeMap childAttrs = child.getAttributes(); for (int i = 0; i < childAttrs.getLength(); i++) { String attrName = childAttrs.item(i).getNodeName(); String attrValue = childAttrs.item(i).getNodeValue(); ((Element)containingNode).setAttribute(attrName, attrValue); } } COM: <s> copies all attributes of the child to the current element </s>
funcom_train/27762022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt(Object obj, int rowIndex, int columnIndex) { NATRule rule = policy.getNATRules()[rowIndex]; switch (columnIndex) { case COL_COMMENT: rule.setComment(obj.toString()); policy.setModified(true); break; } fireTableCellUpdated(rowIndex, columnIndex); } COM: <s> this empty implementation is provided so users dont have to implement </s>
funcom_train/45112480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int ping(String host, int timeout) throws Exception { Map<String, Comparable<?>> result = null; if (timeout > 0) { result = runRemoteScript(commandCreate("Ping", host, timeout)); } else { result = runRemoteScript(commandCreate("Ping", host)); } return Integer.parseInt(result.get(STDOUT).toString()); } COM: <s> pings a host and returns the roundtrip time </s>