__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/3762857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void storePreferences() { Rectangle bounds = PersistentJInternalFrame.this.getNormalBounds(); m_prefs.putInt(LOCATION_X, bounds.x); m_prefs.putInt(LOCATION_Y, bounds.y); m_prefs.putInt(WIDTH, bounds.width); m_prefs.putInt(HEIGHT, bounds.height); } COM: <s> store the current values persistently so that theyll be </s>
funcom_train/48495099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHistogramType( HistogramType histogramType ) { if ( histogramType == null ) { throw new IllegalArgumentException( "histogramType is null" ); } if ( histogramType != this.histogramType ) { this.histogramType = histogramType; notifyListeners( new DatasetChangeEvent( this, this ) ); } } COM: <s> sets the histogram type </s>
funcom_train/1469825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ConfigurableApplicationContext loadContextLocations(String[] locations) { if (logger.isInfoEnabled()) { logger.info("Loading additional configuration from: " + StringUtils.arrayToCommaDelimitedString(locations)); } XmlWebApplicationContext ctx = new XmlWebApplicationContext(); ctx.setConfigLocations(locations); ctx.setServletContext(new MockServletContext()); ctx.refresh(); return ctx; } COM: <s> subclasses can invoke this to get a context key for the given location </s>
funcom_train/17208914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getConnectionList() { if (connectionList == null) { connectionList = new JComboBox(new DefaultComboBoxModel(control .getConnections().toArray(new String[0]))); connectionList.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { ipAlias.setText(""); addressField.setText(""); } }); } return connectionList; } COM: <s> this method initializes j combo box </s>
funcom_train/46744159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRoleEndDt(DateTimeModel roleEndDt) { if (Converter.isDifferent(this.roleEndDt, roleEndDt)) { DateTimeModel oldroleEndDt= DateTimeModel.getNow(); oldroleEndDt.copyAllFrom(this.roleEndDt); this.roleEndDt.copyAllFrom(roleEndDt); setModified("roleEndDt"); firePropertyChange(String.valueOf(VISITPROVIDERS_ROLEENDDT), oldroleEndDt, roleEndDt); } } COM: <s> date the role ends or ended </s>
funcom_train/5165084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init() { // Set the default crossoverRate. // ------------------------------ m_crossoverRate = 6; m_crossoverRatePercent = -1; setCrossoverRateCalc(null); setAllowFullCrossOver(true); setXoverNewAge(true); } COM: <s> initializes certain parameters </s>
funcom_train/5544576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disconnect(){ try{ engineIn.close(); engineOut.close(); engineError.close(); }catch(java.io.IOException e){ System.err.print(e); System.exit(4); } engine.destroy(); inOut.close(); } COM: <s> disconnect connection to kgtp engine </s>
funcom_train/3274362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(){ String fileName = "data/saveFile.xml"; // Show user file chooser dialog final JFileChooser chooser = new JFileChooser(); chooser.setAcceptAllFileFilterUsed(true); // Get the screen shot directory int returnVal = chooser.showSaveDialog(userInterface.getMessageAnchor()); if (returnVal == JFileChooser.APPROVE_OPTION && chooser.getSelectedFile() != null) { fileName = chooser.getSelectedFile().getPath(); } engine.saveWorldState(fileName); } COM: <s> serialize the game state </s>
funcom_train/2890319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WSDDDeployment getDeployment() { assert axis != null; WSDDDeployment deployment; AxisEngine engine = axis.getAxisServer(); EngineConfiguration config = engine.getConfig(); if (config instanceof WSDDEngineConfiguration) { deployment = ((WSDDEngineConfiguration) config).getDeployment(); } else { deployment = null; } return deployment; } COM: <s> get deployment from the server </s>
funcom_train/24089754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPlanetsURI() { // Check for nulls PDURI._log.fine("isPlanetsURI()"); if ((this._host == null) | (this._scheme == null)) { return false; } PDURI._log.fine("isPlanetsURI() Checks"); // Now perform the checks and return the result return ((this._port > -1) && (this._host.length() > 0) && this._scheme.equals(PLANETS_SCHEME)); } COM: <s> checks a uri against the planets uri syntax rules </s>
funcom_train/22237192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int testCollisionByGeometry(Transform3D t) { // load currently active CMT this.getChild(0).getLocalToVworld(transTempCurrentCMT); getLocalToVworld(transTempIncomingCMT); transTempIncomingCMT.mul(t); // during one cycle, can only rotate OR translate int result = testTranslationByGeometry(t); if (result == -1 && testRotation) { result = testRotationByGeometry(t); } return result; } COM: <s> get subject bounds and transform by current cmt </s>
funcom_train/18228149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshFooter() { if (null != splity) { int tempDivLoc = 0; tempDivLoc = this.splity.getDividerLocation(); this.footerComponent = detView.getFooterComponent(); this.splity.setBottomComponent(footerComponent); this.splity.setDividerLocation(tempDivLoc); } else { this.footerComponent = detView.getFooterComponent(); this.splity.setBottomComponent(footerComponent); } } COM: <s> refreshes the footer component </s>
funcom_train/6253799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Observable o,Object arg) { currentFile = (File)arg; if (currentFile.getName().endsWith(suffix)) { //System.out.println("found file:"+currentFile.getName()); fileList.add(lcv,currentFile.getAbsolutePath()); timeList.add(lcv,new Long(currentFile.lastModified())); lcv++; } } COM: <s> called when an observer monitors a change </s>
funcom_train/1648264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FetchResult fetch(FreenetURI uri) throws FetchException { if(uri == null) throw new NullPointerException(); FetchContext context = getFetchContext(); FetchWaiter fw = new FetchWaiter(); ClientGetter get = new ClientGetter(fw, uri, context, priorityClass, this, null, null); core.clientContext.start(get); return fw.waitForCompletion(); } COM: <s> fetch a key </s>
funcom_train/3813675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dump(String name) { System.out.print(name + " :"); for (Set<WordResult> wordSet : values()) { for (WordResult wordResult : wordSet) { System.out.print(' ' + wordResult.getPronunciation().getWord().getSpelling()); } } System.out.println(); } COM: <s> dumps out the contents of this confusion set </s>
funcom_train/8076891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Instance createDiffInstance(Instance instance1, Instance instance2) { if (instance1 instanceof SparseInstance && instance2 instanceof SparseInstance) { return createDiffInstanceSparse((SparseInstance)instance1, (SparseInstance)instance2); } else if (instance1 instanceof SparseInstance) { return createDiffInstanceSparseNonSparse((SparseInstance)instance1, instance2); } else { return createDiffInstanceNonSparse(instance1, instance2); } } COM: <s> create an instance with features corresponding to internal features </s>
funcom_train/44614735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration elements() { if (this.entryQueue == null) return new LRUCacheEnumerator(null); LRUCacheEnumerator.LRUEnumeratorElement head = new LRUCacheEnumerator.LRUEnumeratorElement(this.entryQueue.value); LRUCacheEntry currentEntry = this.entryQueue.next; LRUCacheEnumerator.LRUEnumeratorElement currentElement = head; while(currentEntry != null) { currentElement.next = new LRUCacheEnumerator.LRUEnumeratorElement(currentEntry.value); currentElement = currentElement.next; currentEntry = currentEntry.next; } return new LRUCacheEnumerator(head); } COM: <s> returns an enumerator of the values in the cache with the most </s>
funcom_train/44823029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReturnTypeName(String returnTypeName) { if (returnTypeName.startsWith("[L") && returnTypeName.endsWith(";")) { this.returnTypeName = returnTypeName.substring(2, returnTypeName.length()-1) + "[]"; } else { this.returnTypeName = returnTypeName; } } COM: <s> setter for return type name property </s>
funcom_train/26391969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration enumerate() { return new Enumeration() { Linkable current = head; public boolean hasMoreElements() { return (current != null); } public Object nextElement() { if (current == null) { throw new NoSuchElementException("LinkedList"); } Object value = current; current = (Linkable) current.getNext(); return value; } }; } COM: <s> return an enumeration of the list </s>
funcom_train/7620796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getHorizontalScrollbarHeight() { ScrollabilityCache cache = mScrollCache; if (cache != null) { ScrollBarDrawable scrollBar = cache.scrollBar; if (scrollBar != null) { int size = scrollBar.getSize(false); if (size <= 0) { size = cache.scrollBarSize; } return size; } return 0; } return 0; } COM: <s> returns the height of the horizontal scrollbar </s>
funcom_train/45074937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertTraitsSeq() { // assumes that traitsVector_ has been set int l = traitsVector_.size(); TraitSpec[] t = new TraitSpec[l]; for (int i = 0; i < l; i++) { t[i] = (TraitSpec) traitsVector_.get(i); } traits_ = t; } COM: <s> insert the traits into the trait spec array </s>
funcom_train/21996599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String get(Locale locale, String key) { //TODO: I18N, support locale //if (log.isDebugEnabled()) // log.debug("get: key=[" + key + "]"); if (resources == null) return "Error: Messages not initialized"; String msg = resources.getMessage(key); //if (log.isDebugEnabled()) // log.debug("get: msg=[" + msg + "]"); return msg; } COM: <s> obtain a localized message </s>
funcom_train/18660600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetGetNode() { NodeStatistics ns = new NodeStatistics( null ); assertNull( "A null node should return null", ns.getNode() ); NodeStatistics ns1 = new NodeStatistics( rootNode ); assertEquals( "When we set a node it should be the one coming back", rootNode, ns1.getNode() ); } COM: <s> test of get node method of class node statistics </s>
funcom_train/45623722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUpdateEnabledPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GenerateDeploymentManifestType_updateEnabled_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GenerateDeploymentManifestType_updateEnabled_feature", "_UI_GenerateDeploymentManifestType_type"), MSBPackage.eINSTANCE.getGenerateDeploymentManifestType_UpdateEnabled(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the update enabled feature </s>
funcom_train/45502791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean renameRoom( Room room, String name ) { if( room.getName().equals( name ) ) return true; if( room.getAssociatedFloor() == null ) { room.setName( name ); return true; } for( Room r : room.getAssociatedFloor() ) if( r.getName().equals( name ) ) return false; room.setName( name ); return true; } COM: <s> renames a room if that is possible </s>
funcom_train/29872055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJViewTemplateRightScrollPane() { if (jViewTemplateRightScrollPane == null) { jViewTemplateRightScrollPane = new JScrollPane(); jViewTemplateRightScrollPane.setPreferredSize(new Dimension(300, 200)); jViewTemplateRightScrollPane.setViewportView(getJViewTemplateFieldsTable()); } return jViewTemplateRightScrollPane; } COM: <s> this method initializes j view template right scroll pane </s>
funcom_train/41384554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel31() { if (jPanel31 == null) { FlowLayout flowLayout31 = new FlowLayout(); flowLayout31.setVgap(10); jPanel31 = new JPanel(); jPanel31.setPreferredSize(new Dimension(120, 40)); jPanel31.setLayout(flowLayout31); jPanel31.setBackground(new Color(10, 16, 40)); jPanel31.add(getJButtonADD(), null); } return jPanel31; } COM: <s> this method initializes j panel31 </s>
funcom_train/15914067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Set instanceStringToSet( String instanceStr ) { Set instanceSet = new HashSet(); StringTokenizer st = new StringTokenizer( instanceStr, INSTANCE_DELIM ); while ( st.hasMoreTokens() ) { String instance = (String)st.nextToken(); instanceSet.add( instance ); } return instanceSet; } COM: <s> convert an instance string to set of instances </s>
funcom_train/26047685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readString() throws IOException { if (preUTF8Strings) return readModifiedUTF8String(); int length = readVInt(); final byte[] bytes = new byte[length]; readBytes(bytes, 0, length); return new String(bytes, 0, length, "UTF-8"); } COM: <s> reads a string </s>
funcom_train/50142002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resumePool(){ log.info("Threadpool resuming..."); synchronized(threads){ Iterator iter = threads.iterator(); while (iter.hasNext()) { PooledThread item = (PooledThread)iter.next(); item.resumeThread(); } } log.debug("Threadpool resumed."); } COM: <s> resumes the pool </s>
funcom_train/3114036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void repaintBounds() { //// 1. No point in repainting if no parent. if (parent == null) { return; } //// 2. Repaint the bounds. Point pt = getLocation(); Rectangle rect = getBounds(); parent.repaint(rect.x, rect.y, rect.width, rect.height); } // of method COM: <s> calls repaint on the correct bounds of the pie menu </s>
funcom_train/19909811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertProperty(PropertyNavigator nav, String expected) { Assert.assertTrue(nav.hasNext()); Assert.assertEquals(PROPERTY, nav.next()); Assert.assertEquals(PROPERTY, nav.getElementType()); Assert.assertEquals(expected, nav.getProperty()); } COM: <s> helper method to validate that property navigator has more elements in </s>
funcom_train/20129391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void realize(Session session, final Receiver r) { TypeManager tm = session.getTypeManager(); synchronized (tm) { if (t != null) { session.runOnThread(new Runnable() { public void run() { r.receive(t); } }); return; } tm.realizePromise(this, r); } } COM: <s> call this on any thread </s>
funcom_train/50373427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addBranch(ServiceProxy serviceListener) { RingBranchSceneNode b = findBranch(serviceListener); if(b==null) { synchronized(sceneNodes) { add(new RingBranchSceneNode(traits,serviceListener)); } traits.busNode.fadeSocket(serviceListener,true); return true; } return false; } COM: <s> add a service node branch to ring </s>
funcom_train/28549509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IRooEditorKit getRooEditorKit() { IRooEditorKit result = null; final EditorKit edKit = getEditorKit(); if (edKit instanceof IRooEditorKit) { result = (IRooEditorKit) edKit; } else { throw new RuntimeException("Invalid method call, " + "only call this method when you are in " + "the ROO editor Kit. Found editor Kit: " + edKit); } return result; } COM: <s> returns the roo editor kit </s>
funcom_train/44533669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getLibClasspathEntry(String projectName, String path, String sourcePath, boolean export) { if (sourcePath != null) return getClasspathEntry(KIND_LIB, PROJECT_SEPARATOR + projectName + PROJECT_SEPARATOR + path, PROJECT_SEPARATOR + projectName + PROJECT_SEPARATOR + sourcePath, export); else return getClasspathEntry(KIND_LIB, PROJECT_SEPARATOR + projectName + PROJECT_SEPARATOR + path, null, export); } COM: <s> output example classpathentry kind lib path common </s>
funcom_train/11732452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int buildHashCode() { int h = 17; h = 37 * h + principal.getName().hashCode(); for (Privilege p : privileges) { h = 37 * h + p.hashCode(); } h = 37 * h + Boolean.valueOf(allow).hashCode(); h = 37 * h + restrictions.hashCode(); return h; } COM: <s> build the hash code </s>
funcom_train/17987897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(ColumnWidth cw) { // If we weren't given one to compare to... if (null == cw) { // ...they can't be equal. return false; } // Return true if the data members are equal and false // otherwise. return (cw.getWidth() == getWidth() && cw.getUnits().equals(getUnits())); } COM: <s> returns true of a provide column width equals this one </s>
funcom_train/31292984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIdentifyInlineGrammar() { final String grammar = "<grammar type=\"application/srgs+xml\" " + "root=\"r2\" version=\"1.0\"></grammar>"; final GrammarDocument doc = getGrammarFromString(grammar); try { final GrammarType type = central.identifyGrammar(doc, GrammarType.SRGS_XML); assertEquals(GrammarType.SRGS_XML, type); } catch (UnsupportedFormatError e) { fail(e.getMessage()); } } COM: <s> tests the functionality to identify a grammar which is within </s>
funcom_train/42711501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadPopulations() throws IOException { String file = new File(dataDir, rel.population.table).getPath(); if(trimPopulationColumns && crit != null) { Set<String> cols = crit.getRefdPopCols(); populationTable = new CSVTable(file, cols); } else populationTable = new CSVTable(file); } COM: <s> load and pre process sampled population table </s>
funcom_train/43913291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected InputStream post( String path ) throws Exception { MockHttpServletRequest request = createRequest( path ); request.setMethod( "POST" ); request.setContentType( "application/x-www-form-urlencoded" ); MockHttpServletResponse response = dispatch( request ); return new ByteArrayInputStream( response.getOutputStreamContent().getBytes() ); } COM: <s> executes an ows request using the post method with key value pairs </s>
funcom_train/35838690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean purgeNode(PCSession session, String sNodeID) throws SQLException { // DBConnection dbcon = getDatabaseManager().requestConnection(session.getModelName()); // // boolean deleted = DBNode.purge(dbcon, sNodeID, session.getUserID()); // // getDatabaseManager().releaseConnection(session.getModelName(),dbcon); return true; } COM: <s> purges a node from the database and returns true if successful </s>
funcom_train/36229071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exit() { try { saveLogBook(); setLogBookSource(false, null); logBookSourceUser.close(); logBookSourceTutorial.close(); settingsSource.save(); } catch (Exception e) { } // Do not exit if running tests if (testLog == null) { System.exit(0); } } COM: <s> saves settings and logbook and stops the application </s>
funcom_train/31208289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isWritable(int column) throws SQLException { try { if(Trace.isDetailed()) Trace.trace(getId(),column); // checkColumnIndex already calls checkClosed rs.checkColumnIndex(column); return true; } catch(Throwable e) { throw convertThrowable(e); } } COM: <s> checks whether it is possible for a write on this column to succeed </s>
funcom_train/13848662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init() throws Exception { LoginContext loginContext = (LoginContext) config.getEntry( "edu.gatech.distfs.blockserver.BlockStorageServiceImpl", "loginContext", LoginContext.class, null); if (loginContext == null) { initAsSubject(); } else { loginContext.login(); Subject.doAsPrivileged(loginContext.getSubject(), new PrivilegedExceptionAction() { public Object run() throws Exception { initAsSubject(); return null; } }, null); } } COM: <s> initializes the server including exporting it and storing its proxy in </s>
funcom_train/34808851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAjaxPackage (String pHtmlIdentifier) { for (int i = 0; i < mAjaxPackageList.getLength(); i++) { if (mAjaxPackageList.item(i) == ((DOM)mAjaxPackageRefs.get(pHtmlIdentifier))) { mAjaxPackageList.removeFromList(i); mAjaxPackageRefs.remove(pHtmlIdentifier); } } } COM: <s> removes an ajax data package from the outgoing html </s>
funcom_train/1550847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateInputStringWithRowReferences() { if (!includesRowReferences) return; // inputVE will print the correct label, e.g. $4 for // the row reference boolean oldValue = kernel.isPrintLocalizedCommandNames(); kernel.setPrintLocalizedCommandNames(false); input = inputVE.toAssignmentString(); kernel.setPrintLocalizedCommandNames(oldValue); updateLocalizedInput(); } COM: <s> updates row references strings in input by setting </s>
funcom_train/28215551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTransitionsFromPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AbstractTargetState_transitionsFrom_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AbstractTargetState_transitionsFrom_feature", "_UI_AbstractTargetState_type"), StateMachinePackage.Literals.ABSTRACT_TARGET_STATE__TRANSITIONS_FROM, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the transitions from feature </s>
funcom_train/8342485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void populateCombobox(final PrintService[] services) { String currentName; for (PrintService current : services) { currentName = current.getAttribute(PrinterName.class).getValue(); // availablePrinters.addItem(currentName, new Object[] { current }); availablePrinters.addItem(new LightweightAttributes( new String[]{"printerName", "printer"}, new Object[] {currentName, current})); } } COM: <s> load the printer names and their corresponding services to combobox </s>
funcom_train/22791831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddMinute() { System.out.println("testAddMinute"); int hourse = 0; int minute = 45; Time instance = new Time("0:00"); instance.addMinute(minute); assertEquals(new Time(hourse+":"+minute), instance); } COM: <s> test of add minute method of class net </s>
funcom_train/43346606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(String field, String value) { int fieldCount = count(field); if (fieldCount == 1) { String[] newValue = new String[2]; newValue[0] = toUTF8(field); newValue[1] = toUTF8(value); comments.set(indexOf(field, 0), newValue); } else if (fieldCount == 0) { add(field, value); } } COM: <s> sets the value of a field in the header </s>
funcom_train/33598634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem2() { if (stringItem2 == null) {//GEN-END:|43-getter|0|43-preInit // write pre-init user code here stringItem2 = new StringItem("state", null);//GEN-LINE:|43-getter|1|43-postInit // write post-init user code here }//GEN-BEGIN:|43-getter|2| return stringItem2; } COM: <s> returns an initiliazed instance of string item2 component </s>
funcom_train/23300223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLine(int fault, ASTNode subtree, int faultType, String javaFile, int origLineNumber ) { String entry = ""; entry = "" + fault + separator + subtree.toString() + separator + faultType + separator + javaFile + separator + origLineNumber + separator + "line number not available"; entry = entry.replaceAll("\n", ""); protocol.append(entry + "\n"); } COM: <s> adds for each injected or old fault a line to the protocol </s>
funcom_train/45642528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String convertByteArrayToString(byte[] byteArray) { String md5Client; StringBuffer result = new StringBuffer(); for (byte element : byteArray) { result.append(String.format("%x", element)); } md5Client = result.toString().toUpperCase(); return md5Client; } COM: <s> converts an array of bytes into an hex string </s>
funcom_train/22578691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadStoreFile() throws IOException { BufferedReader br = new BufferedReader(new FileReader(storeFile)); while ( true ) { String line = br.readLine(); if ( line == null ) { break; } store.add(line); } logger.debug("" + store.size() + " records loaded from " + storeFile); } COM: <s> load the content of the store file </s>
funcom_train/36785734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void modifyNoteBySemitones (int numberOfSemitones) throws IllegalArgumentException { if (midi + numberOfSemitones < LOW_MIDI_ABSOLUTE_NUMBER || midi + numberOfSemitones > HIGH_MIDI_ABSOLUTE_NUMBER) throw new IllegalArgumentException("The offset in semitones must be between " + (LOW_MIDI_ABSOLUTE_NUMBER - midi) + " and " + (HIGH_MIDI_ABSOLUTE_NUMBER - midi) + " inclusive for this note."); midi += numberOfSemitones; } COM: <s> transposes this code note code by a specified number of number of semitones </s>
funcom_train/19059712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CloneInputStream getClone() { if (usesFile) { try { // add a new inputstream to read from streamList.add(new FileInputStream(tempFile)); } catch (FileNotFoundException e) { e.printStackTrace(); // only if tempfile was corrupted } } else { streamList.add(new ByteArrayInputStream(buffer)); } openClones++; return new CloneInputStream(this, nextId++); } COM: <s> gets a new clone of the master </s>
funcom_train/25654069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPulling() { if(state == SpriteState.ACQUIRING) { state = SpriteState.PULLING; } final int delta = 155; destination = ConcurrentSpriteCanvas.ACQUIRE_BORDER + delta + 10; if(currentLocation == 0) { setCurrentLocation(ConcurrentSpriteCanvas.ACQUIRE_BORDER + delta); } } COM: <s> draw this sprite pulling right from mutex right border </s>
funcom_train/34261238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setEntireWorkspaceSelection(boolean anEntireFlywheel) { targetField.setEnabled(!anEntireFlywheel); browseButton.setEnabled(!anEntireFlywheel); if (anEntireFlywheel) { targetField.setValue(getFileChooserStart()); targetField.setBackground(FMSWidgetController.getNonSelectedColor()); validData(); } else { targetField.setFieldView(); } } COM: <s> sets the scope </s>
funcom_train/43100313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeTargetFlow(Object handle, Object flow) { if (handle instanceof MModelElement && flow instanceof MFlow) { ((MModelElement) handle).removeTargetFlow((MFlow) flow); return; } throw new IllegalArgumentException("handle: " + handle + " or flow: " + flow); } COM: <s> add a target flow to a model element </s>
funcom_train/7375084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void discardBatch() throws FrontendException { if (currDAG == null || !isBatchOn()) { int errCode = 1083; String msg = "setBatchOn() must be called first."; throw new FrontendException(msg, errCode, PigException.INPUT); } currDAG = graphs.pop(); } COM: <s> discards a batch of pig commands </s>
funcom_train/532130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MenuItem remove (int pos) { MenuItem[] newItems = new MenuItem[(items.length-1)]; MenuItem oldItem = null; int n=0; for (int i=0;i<items.length;i++) { if (i==pos) { oldItem = items[i]; continue; } newItems[n] = items[i]; n++; } items = newItems; if (isShown()) oldItem.setShown(false); notifyChangeListeners(MenuItem.ITEM_DELETED, pos, this); return oldItem; } COM: <s> removes a menu item using its index </s>
funcom_train/26098826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnApply() { if (btnApply == null) { btnApply = new JButton(); btnApply.setText("Apply"); btnApply.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { Pattern.compile(getPattern()); } catch (Exception e1) { View.getSingleton().showWarningDialog("Invalid pattern."); return; } exitResult = JOptionPane.OK_OPTION; HistoryFilterDialog.this.dispose(); } }); } return btnApply; } COM: <s> this method initializes btn apply </s>
funcom_train/3023316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void reportAverageInstanceVariables(ProjectMetrics projectData) { // Instance Variables double top = projectData.getInstanceVariableTotal(); double bottom = projectData.getClassTotal(); System.out.println("[004] " + projectData.getInstanceVariableTotal() + " total instance variables in " + projectData.getClassTotal() + " classes."); System.out.println("[004] " + "Average: " + (top / bottom)); } COM: <s> reports on the average number of instance variables </s>
funcom_train/16908788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fill(ImageProcessor ip) { ip.setColor(Toolbar.getForegroundColor()); if (isLineSelection()) { if (isStraightLine() && roi.getStrokeWidth()>1 && !(roi instanceof Arrow)) ip.fillPolygon(roi.getPolygon()); else roi.drawPixels(ip); } else ip.fill(); // fill with foreground color } COM: <s> obsolete replaced by image processor </s>
funcom_train/32940612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getIndexInList(String aValue, List<String> aList) { if (aValue == null || aValue.trim().length() <= 0) return -1; if (aList == null || aList.isEmpty()) return -1; String aValueLC = aValue.toLowerCase(); return aList.indexOf(aValueLC); } COM: <s> makes a case insensitive search inside code a list code to see </s>
funcom_train/34281187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void swapLayerUp(int index) { if (index + 1 == layers.size()) { throw new RuntimeException( "Can't swap up when already at the top."); } MapLayer hold = layers.get(index + 1); layers.set(index + 1, getLayer(index)); layers.set(index, hold); } COM: <s> moves the layer at code index code up one in the vector </s>
funcom_train/2344789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFrame getJFrame() { if (jFrame == null) { jFrame = new JFrame(); jFrame.setSize(new Dimension(661, 295)); jFrame.setTitle("Hyper Squirrel"); jFrame.setJMenuBar(getJJMenuBar()); jFrame.setContentPane(getJContentPane()); jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } return jFrame; } COM: <s> this method initializes j frame </s>
funcom_train/25027795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void crossover() { int index = (int) (Math.random() * population[resultIndex].length + 1); for (int i = 0; i < index; i++) { population[resultIndex][i] = population[firstIndex][i]; } for (int i = index; i < population[resultIndex].length; i++) { population[resultIndex][i] = population[secondIndex][i]; } } COM: <s> crosses the population at the indexes in the select method </s>
funcom_train/31800661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getTodayTasks(String username) throws Exception { List tasks; try { /* Localize the bean */ TaskModuleHome home = EjbLocator.getTaskModuleHome(); TaskModule bean = home.create(); /* get next tasks */ tasks = bean.getTodayTasks(username); /* remove bean */ bean.remove(); } catch (Exception e) { throw new ServletException(e); } /* try */ return tasks; } /* getTodayTasks() */ COM: <s> method for getting today tasks for big module using ejb </s>
funcom_train/36602551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearAll() { redLines.clear(); greenLines.clear(); blueLines.clear(); yellowLines.clear(); spheres.clear(); boxes.clear(); for (int i = 0; i < debugRenderers.size(); i++) debugRenderers.get(i).clear(); } COM: <s> clear all debug rendering collections including custom ones </s>
funcom_train/18736046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IProgramElement findElementForSourceLine(String sourceFilePath, int lineNumber) { String canonicalSFP = AsmManager.getDefault().getCanonicalFilePath( new File(sourceFilePath)); IProgramElement node = findNodeForSourceLineHelper(root, canonicalSFP, lineNumber, -1); if (node != null) { return node; } else { return createFileStructureNode(sourceFilePath); } } COM: <s> never returns null </s>
funcom_train/12834274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initABT() { try { BluetoothStack.init(new AvetanaBTStack( hci )); //out("initABT", "(hci="+hci + ") called"); } catch (Exception e) { err("initABT", "error on stack initialization to hci=" + hci); e.printStackTrace(); } try { address = BlueZ.hciDevBTAddress(hci); } catch (BlueZException e) { e.printStackTrace(); } } COM: <s> initializes the bluetooth stack with the avetana bluetooth jsr82 implementation </s>
funcom_train/14296135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cm3Class MappingTarget() { if (myMappingTarget == null) { if (isMappedAssociation()) { if (FirstAssociationEnd().isNavigable()) { myMappingTarget = (Cm3Class) FirstAssociationEnd().Class(); } else if (SecondAssociationEnd().isNavigable()) { myMappingTarget = (Cm3Class) SecondAssociationEnd().Class(); } } } return myMappingTarget; } COM: <s> returns the target type of this mapped association </s>
funcom_train/39873691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedGroup(int groupPosition) { ExpandableListPosition elGroupPos = ExpandableListPosition .obtainGroupPosition(groupPosition); PositionMetadata pm = mConnector.getFlattenedPos(elGroupPos); elGroupPos.recycle(); final int absoluteFlatPosition = getAbsoluteFlatPosition(pm.position.flatListPos); super.setSelection(absoluteFlatPosition); pm.recycle(); } COM: <s> sets the selection to the specified group </s>
funcom_train/4139440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream getSourceContent( URL sourceURL, String basePathHint, IProject projectHint ) throws CoreException{ //first try to find it locally InputStream stream = getLocalSourceContent( sourceURL, basePathHint, projectHint ); //try to get as remote resource if( stream == null ){ stream = getRemoteSourceContent( sourceURL ); } return stream; } COM: <s> this method gets the content of the resource that maps to the url </s>
funcom_train/26574232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCyclist(Cyclist c) { cyclist = c; // if (treeTablePanel == null) { // treeTablePanel = new TreeTablePanel(cyclist); // } else { // treeTablePanel.setCyclist(cyclist); // } if (chartsPanel == null) { chartsPanel = new ChartsPanel(cyclist); } else { chartsPanel.setCyclist(cyclist); } this.repaint(); } COM: <s> display the given cyclist </s>
funcom_train/39314471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetExtension() { System.out.println("testGetExtension"); //String filename = file.getName(); String expected = null; String actual = filter.getExtension(file); assertEquals(expected,actual); System.out.println("Done testGetExtension"); } COM: <s> test of get extension method of class terp paint file filter </s>
funcom_train/34331471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintComponent(Graphics g) { c_logger.debug("+"); Graphics2D _g2d = (Graphics2D) g; _g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); _g2d.setColor(Color.BLACK); _g2d.drawLine(m_x, 0, m_x, super.getHeight()); _g2d.drawLine(0, m_y, super.getWidth(), m_y); } COM: <s> inherited method that performs actual drawing </s>
funcom_train/8628539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getSQL(Expression[] list) { StatementBuilder buff = new StatementBuilder(); for (Expression e : list) { buff.appendExceptFirst(", "); if (e != null) { buff.append(e.getSQL()); } } return buff.toString(); } COM: <s> get the sql snippet of the expression list </s>
funcom_train/17184336
/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 FlowLayout()); jContentPane.add(getDialField(), null); jContentPane.add(getDialBtn(), null); jContentPane.add(getHangupBtn(), null); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/44850384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean save(Group inGroup) throws ExternIDNotUniqueException { try { Long lGroupID = inGroup.ucNew(); setGroupID(lGroupID); showNotification(Activator.getMessages().getMessage("admin.group.new.ok"), Notification.TYPE_TRAY_NOTIFICATION); //$NON-NLS-1$ sendEvent(GroupEditTask.class); return true; } catch (BOMChangeValueException exc) { LOG.error("Error while saving the member data.", exc); //$NON-NLS-1$ } return false; } COM: <s> callback method saves the changed group data </s>
funcom_train/37831020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onUsed(RPEntity user) { if (!nextTo(user)) { user.sendPrivateText("You cannot reach that from here."); return false; } String sound = sounds[(int) (Math.random() * sounds.length)]; SoundEvent event = new SoundEvent(sound, radius, volume, SoundLayer.AMBIENT_SOUND); this.addEvent(event); this.notifyWorldAboutChanges(); return true; } COM: <s> plays a sound </s>
funcom_train/28268357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encrypt(char[] data, int offset, int end) { for (; offset < end; offset += 4) { xL = unpackInt(data, offset); xR = unpackInt(data, offset + 2); encrypt(); packInt(xR, data, offset); packInt(xL, data, offset + 2); } } COM: <s> encrypt char array in place </s>
funcom_train/14396228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setKey(boolean isKey) { Stereotype appliedStereotype = getAppliedStereotype(KeyQualifierType.STEREOTYPE_NAME); if (appliedStereotype == null && isKey) { applyStereotype(getApplicableStereotype(KeyQualifierType.STEREOTYPE_NAME)); } else if (appliedStereotype != null && !isKey) { unapplyStereotype(appliedStereotype); } } COM: <s> set wether this porperty is used as key or not </s>
funcom_train/39273741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getPreviousParameters() { Map params = new HashMap(); params.put(ConstantValues.STRING_ACTION, ConstantValues.STRING_PREVIOUS); params.put(ConstantValues.STRING_MONTH, String.valueOf(mCalendar.get(Calendar.MONTH))); params.put(ConstantValues.STRING_YEAR, String.valueOf(mCalendar.get(Calendar.YEAR))); return Collections.unmodifiableMap(params); } COM: <s> get the parameters to be used by the applications view tier to </s>
funcom_train/50066956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addArchives(String extdir) { String[] archives = new File(extdir).list(); for (int i = 0; archives != null && i < archives.length; i++) { if (archives[i].endsWith(".jar")) { String prefix = (extdir.endsWith(File.separator)) ? extdir : (extdir + File.separator); bootClassPath = bootClassPath + prefix + archives[i] + pathSep; } } } COM: <s> add all archives in extdir to boot class path </s>
funcom_train/23278966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void smallerComparisonBoard(int j, List<LaunchBoard> boards){ LaunchBoard tmp1 = boards.get(j); LaunchBoard tmp2 = boards.get(j+1); boards.remove(j); boards.remove(j); boards.add(j,tmp2); boards.add(j+1,tmp1); } COM: <s> method used for sort boards method </s>
funcom_train/41164417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(ToComment entity) { EntityManagerHelper.log("deleting ToComment instance", Level.INFO, null); try { entity = getEntityManager().getReference(ToComment.class, entity.getCommentId()); 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 to comment entity </s>
funcom_train/26335546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkItemizedResponse( char key, Object obj ) { if( obj != null ) { GameSpell spell = (GameSpell) obj; CastSpellGameAction cast = new CastSpellGameAction( this.engine, this.engine.getWorld().getPlayer(), spell ); this.engine.getWorld().getPlayer().doGameAction( cast ); } } COM: <s> itemized selection listener implementation casts the selected spell </s>
funcom_train/2886168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addTest(String classname) { String fullname = getFullClassname(classname); boolean add; //should we add this? add = singleTest == null || singleTest.length() == 0 || singleTest.equals(classname) || singleTest.equals(fullname); if (add && testClasses.get(fullname) == null) { log("adding test " + fullname); testClasses.put(fullname, fullname); } } COM: <s> add a test to the list prepending the package if </s>
funcom_train/50076485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void error(String str) { fireError(str); lockOpen.lock(); try { if (logger.isDebugEnabled()) logger.debug("clientId=" + clientId + ": " + "error=" + str); } finally { condConnect.signal(); lockOpen.unlock(); } } COM: <s> this method is called twice so far in the api </s>
funcom_train/51340647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public Tuple remove(final byte[] key, final Tuple tuple) { if (key == null) throw new IllegalArgumentException(); if(getIndexMetadata().getDeleteMarkers()) { throw new UnsupportedOperationException(); } assertNotReadOnly(); // conditional range check on the key. assert rangeCheck(key, false); btreeCounters.nremoves.incrementAndGet(); return getRootOrFinger(key).remove(key, tuple); } COM: <s> core method for deleting a value under a key </s>
funcom_train/35716655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void truncatePostfix(StringBuffer buffer, CharSequence sequence) { // find common prefix int min= Math.min(buffer.length(), sequence.length()); for (int c= 0; c < min; c++) { if (sequence.charAt(c) != buffer.charAt(c)) { buffer.delete(c, buffer.length()); return; } } // all equal up to minimum buffer.delete(min, buffer.length()); } COM: <s> truncates code buffer code to the common prefix of code buffer code </s>
funcom_train/4518080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocale(Locale locale) { _locale = locale; _df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM, _locale); _df2 = DateFormat.getDateInstance(DateFormat.SHORT, _locale); _df.setLenient(false); _df2.setLenient(false); } COM: <s> set the locale for this jaret date formatter </s>
funcom_train/51609871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ExpGrowthLogsModule (Engine engine, String[] params){ super(engine); try{ if (params.length==1){ h=Double.parseDouble(params[0]); k=RandomChoice.randInt(1,20)*0.01; } else { h=Double.parseDouble(params[0]); k=Double.parseDouble(params[1]); } } catch (IllegalArgumentException e){ System.out.println("IllegalArgumentException while processing parameters passed into ExpGrowthLogsModule"); throw e; } } COM: <s> constructor exp growth logs module initialises the question </s>
funcom_train/48561210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand6() { if (backCommand6 == null) {//GEN-END:|438-getter|0|438-preInit // write pre-init user code here backCommand6 = new Command("\u041D\u0430\u0437\u0430\u0434", Command.BACK, 0);//GEN-LINE:|438-getter|1|438-postInit // write post-init user code here }//GEN-BEGIN:|438-getter|2| return backCommand6; } COM: <s> returns an initiliazed instance of back command6 component </s>
funcom_train/20424422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void publishHostList(Queue<ChessPlayer> list){ try { WaitingRoomStatusWrapper wr = new WaitingRoomStatusWrapper(list); this.sendMessage(wr); } catch (JMSException ex) { myLog.logMessage(Level.SEVERE, "WaitingRoomPublisherBean::publishHostList error", ex); } } COM: <s> publish the list of players who are waiting to start a game </s>
funcom_train/50982821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMakeConstraints() { final TableLayoutConstraints constraints = TableLayoutConstraints.makeConstraints("5,17"); assertEquals("row", 5, constraints.getRow() ); assertEquals("column", 17, constraints.getColumn() ); } COM: <s> test make constraints with legal input </s>
funcom_train/47848050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TelephoneType loadTelephoneType(ResultSet rs) throws SQLException { TelephoneType result = new TelephoneType(); result.setIdentifier(rs.getInt(1)); result.setCode(rs.getString(2)); result.setName(rs.getString(3)); result.setPurpose(rs.getString(4)); result.setSign(rs.getString(5)); result.setSortOrder(rs.getInt(6)); result.setVersion(rs.getInt(7)); return result; } COM: <s> loads a code telephone type code instance from a sql result set </s>