__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/25365650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsFinalPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Dialog_isFinal_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Dialog_isFinal_feature", "_UI_Dialog_type"), LeveleditorPackage.Literals.DIALOG__IS_FINAL, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is final feature </s>
funcom_train/4104104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnableObjectPooling( boolean enabled ) { // propagate this request to all factories CrossReferenceFactory.getInstance().setCacheEnabled( enabled ); InteractionTypeFactory.getInstance().setCacheEnabled( enabled ); InteractionDetectionMethodFactory.getInstance().setCacheEnabled( enabled ); OrganismFactory.getInstance().setCacheEnabled( enabled ); } COM: <s> if true will make sure redundant objects are pooled to save memory </s>
funcom_train/6347332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDoubleCopy() { double[] x = new double[]{'\0', 'c', '\uFFFF'}; DoubleArrayRecord r = RecordFactoryCreator. createDoubleArrayRecordFactory(). createRecord(x); double[] y = r.getDoubleArray(); double[] z = r.getDoubleArray(); assertNotSame(y, z); } COM: <s> asserts that the double wrapper makes a copy when returning </s>
funcom_train/29759885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canImport(TransferSupport support) { if (!support.isDrop()) { return false; } // fetch the drop location JList.DropLocation dl = (JList.DropLocation) support.getDropLocation(); int index = dl.getIndex(); // we do not support invalid columns or the first column (All Contacts) if (index == -1 || index == 0) { return false; } return support.isDataFlavorSupported(DataFlavor.stringFlavor); } COM: <s> only allow a drop on a group column </s>
funcom_train/32156577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTimeCounters(Instantiation view) { if (view == null || view.isEmpty()) return 1; Iterator<VarAssignment> it = view.iterator(); while (it.hasNext()) { VarAssignment vView = it.next(); VarAssignment v = this.getVarAssignment(vView.getVarIdentifier()); if (v != null) { int comp = v.compareTimeCounter(vView); if (comp > 0) return 1; if (comp < 0) return -1; } } return 0; } COM: <s> compare the time counters of this instantiation with those of the given instantiation </s>
funcom_train/21465093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionSynchronizeBlogroll() { /** Get root subcription element */ Category blogrollRootCategory = rssOwlFavoritesTree.getSelectedCat(rssOwlFavoritesTree.getTreePath(true)); while (blogrollRootCategory != null && blogrollRootCategory.getParent().isBlogroll()) blogrollRootCategory = blogrollRootCategory.getParent(); /** Synchronize */ actionSynchronizeBlogroll(blogrollRootCategory); } COM: <s> synchronize the selected blogroll </s>
funcom_train/30038697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void issue(Alarm alarm) { if (alarm == null) { logger.error("Alarm to issue was null, aborting!"); } else { try { AlarmEvent ev = new AlarmEvent(owner, alarm, AlarmEvent.ISSUE); dispatcher.fireEssEvent(ev); } catch (Exception e) { logger.error("Error dispatching alarm issue event", e); } } } COM: <s> allows an alarm to be posted to the notification mechanism unrestrained </s>
funcom_train/3919984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractPropertyRef createPropertyRef(LD_DataComponent dc) { AbstractPropertyRef propertyRef = null; if(dc instanceof LD_Property) { propertyRef = new LD_PropertyRef((LD_Property)dc); } else if(dc instanceof LD_PropertyGroup) { propertyRef = new LD_PropertyGroupRef((LD_PropertyGroup)dc); } return propertyRef; } COM: <s> create an property ref from a component </s>
funcom_train/1339823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BufferedImage resetImage() { BufferedImage image = atlas.getImage(ul, right, down, 0, 0, direction.getWidth(), direction.getHeight(), true, 1, null, null, Interpolation.NEAREST_NEIGHBOR); this.atlasImg = image; return image; } COM: <s> reset the atlas image </s>
funcom_train/36920842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPair(IServerPeer peer, File file){ List<File> cMap = contentMap.get(peer); if (cMap == null){ cMap = new LinkedList<File>(); } List<IServerPeer> pMap = peerMap.get(file); if (pMap == null){ pMap = new LinkedList<IServerPeer>(); } if (!pMap.contains(peer)) pMap.add(peer); if (!cMap.contains(file)) cMap.add(file); peerMap.put(file, pMap); contentMap.put(peer, cMap); } COM: <s> adds a pair to the adt </s>
funcom_train/32986192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getEmailOfAsssignedReviewer() throws Exception { if (getReviewAssignments().size() > 0) { return (NmrshiftdbUserPeer.retrieveByPK(((DBUserDBSpectrum) getReviewAssignments().get(getReviewAssignments().size() - 1)).getUserId()).getEmail()); } else { return ("No assignment"); } } COM: <s> gets the email of the last reviewer the dbspectrum object was assigned to </s>
funcom_train/25484753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeRole(final Role role) throws RoleException { if (!fRoles.contains(role)) { throw new RoleException("Role doesn't exist..."); } EntityRep entity = role.getEntity(); entity.removeConnectedRelationship(this); /* inform weak entity if necessary */ if (isWeak()) fWeakEntity.removeDependency(this); fRoles.remove(role); } COM: <s> removes a role from this relationship </s>
funcom_train/9877084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void selectNode(int x, int y) { deselect(this.selected); HCLCluster cluster = new HCLCluster(findNode(x, y), Integer.MAX_VALUE, Integer.MIN_VALUE); selectNode(cluster, cluster.root); fireEvent(cluster); repaint(); } COM: <s> selects node by specified x and y coordinaties </s>
funcom_train/2628494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAvailableWindowList() { System.out.println("getAvailableWindowList"); GUITypeWrapper instance = null; Set expResult = null; Set result = instance.getAvailableWindowList(); 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 available window list method of class guitype wrapper </s>
funcom_train/10353583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String get() { String s = ""; if (byteValue == null) return ""; try { s = new String(byteValue, DBF.encodedType); } catch (UnsupportedEncodingException UEE) { s = new String(byteValue); } int k; if (byteValue.length < 2) return s; for (k = byteValue.length; k > -1 && byteValue[k - 1] == 0; k--) ; return s.substring(0, k); } COM: <s> return the contents of the memo field variant of the field </s>
funcom_train/10518853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String read(String filename) { String content = null; try { File file = FILE_UTILS.resolveFile(getProject().getBaseDir(), filename); java.io.FileReader rdr = new java.io.FileReader(file); content = FileUtils.readFully(rdr); rdr.close(); rdr = null; } catch (Exception e) { e.printStackTrace(); } return content; } COM: <s> wrapper for file utils </s>
funcom_train/12177954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flushAllPipelineCaches() { // flush named caches CacheProcessConfiguration cache = retrievePipelineCacheProcessConfiguration(); cache.flushAllCaches(); // flush URLContentCache URLContentCacheConfiguration contentCacheConfig = retrieveURLContentCacheConfiguration(); Cache contentCache = contentCacheConfig.getCache(); if (contentCache != null) { contentCache.getRootGroup().flush(null); } } COM: <s> a method to flush all the pipeline caches </s>
funcom_train/29038377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Text createTextControl(Composite parent) { if (textField == null) { textField = new Text(parent, SWT.SINGLE | SWT.BORDER); textField.setFont(parent.getFont()); textField.addKeyListener(new KeyAdapter() { @Override public void keyReleased(KeyEvent event) { valueChanged(); } }); textField.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent event) { textField = null; } }); } return textField; } COM: <s> creates this field editors text control </s>
funcom_train/28878199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeAllActionListenerOfProperty(String _p) { if (_p == null) return false; if (ac_.containsKey(_p)) { Vector _prop = (Vector) ac_.get(_p); if ((_prop != null) && (_prop.size() > 0)) { _prop.removeAllElements(); ac_.remove(_p); } else return false; } else return false; return true; } COM: <s> unregisters all the registered listeners for the specified action </s>
funcom_train/18808877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyListeners(final DatasetChangeEvent event) { final Object[] listeners = this.listenerList.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == DatasetChangeListener.class) { ((DatasetChangeListener) listeners[i + 1]).datasetChanged(event); } } } COM: <s> notifies all registered listeners that the dataset has changed </s>
funcom_train/20875048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearBest() { getModel().clearBest(); iBestInfo = null; iBestTime = -1; iBestIteration = -1; iBestComplete = false; iBestValue = 0; iBestPerturbationsPenaly = -1.0; for (SolutionListener<V, T> listener : iSolutionListeners) listener.bestCleared(this); } COM: <s> clear the best ever found solution </s>
funcom_train/13188400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { int result = super.hashCode(); result = 29 * result + (this.data != null ? this.data.hashCode() : 0); result = 29 * result + this.maximumItemCount; result = 29 * result + (this.autoSort ? 1 : 0); result = 29 * result + (this.allowDuplicateXValues ? 1 : 0); return result; } COM: <s> returns a hash code </s>
funcom_train/13957211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lockRelationship(ERXKey... keys) { for (ERXKey key : keys) { String keyPath = key.key(); int dotIndex = keyPath.indexOf('.'); if (dotIndex == -1) { _lockedRelationships.addObject(key); //_includes.removeObjectForKey(key); } else { ERXKeyFilter subFilter = include(new ERXKey(keyPath.substring(0, dotIndex))); subFilter.lockRelationship(new ERXKey(keyPath.substring(dotIndex + 1))); } } } COM: <s> locks the given relationship on this filter </s>
funcom_train/9743506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent event) { if (HelpAvailable) { try { URI uri; if (helpURL.contains("http")) { uri = new URI(helpURL); desktop.browse(uri); } else { File file = new File(helpURL); uri = file.toURI().normalize(); desktop.browse(uri); } } catch (Exception ex) { JUtility.errorBeep(); JOptionPane .showMessageDialog(Common.mainForm, ex.getMessage(), "Error", JOptionPane.ERROR_MESSAGE); } } } COM: <s> method action performed </s>
funcom_train/7980716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int length() { int r = mainPart.length(); // Return value. if (null != uniquePart) { r += uniquePart.length(); } if (null != query) { r += query.length(); } if (null != suffix) { r += 1 + suffix.length(); // 1 for the '.' } return r; } COM: <s> gets the length of the simple file name that would be </s>
funcom_train/16082423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int size() { int contactsSize = contacts.size(); int size = 0; Status status = null; for (int i = 0; i < contactsSize; i++) { status = ((Contact)contacts.get(i)).getStatus(); if (status != null && status.getCode() == Status.OFFLINE) { size++; } } return size; } COM: <s> returns the number of contacts in this group that are </s>
funcom_train/39770506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public CommandContext getContextForComponent(Component comp) { debug("getting context for " + comp); if (comp instanceof CommandContext) { debug("comp is already context"); return (CommandContext)comp; } synchronized (comp.getTreeLock()) { Container container = comp.getParent(); debug("testing if " + container + "is context"); while (container != null) { if (container instanceof CommandContext) { return (CommandContext)container; } container = container.getParent(); } } return null; } COM: <s> this function gets a comand context from a component </s>
funcom_train/2994821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateGraphIfShowing(boolean b) { if (plotFrame != null && plotPanels.size() > 0) { showGraph(true,b); int i = 0; if (plotPanels.size() > 1) i = tabbedPane.getSelectedIndex(); ((PlotPanel)plotPanels.get(i)).update(); } else showGraph(false,b); } COM: <s> update the graph if the graph is actually showing </s>
funcom_train/16913213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(int index, double[] point) { double[] old = list.get(index); Leaf leaf = all.get(old); int leafIndex = leaf.points.indexOf(old); leaf.points.set(leafIndex, point); all.put(point, leaf); all.remove(old); list.set(index, point); } COM: <s> replaces the point at the given index with the one provided </s>
funcom_train/32613785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getComparableValueType() { if (m_sDataType != null && m_sDataType.length() > 0) { return m_sDataType; } else { // return XSD.STRING; return "http://www.w3.org/2001/XMLSchema#" + "string"; } } COM: <s> returns a string identifying this nodes comparable value type </s>
funcom_train/21244192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IJBJFPlugin getRuntimePlugin ( String keyId ) { IJBJFPlugin ljbjfPlugin = null; if ( getDefinition().getBatchPlugins().getPlugins().containsKey(keyId) ) { ljbjfPlugin = getDefinition().getBatchPlugins().getPlugin(keyId); } return ljbjfPlugin; } COM: <s> simple facade method that returns an code ijbjfplugin code </s>
funcom_train/26094762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCloneAllele() throws Exception { Long id = new Long( 50 ); Long srcId = new Long( 100 ); Long destId = new Long( 200 ); double weight = 0.5d; ConnectionAllele orig = new TestConnectionAllele( id, srcId, destId ); orig.setWeight( weight ); ConnectionAllele copy = (ConnectionAllele) orig.cloneAllele(); assertConnectionAlleleEquals( copy, id, srcId, destId, weight ); assertEquals( "should be equal", orig, copy ); } COM: <s> test code clone gene code method </s>
funcom_train/1152325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getItemCommand27() { if (itemCommand27 == null) {//GEN-END:|438-getter|0|438-preInit // write pre-init user code here itemCommand27 = new Command("Atras", Command.ITEM, 0);//GEN-LINE:|438-getter|1|438-postInit // write post-init user code here }//GEN-BEGIN:|438-getter|2| return itemCommand27; } COM: <s> returns an initiliazed instance of item command27 component </s>
funcom_train/40419366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPlinkTemplate() { String tmp = null; tmp = (String)this.get(PLINK_TEMPLATE_KEY); if (tmp != null && !"".equals(tmp)) { return tmp; } log.warn("No plinktemplate set. Using default template '$url'."); return "$url"; } COM: <s> gets the applications plink template </s>
funcom_train/41979326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int generateDimension (ArrayList <String> list) { int sum = 0; for (String s : list) sum += s.length (); sum = (int) (Math.ceil (Math.sqrt (sum) * 5 / 4)); if (sum < list.get (0).length ()) sum = list.get (0).length (); return (++sum); } COM: <s> generates the dimension to be used in the word search matrix </s>
funcom_train/24082678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addObjectProperty(OWLObjectProperty objProp) { if (objProp == null) { throw new IllegalArgumentException("Null argument."); } boolean ret = false; if (!this.objectPropertyInvMap.containsKey(objProp)) { Integer id = this.entityManager.createNamedEntity( IntegerEntityType.OBJECT_PROPERTY, objProp.toStringID(), false); this.objectPropertyMap.put(id, objProp); this.objectPropertyInvMap.put(objProp, id); ret = true; } return ret; } COM: <s> adds an object property to the repository </s>
funcom_train/24938504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(ForgePattern on_reset, ForgePattern on_clock) { reset_block.add(on_reset); clock_block.add(on_clock); consumed_nets.addAll(on_reset.getConsumedNets()); consumed_nets.addAll(on_clock.getConsumedNets()); produced_nets.addAll(on_reset.getProducedNets()); produced_nets.addAll(on_clock.getProducedNets()); } // add() COM: <s> add sync code </s>
funcom_train/1907376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Instance createInstance(String question, String parseTree){ String[] tokens = question.split("\\s+"); List<Term> terms = new ArrayList<Term>(); for (String token : tokens) { terms.add(new Term(0,0,token)); } return createInstance(terms,parseTree); } COM: <s> convenience method that tokenizes the given question by whitespace creates </s>
funcom_train/33704993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String status() { return String.format( "1min: %,d, 5min: %,d, 15min: %,d" , getTracker1().getLast().getCompleted() , getTracker5().getLast().getCompleted() , getTracker15().getLast().getCompleted() ) ; } COM: <s> get a quick brief status of the number of completed items </s>
funcom_train/27673890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ErrorFatal(Exception e) { super.ErrorMsg("Exception: " + e); NSAlertPanel.runAlert("An uncaught exception occured!", "This is a bad thing and probably means that a " + "programmer has done something bad.\n The exception is:\n" + e, "Dismiss", "Quit", null); System.exit(1); } COM: <s> formats and prints e to stderr and an alert dialogue </s>
funcom_train/4662280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJPLayButton() { if (jPLayButton == null) { jPLayButton = new JButton(); jPLayButton.setBounds(new Rectangle(103, 574, 183, 61)); jPLayButton.setText("PLAY"); jPLayButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { play(); } }); } return jPLayButton; } COM: <s> this method initializes j play button </s>
funcom_train/3328378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValues(short[] values) { if (values.length != 4) throw new IllegalArgumentException("Date#setValues: not the right number of values"); this.setCentury(values[0]); this.setYear(values[1]); this.setMonth(values[2]); this.setDay(values[3]); } COM: <s> sets all the fields by reading the values in an array </s>
funcom_train/25291460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getReflectionDelay() { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_REFLECTION_DELAY_READ)) throw new CapabilityNotSetException(Ding3dI18N.getString("AuralAttributes23")); return ((AuralAttributesRetained)this.retained).getReflectionDelay(); } COM: <s> retrieve reflection delay time </s>
funcom_train/3118424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stopListeningToDestView() { if (destView != null) { destView.removePropertyChangeListener(endpointViewHandler); final InteractionElement dest = destView.getModel(); if (dest instanceof Control) { ((Control)dest).removeControlListener(controlHandler); } if (destPageView != null) { destPageView.removePropertyChangeListener(endpointViewHandler); } } } COM: <s> stops listening to the view of the destination of this arrow </s>
funcom_train/16794955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawPixels(ImageProcessor ip) { Polygon p = getPolygon(); if (p.npoints>0) { int saveWidth = ip.getLineWidth(); if (getStrokeWidth()>1f) ip.setLineWidth((int)Math.round(getStrokeWidth())); ip.drawPolygon(p); ip.setLineWidth(saveWidth); } if (Line.getWidth()>1 || getStrokeWidth()>1) updateFullWindow = true; } COM: <s> draws an outline of this oval roi on the image </s>
funcom_train/11656085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateMenuElement(MenuElement menu) { Component component = menu.getComponent(); if (component.getName() != null) { ((JMenuItem) component).setText(JMeterUtils.getResString(component.getName())); } MenuElement[] subelements = menu.getSubElements(); for (int i = 0; i < subelements.length; i++) { updateMenuElement(subelements[i]); } } COM: <s> refreshes all texts in the menu and all submenus to a new locale </s>
funcom_train/10499816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ArchiveScanner newArchiveScanner() { return new CommonsCompressArchiveScanner(new DumpStreamFactory(), new CommonsCompressArchiveScanner.ResourceBuilder() { public Resource buildResource(Resource archive, String encoding, ArchiveEntry entry) { return new DumpResource(archive, (DumpArchiveEntry) entry); } }, skipUnreadable, getProject()); } COM: <s> create a new scanner </s>
funcom_train/12179927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createDisplayArea() { displayArea = new Composite(this, SWT.NONE); displayAreaLayout = new StackLayout(); displayArea.setLayout(displayAreaLayout); displayArea.setBackground(getDisplay(). getSystemColor(SWT.COLOR_LIST_BACKGROUND)); createMessagePage(displayArea); displayAreaLayout.topControl = messagePage; displayArea.layout(); } COM: <s> create the display area composite </s>
funcom_train/12189325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateAndGetCache() throws Exception { CacheProcessConfiguration cacheProcessConfiguration = new CacheProcessConfiguration(); cacheProcessConfiguration.createCache("myCache", "12345", "0"); Cache cache = cacheProcessConfiguration.getCache("myCache"); assertNotNull("Cache 'myCache' should exist", cache); } COM: <s> test the methods create cache and get cache </s>
funcom_train/8136976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChild(LockObject newChild) { if (this.fChildren == null) { this.fChildren = new LockObject[0]; } int size = this.fChildren.length; LockObject[] newChildren = new LockObject[size + 1]; System.arraycopy(this.fChildren, 0, newChildren, 0, size); newChildren[size] = newChild; this.fChildren = newChildren; } COM: <s> adds a new child lock to this lock </s>
funcom_train/9200265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("siniestroPort".equals(portName)) { setsiniestroPortEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/19838870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void findConnections( Piece p ) { int color = p.getColor(); int x = p.getX(); int y = p.getY(); // Assume p is a Piece on the board. findHorConnections ( p, color, x, y ); findVerConnections ( p, color, x, y ); findDiagConnections( p, color, x, y ); } COM: <s> find connections passes in the color and the x and y coordinate two </s>
funcom_train/13393543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { Dimension d = getSize(); // get size of drawing area g.setColor(getBackground()); // clear drawing area g.fillRect(0, 0, d.width, d.height); g.setColor(getForeground()); if (memImage != null) { g.drawImage(memImage, 0, 0, this); } } COM: <s> paint on our given object the given image </s>
funcom_train/49789956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAnotherRole() throws Exception { IFile sitemap = doStandardLoginAs("another@openiaml.org", "test123"); // we actually expect a problem, because user does not have 'default role' permissions assertProblem(); // if we then try to go to 'target', we likewise will also be prevented gotoSitemapWithProblem(sitemap, "target"); assertProblem(); } COM: <s> log in as another role fails </s>
funcom_train/39805382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMonthStringForeground(Color c) { Color old = getMonthStringForeground(); monthStringForeground = c; firePropertyChange("monthStringForeground", old, getMonthStringForeground()); // PENDING JW: remove repaint, ui must take care of it repaint(); } COM: <s> sets the color used to draw the foreground of the month string </s>
funcom_train/802659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIndexedPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SupDataType_indexed_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SupDataType_indexed_feature", "_UI_SupDataType_type"), MzdataPackage.Literals.SUP_DATA_TYPE__INDEXED, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the indexed feature </s>
funcom_train/23928582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File idToFile(String id) throws Exception { if ((id == null) || (id.length() == 0)) { throw new IllegalArgumentException("Id is not valid!"); } if (id.equals(ROOT_ID)) { return fRoot; } return new File(fRoot, (new String(Base64.decodeBase64(id.getBytes("ISO-8859-1")), "UTF-8")).replace( '/', File.separatorChar)); } COM: <s> converts an id to a file object </s>
funcom_train/15636925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPack1DMin() { System.out.println("pack 1D (min)"); BitString expResult, result; double[] value = new double[1]; Hasher instance = new Hasher("t1"); // testing min value[0] = instance.getMinHash(0); expResult = BitString.createMin(); result = instance.pack(value); assertTrue(expResult.equals(result)); } COM: <s> tests if packing the min val in 1 d results in zero </s>
funcom_train/8677729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ExpressionLocation makeLocator() { int line = t.getLineNumber(); int column = t.getColumnNumber(); ExpressionLocation loc = new ExpressionLocation(); loc.setSystemId(env.getSystemId()); loc.setLineNumber(line); loc.setColumnNumber(column); return loc; } COM: <s> make a locator object representing the current parsing location </s>
funcom_train/12838758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String prepareValueForDatabase(String value) { String returnString = ""; int begIndex = 0; int endIndex = 0; endIndex = value.indexOf("'"); while (endIndex > -1) { returnString += (value.substring(begIndex, endIndex) + "''"); begIndex = endIndex + 1; endIndex = value.indexOf("'", begIndex); } returnString += value.substring(begIndex, value.length()); return returnString; } COM: <s> databases dont like single quotes so this method will make </s>
funcom_train/23053702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleResult(DsResult result, ACLMessage msg) { jade.util.leap.List recs = result.getRecords(); Iterator i = recs.iterator(); LinkedList plats = new LinkedList(); log.log(Logger.FINE,"Got " + recs.size() + " platforms from the DS"); while(i.hasNext()){ DsRecord r = (DsRecord)i.next(); Platform_identifier platf = new Platform_identifier(); platf.setName(r.getName()); platf.setPs(r.getAgent()); plats.add(platf); } setPlatforms(plats); } COM: <s> handles a response from the ds server </s>
funcom_train/28601230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setInstant() { // TODO Read from players profile configuration what type of instant action he likes to have, to be more personalized // Give the first player a random fighter PlayerManager.getSingleton().getPlayers().firstElement().setFighter(FighterManager.getSingleton().getRandomFighter()); // Select a random arena setting States.getSingleton().setState(State.SELECTED_ARENA, ArenaManager.getSingleton().getRandomArenaName()); } COM: <s> set a game up so it can be player immediately </s>
funcom_train/18257665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFile(File file) { try { this.file = new QTFile(file); movie = Movie.createMovieFile((QTFile) this.file, kMoviePlayer, createMovieFileDeleteCurFile | createMovieFileDontCreateResFile); } catch (Exception qte) { qte.printStackTrace(); } super.setFile(file); } COM: <s> sets the file to save the movie to </s>
funcom_train/41759030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getMenu() { if (Menu == null) {//GEN-END:|29-getter|0|29-preInit // write pre-init user code here Menu = new Command("Ok", Command.OK, 0);//GEN-LINE:|29-getter|1|29-postInit // write post-init user code here }//GEN-BEGIN:|29-getter|2| return Menu; } COM: <s> returns an initiliazed instance of menu component </s>
funcom_train/5377393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File createBundleStoreDir() { if (!getBundleStoreDir().exists() && !getBundleStoreDir().mkdirs()) { if (Debug.DEBUG && Debug.DEBUG_GENERAL) { Debug.println("Unable to create bundle store directory: " + getBundleStoreDir().getPath()); //$NON-NLS-1$ } } return getBundleStoreDir(); } COM: <s> return the top level bundle directory </s>
funcom_train/22478300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPath(Object path) { if (!isValidString(path)) { throw new IllegalArgumentException( "The addPath function should be invoked with a single, non-empty string path."); } String stringPath = ((String) path); if (!stringPath.endsWith(File.separator)) { stringPath += File.separatorChar; } if (!this.paths.contains(stringPath)) { this.paths.add(stringPath); } } COM: <s> p adds a path that should be searched when the </s>
funcom_train/36201884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String escapeWeirdChars(String text) { StringBuilder newText = new StringBuilder(); for (int i = 0; i < text.length(); i++) { char c = text.charAt(i); if (Character.isLetterOrDigit(c) || c == '_' || c == ' ' || c == '-') { newText.append(c); } else { newText.append('_').append(Integer.toHexString(c)).append('_'); } } return newText.toString(); } COM: <s> escapes all non usual characters of the page title into normal </s>
funcom_train/35273929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void radiusChanged(float radius) { this.radius = maxToolSize*radius; if (markerPrimary != null) { for (Entry e: markerPrimary.getMesh().getBuffers()) ((VertexBuffer)e.getValue()).resetObject(); ((Sphere)markerPrimary.getMesh()).updateGeometry(8, 8, this.radius); } } COM: <s> the radius of the tool has changed so update the marker </s>
funcom_train/23632016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setData(final String s) { //System.out.println("Do we get in here?"); if (type.equals("date")) { final SimpleDate d = SimpleDate.parse(s); final String year = new String(10000 + d.year + "").substring(1); final String month = new String(100 + d.month + "").substring(1); final String day = new String(100 + d.day + "").substring(1); this.data = year + month + day; this.setText(formatDate(data)); } } COM: <s> set the data in the text box </s>
funcom_train/32824878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void specifyArguments(Map map, int portNumber) { Connector.IntegerArgument port = (Connector.IntegerArgument) map.get("port"); port.setValue(portNumber); Connector.IntegerArgument timeoutArg = (Connector.IntegerArgument) map.get("timeout"); if (timeoutArg != null) { int timeout = JavaRuntime.getPreferences().getInt(JavaRuntime.PREF_CONNECT_TIMEOUT); timeoutArg.setValue(timeout); } } COM: <s> specify new connector arguments to the jdi connector </s>
funcom_train/23393553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addServicePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ServiceInvocationEnactment_service_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ServiceInvocationEnactment_service_feature", "_UI_ServiceInvocationEnactment_type"), EnactmentPackage.Literals.SERVICE_INVOCATION_ENACTMENT__SERVICE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the service feature </s>
funcom_train/23346774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateResult() { Object result; String errorInfo; // Get the value result = myParser.getValueAsObject(); // Is the result ok? if (result!=null) { resultLabel.setText(result.toString()); } else { resultLabel.setText(""); } // Get the error information if ((errorInfo = myParser.getErrorInfo()) != null) { errorTextArea.setText(errorInfo); } else { errorTextArea.setText(""); } } COM: <s> this method uses jeps get value as object method to obtain the current </s>
funcom_train/1222710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeType(String s) throws IOException { if (s.length() != 4) { throw new IllegalArgumentException("type string must have 4 characters"); } try { out.write(s.getBytes("ASCII"), 0, 4); incCount(4); } catch (UnsupportedEncodingException e) { throw new InternalError(e.toString()); } } COM: <s> writes an atom type identifier 4 bytes </s>
funcom_train/28888399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNewRow() { final BBDDefaultTableModel dtm = (BBDDefaultTableModel) getModel(); Vector<Object> newRow = new Vector<Object>(); for (int c = 0; c < dtm.getColumnCount(); c++) { newRow.add(dtm.getDefaultValue(c)); } dtm.addRow(newRow); } COM: <s> add blank row onto the end of the table </s>
funcom_train/20443174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getScreenCommand() { if (screenCommand == null) {//GEN-END:|29-getter|0|29-preInit // write pre-init user code here screenCommand = new Command("Screen", Command.SCREEN, 0);//GEN-LINE:|29-getter|1|29-postInit // write post-init user code here }//GEN-BEGIN:|29-getter|2| return screenCommand; } COM: <s> returns an initiliazed instance of screen command component </s>
funcom_train/49995313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColor(PortfolioCategory category) { switch (category) { case GOOD: return getDataModel().getGoodColor(); case AVERAGE: return getDataModel().getAverageColor(); case POOR: return getDataModel().getPoorColor(); case NA: return getDataModel().getNAColor(); default: return getDataModel().getFontColor(); } } COM: <s> return the color associated with the given category </s>
funcom_train/4919864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNotApply() { this.recordReturn(this.one, this.one.canApply(), true); this.recordReturn(this.two, this.two.canApply(), false); this.replayMockObjects(); assertFalse( "Should not be able to apply if one change can not be applied", this.aggregate.canApply()); this.verifyMockObjects(); } COM: <s> ensure able to not apply </s>
funcom_train/45250262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ProgressViewerContentProvider getContentProvider() { return new ProgressViewerContentProvider(viewer, true, false) { /* * (non-Javadoc) * * @see org.eclipse.ui.internal.progress.ProgressViewerContentProvider#getElements(java.lang.Object) */ public Object[] getElements(Object inputElement) { Object[] elements = super.getElements(inputElement); Object[] result = new Object[elements.length + 1]; System.arraycopy(elements, 0, result, 1, elements.length); result[0] = blockedElement; return result; } }; } COM: <s> return the content provider used for the receiver </s>
funcom_train/33279711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void mixedIndentation(final List<String> lines, final String relativePath) { for (int i = 0; i < lines.size(); i++) { final String line = lines.get(i); if (line.indexOf('\t') != -1) { addFailure("Mixed indentation in " + relativePath + ", line: " + (i + 1)); } } } COM: <s> verifies that no xml files have mixed indentation tabs and spaces mixed </s>
funcom_train/19912775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFileTypeIcons(String iconKey, String fileType, ImageIcon errorIcon) { ImageIcon defaultIcon = ResourcesRepository.getImageIcon(fileType + "-icon.png"); MultiIcon multi = new MultiIcon(); multi.addIcon(defaultIcon, MultiIcon.CENTER); multi.addIcon(errorIcon, MultiIcon.CENTER); icons.put(iconKey, defaultIcon); icons.put(iconKey + "-error", multi); } COM: <s> this method does a very simple job </s>
funcom_train/43645860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadMoreResults() { if (nextAction != null) { try { performAction((MWAction) nextAction); /* * ++ remove * that cast! ++ */ knownResults.addAll(nextAction.getResults()); nextAction = nextAction.getNextAction(); } catch (ActionException ae) { nextAction = null; } catch (ProcessException e) { nextAction = null; } } } COM: <s> request more results if local interation seems to be empty </s>
funcom_train/49026708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getModificaButton() { if (modificaButton == null) { modificaButton = new JButton(); modificaButton.setText("Modifica"); modificaButton.setMnemonic(KeyEvent.VK_UNDEFINED); modificaButton.setIcon(new ImageIcon(getClass().getResource("/icone/application-edit-icon.png"))); modificaButton.setFont(new Font("Dialog", Font.BOLD, 12)); modificaButton.setCursor(new Cursor(Cursor.HAND_CURSOR)); modificaButton.setEnabled(false); modificaButton.addActionListener(this); } return modificaButton; } COM: <s> this method initializes modifica button </s>
funcom_train/31928794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getCR_bit(int crf, int crb) { switch (crb) { case 0: return crf_lt[crf]; case 1: return crf_gt[crf]; case 2: return crf_eq[crf]; case 3: return crf_so[crf]; } DBT_OptimizingCompilerException.UNREACHABLE(); return false; // keep the compiler happy } COM: <s> read a bit of a condition register field </s>
funcom_train/50864202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void takeContainer() { Unit container = findLeastFullContainer(rover.getInventory(), containerType, resourceType); if (container != null) { if (person.getInventory().canStoreUnit(container)) { rover.getInventory().retrieveUnit(container); person.getInventory().storeUnit(container); } } } COM: <s> takes the least full container from the rover </s>
funcom_train/549291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createMenu(boolean state){ actionBars = getViewSite().getActionBars(); toolBar = actionBars.getToolBarManager(); ToolBarManager toolBarX = (ToolBarManager)toolBar; prefMenu = new AtkPanelPrefMenu(this, "Preferences", toolBarX.getControl()); viewMenu = new AtkPanelViewMenu("Views", this); toolBar.add(viewMenu); toolBar.add(prefMenu); prefMenu.setEnabled(state); viewMenu.setEnabled(state); } COM: <s> function creates views menu </s>
funcom_train/11738991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int moveRowUp(Object row) { int len = objectList.size(); if (len < 2) { return -1; } int ind = objectList.indexOf(row); if (ind <= 0) { return -1; } int neighborIndex = ind - 1; if (neighborIndex < 0) { neighborIndex = len - 1; } swapRows(ind, neighborIndex); return neighborIndex; } COM: <s> moves a row up jumping down if row is already at the top </s>
funcom_train/20304203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeOntClasses() { String template = hasValue( OPT_CLASS_TEMPLATE ) ? getValue( OPT_CLASS_TEMPLATE ) : DEFAULT_TEMPLATE; for (Iterator i = sorted( m_source.listClasses() ); i.hasNext(); ) { writeValue( (Resource) i.next(), template, "OntClass", "createClass", "_CLASS" ); } } COM: <s> write classes as ontology terms </s>
funcom_train/44283149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void calculateChecksum(Patch p, int start, int end, int offset) { int sum=0x00; //add all values of address and data for(int i=start;i<offset;i++){ sum += p.sysex[i]; } //calculate checkSum with a simple formula int chkSm = 128-(sum % 128); p.sysex[offset] = (byte)chkSm; } COM: <s> spd11 pad driver check sum calculation replaces the offset byte br </s>
funcom_train/5343194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ReplyHandler getPushHandler(byte[] guid) { ReplyHandler replyHandler = _pushRouteTable.getReplyHandler(guid); if(replyHandler != null) return replyHandler; else if(Arrays.equals(_clientGUID, guid)) return FOR_ME_REPLY_HANDLER; else return null; } COM: <s> returns the appropriate handler from the push route table </s>
funcom_train/13363584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List convertToList(String[] src) { List trg = new ArrayList(); if (src != null) { for (int i = 0; i < src.length; i++) { if (isValid(src[i])) { trg.add(src[i]); } } } return trg; } COM: <s> converts an array of strings to a list of strings </s>
funcom_train/331616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PamVector rotate(PamVector rotationVector) { double[] vd = getVector(); double[] newV = new double[3]; double sin = rotationVector.getElement(1); double cos = rotationVector.getElement(0); newV[0] = vd[0] * cos - vd[1] * sin; newV[1] = vd[0] * sin + vd[1] * cos; newV[2] = vd[2]; return new PamVector(newV); } COM: <s> rotate a vector using another vector </s>
funcom_train/4757236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Plane rotate(final Vector3D center, final Rotation rotation) { final Vector3D delta = origin.subtract(center); final Plane plane = new Plane(center.add(rotation.applyTo(delta)), rotation.applyTo(w)); // make sure the frame is transformed as desired plane.u = rotation.applyTo(u); plane.v = rotation.applyTo(v); return plane; } COM: <s> rotate the plane around the specified point </s>
funcom_train/33686297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAllBoardSpaces(Player[][] spaces) { // Clear all board spaces this.boardSpaces.clear(); for (int x = 0; x < 8; x++) { for (int y = 0; y < 8; y++) { IBoardSpace newSpace = new BoardSpace(); newSpace.setXCoordinate(x); newSpace.setYCoordinate(y); newSpace.setPlayer(spaces[x][y]); this.boardSpaces.add(newSpace); } } } COM: <s> a universally accessible method to pass in several </s>
funcom_train/25057930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkAndRecordError(GridJobStatus status) throws DaoException { // If an exit code exists and is non-zero record an error. if (null!=status.getExitStatus() && 0!=status.getExitStatus()){ addEventToTask(status.getTaskID(), new Event(Event.ERROR_EVENT, new Date(), Event.ERROR_EVENT)); } } COM: <s> method to record a task error when appropriate </s>
funcom_train/27823892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTableRowIndex(Concept concept) { for (int i=0;i<m_elements.size();i++) { TableRow tableRow=(TableRow)m_elements.get(i); if (tableRow.m_concept.equals(concept)) return i; } return -1; } COM: <s> locates the table row index for given concept </s>
funcom_train/38995125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProbabilisticExtension getCharacteristicProbabilisticExtension(DungTheory theory){ ProbabilisticExtension pe = new ProbabilisticExtension((DungSignature)theory.getSignature()); if(this.getUndecidedArguments(theory).isEmpty()){ pe.put(new Extension(this), new Probability(1d)); return pe; } pe.put(new Extension(this), new Probability(0.5)); Extension e = new Extension(this); e.addAll(this.getUndecidedArguments(theory)); pe.put(e, new Probability(0.5)); return pe; } COM: <s> returns the characteristic probabilistic extension of this extension </s>
funcom_train/10617204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCertStoreException06() { CertStoreException tE = new CertStoreException(null, null); assertNull("getMessage() must return null", tE.getMessage()); assertNull("getCause() must return null", tE.getCause()); } COM: <s> test for code cert store exception string throwable code constructor </s>
funcom_train/49167067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void showException(Exception ex) { // Add the stack trace to the status area StringWriter sw = new StringWriter(); ex.printStackTrace(new PrintWriter(sw)); javax.swing.JOptionPane.showMessageDialog(null, "An unexpected error occured. Here is the stack trace:\n\n" + sw.toString(), "An Error Occured", JOptionPane.ERROR_MESSAGE); } COM: <s> display an exception in a message box </s>
funcom_train/19102023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSimulationEnabled(boolean b) { getStatesPanel().setVisible(b); PetriTransition[] trans = getDrawingArea().getTransitions(); PetriNet net = getDrawingArea(); for (int i = 0; i < trans.length; i++){ trans[i].setAttribute("Simulating", new Boolean(b)); trans[i].setAttribute("Active", new Boolean(net.isActive(trans[i]))); } } COM: <s> enables the simulation controls </s>
funcom_train/42437663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isClassConfiguration(IConfiguration configurationAnnotation) { if(null == configurationAnnotation) { return false; } boolean before= (null != configurationAnnotation) ? configurationAnnotation.getBeforeTestClass() : false; boolean after= (null != configurationAnnotation) ? configurationAnnotation.getAfterTestClass() : false; return (before || after); } COM: <s> is the current code iconfiguration code a class level method </s>