__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/33388700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvalidMovesDice() throws Exception { BackgammonBoardImpl board = new BackgammonBoardImpl(); SamplePlayer player = new SamplePlayer(); DiceImpl dice = new DiceImpl(); for (int i = 0; i < 1; i++) { TestUtil.generateNext(dice); PlayerMove move = player.getMove(board, dice); TestUtil.generateNext(dice); assertFalse("Invalid move accepted " + i, TestUtil.makeMove(board, move, dice)); } } COM: <s> tests validation of invalid moves for the given dice </s>
funcom_train/21955395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeLogger(String pKey) { if (mMonitoredLogStrings.contains(pKey)) { mMonitoredLogStrings.remove(pKey); Pooka.getResources().removeValueChangeListener(this, pKey + ".logLevel"); getLogger().log(Level.FINE, "removed key " + pKey); } } COM: <s> removes a logger from the monitored list </s>
funcom_train/36012251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canFinish() { // return (this.reviewId != null && ((this.reviewers != null) && this.reviewers.size() > 0) // && this.author != null); return reviewIdPage.isPageComplete() && reviewerPage.isPageComplete(); } COM: <s> checks if the wizard can finish </s>
funcom_train/38287561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NamespaceManager newUpdatedManager() { Map<String, String> prefixes = getPrefixes(); if (prefixes == null) throw new IllegalStateException("Errors on component."); //$NON-NLS-1$ NamespaceManager child = new NamespaceManager(nsManager); for (String namespace : prefixes.keySet()) { String prefix = prefixes.get(namespace); child.declare(namespace, prefix); } return child; } COM: <s> produces a namespace manager where these new prefixes are registered </s>
funcom_train/37841650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getMultiHandle(String serviceName, Class multiHandleClass) throws SynthesisException { if(!handleMap.containsKey(serviceName)) return null; Multihandle retHandle = null; List handleList = (List)handleMap.get(serviceName); if(handleList.size() > 0) { retHandle = M2MI.getMultihandle(multiHandleClass); Iterator iter = handleList.iterator(); while(iter.hasNext()) { Object next = iter.next(); if(next != null) retHandle.attach(iter.next()); } } return retHandle; } COM: <s> description creates and returns a multihandle for the given service name </s>
funcom_train/17724424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void configureActionListener(UIComponent component, String name, String value) { if (value == null) { return; } if (isValueReference(value)) { MethodBinding mb = getFacesContext().getApplication(). createMethodBinding(value, ACTION_LISTENER_SIGNATURE); ((ActionSource) component).setActionListener(mb); } else { throw new IllegalArgumentException(value); } } COM: <s> p configure an action listener method binding </s>
funcom_train/40542501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String formatText(String text) { // Replace tabs with spaces text = text.replaceAll("\t", " "); // Replace newlines with spaces (for any platform) text = text.replaceAll("\r\n", " "); text = text.replaceAll("\n", " "); return text; } COM: <s> formats the text by removing special whitespace characters tab newline etc </s>
funcom_train/31022412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createTabFolder(Composite container) { folder = new TabFolder(container,SWT.FLAT); folder.setBackground(factory.getBackgroundColor()); folder.setForeground(factory.getForegroundColor()); GridData gd = new GridData(GridData.FILL_BOTH ); gd.horizontalSpan = 2; GridLayout layout = new GridLayout(); layout.marginWidth = 5; layout.numColumns=1; folder.setLayout(layout); folder.setLayoutData(gd); } COM: <s> create the tab folder </s>
funcom_train/36856102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long createNote(String title, String lat, String lon) { ContentValues initialValues = new ContentValues(); initialValues.put(KEY_TITLE, title); initialValues.put(KEY_LAT, lat); initialValues.put(KEY_LON, lon); return mDb.insert(DATABASE_TABLE, null, initialValues); } COM: <s> create a new note using the title and body provided </s>
funcom_train/18623926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element addKeywords (Element md, Element keywords) throws Exception { Element root = (Element)md.getChild("identificationInfo", gmd).getChildren().get(0); boolean ok = addAfter(root, keywords, "descriptiveKeywords", gmd); if (!ok) { throw new BadXmlResponseEx("The metadata did not have a descriptiveKeywords Element"); } return md; } COM: <s> add keywords generated from cdm coordinate systems to identification info </s>
funcom_train/5346123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addXMLToResponse(Response response, FileDesc fd) { List docs = fd.getLimeXMLDocuments(); if( docs.size() == 0 ) return; if( docs.size() == 1 ) response.setDocument((LimeXMLDocument)docs.get(0)); } COM: <s> adds xml to the response </s>
funcom_train/934285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected HttpServletRequest processMultipart(HttpServletRequest request) { if (!"POST".equalsIgnoreCase(request.getMethod())) { return (request); } String contentType = request.getContentType(); if ( (contentType != null) && contentType.startsWith("multipart/form-data")) { return (new MultipartRequestWrapper(request)); } else { return (request); } } COM: <s> if this is a multipart request wrap it with a special wrapper </s>
funcom_train/40306390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseDragged(MouseEvent e) { // if we clicked the right-mouse button before if ( m_bDragEnabled ) m_gui.getRenderer().setRotation((e.getY() - m_pointDragStart.y) / 4, (e.getX() - m_pointDragStart.x) / 4); } COM: <s> called by gui components mouse dragged event </s>
funcom_train/36984324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void textSize(float size) { if (textFontNative == null) { super.textSize(size); return; } textFontNative = textFontNative.deriveFont(size); g2.setFont(textFontNative); // get the metrics info textFontNativeMetrics = g2.getFontMetrics(textFontNative); } COM: <s> same as parent but override for native version of the font </s>
funcom_train/3560261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showDataSets() throws DbException { DbIterator res; if (!isInitialized()) init(); res = prv.getDataSets(null).iterator(); TableUtils.fillSortedTable(tabDataSetList, res, dataSetIndexes, 0); initDataSetTableSizes(); } COM: <s> shows the data sets list </s>
funcom_train/50865765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndex(Comparable key) { int result = -1; Set<Comparable> keys = dataMap.keySet(); if (keys.contains(key)) { int count = 0; Iterator<Comparable> i = keys.iterator(); while (i.hasNext()) { if (key == i.next()) result = count; else count++; } } return result; } COM: <s> returns the index for a given key </s>
funcom_train/20151906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void broadcastAsAdmin(String tellType, Collection<User> users, String msg, Object... args) { if (args.length > 0) { msg = MessageFormat.format(msg, args); } command.sendQuietly("admin {0}", adminPass); for (User user : users) { command.sendQuietly("{0} {1} {2}", tellType, user, msg); } command.sendQuietly("admin"); } COM: <s> sends a message to all players in the list with the admin enabled </s>
funcom_train/5016746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void error(String _errMessage) { while (actualPage.hasNextPage()) { actualPage = actualPage.getNextPage(); if (actualPage instanceof FinishPage) { FinishPage finishPage = (FinishPage)actualPage; finishPage.setErrorMessage(_errMessage); showActualPage(); return; } } } COM: <s> set err message and show finish page if exists </s>
funcom_train/17769543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addImplicitCollection(Class ownerType, String fieldName, String itemFieldName, Class itemType) { if (implicitCollectionMapper == null) { throw new InitializationException("No " + ImplicitCollectionMapper.class.getName() + " available"); } implicitCollectionMapper.add(ownerType, fieldName, itemFieldName, itemType); } COM: <s> adds implicit collection which is used for all items of the given element </s>
funcom_train/28490648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Relationship createRelationship(String name, AbstractObject[] obj, String[] role, String[] multiplicity) { Relationship res=getFactory().createRelationship(); res.setName(name); for(int i=0; i<obj.length; i++) { Link link=getFactory().createLink(); link.setLinksTo(obj[i]); link.setRole(role[i]); link.setMultiplicity(multiplicity[i]); res.getLinks().add(link); } return res; } COM: <s> creates a relationship </s>
funcom_train/3666034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Item get(final Item key) { int h = key.hashCode; Item i = items[h % items.length]; while (i != null) { if (i.hashCode == h && key.isEqualTo(i)) { return i; } i = i.next; } return null; } COM: <s> returns the constant pools hash table item which is equal to the given </s>
funcom_train/16651900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer getInteger(AtarrabiConfigParam param) { if (param == null) { return null; } try { String valueString = this.getString(param); if (valueString != null) { return Integer.parseInt(this.getString(param)); } else { return null; } } catch (NumberFormatException e) { log.warn("Could not convert param #0 into an integer value. Please check your configuration!", param); return null; } } COM: <s> returns an integer representation of the config parameter </s>
funcom_train/3461256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JarInfo createJarInfo(Vector classList, Vector serList, Manifest mf) { JarInfo jarinfo = null; if (this.useJavaBeanHeader) { jarinfo = createJarInfoFromManifest(classList, serList, mf); } else { jarinfo = createJarInfoFromClassList(classList, serList); } return jarinfo; } COM: <s> create a jar info from a manifest and a class list </s>
funcom_train/8633758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void branchChainTo(BranchLabel label) { // in order to improve debug attributes for stepping (11431) // we want to inline the jumps to #breakLabel which already got // generated (if any), and have them directly branch to a better // location (the argument label). // we know at this point that the breakLabel already got placed if (this.breakLabel.forwardReferenceCount() > 0) { label.becomeDelegateFor(this.breakLabel); } } COM: <s> dispatch the call on its last statement </s>
funcom_train/17606821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadPages(String filename, final int instance) throws IOException { PDFLoader loader=new PDFLoader(new File(filename), new LoadListener() { @Override public void updateState(float percent) { progress.setValue((int)(percent*100)); } @Override public void completed(PDFLoader loader) { addImages(loader.getImages(), instance); System.out.println("File load finished"); } @Override public void error(Exception e) { System.out.println("error occurred: "+e.getMessage()); } }); loader.start(); } COM: <s> loads pdffile to imagearray with specified size </s>
funcom_train/2804937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { g.setColor(Color.gray); for (int i = 0; i < rectangles.size(); i++) { Rectangle r = (Rectangle)rectangles.elementAt(i); g.fill3DRect(r.x-1,r.y-1,r.width+2,r.height+2,false); } super.paint(g); } COM: <s> manage the repainting of this panel </s>
funcom_train/44627641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFNotIn() { helpTCF("A.java", "import org.jmlspecs.annotation.*;\n" + "public class A { \n" + " //@ public model JMLDataGroup q;\n" + " @Secret int m; \n" + "} \n" //,"/A.java:4: A secret field must be a model field or in a secret datagroup",15 ); } COM: <s> secret but not in a datagroup </s>
funcom_train/47307841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getBeanName(String name) { name = getBeanPropertyName(name); StringBuilder sb = new StringBuilder(name.length()); sb.append(Character.toUpperCase(name.charAt(0))); sb.append(name.substring(1)); return sb.toString(); } COM: <s> returns the correctly capitalized form of the given property attribute </s>
funcom_train/2676760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyItemResume(IPlayItem item, int position) { IStreamAwareScopeHandler handler = getStreamAwareHandler(); if (handler != null) { try { handler.streamPlaylistVODItemResume(this, item, position); } catch (Throwable t) { log.error("error notify streamPlaylistVODItemResume", t); } } } COM: <s> notifies subscribers on resume </s>
funcom_train/8470011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finish() { for (Map.Entry<String, String> entry : posTags.entrySet()) { posWriter.println(entry.getKey() + " " + entry.getValue()); } posWriter.flush(); posWriter.close(); writer.flush(); writer.close(); } COM: <s> finalizes the writing of documents </s>
funcom_train/37062350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void centerTableData() { DefaultTableCellRenderer renderer = new DefaultTableCellRenderer(); renderer.setHorizontalAlignment(SwingConstants.CENTER); for ( Enumeration e = myTable.getColumnModel().getColumns(); e.hasMoreElements(); ) { ((TableColumn)e.nextElement()).setCellRenderer(renderer); } } COM: <s> center the table data </s>
funcom_train/37507034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendRefresh(ClientAdapter aClientAdapter, String aRefreshURL) { Event refreshEvent = new Event(E_REFRESH); // Set wait time and url for refresh refreshEvent.setField(P_WAIT, "" + getRefreshTimeMillis()); refreshEvent.setField(P_URL, aRefreshURL); try { // Push to client through client adapter aClientAdapter.push(refreshEvent); // Stop this round until refresh event aClientAdapter.stop(); } catch (Throwable t) { // Leave on any exception bailout(); } } COM: <s> send refresh command to pull poll clients </s>
funcom_train/6490938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDispatchLockerObject(DispatchableLocker locker) { // You know an example of where this is used is for reporting. When // reporting we will not necessarily want a screen representation of // the UI, so locking the window makes little sense. In reporting the // locker reference will probably be an object which this.locker = locker; } COM: <s> set the locker object for use when submitting work to the operational </s>
funcom_train/48616642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String removeFile(){ log.debug("Remove FileId = " + personalFileId); StringTokenizer tokenizer = new StringTokenizer(shareFileIds, ","); StringBuffer buffer = new StringBuffer(); while(tokenizer.hasMoreElements()) { Long fileId = new Long(tokenizer.nextToken()); if (!fileId.equals(personalFileId)) { buffer.append(fileId); buffer.append(","); } } shareFileIds = buffer.toString(); return SUCCESS; } COM: <s> remove a file </s>
funcom_train/3805392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processDocumentVersion(Attributes attr){ version = new FeedVersion(); String v_1 = attr.getValue("xmlns"); String v_2 = attr.getValue("version"); version.setNamespace(v_1); if (v_2 != null) version.setVersion(Double.parseDouble(v_2)); else version.setVersion(0d); } COM: <s> try to get document version </s>
funcom_train/20342154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem() { if (stringItem == null) {//GEN-END:|18-getter|0|18-preInit // write pre-init user code here stringItem = new StringItem("", null);//GEN-LINE:|18-getter|1|18-postInit // write post-init user code here }//GEN-BEGIN:|18-getter|2| return stringItem; } COM: <s> returns an initiliazed instance of string item component </s>
funcom_train/32630363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Base getNotesObject(final Object object) { final Base notesBase; if (object instanceof BaseProxy) { notesBase = ((BaseProxy) object).getNotesObject(); } else if (object instanceof Base) { notesBase = (Base) object; } else { notesBase = null; } return notesBase; } COM: <s> given any object might be a domingo object or a notes object returns </s>
funcom_train/12127581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String paramString() { StringBuffer result = new StringBuffer(); result.append("source=" + (source == null ? "null" : source.toString())); result.append(",destination=" + (destination == null ? "null" : destination.toString())); result.append(','); result.append(super.paramString()); return result.toString(); } COM: <s> returns a string representing the state of this activity </s>
funcom_train/23410457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInvocablePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CompositeProcess_invocable_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CompositeProcess_invocable_feature", "_UI_CompositeProcess_type"), ProcessPackage.Literals.COMPOSITE_PROCESS__INVOCABLE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the invocable feature </s>
funcom_train/14373243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanup () throws IOException { canWrite = false; timer.cancel(); bufferedWriter.flush(); bufferedWriter.close(); final String newFileName = filename + ".gz"; final String newFullPath = fullPath + ".gz"; GZIPOutputStream outgzWriter = new GZIPOutputStream(new FileOutputStream(newFullPath)); outgzWriter.write(readLogFile().getBytes()); outgzWriter.close(); this.filename = newFileName; this.fullPath = newFullPath; } COM: <s> flushes and closes the log file then gzips </s>
funcom_train/457824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateIllegalProjectLegalTaskName() { tester.startPage(EditProjectPage.class); final FormTester formTester = tester.newFormTester(MARKUP_ID_FORM); formTester.setValue(MARKUP_ID_PROJECT_NAME_TEXTFIELD, PROJECT_NAME_ILLEGAL); formTester.setValue(MARKUP_ID_TASK_NAME, TASK_NAME_LEGAL); formTester.submit(MARKUP_ID_TASK_SUBMIT_BUTTON); assertTrue(formTester.getForm().hasError()); } COM: <s> tests the basic creation of a new project illegal project name submitted </s>
funcom_train/23199581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.add(getJJToolBarBar(), BorderLayout.NORTH); jContentPane.add(getSampleChart(), BorderLayout.CENTER); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/39213383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int isFxpCompleted(FTPClient fxpFtp)throws IOException { String response = fxpFtp.connect.ctlsocket.getFxpResponse(); if (response.equals("")) return 0; else { boolean ok = response.startsWith(COLSE_DATA_CONNECT) && connect.ctlsocket.getResponse().startsWith(COLSE_DATA_CONNECT); if (ok) return 1; else return -1; } } COM: <s> to see whether the fxp transfer is completed </s>
funcom_train/18896715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCloseGraph() throws Exception{ // add in a triple by nodes graph.add(ref1, ref1, ref1); assertFalse(graph.isEmpty()); assertEquals(1, graph.getNumberOfTriples()); // Create iterator. ClosableIterator iter = graph.find(null, null, null); iter.close(); // Close the graph. graph.close(); } COM: <s> normal test for creating an iterator </s>
funcom_train/10285834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFilesize(TagContent size) throws TagFormatException { if (size.getTextContent() == null || !checkNumeric(size.getTextContent())) { throw new TagFormatException(); } (new TextFrameEncoding(id3v2, "TSIZ", size, use_compression)).write(); } COM: <s> set size of files in bytes excluding id3v2 tag read from text content </s>
funcom_train/40409404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMonthlyLimits() throws Exception { // Create selector. InfoSelector selector = new InfoSelector(); selector.setApiUsageType(ApiUsageType.UNIT_COUNT); ApiUsageInfo apiUsageInfo = service.get(selector); assertNull(apiUsageInfo.getApiUsageRecords()); assertNotNull(apiUsageInfo.getCost()); } COM: <s> test getting monthly api usage limits </s>
funcom_train/8691077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int handleArgPropertyFile(String[] args, int pos) { try { propertyFiles.addElement(args[++pos]); } catch (ArrayIndexOutOfBoundsException aioobe) { String msg = "You must specify a property filename when " + "using the -propertyfile argument"; throw new BuildException(msg); } return pos; } COM: <s> handle the propertyfile argument </s>
funcom_train/5372977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deselect (int index) { checkWidget (); /* int selection = OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0); if (index != selection) return; OS.SendMessage (handle, OS.CB_SETCURSEL, -1, 0); */ selectInput.selectedIndex = -1; sendEvent (SWT.Modify); // widget could be disposed at this point } COM: <s> deselects the item at the given zero relative index in the receivers </s>
funcom_train/14170691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFileListProvider(IFileListProvider provider) { // first we have to check if given provider is present if (provider == null) { return; } if (isProviderPresent(resolutionTree, provider)) { if (fileListGenerated) { removeFromFileList(provider, getResolutionTree()); } removeFromResolutionTree(provider, getResolutionTree()); } provider.deregisterFileListChangeListener(changeListener); } COM: <s> removes given file list provider from this compound provider </s>
funcom_train/9678974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveChoicesFromPropertyEditors(PropertyPersistance persistance){ super.saveChoicesFromPropertyEditors(persistance); for( Iterator i = this.jDevSpecificPropertyList.iterator(); i.hasNext(); ) { ProjectProperty eachProperty = (ProjectProperty)i.next(); eachProperty.saveChoiceFromEditor(persistance); } } COM: <s> this is overriding the one in project options so that additional properties from </s>
funcom_train/4780419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getGroupGroupMembers(Document document, String groupName) throws AppException, AppException { if (groupName == null) { throw new AppException("application.error.grouprequired"); } StringBuilder builder = new StringBuilder(); Group group = document.findGroup(groupName); if (group == null) { throw new AppException("application.error.unabletofindgroup", groupName); } List<Group> groupMembers = group.getGroupMembers(); for (Group groupMember : groupMembers) { builder.append(groupMember.getName()); builder.append("\n"); } return builder.toString(); } COM: <s> get list of groups that are a member of a group </s>
funcom_train/652487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void adaptToPreferenceChange(PropertyChangeEvent event) { String property = event.getProperty(); Token token = getToken(property); if (token != null) { if (property.endsWith(ITextStylePreferences.SUFFIX_FOREGROUND) || property .endsWith(ITextStylePreferences.SUFFIX_BACKGROUND)) { adaptToColorChange(token, event); } else if (property.endsWith(ITextStylePreferences.SUFFIX_STYLE)) { adaptToStyleChange(token, event); } } } COM: <s> adapts the behavior of the contained components to the change encoded in </s>
funcom_train/45232450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMniTipoDatiAcq() { if (mniTipoDatiAcq == null) { mniTipoDatiAcq = new JMenuItem(); mniTipoDatiAcq.setText(Messages.getString("VcMainFrame.mnuPurchasingData")); //$NON-NLS-1$ mniTipoDatiAcq.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { openAnaTipoDatiAcq(); } }); } return mniTipoDatiAcq; } COM: <s> this method initializes mni tipo dati acq </s>
funcom_train/3371326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color getForeground() { AccessibleContext ac = getCurrentAccessibleContext(); if (ac instanceof AccessibleComponent) { return ((AccessibleComponent) ac).getForeground(); } else { Component c = getCurrentComponent(); if (c != null) { return c.getForeground(); } else { return null; } } } COM: <s> get the foreground color of this object </s>
funcom_train/44027155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initBottomLinksPanel() { // Header RootPanel header = RootPanel.get("design-new-header"); if (panelBottomLinksWrapper == null){ panelBottomLinksWrapper = new HTMLPanel( "<div class=\"header-bottom-panel-style-wrapper\">" + "<div id=\"header-bottom-panel-style-id\" class=\"header-bottom-panel-style\" >" + "</div>" + "</div>"); panelBottomLinks = new AbsolutePanel(); panelBottomLinks.setStyleName("design-new-header-temp-links"); panelBottomLinksWrapper.add(panelBottomLinks, "header-bottom-panel-style-id"); } header.add(panelBottomLinksWrapper); } COM: <s> initializes bottom links panel of the xide header </s>
funcom_train/36920974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double pdf(int x) { double power = x-mean; power = -(power*power)/(2*stdDev*stdDev); double prob = 1/Math.sqrt(2*Math.PI*(stdDev*stdDev)); prob = prob * Math.exp(power); return prob; } COM: <s> returns the probability of some value x on this distribution </s>
funcom_train/45078375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HTree getHashtable( String hashtable) throws IOException { long recid = recman.getNamedObject(hashtable); HTree hash = null; if (recid !=0) hash = HTree.load(recman, recid); else { hash = HTree.createInstance(recman); recman.setNamedObject(hashtable, hash.getRecid()) ; } return hash; } COM: <s> get the htree from the record manager </s>
funcom_train/23707425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Component createToolbar() { if (toolbar == null) { toolbar = new JToolBar(); toolbar.add(createNewBtn()); toolbar.add(createOpenBtn()); toolbar.add(createSaveBtn()); toolbar.add(Box.createHorizontalStrut(5)); toolbar.add(Box.createHorizontalGlue()); } return toolbar; } COM: <s> create the toolbar </s>
funcom_train/31358773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processPrivateMessageEvent(String recipient, String name, String message) { // display private message for the recipient and sender if (recipient.equals(nickname) || name.equals(nickname)) chatArea.append(name + ": " + message + "\n"); else if (spy) // if spy mode is on, display private message along with recipients name chatArea.append(name + " (private to " + recipient + "): " + message + "\n"); } COM: <s> processes a private message event received from the chat service wrapper </s>
funcom_train/51699666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getParam(String paramId) { if (strictAccessCheck) { if (params == null) throw new IllegalStateException("Parameters are not defined"); if (!params.containsKey(paramId)) throw new IllegalStateException("Parameter '" + paramId + "' is not defined"); } return (params == null) ? null : params.get(paramId); } COM: <s> get a transition parameter value </s>
funcom_train/34796095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PrintWriter initWriter(String filename) { if (filename == null || filename.equals("")) { throw new IllegalArgumentException("File name must not be the empty string."); } File file = new File(filename); File dir = file.getParentFile(); if (dir != null) { dir.mkdirs(); } try { return new PrintWriter(new BufferedWriter(new FileWriter(file))); } catch (IOException e) { throw new IllegalArgumentException(e); } } COM: <s> initialize the print write from a filename </s>
funcom_train/45754177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void showPageNumber(int curpage, int maxpage) { Intent msg = new Intent(UPDATE_STATUSBAR); msg.putExtra(STATUSBAR_ICON, 7); msg.putExtra(STATUSBAR_ACTION, 1); msg.putExtra("current", curpage); msg.putExtra("max", maxpage); sendBroadcast(msg); } COM: <s> show page number </s>
funcom_train/37860035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void expand() { Set<DocumentImpl> docs = new HashSet<DocumentImpl>(); for (int i = 0; i <= size; i++) { NodeImpl node = (NodeImpl) values[i]; if (node.getDocument().hasReferenceNodes()) docs.add(node.getDocument()); } for (DocumentImpl doc : docs) { doc.expand(); } } COM: <s> scan the sequence and check all in memory documents </s>
funcom_train/14318174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendUnauthorized() throws IOException { HashMap<String, String> headers = new HashMap<String, String>(); headers.put("WWW-Authenticate", "Basic realm=\"" + BundleMessage.format("UI_DAVMAIL_GATEWAY") + '\"'); sendHttpResponse(HttpStatus.SC_UNAUTHORIZED, headers, null, (byte[]) null, true); } COM: <s> send 401 unauthorized response </s>
funcom_train/20891447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getJComboBoxYAxis1() { if ((jComboBoxYAxis1 == null) || (this.reconstruct)) { if (this.yAxes != null) { jComboBoxYAxis1 = new JComboBox(this.yAxes); jComboBoxYAxis1.setSelectedIndex(0); } else { jComboBoxYAxis1 = new JComboBox(); } } return jComboBoxYAxis1; } COM: <s> this method initializes j combo box yaxis1 </s>
funcom_train/31127077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getProductID(){ byte[] buf = new byte[8]; int failed = this.getData(0x10, buf, 8); if(failed!=0) return "failed. "; String str="l:"; for(int i=0; i<8; i++){ str+=(char)buf[i]; } return str; } COM: <s> method used to know the type of the sensor </s>
funcom_train/50325697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getUserName(Element elem) { if ( elem.getChild("userName") != null) { return elem.getChild("userName").getText(); } if ( elem.getAttribute("userName") != null) { return elem.getAttribute("userName").getValue(); } return null; } COM: <s> get the user name from an element defining a named bean </s>
funcom_train/39470241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeNode(BinTreeNode node) { BinTreeNodeP p = (BinTreeNodeP)node; if (p == root) { root = null; } else { fixWeight(p.parent, -getWeight(p)); if (p.parent.left == p) { p.parent.left = null; } else { p.parent.right = null; } p.parent = null; } } COM: <s> removes the specified node and all its children from the tree </s>
funcom_train/7826253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFire() { System.out.println("fire"); Place place = createPlace(); Transition transition = createTransition(); InhibitorArc instance = new InhibitorArc(place, transition, new InhibitorArcObjectImpl(model)); place.setTokens(0); instance.fire(); assertEquals(0, place.getTokens()); } COM: <s> test of fire method of class edu </s>
funcom_train/4509643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAdmins(List<JID> admins) { Collection<String> adminList = new ArrayList<String>(); for (JID admin : admins) { adminList.add(admin.toBareJID()); } JiveGlobals.setProperty("admin.authorizedJIDs", StringUtils.collectionToString(adminList)); } COM: <s> the default provider sets a comma separated list as the system property </s>
funcom_train/16358309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void save(String fileName, List list) { String NEW_LINE = System.getProperty("line.separator"); try { FileOutputStream fluxFichier = new FileOutputStream(fileName); for(int i=0; i<list.getItemCount() ; i++) { String s = list.getItem(i); s += NEW_LINE ; fluxFichier.write(s.getBytes()); } fluxFichier.close(); } catch (IOException e) {} } COM: <s> save a list in a new file </s>
funcom_train/37015575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isUser(String who) { try { String[] users = listUsers(); for (int i = 0; i < users.length; i++) { if (who.equals(users[i])) { return true; } } } catch (Exception e) { e.printStackTrace(); } return false; } COM: <s> tests if the string is a user or a group </s>
funcom_train/28125758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePlugin(Plugin p) throws BackingStoreException { p.tearDown(); m_plugins.remove(p); String prefName = getPrefName(p); if (m_pluginPreferences.nodeExists(prefName)) { m_pluginPreferences.node(prefName).removeNode(); } removeRegisteredObjects(p); fireContentsChanged(); } COM: <s> removes a plugin from the manager </s>
funcom_train/33639563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static interface NodeWeighter { /** * Returns the weight for a node, with respect to two adjecent edges. * * @param n The node. * @param e1 First edge. * @param e2 Second edge. * * @return The weight associated with traversing through the node from * the first edge to the second. */ public double getWeight(Node n, Edge e1, Edge e2); } COM: <s> supplies a weight for each pair of adjacent edges </s>
funcom_train/6330605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Notation createNotation( String name, String systemID, String publicID ) { NotationProxy notation = null; try { notation = (NotationProxy)database().createObject( NotationImpl.class.getName() ); notation.init( this, name, systemID, publicID ); } catch (Exception except) { throw new DOMExceptionImpl( DOMExceptionImpl.PDOM_ERR, except.getMessage() ); } return notation; } COM: <s> creates a new notation and returns it </s>
funcom_train/49262569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Point getSearchBounds(final boolean isSelection) { if (isSelection) { Point searchBounds = textControl.getSelectionRange(); if (searchBounds.y == 0) { int line = textControl.getLineAtOffset(searchBounds.x); searchBounds.x = textControl.getOffsetAtLine(line); searchBounds.y = textControl.getLine(line).length(); } return searchBounds; } else { return new Point(0, textControl.getCharCount()); } } COM: <s> computes search bounds </s>
funcom_train/44769465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(Object paramsAndWhat) { System.out.println( paramsAndWhat); Genotype y = ( Genotype ) paramsAndWhat; Genotype z = new Genotype( "000" ); Class x; z.setFitness( 0.6) ; System.out.println(y +"=y , z="+z + " " + y.compareTo( z ) ); } COM: <s> used to send input to the task </s>
funcom_train/28170649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSlashSlashToken(String slashSlash) { if (slashSlash.length() < 1 || slashSlash.length() > 2) { throw new IllegalArgumentException("SlashSlash token must be of length 1 or 2: '"+slashSlash+"'"); } this.slashSlash = slashSlash.toCharArray(); commentChar(this.slashSlash[0]); } COM: <s> sets the slash slash token </s>
funcom_train/39879861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int setAuxEffectSendLevel(float level) { if (mState != STATE_INITIALIZED) { return ERROR_INVALID_OPERATION; } // clamp the level if (level < getMinVolume()) { level = getMinVolume(); } if (level > getMaxVolume()) { level = getMaxVolume(); } native_setAuxEffectSendLevel(level); return SUCCESS; } COM: <s> sets the send level of the audio track to the attached auxiliary effect </s>
funcom_train/9531904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPreferencesItem() { addSeparator(); JMenuItem preferences = new JMenuItem("Preferences"); preferences.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { GetInfo getInfo = new GetInfo(); // getInfo.setVisible(true); // getInfo.setEnabled(true); // getInfo.setAlwaysOnTop(true); } }); add(preferences); } COM: <s> this currently doesnt work throws null pointer commented out above </s>
funcom_train/42185166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetModel() { System.out.println("getModel"); WordPlacementList instance = new WordPlacementList(); WordPlacementListModel expResult = null; WordPlacementListModel result = instance.getModel(); 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 model method of class word placement list </s>
funcom_train/33839731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fileInit(File myFile, boolean compressed) throws FitsException { try { if (compressed) { FileInputStream str = new FileInputStream(myFile); streamInit(str, true); } else { randomInit(myFile); } } catch (IOException e) { throw new FitsException("Unable to create Input Stream from File: "+myFile); } } COM: <s> get a stream from the file and then use the stream initialization </s>
funcom_train/43748068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getPostinTextArea() { if (postinTextArea == null) { postinTextArea = new JTextArea(); postinTextArea.setBounds(new Rectangle(24, 231, 156, 204)); postinTextArea.setBackground(Color.lightGray); postinTextArea.setLineWrap(true); } return postinTextArea; } COM: <s> this method initializes postin text area </s>
funcom_train/18113461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*public int addAccount(SmtpAccount account) { if (accounts == null) accounts = new Vector(); for (int i = 0; i < accounts.size(); i++) { Account a = (Account) accounts.elementAt(i); if (a.getAccountName().equals(account.getAccountName())) { return -1; } } accounts.add(account); return (accounts.size() + 1); }*/ COM: <s> adds a feature to the account attribute of the mail user object </s>
funcom_train/22716192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFileId(String fileId) { model.removeAppModelModifyListener(this.fileId, this.appModelModifyListener); this.fileId = fileId; model.addAppModelModifyListenerToFile(this.fileId, this.appModelModifyListener); this.updateTitle(false); this.table.updateUI(); } COM: <s> sets the file id </s>
funcom_train/28694105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PasswordAuthentication getPasswordAuthentication() { JDialog dialog = getDialog(); passwordField.setText( ""); usernameField.setText( ""); hostField.setText( getRequestingHost()); realmField.setText( getRequestingPrompt()); dialog.setLocationRelativeTo( parent); dialog.setVisible( true); if ( okPressed) { return new PasswordAuthentication( usernameField.getText(), passwordField.getPassword()); } else { return null; } } COM: <s> return the password authentication object </s>
funcom_train/15694853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String comparePoints() { String name = ""; int points = -1; Iterator iter = (Players.values()).iterator(); while (iter.hasNext()) { SPlayer p = (SPlayer) iter.next(); if (p.poi >= points) { points = p.poi; name = p.name; } } this.run.output(name + " Won with " + points + " Points\n", false); return points + "/" + name; } COM: <s> gets the points name pair from all clients with the highest points </s>
funcom_train/16786156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PreparedStatement getInsertStatement() throws RQLException { if (insertStmt == null) { String sql = null; try { sql = "INSERT INTO " + name + " values(?, ?, ?, ?, ?, ?)"; insertStmt = connection.prepareStatement(sql); } catch (SQLException ex) { throw new RQLException("Error in sql " + sql, ex); } } return insertStmt; } COM: <s> returns the prepared insert statement </s>
funcom_train/1773215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddAndOperator_testIfNotSet() { DataQuery dataQuery = TestUtil.getNewDataQuery(); Filter.addAndOperator(dataQuery); assertNull(dataQuery.getFilters()); dataQuery.setFilters(null); Filter.addAndOperator(dataQuery); assertNull(dataQuery.getFilters()); } COM: <s> test no and operator is added if a filter has not bee set </s>
funcom_train/44218917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initTestViewType() { String tmn = this.getTestMethodName(); String vt = tmn.replaceFirst(DEFAULT_JUNIT_TEST_METHOD_PREFIX, ""); int idx = vt.indexOf("_"); if (idx == -1) { throw new RuntimeException("Invalid test method name: " + tmn); } this.viewType = vt.substring(idx + 1, vt.length()); } COM: <s> p initialize the current test view type </s>
funcom_train/22528708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void load() { File backingFile = getFile(); if(backingFile.exists()) { try { Document doc = JDOMXMLUtils.readXMLFile(backingFile); Element root = doc.getRootElement(); fromJDOM(root); } catch(Exception ex) { // catch all exceptions ex.printStackTrace(); addDefaultEntries(); } } else { addDefaultEntries(); } } COM: <s> load the index </s>
funcom_train/3888404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUsernamePropertyRefPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EmailDataType_usernamePropertyRef_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EmailDataType_usernamePropertyRef_feature", "_UI_EmailDataType_type"), ImsldV1p0Package.Literals.EMAIL_DATA_TYPE__USERNAME_PROPERTY_REF, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the username property ref feature </s>
funcom_train/3878510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDepth(int node) { if ( !getNodeTable().isValidRow(node) ) return -1; int depth = 0; if ( node!=m_root && getParent(node) < 0 ) return -1; for ( int i=node; i!=m_root && i>=0; ++depth, i=getParent(i) ); return depth; } COM: <s> get the depth of the given node id in the tree </s>
funcom_train/28751428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReportname(String newVal) { if ((newVal != null && this.reportname != null && (newVal.compareTo(this.reportname) == 0)) || (newVal == null && this.reportname == null && reportname_is_initialized)) { return; } this.reportname = newVal; reportname_is_modified = true; reportname_is_initialized = true; } COM: <s> setter method for reportname </s>
funcom_train/42131633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadImportedObjects() throws IOException { OsnReader<DataObject> reader = getOsnReader(new QName("imports.dir"), new ArrayDataObjectFactory()); try { if (reader.hasNext()) { importedObjects = osnReader.next(); } } finally { reader.close(); } } COM: <s> load the imported objects for the saif archive </s>
funcom_train/9361091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printShortString(PrintWriter pw) { pw.print('['); pw.print(left); pw.print(','); pw.print(top); pw.print("]["); pw.print(right); pw.print(','); pw.print(bottom); pw.print(']'); } COM: <s> print short representation to given writer </s>
funcom_train/46454642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String name = (String) myPropertiesTable.get("name"); if(name!=null) { return name; } String text = this.getClass().getName(); int index = text.lastIndexOf("."); if(index>=0) { text = text.substring(index+1); } return "Unnamed element of type "+text; } COM: <s> reports its name if it has been set </s>
funcom_train/41018175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean buyTower(int type, double x_coord, double y_coord, double size) { int cost; switch(type){ case 0: cost=Tower_Bullet.INITIAL_BUILD_COST; break; case 1: cost=Tower_Fire.INITIAL_BUILD_COST; break; default:cost=0; break; } if (CREDITS<cost) return false; else{ switch(type){ case 0: new Tower_Bullet(x_coord, y_coord); break; case 1: new Tower_Fire(x_coord, y_coord); break; default: break; } CREDITS-=cost; return true; } } COM: <s> purchases a tower at the specified location </s>
funcom_train/27761459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getPropertyValue(final Object bean) throws BeanException { NestedHelper nh = resolveNesting(bean, null, null); if (nh.isIndexed) { throw new BeanException("Nesting contains an indexed property but no indices were provided"); } Object value = nh.property.getPropertyValue(nh.bean); if (hasPropertyListeners()) { firePropertyEvent(GET, value, value, nh.bean, nh.index); } return value; } COM: <s> returns the value of the local or nested property described by this </s>
funcom_train/36191426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEx_Neg_Yes(){ Hashtable<String, Object> params = new Hashtable<String, Object>(); params.put("localPolicyDetails", "push"); params.put("remotePolicyDetails", "Agree button"); Object tmp = (Object)feedback.getExplicitFB( FeedbackGUITypes.NEGOTIATION, params); Boolean returned_feedback = (Boolean)tmp; assertTrue(returned_feedback); } COM: <s> call explicit negotiation feedback gui and press yes button </s>