__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/40680515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double totalCount() { if (currentModCount != cacheModCount) { double total = 0.0; for (Map.Entry<E, Double> entry : entries.entrySet()) { total += entry.getValue(); } cacheTotalCount = total; cacheModCount = currentModCount; } return cacheTotalCount; } COM: <s> finds the total of all counts in the counter </s>
funcom_train/45558849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCommand(Request request) { if (request instanceof ReconnectRequest) { Object view = ((ReconnectRequest) request).getConnectionEditPart() .getModel(); if (view instanceof View) { Integer id = new Integer(OwlsVisualIDRegistry .getVisualID((View) view)); request.getExtendedData().put(VISUAL_ID_KEY, id); } } return super.getCommand(request); } COM: <s> extended request data key to hold editpart visual id </s>
funcom_train/19424248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List getOptions(HttpServletRequest req) { List options = null; String attributeName = req.getParameter("options"); try { options = (List) req.getSession().getAttribute(attributeName); } catch (Throwable t) { EaasyStreet.logError("Exception in OptionListServlet attempting to obtain options: " + t.toString(), t); } return options; } COM: <s> p this method retrieves the requested options from the session </s>
funcom_train/7393236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardGradientPaintTransformer)) { return false; } final StandardGradientPaintTransformer that = (StandardGradientPaintTransformer) obj; if (this.type != that.type) { return false; } return true; } COM: <s> tests this instance for equality with an arbitrary object </s>
funcom_train/8409524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void seekNonWs(String pattern, ParsePosition pos) { int len = 0; char[] buffer = pattern.toCharArray(); do { len = StrMatcher.splitMatcher().isMatch(buffer, pos.getIndex()); pos.setIndex(pos.getIndex() + len); } while (len > 0 && pos.getIndex() < pattern.length()); } COM: <s> consume whitespace from the current parse position </s>
funcom_train/48913377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addClass(String classURI, byte classType) { switch (classType) { case OConstants.OWL_CLASS: addUUUStatement(classURI, RDF.TYPE.toString(), OWL.CLASS.toString()); return; default: addUUUStatement(classURI, RDF.TYPE.toString(), OWL.RESTRICTION.toString()); return; } } COM: <s> the method allows adding a class to repository </s>
funcom_train/25365720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addHPPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RoomEvent_HP_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RoomEvent_HP_feature", "_UI_RoomEvent_type"), LeveleditorPackage.Literals.ROOM_EVENT__HP, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the hp feature </s>
funcom_train/39378199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onRender() { for (int i = 0, size = getControls().size(); i < size; i++) { Control control = (Control) getControls().get(i); if (control instanceof Panel) { if (control == getActivePanel()) { control.onRender(); } } else { control.onRender(); } } } COM: <s> perform any pre rendering logic and invoke the tt on render tt method </s>
funcom_train/781436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeOntology(String ontologyURI) throws WgfaOntologyDoesntExistException { OntModel modelToRemove = ontModels.get(ontologyURI).getModel(); globalOntologyModel.getModel().removeSubModel(modelToRemove); ontModels.remove(ontologyURI); db.removeModel(ontologyURI); refreshInferenceModel(); } COM: <s> removes a model identified by its uri from the global ontology model </s>
funcom_train/1164612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void filter(int count, int[] follow, String[] track) throws WeiboException { startHandler(new StreamHandlingThread(new Object[]{count, follow, track}) { public StatusStream getStream() throws WeiboException { return getFilterStream((Integer) args[0],(int[]) args[1],(String[]) args[2]); } }); } COM: <s> see birddog above </s>
funcom_train/26030517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Expression notEqual( Node x, Node y ) { return new Dyadic( asExpression( x ), "http://jena.hpl.hp.com/constraints/NE", asExpression( y ) ) { @Override public boolean evalBool( Object x, Object y ) { return !x.equals( y ); } }; } COM: <s> an expression that is true if x and y differ </s>
funcom_train/1471485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUrlParams() { StringBuffer osParams = new StringBuffer(); for(Iterator i=this.entrySet().iterator();i.hasNext();) { Map.Entry entry = (Map.Entry) i.next(); if(entry.getValue()!=null) osParams.append("&"+encodeConfig(entry.getKey().toString())+"="+encodeConfig(entry.getValue().toString())); } return osParams.toString(); } COM: <s> generate the url parameter sequence used to pass this configuration to the editor </s>
funcom_train/11390656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isFile(FTPClient client, Path file) { try { return getFileStatus(client, file).isFile(); } catch (FileNotFoundException e) { return false; // file does not exist } catch (IOException ioe) { throw new FTPException("File check failed", ioe); } } COM: <s> convenience method so that we dont open a new connection when using this </s>
funcom_train/44851508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized private void start_objectDef( String inName, Attributes inAttributes ) { this.objectDef = new ObjectDefImpl(); for ( int i = 0; i < inAttributes.getLength(); i++ ) { try { objectDef.set(inAttributes.getQName(i), inAttributes.getValue(i).intern()); } catch ( Exception exc ) { DefaultExceptionWriter.printOut(this, exc, true); } } } COM: <s> handles the start of the object def tag </s>
funcom_train/36079424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WireFeed build(org.w3c.dom.Document document) throws IllegalArgumentException,FeedException { DOMBuilder domBuilder = new DOMBuilder(); try { Document jdomDoc = domBuilder.build(document); return build(jdomDoc); } catch (IllegalArgumentException ex) { throw ex; } catch (Exception ex) { throw new ParsingFeedException("Invalid XML",ex); } } COM: <s> builds an wire feed rss or atom from an w3 c dom document </s>
funcom_train/40762766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String extractFileName(URI fileResource) { String fileStirng = fileResource.toString(); if (fileStirng != null && fileStirng.indexOf('/') > 0) { return fileStirng.substring(fileStirng.lastIndexOf('/') + 1); } else { return fileStirng; } } COM: <s> extracts file name from a file resource uri </s>
funcom_train/10908878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "Keep[" + "withinLine:" + getWithinLine().getObject() + ", withinColumn:" + getWithinColumn().getObject() + ", withinPage:" + getWithinPage().getObject() + "]"; } COM: <s> not sure what to do here </s>
funcom_train/27849188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void start() { logger.entering(classStr,"start"); pdm = new PeerDiscoveryManager(netPeerGroup); gdm = new GroupDiscoveryManager(netPeerGroup); // create input pipe // discover peers // discover peer input pipes // construct output pipe connected to peer input pipes // send greeting message // forward peer information to main application } COM: <s> this routine is used to start the communication handler processes that </s>
funcom_train/10959074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prepare() { if (writer == null) { try { writer = new FileWriter(output + "/out.dot"); } catch (IOException e) { throw new StrutsException(e); } } StrutsConfigRetriever.setConfiguration(configDir, views.split("[,]+")); DOTRenderer renderer = new DOTRenderer(writer); renderer.render(namespace); } COM: <s> prepares the dot generated content and writes out to the provided writer </s>
funcom_train/40619853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addLogEntry(String text, String color) { text = "<B>" + lineCount + ":</B> " + "<FONT color=\"" + color + "\">" + text + "</FONT>" + "<BR>" + logLabel.getHTML(); logLabel.setHTML(text); lineCount++; } COM: <s> add some data to the log </s>
funcom_train/25049526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ensureInitialized() { if(knownFeatures == null) { knownFeatures = new HashMap<String, Feature>(); //Fill the 'knownFeatures' map Collection<Feature> features = getBeans(); if(features != null) { for(Feature feature : features) { knownFeatures.put(feature.getName(), feature); } } } } COM: <s> ensures that all necessary fields are initialized </s>
funcom_train/28257931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addControlListener(EventListener listener) { if (listener instanceof ActionListener) { AbstractButton ab; AbstractGainButtonPanel p = (AbstractGainButtonPanel) getControlComponent(); ab = p.getGainIncreaseButton(); ab.addActionListener((ActionListener) listener); ab = p.getGainDecreaseButton(); ab.addActionListener((ActionListener) listener); } else { throw new IllegalArgumentException("ActionListener required"); } } COM: <s> over rides add control listener from abstract action listener </s>
funcom_train/322174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getNextDataStart(long timeMillis) { if (getNumMapPoints() == 0) { return NO_DATA; } if (timeMillis > getLastDataTime()) { return AFTER_LAST; } Iterator<TmapPoint> li = getListIterator(); int a = IN_GAP; TmapPoint mapPoint; while (li.hasNext()) { mapPoint = li.next(); if (mapPoint.getStartTime() > timeMillis) { return mapPoint.getStartTime(); } } return AFTER_LAST; } COM: <s> get the next data start point </s>
funcom_train/50187107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { int result = super.hashCode(); result = 29 * result + (int) target; result = 29 * result + (int) action; result = 29 * result + line; result = 29 * result + column; result = 29 * result + (path != null ? path.hashCode() : 0); result = 29 * result + (valid ? 1 : 0); return result; } COM: <s> returns a hash code value for this breakpoint </s>
funcom_train/43184995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getVariance(Map<Double, Double> samples) { double variance = 0; for (Map.Entry<Double, Double> e : samples.entrySet()) { variance += Math.pow(e.getValue() - getYAt(e.getKey()), 2); } return variance / (double) samples.size(); } COM: <s> get the variance of this curve from a set of samples </s>
funcom_train/18658160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FileChannel getFileChannel() throws IOException { if (this.tempFileChannel == null) { if (this.tempFileRandomAccessHandle == null) this.tempFileRandomAccessHandle = new RandomAccessFile(this.tempFileHandle, this.tempFileMode); this.tempFileChannel = this.tempFileRandomAccessHandle.getChannel(); }; return this.tempFileChannel; } COM: <s> returns the file channel to write read from data to the file </s>
funcom_train/494998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int calculateMaxFontWidth() { int maxWidth = 0; for (int i = 0; i < legendModel.getLegendStrings().size(); i++) { String nextLegend = (String)legendModel.getLegendStrings().get(i); int width = this.getFontMetrics(this.getFont()).charsWidth(nextLegend.toCharArray(), 0, nextLegend.length()); if (width > maxWidth) maxWidth = width; } return maxWidth + HORIZ_OFFSET + 2; } COM: <s> allows calculation of the widest required string for this pane </s>
funcom_train/10666742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleNotification(Notification notification, Object handback) { log.info(notification.getType() + " notification received"); if (notification.getType().equals("jmx.monitor.counter.threshold")) { isNotification = true; } else { isNotification = false; } // log.add(String.valueOf(isNotification)); } COM: <s> test verifies if the notification jmx </s>
funcom_train/117901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeCurrentNode() { TreePath currentSelection = tree.getSelectionPath(); if (currentSelection != null) { DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode) (currentSelection.getLastPathComponent()); MutableTreeNode parent = (MutableTreeNode)(currentNode.getParent()); if (parent != null) { treeModel.removeNodeFromParent(currentNode); return; } } // Either there was no selection, or the root was selected. // FIXME } COM: <s> remove the currently selected node </s>
funcom_train/38938732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void associatePrivilegeStructure(List<Role> selectedRoles, List<Groups> selectedGroups, List<Permission> selectedPermissions, Privilege privilege){ getLoggerWeb().debug("Associate Privilege Structure: "+privilege.getPrivilegeName()+" Enabled: "+privilege.getPrivilegeEnabled()); privilegeStructure.setPrivilege(privilege); privilegeStructure.setPrivilegeGroups(selectedGroups); privilegeStructure.setPrivilegePermissions(selectedPermissions); privilegeStructure.setPrivilegeRoles(selectedRoles); } COM: <s> performs the association between privilege and list of roles </s>
funcom_train/18479359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeTree(B po,ObjectOutput os) throws IOException { writeAttrs(po,os) ; os.writeInt(po.getChildren().size()) ; for(B child : po.getChildren()) { os.writeObject(child.getClass().getName()) ; writeTree(child,os) ; } } COM: <s> writes the entire tree of a propertied object to an object output </s>
funcom_train/24409561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSubmission(String newValue) { // System.out.printf("LeftPane.setSubmission(%s)\n", newValue); if (newValue.equalsIgnoreCase(INDIVIDUALBUTTON)){ submissionButtons.setSelected(individualButton.getModel(), true); } else { // simultaneous: i.e. it is SIMULTANEOUSBUTTON submissionButtons.setSelected(simultaneousButton.getModel(), true); } } COM: <s> set submission mode radio button group to reflect new value which </s>
funcom_train/39350679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void begin() { // Trap uncaught exceptions Trace.trace(Item.SCHEDULER, "Setting uncaught exception handler for thread %s", Thread.currentThread().getName()); Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() { public void uncaughtException(Thread t, Throwable e) { env.uncaughtException(t, e); end(); } }); } COM: <s> mark a mutator as currently active </s>
funcom_train/29391496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List execute(String sqlStmt, Class classToFill) throws SQLException { if (classToFill == null) throw new SQLException("Null fill class not valid"); try { if ( null == this.con) this.con = Pool.getInstance().getConnection(); this.prepare(sqlStmt); return this.populate(classToFill); } catch (SQLException ex) { LOG.fatal(ex); throw(ex); } finally { this.release(); } } COM: <s> this is with normal statement </s>
funcom_train/8631348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public short getShort(int columnIndex) throws SQLException { Object o = get(columnIndex); if (o != null && !(o instanceof Number)) { o = Short.decode(o.toString()); } return o == null ? 0 : ((Number) o).shortValue(); } COM: <s> returns the value as a short </s>
funcom_train/11772027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JCheckBox getJCheckBoxWarning() { if (jCheckBoxWarning == null) { jCheckBoxWarning = new JCheckBox(); jCheckBoxWarning.setFont(GuiFont.FONT_PLAIN); jCheckBoxWarning.setText("Alerte kilometrage depasse"); } return jCheckBoxWarning; } COM: <s> this method initializes j check box warning </s>
funcom_train/3945783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateSchemaversionType_MaxLength(String schemaversionType, DiagnosticChain diagnostics, Map context) { int length = schemaversionType.length(); boolean result = length <= 20; if (!result && diagnostics != null) reportMaxLengthViolation(ImscpRootv1p1p2Package.eINSTANCE.getSchemaversionType(), schemaversionType, length, 20, diagnostics, context); return result; } COM: <s> validates the max length constraint of em schemaversion type em </s>
funcom_train/8900944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(int row, int col) { /*switch (column) { case 0: return new Integer(row); case 1: return classNode.getStateAt(row); case 2: return ""+classNode.getMarginalAt(row); default: return null; }*/ return cells[row][col]; } COM: <s> gets a table cell </s>
funcom_train/26221187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isMatch(String fileName, String[] searchFragments) { fileName = fileName.toLowerCase(); final int fragCount = searchFragments.length; for (int pos = 0; pos < fragCount; pos++) { if (-1 == fileName.indexOf(searchFragments[pos])) { return false; } } return true; } COM: <s> returns true if the given file name matches all fragments false </s>
funcom_train/26411363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitMetric(FixedRangeMetric fixedRangeMetric) { try { fixedRangeMetric.setMetricValue(Double.valueOf(stringValue).doubleValue()); } catch (NumberFormatException nfe) { throw new IllegalArgumentException("String value " + stringValue + " cannot be parsed as a double: " + nfe.toString()); } } COM: <s> visit the given fixed range metric parsing the string value to </s>
funcom_train/43999162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PropertySheetPage getPage(String name) { for(PropertySheetPage psp : _pages) { if(psp.getName().equals(name)) return psp; } throw new MNException("No property sheet page of name " + name + " exists in node class " + BaseNode.this.getClass().getName()); } COM: <s> get a page in this property sheet by name </s>
funcom_train/39571072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Integer searchToken(String pending, Hashtable table){ Integer idx = null; for (Enumeration e = table.keys() ; e.hasMoreElements() ;) { Integer page = (Integer) e.nextElement(); Hashtable h = (Hashtable) table.get(page); idx = (Integer) h.get(pending); if(idx != null){ switchPage(page); break; } } return idx; } COM: <s> searches in all available code pages for a certain token </s>
funcom_train/49643822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeCallback(String path) { path = normalizePath(path); for (Handler handler : contextHandlers.getHandlers()) { if (handler instanceof ContextHandler && ((ContextHandler) handler).getContextPath().equals(path)) { contextHandlers.removeHandler(handler); // stop removed handler if (handler.isStarted()) try { handler.stop(); } catch (Exception e) { // ignore exception } } } } COM: <s> remove generic callback at the specified path </s>
funcom_train/34769835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBug1498805() { TimeZone zone = TimeZone.getTimeZone("GMT"); GregorianCalendar gc = new GregorianCalendar(zone); gc.set(2005, Calendar.JANUARY, 1, 12, 0, 0); Week w = new Week(gc.getTime(), zone); assertEquals(53, w.getWeek()); assertEquals(new Year(2004), w.getYear()); } COM: <s> a test case for bug 1498805 </s>
funcom_train/18518250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Item getItemByISBN(String isbn) throws TorqueException { Item item = null; Criteria criteria = new Criteria(); criteria.add(ItemPeer.ISBN, isbn); List list = ItemPeer.doSelect(criteria); if (list != null && list.size() > 0) { item = (Item) list.get(0); } return item; } COM: <s> searches an item in the database </s>
funcom_train/12915971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Panel getFileHeaderPanel() { if (mFileHeaderPanel == null) { mFileHeaderPanel = new Panel(new BorderLayout()); mSelectStatusLabel = new Label(); mFileHeaderPanel.add(mSelectStatusLabel,BorderLayout.SOUTH); mFileHeaderPanel.add(mMachineDescriptionLabel,BorderLayout.WEST); mFileHeaderPanel.add(mFileSystemLocationField,BorderLayout.CENTER); mFileHeaderPanel.add(getChgDirButton(),BorderLayout.EAST); } return mFileHeaderPanel; } COM: <s> the header panel contains labels for remote local and the current directory </s>
funcom_train/44797576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getJDBCSettingsFileName() { String fileName = configurationFileName; if (fileName == null) { // default temporary file String tempDir = FileUtil.createTempDir("jdbc_browser"); fileName = tempDir + File.separatorChar + "jdbcSettings.xml"; } return fileName; } COM: <s> get the file name to store jdbc settings persistently </s>
funcom_train/49211303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getSeedUpperPanel() { if (seedUpperPanel == null) { seedUpperPanel = new JPanel(); seedUpperPanel.setLayout(new GridLayout(0,2)); seedUpperPanel.setBackground(Color.white); seedUpperPanel.add(getSeedLabel(), new GridBagConstraints()); seedUpperPanel.add(getAddButton(), getAddButton().getName()); } return seedUpperPanel; } COM: <s> this method initializes seed upper panel </s>
funcom_train/38318880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected LineNumberReader getInputReader () throws BuildException { if (_inputFile == null) { throw new BuildException("inputFile required."); } try { final FileReader rd= new FileReader(_inputFile); return new LineNumberReader(new BufferedReader(rd)); } catch (IOException e) { throw new BuildException( "Cannot read input file [" + _inputFile.getAbsolutePath() + "].", e ); } } COM: <s> returns a reader for the input file </s>
funcom_train/25231836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setServer( Server l_server ) { // Set the file system type. String fileSystemTypeName = l_server.getType(); cmbFileSystemType.setSelectedItem( FileSystemServer.getFileSystemType( fileSystemTypeName ) ); txtServerName.setText( l_server.getName() ); // Load the server specific options. serverPropertiesPanel.setServer( l_server ); } COM: <s> sets the user interface up to represent the server </s>
funcom_train/4193246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParameter(String name, String value) { if (getValue()==null) setValue(""); if (hasParameter(name)) removeParameter(name); String header=getValue(); header=header.concat(";"+name); if (value!=null) header=header.concat("="+value); setValue(header); } COM: <s> sets the value of a specified parameter </s>
funcom_train/2807603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setComputing(boolean computing) { // computing means everything is disabled, except "Halt" proveNextButton.setEnabled(!computing); proveRestButton.setEnabled(!computing); clearProgramButton.setEnabled(!computing); clearResultsButton.setEnabled(!computing); programArea.setEnabled(!computing); resultsArea.setEnabled(!computing); queryArea.setEnabled(!computing); haltButton.setEnabled(computing); } COM: <s> sets the state of the ide to computing or not </s>
funcom_train/13714389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PathWitness makeSuccessor(int state, BitSet guard) { if (pathIsComplete()) { throw new IllegalStateException("stack is already empty"); } if (guard.intersects(visited)) { throw new IllegalArgumentException( "the successor cannot be created because" + " the guard does not permit it"); } BitSet newVisited = (BitSet) visited.clone(); newVisited.or(guard); return new PathWitness(startState, state, rule, position + 1, newVisited, this); } COM: <s> returns the path witness that witnesses the path that is witnessed by this </s>
funcom_train/23284953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getZoneTracks(String zoneID, String startIndex, String numEntries, String artist, String album) throws IOException, UPNPResponseException, JanosWebException { Element zone = getZoneElement(zoneID, false); zd.getZoneTracks(zoneID, startIndex, numEntries, artist, album, zone); return zone; } COM: <s> get an element representation of a zone players list of tracks </s>
funcom_train/46994783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getOkButton() { if (okButton == null) { okButton = new JButton(); okButton.setText("OK"); okButton.setMinimumSize(new Dimension(70, 23)); okButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { updateConfig(); SetupDialog.this.setVisible(false); } }); } return okButton; } COM: <s> this method initializes ok button </s>
funcom_train/9977944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gotoActionClass() { Struts2CustomObject co = new Struts2CustomObject((Struts2CustomObject)nodeAction.getCustomObject()); Struts2ActionActionManager.gotoActionMethod(context, nodeAction, co, getActionClass(), null, false); setActionClass(co.className); setActionMethod(co.methodName); } COM: <s> opens action java source file </s>
funcom_train/3887637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLevelPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LearningDesignType_level_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LearningDesignType_level_feature", "_UI_LearningDesignType_type"), ImsldV1p0Package.Literals.LEARNING_DESIGN_TYPE__LEVEL, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the level feature </s>
funcom_train/14158070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getMQuitButton() { if (mQuitButton == null) { mQuitButton = new JButton(); mQuitButton.setText(""); mQuitButton.setIcon(new ImageIcon(getClass().getResource("/lanholdempoker/images/toolbar/exit.png"))); mQuitButton.setToolTipText("Quit LanHoldemPoker"); mQuitButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.exit(0); } }); } return mQuitButton; } COM: <s> this method initializes m quit button </s>
funcom_train/45716520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataOJ loadProjectWithDialog() { OpenDialogOJ od = new OpenDialogOJ("Open ObjectJ project ...", FileFilterOJ.objectJFileFilter()); if (od.isApproved()) { return loadAProject(od.getDirectory(), od.getFilename()); } else { return null; } } COM: <s> asks to load a project </s>
funcom_train/24366967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean loadImage(GeoPoint loc, boolean fromClipboard) { String fileName; if (fromClipboard) fileName = getImageFromClipboard(); else fileName = getImageFromFile(); if (fileName == null) return false; // create GeoImage object for this fileName GeoImage geoImage = new GeoImage(app.getKernel().getConstruction()); geoImage.setFileName(fileName); geoImage.setCorner(loc, 0); geoImage.setLabel(null); GeoImage.updateInstances(); return true; } COM: <s> creates a new image at the given location real world coords </s>
funcom_train/16292918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValue() { StringBuffer buffer = new StringBuffer(); Iterator itr = getContent().iterator(); while (itr.hasNext()) { Content child = (Content) itr.next(); if (child instanceof Element || child instanceof Text) { buffer.append(child.getValue()); } } return buffer // JCLIC modification //.toString(); .substring(0); } COM: <s> returns the xpath 1 </s>
funcom_train/13314496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visit(ScalarOrTupleSameTypeAsDef n, A argu) { n.nodeToken.accept(this, argu); n.nodeToken1.accept(this, argu); n.nodeChoice.accept(this, argu); n.nodeToken2.accept(this, argu); } COM: <s> node token same type as </s>
funcom_train/3122256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeCol(Object header) { boolean ret = containsCol(header); if (ret) { Object realHeader = colHeaders.get(header); colHeaders.remove(header); Iterator rowIt = grid.keySet().iterator(); while (rowIt.hasNext()) { Map row = (Map)grid.get(rowIt.next()); row.remove(realHeader); } } return ret; } // of method COM: <s> removes the column with the given header if it exists </s>
funcom_train/32292178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TreeNode getChildAfter(TreeNode node) { // Variables int index; // Check node if (node == null || node.getParent() != this) { throw new IllegalArgumentException(); } // if // Get index of child node index = getIndex(node); // Check for child after index++; if (index == getChildCount()) { return null; } // if // Retrieve Child After return getChildAt(index); } // getChildAfter() COM: <s> get child after </s>
funcom_train/5395400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetNewAttribute() { System.out.println("getNewAttribute"); TableAttribute instance = null; Attribute expResult = null; Attribute result = instance.getNewAttribute(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get new attribute method of class org </s>
funcom_train/2270136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changeVelocities() { for (Body b0 : space.bodies) { dv.set(0, 0, 0); for (Body b1 : space.bodies) { if (b0 != b1) { // set temp to b1 - b0 temp.set(b1.getLocation()); temp.sub(b0.getLocation()); temp.setLength(getVelocityChange(temp.length(), b1.mass)); dv.add(temp); } } b0.velocity.add(dv); } } COM: <s> calculates and applies the velocity change for each body in space </s>
funcom_train/27944987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals( Object obj ) { Integer iPluginId; if( obj != null ) iPluginId = ( ( obj instanceof Integer ) ? ( Integer ) obj : new Integer( ( ( JPlugin ) obj ).pluginProperties.getPluginId() ) ); else iPluginId = new Integer( -1 ); if( iPluginId.intValue() == pluginProperties.getPluginId() ) return true; else return false; } COM: <s> implements the compare method </s>
funcom_train/43098166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getSpecificationPath(Object ausecase) { MUseCase uc = (MUseCase) ausecase; Set set = new HashSet(); set.addAll(nsmodel.getModelManagementHelper() .getAllSurroundingNamespaces(uc)); Set set2 = new HashSet(); Iterator it = set.iterator(); while (it.hasNext()) { Object o = it.next(); if (o instanceof MSubsystem || o instanceof MClass) { set2.add(o); } } return set2; } COM: <s> returns the specificationpath operation of some usecase </s>
funcom_train/48152741
/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 x, y1, y2; super.paintComponent(g); //Draw floorboard cracks g.setColor(Color.black); drawLine(g, -1, 0, 1, 0); drawLine(g, -1, 1, 1, 1); //Draw needle if(needleDropped){ g.setColor(needleColor); x = (length / 2) * Math.cos(angle); y1 = distance + (length / 2) * Math.sin(angle); y2 = distance - (length / 2) * Math.sin(angle); drawLine(g, x, y1, -x, y2); } } COM: <s> this method paints the floor </s>
funcom_train/2802315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DefaultMutableTreeNode buildInvalidMessageTree(ArrayList<File> pValidMsgTypes) { DefaultMutableTreeNode validMsgNode = new DefaultMutableTreeNode("Invalid Messages".intern()); for (File pValidMsgType : pValidMsgTypes) { validMsgNode.add(new DefaultMutableTreeNode(pValidMsgType)); } return validMsgNode; } COM: <s> builds the tree containing the invalid messages </s>
funcom_train/28171053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBounds2DDouble() { System.out.println("getBounds2DDouble"); BezierPath instance = new BezierPath(); Rectangle2D.Double expResult = null; Rectangle2D.Double result = instance.getBounds2DDouble(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get bounds2 ddouble method of class org </s>
funcom_train/42260913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMenuIndex(String optionContains) { optionContains = optionContains.toLowerCase(); final java.util.List<String> actions = getMenuItems(); for (int i = 0; i < actions.size(); i++) { final String action = actions.get(i); if (action.toLowerCase().contains(optionContains)) { return i; } } return -1; } COM: <s> returns the index start at 0 in the menu for a given action </s>
funcom_train/15405375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setRollbackFor(Object rollbackFor){ ArrayList<?> list = (ArrayList<?>)rollbackFor; for (int i = 0; i < list.size(); i++) { Type throwType = (Type)list.get(i); mv.visitVarInsn(ALOAD, posTxScope); mv.visitLdcInsn(throwType); mv.visitMethodInsn(INVOKEVIRTUAL, txScopeType.getInternalName(), "setRollbackFor", "(Ljava/lang/Class;)L"+C_TXSCOPE+";"); mv.visitInsn(POP); } } COM: <s> add bytecode to add the rollback for throwable types to the tx scope </s>
funcom_train/14093274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEvaluateMatchesString4() { String leftside = "ABCD"; String rightside = "ba"; int operation = Operator.Operation.MATCH; boolean ignoreCase = true; boolean expectedReturn = false; boolean actualReturn = Operator.evaluate(leftside, rightside, operation, ignoreCase); assertEquals("return value", expectedReturn, actualReturn); } COM: <s> test match ignore case false </s>
funcom_train/7232518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDisabledTokens() { final Iterator iter = this.timedTokens.keySet().iterator(); while (iter.hasNext()) { final Object token = iter.next(); final Place place = (Place) this.timedTokens.get(token); place.addTokenQuietly(token); } } COM: <s> special utility method </s>
funcom_train/29274118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String stem(String str) { str = str.toLowerCase(); this.reset(); char[] word = new char[str.length()]; str.getChars(0, str.length(), word, 0); this.add(word, word.length); this.stem(); String result = this.toString(); this.reset(); return result; } COM: <s> stems a word </s>
funcom_train/5572224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save() { File file = new File(getFilename()); try { ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(file)); oos.writeObject(_mruFileList); oos.flush(); oos.close(); } catch (Exception e) { // do nothing e.printStackTrace(); } } COM: <s> saves a list of mru files out to a file </s>
funcom_train/8629153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addJoin(TableFilter filter, boolean outer, Expression on) throws SQLException { if (on != null) { on.mapColumns(this, 0); } if (join == null) { this.join = filter; filter.outerJoin = outer; if (on != null) { filter.mapAndAddFilter(on); } } else { join.addJoin(filter, outer, on); } } COM: <s> add a joined table </s>
funcom_train/42383462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public enum State { RUN, // juggle/prioritize/emit; usual state HOLD, // enter a consistent, stable, checkpointable state ASAP PAUSE, // enter a stable state where no URIs are in-progress; unlike // HOLD requires all in-process URIs to complete FINISH }; // end and cleanup; may not return to any other state after COM: <s> enumeration of possible target states </s>
funcom_train/32758105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt( final Object value, final int row, final int column ) { if ( column == SIGNAL_COLUMN ) { final String PV = stripIllegalCharacters( value.toString() ); switch( row ) { case WAVEFORM_ROW: new Thread() { public void run() { _channelModel.setChannel( PV ); } }.start(); break; case DELAY_ROW: _channelModel.setDelayChannel( PV ); break; case SAMPLE_PERIOD_ROW: _channelModel.setSamplePeriodChannel( PV ); break; default: return; } } } COM: <s> set the value to that specified </s>
funcom_train/39276407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String renderAnalyze(char delimiter, LAAnalysis analysis) { if (analysis instanceof SingleValueAnalysis) { return renderAnalyze(delimiter, (SingleValueAnalysis) analysis); } else if (analysis instanceof MultiValuesAnalysis) { return renderAnalyze(delimiter, (MultiValuesAnalysis) analysis); } else { return null; } } COM: <s> empty method to avoid loops on unsupported analysis </s>
funcom_train/50392014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class loadGroovyClassFromDirectory(String path){ wfFolder=new Folder(path); wfFolder.mkdir(); try { File groovyFile =new File(path,fileName+Constants.GROOVY); groovyFile.createNewFile(); //load groovy class Class c=((UnicoreWebclientApplication)this.app).getGroovyClassLoader().parseClass(groovyFile); return c; } catch (IOException e) { Logger.getLogger(WorkflowLoading.class).error("cannot read or write groovy file"); delete(wfFolder); } return null; } COM: <s> load groovy class </s>
funcom_train/23201103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startPollingForAudio() { if (ctx.getPlayUrl() == null) return; Thread thread = new Thread() { @Override public void run() { int READ_TIMEOUT = 1000 * 60 * 5; // 5 minutes while (!ctx.getDestroyed()) { boolean repoll = pollForAudio(READ_TIMEOUT); if (!repoll) { pollEventListener.setConnectionStatus(false); return; } try { Thread.sleep(30000); } catch (InterruptedException e) { LOG.error(e); } } } }; thread.setDaemon(true); thread.start(); } COM: <s> polls a url for audio plays it when it is returned </s>
funcom_train/8082386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void UpdateReferenceSet(int numBestSolutions, int numDivsSolutions){ for (int i = 0; i <m_parentsCombination.size (); i++) m_ReferenceSet.add (i, m_parentsCombination.get (i)); GenerateReferenceSet (m_ReferenceSet,numBestSolutions,numDivsSolutions); } COM: <s> update the reference set putting the new obtained solutions there </s>
funcom_train/12923453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Import add(final int uid, final String aString) { if ((uid < 1) || (uid > Coder.USHORT_MAX)) { throw new IllegalArgumentRangeException( 1, Coder.USHORT_MAX, uid); } if (aString == null || aString.length() == 0) { throw new IllegalArgumentException(); } objects.put(uid, aString); return this; } COM: <s> adds the identifier and name to the list of objects to be imported </s>
funcom_train/19074281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireDataChanged() { Object[] myList; synchronized (this) { myList = getAllPlugInListeners().toArray(); } for (int i=0; i < myList.length; ++i) { if (myList[i] != null) { ((PlugInListener)myList[i]).dataChanged(new PlugInEvent(this)); } } } COM: <s> fires an event to the plug in listeners notifying that the underlying data </s>
funcom_train/31527131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleWhileAndSynchronized(BlockDef block) { SymTabAST node = block.getTreeNode(); SymTabAST condition = (SymTabAST)(node.getFirstChild()); SymTabAST slist = (SymTabAST)(condition.getNextSibling()); resolveExpression(condition, block, null, true); handleSList(slist, block); } COM: <s> processes a while loop and resolves references in it </s>
funcom_train/10809514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCharacterEncodingScheme() { if (parser != null) { return parser.getCharacterEncodingScheme(); } else { if (currentEvent == START_DOCUMENT) { if (lastNode instanceof OMDocument) { return ((OMDocument)lastNode).getXMLEncoding(); } else { return null; } } else { throw new IllegalStateException(); } } } COM: <s> method get character encoding scheme </s>
funcom_train/50531951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void Start() throws Exception { synchronized(start_mutex) { stopped=false; bottom_prot.Up(new Event(Event.START)); if(!start_ok_received) start_mutex.wait(); // will be notified by START_OK (sent by bottom-most layer) } if(start_ok_received == false) throw new ChannelException("ProtocolStack.Start(): timed out waiting for START_OK"); } COM: <s> start all layers </s>
funcom_train/18503235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String decodePercent(String str) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < str.length(); i++) { char c = str.charAt(i); switch (c) { case '+': sb.append(' '); break; case '%': sb.append((char) Integer.parseInt(str.substring(i + 1, i + 3), 16)); i += 2; break; default: sb.append(c); break; } } return new String(sb.toString().getBytes()); } COM: <s> decodes the percent encoding scheme </s>
funcom_train/33512052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int addMetaType(String name) { if (! metaMap.containsKey(name)) { String [][] tmp = metadata; int length = tmp.length; metadata = new String[length+1][resultSize]; for(int i=0;i<length;i++) { metadata[i] = tmp[i]; } metadata[length] = new String[resultSize]; metaMap.put(name, length); return length; } return metaMap.get(name); } COM: <s> get the metadata index for the given name </s>
funcom_train/18240026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(){ int counter =0; // try{ while(true){ counter++; System.out.println(toString() + " counter =" + counter); //sleep(2000); } // } /* catch (InterruptedException e) { System.out.println(toString() + "was interrupted"); } */ } COM: <s> mock run method just keeps counting and sleeping </s>
funcom_train/29530983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isStatusSuccess(StatusType status) { if (_logger.isDebugEnabled()) { _logger.debug("Checking if status equals \"SUCCESS\""); } QName statusResult = status.getStatusCode().getValue(); QName success = new QName("org.indivo.status-code", "SUCCESS"); return success.equals(statusResult); } COM: <s> determine whether the specified status has a status code equal to </s>
funcom_train/46866949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Page getPendingInvitationsSent(Long userId, int page) { InvitationFilterDescriptor filter = new InvitationFilterDescriptor(); filter.setUserId(userId); filter.setStatus(InvitationStatus.PENDING); return baseDao .getPaginatedObjects( "from Invitation as i where i.from.userId = :userId AND i.status=:status AND i.community = null order by i.inviteDate desc", filter, page); } COM: <s> returns pending invitations sent by the user </s>
funcom_train/47306516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemovingDBRemovesProfiles() throws Exception { List<TableProfileResult> t1Results = pm.getResults(t1); for (TableProfileResult tpr : t1Results) { assertEquals(mydb, tpr.getProfiledObject().getParentDatabase()); } session.getRootObject().removeChild(mydb); t1Results = pm.getResults(t1); assertEquals(0, t1Results.size()); } COM: <s> this test will add a database profile tables and then remove the database </s>
funcom_train/46696086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetQuery() { System.out.println("getQuery"); BasicIODescriptor instance = new BasicIODescriptor(); Query result = instance.getQuery(); assertNotNull(result); assertTrue(result instanceof NullActorQuery); Query q = new NullLinkQuery(); instance.setQuery(q); assertSame(q,instance.getQuery()); } COM: <s> test of get query method of class basic iodescriptor </s>
funcom_train/20790476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CShape isOnOutline(Point2D p) { Point2D ptDst = new Point2D.Double(); try { absTransform.inverseTransform(p, ptDst); pickingRectangle.setBounds((int) ptDst.getX() - 1, (int) ptDst.getY() - 1, 2, 2); if (((Graphics2D) canvas.getGraphics()).hit(pickingRectangle, shape, true)) return this; } catch (NoninvertibleTransformException e) { return null; } return null; } COM: <s> tests whether a point p is on this shapes outline </s>
funcom_train/1477814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStepGrid(int pixels) { if (pixels>0) { stepGrid = pixels; initGrid(); double radAngle = degToRad(angleFromBegining); rotatePolyline(center,xOriginH,yOriginH,xh,yh,nbPointsH,radAngle); } } COM: <s> changes the space between 2 lines of the grid </s>
funcom_train/25419792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUuids(String[] uuids) { ArrayList<String> validUuids = new ArrayList<String>(); if (uuids != null) { for (String uuid : uuids) { uuid = Val.chkStr(uuid); if (UuidUtil.isUuid(uuid)) { validUuids.add(uuid); } } } _uuids = validUuids.toArray(new String[validUuids.size()]); } COM: <s> sets uuids of harvest history events to delete </s>
funcom_train/40412077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DSRequest removeRequest(String requestId) { for (int i = 0, requestListSize = requestList.size(); i < requestListSize; i++) { DSRequest request = requestList.get(i); if (request.getRequestId().equals(requestId)) { requestList.remove(i); return request; } } return null; } COM: <s> removes and returns the request with a given request id </s>