__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/10587591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean modifiedSince(long date) { if (this.file.lastModified() < date) { return true; } for (int i = 0; i < dependencies.length; i++) { if (this.file.lastModified() < dependencies[i].lastModified()) { return true; } } return false; } COM: <s> determines whether this generators source files have changed </s>
funcom_train/33371260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void train() { TrainingListener trainer = new TrainingListener(1.0f); addExecutionListener(trainer); // Start training for (int i = 0; i < 5; i++) { System.out.println("Training set: " + i); trainer.startSeries(); for (int j = 0; j < inputTraining.length; j++) { trainer.setExpectedOutput(outputTraining[j]); input(inputTraining[j]); } trainer.endSeries(); } removeExecutionListener(trainer); } COM: <s> starts the network training sequence </s>
funcom_train/43036390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSkillLvl(Player p, int lvlId) { if (p == null || p.stream == null || p.disconnected[0]) { return; } p.stream.createFrame(217); p.stream.writeByteC(p.skillLvl[lvlId]); p.stream.writeDWord_v2(p.skillXP[lvlId]); p.stream.writeByteC(lvlId); } COM: <s> send players stat </s>
funcom_train/43245408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetTmpStreetAddr1() { System.out.println("setTmpStreetAddr1"); String tmpStreetAddr1 = ""; PatientDemographicsDG5Object instance = new PatientDemographicsDG5Object(); instance.setTmpStreetAddr1(tmpStreetAddr1); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set tmp street addr1 method of class org </s>
funcom_train/1958758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int execSync(String cmd, File cwd, InputStream in, OutputStream out, OutputStream err, int timeout) throws VerinecException, InterruptedException { return ProgramExec.execSync(cmd,cwd,in,out,err,timeout); } COM: <s> overwrite to call exec sync on the desired implementation </s>
funcom_train/39314298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCurveStroke() { System.out.println("testGetCurveStroke"); curveTool myCurve=new curveTool(); myCurve.setCurveStroke(3); BasicStroke bs=new BasicStroke(3); assertEquals(myCurve.getCurveStroke(), bs); } COM: <s> test of get curve stroke method of class curve tool </s>
funcom_train/49849077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTraslation() { Grid g = new Grid(ranges, nr, nc); g.setValue(0, 0, 1); assertEquals(1, g.getValue(new double[] {1.5,1.5})); g.setValue(0, 9, 1); assertEquals(1, g.getValue(new double[] {1.5,10.5})); } COM: <s> test coordinates traslation system </s>
funcom_train/25422492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HttpRequestListenerMap select(ISelector selector) { HttpRequestListenerMap map = new HttpRequestListenerMap(); for (Map.Entry<HttpRequestDefinition, HttpResponseListenerArray> e : entrySet()) { if (selector.eligible(e.getKey())) { map.put(e.getKey(), e.getValue()); } } return map; } COM: <s> selects subset of listeners by selector </s>
funcom_train/24060476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSeedMaterial ( long seed ) { byte[] seedBytes = new byte[4]; seedBytes[3] = (byte) (seed & 0x000000ff); seedBytes[2] = (byte) ((seed & 0x0000ff00) >> 8); seedBytes[1] = (byte) ((seed & 0x00ff0000) >> 16); seedBytes[0] = (byte) ((seed & 0xff000000) >> 24); addSeedMaterial( seedBytes ); } COM: <s> for real life mix a seed into the random number generator </s>
funcom_train/46125969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendContent(PortletLink link, StringBuffer sb) { sb.append("<li>" + buildContentLine(link.getTitle(), link.getUrl(), link.getDescription(), link.getTarget(), link.getLanguage()) + "</li>"); } COM: <s> add one link to the portlet </s>
funcom_train/3302224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Class getClass(Node node, String key) throws InitException { Assert.notNull(node); Assert.notNull(key); String className = getChild(node, key); if(className != null) return getClass(getChild(node, key)); else return null; } COM: <s> get a class by name from a descriptor node </s>
funcom_train/12527986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLocalPort() { if (!isBound()) { return -1; } if (impl == null) { try { IPEndPoint endPoint = (IPEndPoint)netSock.get_LocalEndPoint(); return endPoint.get_Port(); } catch (Throwable t) { return -1; // Shouldn't happen } } else return impl.getLocalPort(); } COM: <s> gets the local port of this server socket or </s>
funcom_train/43245833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBNRelationship() { System.out.println("getBNRelationship"); EmergencyContactDG5Object instance = new EmergencyContactDG5Object(); String expResult = ""; String result = instance.getBNRelationship(); 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 bnrelationship method of class org </s>
funcom_train/31102469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIdAttributeNode(int elemIndex, int attrIndex) { int chunk = attrIndex >> CHUNK_SHIFT; int index = attrIndex & CHUNK_MASK; int extra = getChunkIndex(fNodeExtra, chunk, index); extra = extra | IDATTRIBUTE; setChunkIndex(fNodeExtra, extra, chunk, index); String value = getChunkValue(fNodeValue, chunk, index); putIdentifier(value, elemIndex); } COM: <s> adds an attribute node to the specified element </s>
funcom_train/17868640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getWidth (int col_index, int width) { for (int i = 0; i < outlines_.size(); i++) { if (elementAt(i).match(col_index)) { return elementAt(i).getWidth(col_index, width); } } return width; }; COM: <s> get the width of the column </s>
funcom_train/3721007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSpecName(String specName) throws java.beans.PropertyVetoException { String oldSpecName = this.specName; vetoableChangeSupport.fireVetoableChange("specName", oldSpecName, specName); this.specName = specName; propertyChangeSupport.firePropertyChange("specName", oldSpecName, specName); } COM: <s> setter for property spec name </s>
funcom_train/36147851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public byte next_byte() { String str = readString(); if (str == null || "".equals(str)) { return 0; } char sep1 = StringUtils.nextCharacterSeparator(getBuffer().getDelimiter()); StringTokenizer stk = new StringTokenizer(str, sep1); stk.next(); String value = stk.next(); return Byte.parseByte(value); } COM: <s> gets the next byte object </s>
funcom_train/3715329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set (String name, String value) { // Check that the name is not null. if (name == null) return; // Replace a null value with an empty string. if (value == null) value = ""; // Return if the list of attributes is not defined. if (list == null) return; // Otherwise, add the attribute and value to the list. list.put(name.toLowerCase(), value); } COM: <s> sets the attribute with the specified name to the specified </s>
funcom_train/43702511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void accessFields() throws IllegalAccessException { Class cls = this.getClass(); while (cls != null && !ignoreFromWire(cls)) { Field[] flds = cls.getDeclaredFields(); for (int j = 0; j < flds.length; ++j) { Field f = flds[j]; f.setAccessible(true); Object o = f.get(this); if (o != null) o.toString(); } cls = cls.getSuperclass(); } Field[] flds = cls.getSuperclass().getDeclaredFields(); } COM: <s> accesses individual fields of composer instance to trigger component injection </s>
funcom_train/41721619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addWeightAndDistance(String metricId, double weight, double distance) { if (weightsAndDistances == null) weightsAndDistances = new HashMap<String,WeightedDistance>(); // lazy creation if (weightsAndDistances.containsKey(metricId)) throw new IllegalArgumentException("Cannot add data for same metric twice"); weightsAndDistances.put(metricId, new WeightedDistance(weight, distance)); } COM: <s> adds information about the weight and the distance for a metric </s>
funcom_train/13393535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FaceBundle readBundle(File f) throws FileNotFoundException, IOException, ClassNotFoundException { FileInputStream in = new FileInputStream(f); ObjectInputStream fo = new ObjectInputStream(in); FaceBundle bundle = (FaceBundle) fo.readObject(); fo.close(); //System.out.println("read cached bundle.."); return bundle; } COM: <s> read the cache object from file </s>
funcom_train/33851464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyFrom(Path other) { grow(other.length - 1); System.arraycopy(other.blockIdList, 0, this.blockIdList, 0, other.length); this.length = other.length; this.cachedHashCode = other.cachedHashCode; } COM: <s> make this path identical to the given one </s>
funcom_train/3986933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void firstNodeExpand () { Page firstChild = (Page) pageRoot.getFirstChild(); if(firstChild!=null) { Enumeration e = firstChild.children(); while(e.hasMoreElements()) { Page child = (Page)e.nextElement(); Object path[]={pageRoot,firstChild, child}; tree.scrollPathToVisible(new TreePath(path)); } } } COM: <s> expand the first node of the tree </s>
funcom_train/8045910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String buildQualifiedName(final String prefix, final String name) { final boolean hasPrefix = XMLUtil.hasValue(prefix); if (verifyUsage) { if (hasPrefix) XMLUtil.verifyName(prefix); XMLUtil.verifyName(name); } return hasPrefix ? (prefix + ':' + name) : name; } COM: <s> build a href http www </s>
funcom_train/50880494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void projectBackward(Projection inProjection, GISDataset inDataset) throws Exception{ if (inProjection == null) return; if (inDataset == null) return; for (int i=0; i<inDataset.size(); i++){ ShapeProjector.projectBackward(inProjection, inDataset.getShape(i)); } inDataset.resetEnvelope(); } COM: <s> project the dataset backward </s>
funcom_train/41346512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object getNthObject(Object key, int n) { if (this.getClass() != TestBaseKeyedObjectPool.class) { fail("Subclasses of TestBaseKeyedObjectPool must reimplement this method."); } throw new UnsupportedOperationException("BaseKeyedObjectPool isn't a complete implementation."); } COM: <s> return what we expect to be the n sup th sup </s>
funcom_train/23679990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchEvent(long rowId) throws SQLException { Cursor mCursor = mDb.query(true, DATABASE_TABLE, new String[] {KEY_ROWID, KEY_EVENTNAME, KEY_STARTDATE, KEY_STARTTIME, KEY_ENDDATE, KEY_ENDTIME}, KEY_ROWID + "=" + rowId, null, null, null, null, null); if (mCursor != null) { mCursor.moveToFirst(); } return mCursor; } COM: <s> return a cursor positioned at the event that matches the given row id </s>
funcom_train/20776431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectStayLastingTimeMs(int selectStayLastingTimeMs) { int old = this.selectStayLastingTimeMs; this.selectStayLastingTimeMs = selectStayLastingTimeMs; getPrefs().putInt("BluringFilter2DTracker.selectStayLastingTimeMs", selectStayLastingTimeMs); getSupport().firePropertyChange("selectStayLastingTimeMs",old,this.selectStayLastingTimeMs); } COM: <s> sets select stay lasting time ms </s>
funcom_train/121551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(Object o) { LogoLink cur = head; boolean found = false; while (cur != null && !found) { found = cur.data == o || (cur.data != null && cur.data.equals(o)); if (o instanceof String && cur.data instanceof String) { found |= ((String)o).equalsIgnoreCase((String)cur.data); } cur = cur.next; } return found; } COM: <s> returns whether the list contains the object requested </s>
funcom_train/1460739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Sequence getSequence(InputStream is) { try { if (!is.markSupported()) { is = new BufferedInputStream(is); } Sequence s = MidiSystem.getSequence(is); is.close(); return s; } catch (InvalidMidiDataException ex) { ex.printStackTrace(); return null; } catch (IOException ex) { ex.printStackTrace(); return null; } } COM: <s> loads a sequence from an input stream </s>
funcom_train/18097067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRegion( int x, int y, int width, int height ) { if (x < this.leftX) { this.leftX = x; } if (y < this.topY) { this.topY = y; } if (x + width > this.rightX) { this.rightX = x + width; } if (y + height > this.bottomY) { this.bottomY = y + height; } this.containsRegion = true; } COM: <s> adds a clipping region </s>
funcom_train/38524568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeClassList(File f) throws IOException{ DepClass dclass = null; BufferedWriter out = new BufferedWriter(new FileWriter(f)); out.write(list.size() + " classes in cache"); out.newLine(); for (Iterator it= list.iterator();it.hasNext();) { dclass=(DepClass)it.next(); String description = dclass.toString(); out.write(description); out.write("\n----------------------------------------------------------------------"); out.newLine(); } out.flush(); out.close(); } COM: <s> write all definitions of the classes known by this project </s>
funcom_train/15858965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void bindSSL() throws LDAPException { this.connect(); try { this.ldapConnection.bind(this.ldapVersion, this.ldapLoginDN, this.ldapPassword.getBytes("UTF8")); } catch (UnsupportedEncodingException u) { throw new LDAPException("UTF8 Invalid Encoding", LDAPException.LOCAL_ERROR, (String) null, u); } } COM: <s> binds via an ssl connection </s>
funcom_train/21952060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void next() throws PropertyValueVetoException { if (inEndState()) { checkStateTransition(mState, ""); finishWizard(); } else { String newState = getNextState(mState); if (newState != null) { checkStateTransition(mState, newState); mState = newState; editorPane.loadState(newState); } } } COM: <s> goes forward a state </s>
funcom_train/2800892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UiIgnore duplicate() { UiIgnore ignore = new UiIgnore(); ignore.setExpectedMessage(mExpectedMessage); ignore.setFieldPath(mFieldPath); ignore.setIgnore(mIgnore); ignore.setIgnoreContent(mIgnoreContent); ignore.setIgnoreType(mIgnoreType); return ignore; } COM: <s> creates and returns a copy of this object </s>
funcom_train/18032130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getList() { if (m_list == null) { m_list = new JList(); m_list.setModel(new InboxListModel()); m_list.setCellRenderer(new FBListCellRenderer()); m_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); m_list.addListSelectionListener(new MyListSelectionListener()); m_list.addMouseListener(new MyMouseListener()); } return m_list; } COM: <s> returns the list for the image names </s>
funcom_train/4527837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBalancer0() throws Exception { /** one-node cluster test*/ // add an empty node with half of the CAPACITY & the same rack test(new long[]{CAPACITY}, new String[]{RACK0}, CAPACITY/2, RACK0); /** two-node cluster test */ test(new long[]{CAPACITY, CAPACITY}, new String[]{RACK0, RACK1}, CAPACITY, RACK2); } COM: <s> test a cluster with even distribution </s>
funcom_train/17753526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void keyPressed(int keycode) { if (this.getGameAction(keycode) == UP) { upPressed(); } else if (this.getGameAction(keycode) == DOWN) { downPressed(); } else { // Exit on ANY other key press. Display.getDisplay(LibCheckerMIDlet.getMIDlet()).setCurrent(previousScreen); } } COM: <s> handle all key pressed events </s>
funcom_train/42777370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TiiraService createTiiraService(String beanName, BeanDefinition def) { String beanClass = def.getBeanClassName(); Class implClass = createClass(beanClass); Class interfaceClass = resolveServiceInterface(implClass); String urlName = this.resolveUrlName(interfaceClass); return new TiiraService(interfaceClass, implClass, beanName, urlName); } COM: <s> create tiira service of bean definition </s>
funcom_train/47762777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DataReaderAdapter createReaderFor(MessageType type) throws RapidEventCollectorException { RapidDataReaderAdapter retVal = type.getFactory().createDataReader(m_agent, this, type); RapidEventCollector.registerForMessagesAtDDSPipe(m_agent, type, retVal); m_typeToReaderMap.put(type, retVal); return retVal; } COM: <s> create a data reader and register with dds </s>
funcom_train/9869816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHash(String newVal) { if ((newVal != null && this.hash != null && (newVal.compareTo(this.hash) == 0)) || (newVal == null && this.hash == null && hash_is_initialized)) { return; } this.hash = newVal; hash_is_modified = true; hash_is_initialized = true; } COM: <s> setter method for hash </s>
funcom_train/45253142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void constructElements(boolean fireEvent) { Set elements = new HashSet(); for (int i = 0; i < components.length; i++) { IWorkingSet workingSet = components[i]; elements.addAll(Arrays.asList(workingSet.getElements())); } internalSetElements((IAdaptable[]) elements .toArray(new IAdaptable[elements.size()])); if (fireEvent) { fireWorkingSetChanged( IWorkingSetManager.CHANGE_WORKING_SET_CONTENT_CHANGE, null); } } COM: <s> takes the elements from all component working sets and sets them to be </s>
funcom_train/20827282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printWeightTable() { if (info.getMetrics().getCoverage() < 100) { printTableHeader("statements", "covered", "missed", "weight"); for (Info child : info.getChildInfosSortedByWeight()) { printDetailWeight(child); } printTableFooter(); } } COM: <s> prints a table with the relative weight of missing code </s>
funcom_train/41164196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoExercises1 entity) { EntityManagerHelper.log("deleting CoExercises1 instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoExercises1.class, entity.getExerciseId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co exercises1 entity </s>
funcom_train/14439126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean beforeCopyGrid(GridControl grid) { boolean ok = super.beforeCopyGrid(grid); if (!ok) return false; PricelistVO vo = (PricelistVO)frame.getGrid().getVOListTableModel().getObjectForRow(frame.getGrid().getSelectedRow()); oldCompanyCodeSys01SAL01 = vo.getCompanyCodeSys01SAL01(); oldPricelistCodeSAL01 = vo.getPricelistCodeSAL01(); return true; } COM: <s> callback method invoked on pressing copy button </s>
funcom_train/5855583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Type getArrayType(Type component) { String name = component.getName(); if (component.isArray()) { return getCreator().getType("[" + name); } if (!component.isPrimitive()) { return getCreator().getType("[L" + name + ";"); } return null; } COM: <s> return the array type for the given type null for primitive arrays </s>
funcom_train/10805541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SliceInfo setInto(OpenJPAStateManager sm) { if (sm == null) throw new NullPointerException(); Object previous = sm.setImplData(this, true); if (previous == null || previous instanceof SliceInfo) return (SliceInfo)previous; throw new InternalException(_loc.get("unknown-impl-data", previous, previous.getClass().getName(), sm.getPersistenceCapable()) .getMessage()); } COM: <s> sets this receiver as the given state managers internal instance level </s>
funcom_train/11674613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearRect(int x, int y, int width, int height){ Paint paint = gc.getPaint(); gc.setColor(gc.getBackground()); fillRect(x, y, width, height); gc.setPaint(paint); } COM: <s> clears the specified rectangle by filling it with the background </s>
funcom_train/50045286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int openEntity(final String method, int parentNodeId, String name) { String key = method + "_" + name + "_" + parentNodeId; Integer entityId = entityCache.get(key); if (entityId == null) { entityId = openRemoteEntity(method, parentNodeId, name); entityCache.put(key, entityId); } return entityId.intValue(); } COM: <s> send the server an open exception message for an hdf5 entity </s>
funcom_train/35751386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect(String host, int port) throws Exception { socket = new Socket(); socket.connect(new InetSocketAddress(host, port)); reader = new BufferedReader(new InputStreamReader(socket.getInputStream())); writer = new PrintWriter(socket.getOutputStream(), true); if (debug) System.out.println("Connected to the host"); getServerResponse(); } COM: <s> initializes a socket connection to a certain server on a certain port </s>
funcom_train/37185641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertRow(int row, Layer layer) { super.insertRow(row, layer); int rowNumber = this.getRowCount(); for (int index = row; index < rowNumber; index++) { layer = (Layer)this.dataVector.get(index); layer.put(Layer.NUMBER, new Integer(index + 1)); } this.reSort(); } COM: <s> inserts a new row and makes sure the layer number </s>
funcom_train/44708031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BigDecimal setID() throws PersistenceException { if (!isNew()) { return getID(); } BigDecimal currentID = getID(); if (currentID == null) { currentID = generateID(); set("id", currentID); } return currentID; } COM: <s> sets the value of the id property to </s>
funcom_train/43050793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void dumpMulticallStack(ArrayList<CallElement> registeredCallElements){ MessageUtils.registerErrorLog(log, "core.multicall.failure.method.invocation"); for(CallElement callElement : registeredCallElements){ logCallElement(callElement); } MessageUtils.registerErrorLog(log, "symbol.line.separator"); } COM: <s> logs the list of calls queued for remote execution </s>
funcom_train/31405950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getUsedTonnage() { //float weightLeft = getWeight() - new Float( table.getValueAt(table.getRowForTonnage((int)getWeight()), table.COL_STRUCTURE_WEIGHT_STANDARD).toString()).floatValue(); // System.err.println(weightLeft+" tons remaining"); return getTonnage() - getAvailableTonnage(); } COM: <s> tally tonnage used </s>
funcom_train/19326130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FoValue traitFloat(final FObj fobj, final FoContext context) { final org.foray.fotree.fo.prop.PdFloat property = (org.foray.fotree.fo.prop.PdFloat) getProperty( FoProperty.FLOAT); if (property != null) { return property.getValue(context, fobj); } return org.foray.fotree.fo.prop.PdFloat.getValueNoInstance(); } COM: <s> returns the float property </s>
funcom_train/23199670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JEditorPane getJEditorPane() { if (jEditorPane == null) { jEditorPane = new JEditorPane(); jEditorPane.setEditable(false); jEditorPane.setContentType("text/html"); jEditorPane.setText(I18nFactory.createI18n().getMessage( I18nResourcesEnum.appletAboutHtml.getCode())); jEditorPane.setCaretPosition(0); } return jEditorPane; } COM: <s> this method initializes j editor pane </s>
funcom_train/31095524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isNewPageSymbol(Stroke stroke, StrokeArea sa) { /** * The New Page symbol will be a circle with a radius * between 0.3 and 0.6 cm = 10-20 anoto dots. 3 mm = 10 dots * The center of the circle has to be located no more than 3 cm * from the upper right corner of the page. */ return false; } COM: <s> method is new page symbol </s>
funcom_train/15923538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Ext_c copy() { try { Ext_c copy = (Ext_c) super.clone(); if (ext != null) { copy.ext = (Ext) ext.copy(); } copy.node = null; // uninitialize return copy; } catch (CloneNotSupportedException e) { throw new InternalCompilerError("Java clone() weirdness."); } } COM: <s> copy the extension </s>
funcom_train/31680343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUp(final ISymbol symbol) throws SyntaxError { String[] rules; if ((rules = getRules()) != null) { final Parser parser = new Parser(); final EvalEngine engine = EvalEngine.get(); // if (session != null) { // parser.setFactory(ExpressionFactory.get()); // } if (Config.DEBUG) { try { setUpRules(rules, parser, engine); } catch (final Throwable th) { th.printStackTrace(); } } else { setUpRules(rules, parser, engine); } } } COM: <s> evaluate built in rules and define attributes for a function </s>
funcom_train/16651662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAuthor(Person author) { log.debug("removing author: #0", author); publicationEntity.getAuthors().remove(author); log.debug("Removing author"); log.debug("Author was updated: #0", author.isUpdated()); actionHelper.getEntityManager().flush(); facesMessages.addFromResourceBundle(Severity.INFO, "wizard.scientist.authors.statusmsg.remAuthor", author.getFirstName(), author.getLastName()); ((FindAction) Component.getInstance(findAction, ScopeType.CONVERSATION)) .find(); } COM: <s> remove person from the authors list </s>
funcom_train/29881990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JButton createHelpAboutButton() { JButton tJButton = createToolBarButton("V221HelpAbout.png", "Help Choices (License Info and About)"); tJButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) {mOpenPCLViewer.actionShowHideHelpChoicesPopup();} }); return tJButton; } COM: <s> help about toolbar button </s>
funcom_train/2288169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Set getAllGroupNames() { Set distinctGroups = new HashSet(); // add role group name distinctGroups.add(getGroupName()); if (getParentRole() != null) { // add parent roles group names distinctGroups.addAll(getParentRole().getAllGroupNames()); } return distinctGroups; } COM: <s> returns a set of all roles group names </s>
funcom_train/18743299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JProgressBar getBar() { if (this.bar == null) { this.bar = new JProgressBar(); this.bar.setSize(LABEL_WIDTH, LABEL_HEIGHT); this.bar.setIndeterminate(true); this.bar.setStringPainted(true); } return this.bar; } COM: <s> lazily creates and returns the progress bar on the dialog </s>
funcom_train/35694460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveValue(FacesContext context, UIComponent comp) { //System.out.println(getDesc(comp, "SET_SAVE")); savedValue = getValue(context, comp); haveSavedValue = true; //System.out.println(" savedValue: " + savedValue); } COM: <s> before a component does all the phases and goes through the several </s>
funcom_train/3711486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getYMin (double x1, double x2) { double result = Constant.DMAX; for (int i = 0; i < xdata.length; i++) { if (isValidDatum(ydata, i) && isValidDatum(xdata, i)) { if (xdata[i] > x1 && xdata[i] <= x2 && ydata[i] <= result) { result = ydata[i]; } } } return result; } COM: <s> gets the minimum y value within a given x range </s>
funcom_train/48895517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getexcluir() { if (excluir == null) { excluir = new JButton(); excluir.setPreferredSize(new Dimension(87, 22)); excluir.setBounds(new Rectangle(335, 465, 87, 22)); excluir.setText("Excluir"); excluir.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("Remove prontuario"); model.removeProntuario(cPront.getText()); } }); } return excluir; } COM: <s> this method initializes excluir </s>
funcom_train/28296359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getScopeID() { if (_Debug) { System.out.println(" :: SeqActivity --> BEGIN - getScopeID"); System.out.println(" ::--> " + mScopeID); System.out.println(" :: SeqActivity --> END - getScopeID"); } return mScopeID; } COM: <s> retrives the a scope id associated with this activity </s>
funcom_train/12643683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawChars(char chars[], int offset, int length, int x, int y) { pDrawChars(psd, fontMetrics.nativeFont, chars, offset, length, x + originX, y + originY); } COM: <s> draws the given character array </s>
funcom_train/11383801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testFailureLogFormat(boolean checkIP) { testFailureLogFormatHelper(checkIP, null, null); testFailureLogFormatHelper(checkIP, APPID, null); testFailureLogFormatHelper(checkIP, null, CONTAINERID); testFailureLogFormatHelper(checkIP, APPID, CONTAINERID); } COM: <s> test the audit log format for failure events with the various </s>
funcom_train/14027676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean advanceIndex() { if (_index < 0) { throw new IndexOutOfBoundsException( "The program index (" + _index + ") is not within the instruction list (length=" + _instructionList.size() + ")"); } if (_index < _instructionList.size()) { ++_index; } return (_index < _instructionList.size()); } COM: <s> advance the program index to the next instruction </s>
funcom_train/26094253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NeuronAllele newNeuronAllele(Long connectionId) { Long id = neatIdMap.findNeuronId(connectionId); if (id == null) { id = nextInnovationId(); neatIdMap.putNeuronId(connectionId, id); } NeuronGene gene = new NeuronGene(NeuronType.HIDDEN, id, hiddenActivationType); return new NeuronAllele(gene); } COM: <s> factory method to construct new neuron allele which has replaced connection </s>
funcom_train/4528808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { shouldRun = false; try { if (infoServer != null) infoServer.stop(); } catch(InterruptedException ie) { LOG.warn(StringUtils.stringifyException(ie)); } try { if (checkpointImage != null) checkpointImage.close(); } catch(IOException e) { LOG.warn(StringUtils.stringifyException(e)); } } COM: <s> shut down this instance of the datanode </s>
funcom_train/35273181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMessage() { System.out.println("getMessage"); InfoModel instance = new InfoModel(); String expResult = "welcome to mvc"; String result = instance.getMessage(); 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 message method of class info model </s>
funcom_train/44590303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Type getType() { if (this.memberType == null) { // lazy init must be thread-safe for readers synchronized (this) { if (this.memberType == null) { preLazyInit(); this.memberType = this.ast.newPrimitiveType(PrimitiveType.INT); postLazyInit(this.memberType, TYPE_PROPERTY); } } } return this.memberType; } COM: <s> returns the type of the annotation type member declared in this </s>
funcom_train/40222284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int numCoveredCards () { Column col = (Column) getModelElement(); // count - 1 cards are under. But offset by which was drawn first. int fd = firstDrawn(); if (fd < 0) throw new IllegalArgumentException ("RowView::numCoveredCards() received invalid value for firstDrawn. Must be between 0 and " + (int) (col.count() - 1)); return col.count() - 1 - fd; } COM: <s> returns the number of cards currently covered in the output view </s>
funcom_train/17403238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTextField getNome() { if (nome == null) { nome = new JTextField(); // TODO melhorar isso try { nome.setText(Constantes.REMOTE_PLAYER + Util.getRegistry("127.0.0.1").list().length); } catch (AccessException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } } return nome; } COM: <s> this method initializes nome </s>
funcom_train/11324374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCharset(IProject project) { IStructuredModel model = ClickUtils.getClickXMLModel(project); String charset = null; try { NodeList list = (((IDOMModel)model).getDocument()).getElementsByTagName(ClickPlugin.TAG_CLICK_APP); if(list.getLength()==1){ Element format = (Element)list.item(0); charset = format.getAttribute(ClickPlugin.ATTR_CHARSET); } } catch(Exception ex){ } finally { if(model!=null){ model.releaseFromRead(); } } return charset; } COM: <s> returns the charset which is defined in tt click </s>
funcom_train/29606703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void undo() { if (undoSnapshot != null) { try { redoSnapshot = (XebeceDocument) document.clone(); document.setDocument(undoSnapshot); undoSnapshot = null; } catch (CloneNotSupportedException ex) { log.log(Level.SEVERE, "Cloning of XebeceDocument not supported", ex); } } notifyUndoStateChanged(); } COM: <s> performs an undo </s>
funcom_train/43235501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int new_mnode(Eojeol eojeol, String wp_tag, double prob) { mn[mn_end].eojeol = eojeol; mn[mn_end].wp_tag = wp_tag; mn[mn_end].prob_wt = prob; mn[mn_end].backptr = 0; mn[mn_end].sibling = 0; return mn_end++; } COM: <s> adds a new node for the markov model </s>
funcom_train/25766651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveModel(File modelFile) throws IOException { if (this.crf == null) { throw new IllegalStateException("Model not trained. Nothing to save"); } if (!modelFile.getParentFile().exists()) { // create non-existent parent directories modelFile.getParentFile().mkdirs(); } ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(modelFile)); oos.writeObject(this.crf); oos.close(); } COM: <s> save a trained model to a file specified by model file </s>
funcom_train/4505891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPatterns(String patterns) { if (patterns != null) { this.patterns = patterns; String[] data = patterns.split(","); compiledPatterns.clear(); for (int i = 0; i < data.length; i++) { compiledPatterns.add(Pattern.compile(data[i])); } } else { clearPatterns(); } } COM: <s> set the patterns to use for searching content </s>
funcom_train/28365782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPoint(double[] x, double[] y) { synchronized (lockUpObj) { xyPointV.removeAllElements(); for (int i = 0; i < x.length; i++) { xyPointV.add(new XYpoint(x[i], y[i], 0.0)); } Collections.sort(xyPointV, new CompareX()); this.calculateRepresentation(); this.updateData(); } this.updateContainer(); } COM: <s> add an array of x y points to the data set </s>
funcom_train/31956044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rewrite() throws FitsException, IOException { ArrayDataOutput dos = (ArrayDataOutput) input; if (rewriteable()) { FitsUtil.reposition(dos, fileOffset); write(dos); dos.flush(); } else { throw new FitsException("Invalid attempt to rewrite Header."); } } COM: <s> rewrite the header </s>
funcom_train/35310282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateView() { Component validateRoot = SwingUtilities.getValidateRoot(this, false); if (validateRoot == null) { return; } // Validate the root. validateRoot.validate(); // And let the RepaintManager it does not have to validate from // validateRoot anymore. RepaintManager rm = RepaintManager.currentManager(this); if (rm != null) { rm.removeInvalidComponent((JComponent)validateRoot); } } COM: <s> ascends the code viewport code s parents stopping when </s>
funcom_train/22112658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer getIdFromTrigger(Integer tid) { RegisteredTrigger trigger = getTriggerDAO().get(tid); if (trigger == null) { return null; } AlertDefinition def = trigger.getAlertDefinition(); if (def != null && def.isEnabled() && !def.isDeleted()) { return def.getId(); } else { return null; } } COM: <s> decide if a trigger should fire the alert </s>
funcom_train/10563947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Representation lookupMetadata(Yard entityhubYard, String entityId, boolean init) throws YardException { Representation metadata; //TODO: check the asumption that the Metadata always use the // extension ".meta" String metaID = entityId+".meta"; metadata = entityhubYard.getRepresentation(metaID); if(metadata == null){ metadata = entityhubYard.create(metaID); } return metadata; } COM: <s> lookups or initialises the metadata for the entity with the parsed id </s>
funcom_train/28629344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void decorate(Document[] contextDocuments) { for (int i = 0; i < contextDocuments.length; i++) for (Iterator iter = contextDocuments[i].getDescendants(elementFilter); iter.hasNext();) { Element element = (Element) iter.next(); decorateElement(element); } } COM: <s> permits decoration of the document by iterating all the filtered </s>
funcom_train/16462153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void goToDir(Object tfFilename, Object list, Object dialog) { File file = new File(getString(tfFilename, Thinlet.TEXT)); if (!file.exists()) { alert(InternationalisationUtils.getI18NString(FrontlineSMSConstants.MESSAGE_DIRECTORY_NOT_FOUND)); } else { addFilesToList(file, list, dialog); } setText(tfFilename, ""); } COM: <s> enters the selected directory and show its files in the list </s>
funcom_train/34531610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetPlayerNames() { int curPlayer = boardDisplay.getGame().getCurrentPlayerIndex(); // Should be 0... for (int i = 0; i < MAX_NB_PLAYERS; i++) { if (i == curPlayer) playerNames[i].setText(">> " + activePlayers[i].getName()); else playerNames[i].setText(activePlayers[i].getName()); } } COM: <s> resets the player names in the informational pannel adding in front </s>
funcom_train/43630937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(String url, String user, String password) throws Exception { try { DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); // String url = "jdbc:oracle:thin:login/heslo@adela.dcse.fee.vutbr.cz:1521:stud" ; conn = DriverManager.getConnection( url, user, password ); } catch (Exception e) { throw new Exception(); } } COM: <s> initialize the connection to the db </s>
funcom_train/49789266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAbsolutePathRoot() { if (absolutePathRoot == null) { try { absolutePathRoot = FileLocator.resolve(Platform.getBundle("org.openiaml.model.tests").getEntry("/")).getPath(); } catch (IOException e) { throw new RuntimeException(e.getMessage(), e); } } return absolutePathRoot; } COM: <s> get the absolute path root of the testing plugin in the </s>
funcom_train/4196891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getDefaultDirectory() { if (_defaultDirectory == null) { try { File tempFile = File.createTempFile("filesystemview", "restricted"); //$NON-NLS-1$ //$NON-NLS-2$ tempFile.deleteOnExit(); _defaultDirectory = tempFile.getParentFile(); } catch (IOException e) { e.printStackTrace(); } } return _defaultDirectory; } COM: <s> return the users default starting directory for the file chooser </s>
funcom_train/13261172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isBlocked(JobClass jobClass) { int id = jobClass.getId(); if (globalConstraintDefined) { if ((actualOccupation + classWeights[id]) > maxCapacity) { //globally blocked return true; } } if (classConstraintDefined[jobClass.getId()]) { if ((actualOccupationPerClass[id] + classWeights[id]) > maxCapacityPerClass[id]) { //class blocked return true; } } return false; } COM: <s> tells whether the region is blocked for this class or </s>
funcom_train/33353152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DSScriptBuilder astroRealTime(AstroObj ao, String brightness, DSDelayRateTime drt) { body.append(String.format("\tAstro RealTime \"%s\" %s %s\n", ao.toString(), brightness, drt)); return this; } COM: <s> astro real time br br </s>
funcom_train/3313188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disconnectFromServer() throws IOException{ //System.out.println(client.readLine()); if(netSocket != null){ if(!netSocket.isClosed()&&server != null){ server.println("quit"); System.out.println(client.readLine());//DEBUG } netSocket.shutdownInput(); netSocket.shutdownOutput(); netSocket.close(); } if(server != null){ server.flush(); server.close(); } if(client != null) client.close(); } COM: <s> describe code disconnect from server code method here </s>
funcom_train/9701008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IFile generate() { String outputPath = getAbsoluteOutputLoacation(); wsdl2java.calculateOption(outputPath.substring(outputPath.lastIndexOf(File.separator))); wsdl2java.generate(); wsdl2java.cleanup(); IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IResource resource = root.findMember(new Path(model.getStoreLocation())); IContainer container = (IContainer) resource; IPath path = new Path(model.getFileName()); IFile file = container.getFile(path); return file; } COM: <s> generate the file reference and delegate the creation of the file to </s>
funcom_train/17819470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection values() { if (values==null) { values = new AbstractCollection() { public Iterator iterator() { return getHashIterator(VALUES); } public int size() { return count; } public boolean contains(Object o) { return containsValue(o); } public void clear() { HackedCacheHashMap.this.clear(); } }; } return values; } COM: <s> returns a collection view of the values contained in this map </s>
funcom_train/46092844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getMSubmissionPanel() { if (mSubmissionPanel == null) { FlowLayout flowLayout1 = new FlowLayout(); flowLayout1.setAlignment(FlowLayout.LEFT); flowLayout1.setVgap(2); flowLayout1.setHgap(2); mSubmissionNumberLabel = new JLabel(); mSubmissionNumberLabel.setText("Submission number"); mSubmissionPanel = new JPanel(); mSubmissionPanel.setLayout(flowLayout1); mSubmissionPanel.add(mSubmissionNumberLabel, null); mSubmissionPanel.add(getMSubmissionSpinner(), null); } return mSubmissionPanel; } COM: <s> this method initializes m submission panel </s>
funcom_train/43590776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel6() { if (jPanel6 == null) { jPanel6 = new JPanel(); jPanel6.setName("jPanel6"); jPanel6.setPreferredSize(new Dimension(150, 26)); jPanel6.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); jPanel6.setLayout(new BoxLayout(getJPanel6(), BoxLayout.X_AXIS)); jPanel6.add(getScrobbleTimeField(), null); jPanel6.add(getScrobbleDateField(), null); } return jPanel6; } COM: <s> this method initializes j panel6 </s>
funcom_train/22287362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void remove(Widget w, int i) { if (getPlayerPanel() != null) { if (w.isShowing()) { w.stopAll(); } w.destroyAll(); } w.parent = null; System.arraycopy(widgets, i+1, widgets, i, --nwidgets - i); if (nwidgets == 0) { widgets = null; } else { widgets[nwidgets] = null; } } COM: <s> remove the widget assuming that the given index </s>