__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/7422262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Task parseImplementation(Node activityNode, Node implementationNode) { NodeList childs = implementationNode.getChildNodes(); for (int i = 0; i < childs.getLength(); i++) { Node child = childs.item(i); if (child.getLocalName() == null) { continue; } if (child.getLocalName().equals(TASK)) { return parseTask(activityNode, child); } } return null; } COM: <s> parses the implementation node of an activity node </s>
funcom_train/26645276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void inject(Object obj) { // There are a few reasons why we can get null and it is valid, so just ignore. if( obj==null ) return; Injector.getInjector(obj.getClass()).inject(this, obj); if (obj instanceof MetaDataUser) ((MetaDataUser) obj).setMetaData(this); } COM: <s> inject the components into the bean </s>
funcom_train/171577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int lookupFloat(float n) { int bits = Float.floatToIntBits(n); for(int i=1; i < index; i++) { if(constants[i] instanceof ConstantFloat) { ConstantFloat c = (ConstantFloat)constants[i]; if(Float.floatToIntBits(c.getBytes()) == bits) return i; } } return -1; } COM: <s> look for constant float in constant pool </s>
funcom_train/3913726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (this == obj) { return true; } if (! (obj instanceof RoleInstanceEntityPK)) { return false; } RoleInstanceEntityPK that = (RoleInstanceEntityPK) obj; if (that.roleInstanceId != this.roleInstanceId) { return false; } return true; } COM: <s> checks if the passed object and this key are equal </s>
funcom_train/11308978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream getInputStream() throws IOException { if (in == null ) { String ce = getHeader("Content-Encoding"); in = method.getResponseBodyAsStream(); if (ce != null && in != null) { in = CompressionUtil.getDecodingInputStream(in, ce); } in = new AutoReleasingInputStream(method, in); } return in; } COM: <s> return the inputstream for reading the content of the response </s>
funcom_train/28877569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String ToString() { String s = "-----\n"; s += "ID=" + getId() + " file: " + getFullPath() + "\n"; s += "status: open=" + isOpened() + " activated=" + isActivated() + "\n"; s += "session date: " + time.getDateToString() + " total time:" + time.timeToString(); s += "\n-----"; return s; } COM: <s> a string representation of the class data item </s>
funcom_train/17779368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean loadRTI() { if(prop == null) { logger.error("prop is null. Cannot continue"); return false; } informType = prop.getProperty("informType"); informId = prop.getProperty("informId"); if(informType == null || informId == null) { logger.error("Informing info is not set properly."); return false; } return true; } COM: <s> loads the informer id and informer type </s>
funcom_train/27948181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getScaleFactor() { double f; if( xrange > yrange ) f = scale*yrange; else f = scale*xrange; if(vmean <= 0.0) return 1.0; if( scalingType == MEAN ) return f/vmean; if( scalingType == MINIMUM ) return f/vmin; if( scalingType == MAXIMUM ) return f/vmax; return 1.0; } COM: <s> return the current scaling factor </s>
funcom_train/18238518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNoChangeInFeature(){ beforeAfterFeatureMap.put(new Feature("noChangeBefore", 0, 100), new Feature("noChangeAfter", 0, 100)); Map<Feature, Double> featChangeMap = TDBCollection.getFeaturesThatHaveTooGreatASizePercentageChange( percentChangeLimit, beforeAfterFeatureMap); assertTrue(featChangeMap.size() ==0); } COM: <s> first check that a feature that doesnot change </s>
funcom_train/14612530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object convert(Class type, Object value) { if (value == null) { if (useDefault) { return (defaultValue); } else { throw new ConversionException("No value specified"); } } if (value instanceof File) { return (value); } return new File(value.toString()); } COM: <s> convert the specified input object into an output object of the </s>
funcom_train/17528976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeIndex(E e, V v) { if (e == null || v == null) return; if (this.edges.containsKey(e)) { this.edges.get(e).remove(v); if (this.edges.get(e).size() == 0) this.edges.remove(e); } if (this.vertices.containsKey(v)) { this.vertices.get(v).remove(e); if (this.vertices.get(v).size() == 0) this.vertices.remove(v); } } COM: <s> remove vertex index from the edge </s>
funcom_train/50937685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean greaterThan(String value, String option) { try { BigDecimal left = new BigDecimal(value); BigDecimal right = new BigDecimal(option); return left.compareTo(right) == 1; } catch (NumberFormatException x) { return value.compareTo(option) == 1; } } COM: <s> returns true if value is greater than the option </s>
funcom_train/34596525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MoveListEntry getTransformedMove(MoveListEntry move, boolean enemy) { // For now, do this in no particular order. synchronized (m_statuses) { Iterator i = m_statuses.iterator(); while (i.hasNext()) { StatusEffect eff = (StatusEffect) i.next(); if (eff.isActive() && eff.isMoveTransformer(enemy)) { move = eff.getMove(this, (MoveListEntry) move.clone(), enemy); if (move == null) { return null; } } } } return move; } COM: <s> transform a move based on the status effects applied to the pokemon </s>
funcom_train/13717749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPrevAccesses() { System.out.println("testGetPrevAccesses"); ReuseDistanceDistributions rdds = complete_rdd.getPrevAccesses(); ReuseDistanceDistribution[] rddArray = rdds.getReuseDistanceDistributionArray(); Assert.assertEquals(rddArray.length, 2); Assert.assertEquals(rddArray[0], prev1); Assert.assertEquals(rddArray[1], prev2); } COM: <s> test of get prev accesses method of class be </s>
funcom_train/14432394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*private void registerPomListener() { final PomModel pomModel = module.getUserData() pomModelListener = new PhpPomModelListener(module, pomModel) { protected synchronized void processEvent(final VirtualFile vFile) { ProgressManager.getInstance().checkCanceled(); regenerateFileInfo(vFile); } }; pomModel.addModelListener(pomModelListener, module); }*/ COM: <s> adds pom model listener to files cache </s>
funcom_train/9086714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(EquipmentDetails entity) { EntityManagerHelper.log("deleting EquipmentDetails instance", Level.INFO, null); try { entity = getEntityManager().getReference(EquipmentDetails.class, entity.getId()); 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 equipment details entity </s>
funcom_train/7660765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetWaitingThreadsIMSE() { final PublicReentrantLock lock = new PublicReentrantLock(); final Condition c = (lock.newCondition()); try { lock.getWaitingThreads(c); shouldThrow(); } catch (IllegalMonitorStateException success) { } catch (Exception ex) { unexpectedException(); } } COM: <s> get waiting threads throws imse if not locked </s>
funcom_train/41582471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean buttonExist(int id) throws SQLException { Cursor mCursor = mDb.query(true, BUTTON_TABLE, new String[] {BUTTON_ID}, BUTTON_ID + "=" + id + "", null, null, null, null, null); int value = mCursor.getCount(); mCursor.close(); return value >= 1; } COM: <s> returns true if the button of name exists in database </s>
funcom_train/44340479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { lexIdent2CS.clear(); ArrayList arrLst; for (Iterator i = lexCS2Idents.values().iterator(); i.hasNext(); ) { arrLst = (ArrayList) i.next(); if (arrLst != null) { arrLst.clear(); arrLst = null; } } lexCS2Idents.clear(); } COM: <s> clear the content of the current lexicon i </s>
funcom_train/35298877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processWriteAborted() { if (progressListeners == null) { return; } int numListeners = progressListeners.size(); for (int i = 0; i < numListeners; i++) { IIOWriteProgressListener listener = (IIOWriteProgressListener)progressListeners.get(i); listener.writeAborted(this); } } COM: <s> broadcasts that the write has been aborted to all registered </s>
funcom_train/37837834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TileSetDefinition getTilesetFor(final int value) { if (value == 0) { return null; } final List<TileSetDefinition> tilesets = map.getTilesets(); int pos = 0; for (pos = 0; pos < tilesets.size(); pos++) { if (value < tilesets.get(pos).getFirstGid()) { break; } } return tilesets.get(pos - 1); } COM: <s> returns the name of the tileset a tile belongs to </s>
funcom_train/42068264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addWavRandomAccessFilePointerPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ChunkUnknown_wavRandomAccessFilePointer_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ChunkUnknown_wavRandomAccessFilePointer_feature", "_UI_ChunkUnknown_type"), WavPackage.Literals.CHUNK_UNKNOWN__WAV_RANDOM_ACCESS_FILE_POINTER, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the wav random access file pointer feature </s>
funcom_train/1528063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void dilate(NumberValue rval, GeoPoint S) { double r = rval.getDouble(); double temp = (r - 1); z = temp * (x * S.inhomX + y * S.inhomY) + r * z; x *= r; y *= r; z *= r; } COM: <s> dilate from s by r </s>
funcom_train/16912179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setInputTraining(final File theFile) { inputsTrain = Utils.getDoubleMatrix(theFile); jbInputsFile.setText(theFile.getName()); som.setTrainingInputs(inputsTrain); som.setNumInputVectors(inputsTrain.length); som.setTrainingINFile(theFile); } COM: <s> sets the input training file </s>
funcom_train/32711665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printStatus() { int x, y; for (x = 0; x < this.neurons.size(); x++) { getNeuron(x).printState(); for (y = 0; y < getNeuron(x).synapses.size(); y++) System.out.println("\t connections with weight: " + getNeuron(x).getSynapse(y).second); } } COM: <s> prints the layers status </s>
funcom_train/9938077
/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 ("delta".equals(portName)) { setdeltaEndpointAddress(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/1775904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double aspectDirection(double xd, double yd){ if(xd == 0 && yd == 0) return -1; if(xd == 0){ if(yd < 0) return 0; else return 180; } if(yd == 0){ if(xd > 0) return 90; else return 270; } double _d = Math.toDegrees(Math.atan(yd / xd)); if(xd > 0){ return _d + 90; } else{ return _d + 270; } } COM: <s> determine the aspect direction at pixel </s>
funcom_train/5378275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int findOldestGeneration(String file) { String[] files = base.list(); int oldestGeneration = 0; if (files != null) { String name = file + '.'; int len = name.length(); for (int i = 0; i < files.length; i++) { if (!files[i].startsWith(name)) continue; try { int generation = Integer.parseInt(files[i].substring(len)); if (generation > oldestGeneration) oldestGeneration = generation; } catch (NumberFormatException e) { continue; } } } return oldestGeneration; } COM: <s> find the oldest generation of a file still available on disk </s>
funcom_train/7891574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element toXml(Document document) { if (isRefreshLock) { return null; } else { Element lockInfo = DomUtil.createElement(document, XML_LOCKINFO, NAMESPACE); lockInfo.appendChild(scope.toXml(document)); lockInfo.appendChild(type.toXml(document)); if (owner != null) { DomUtil.addChildElement(lockInfo, XML_OWNER, NAMESPACE, owner); } return lockInfo; } } COM: <s> returns the xml representation of this lock info </s>
funcom_train/31031402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setAccYearFields(CAccYear accyear) { txtAconum.setText(Utility.getNonNullValue( accyear.getAconum()).toString()); txtAyearno.setText(Utility.getNonNullValue( accyear.getAyearno()).toString()); txtAstdate.setText(Utility.getNonNullValue( accyear.getAstdate()).toString()); txtAendate.setText(Utility.getNonNullValue( accyear.getAendate()).toString()); } COM: <s> sets the account year frame field value from the corressponding account </s>
funcom_train/40882823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cycleRollovers () { newActiveRollovers.clear(); for (int i = 0; i < this.rollovers.size(); i++) { int prevIndex = (i == 0) ? this.rollovers.size() - 1 : i - 1; if (this.activeRollovers.contains(this.rollovers.get(prevIndex))) { newActiveRollovers.add(this.rollovers.get(i)); } } this.activeRollovers.clear(); this.activeRollovers.addAll(newActiveRollovers); } COM: <s> cycles the states of all rollover elements by rotating right </s>
funcom_train/40346961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(RoleImpl RoleImpl) { if (this.getAuthority() == null && RoleImpl != null && RoleImpl.getAuthority() == null) { return true; } return (this.getAuthority() != null && RoleImpl != null && this.getAuthority().equals(RoleImpl.getAuthority())); } COM: <s> two roles are equal if the role names are the same </s>
funcom_train/10525266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateRequestResponseData(RequestData request, ResponseData response) { if (_requestData.size() == 0 || _responseData.size() == 0) throw new IllegalStateException("data size is zero, unable to update"); _requestData.set(_requestData.size() - 1, request); _responseData.add(_responseData.size() - 1, response); } COM: <s> update the data for the most recent test </s>
funcom_train/44789669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void marshall(String fileName) { try { this.marshall(new FileOutputStream(fileName)); } catch (FileNotFoundException e) { GeOxygeneApplicationProperties.logger .error("File " + fileName + " could not be written to"); //$NON-NLS-1$//$NON-NLS-2$ } } COM: <s> save the properties in the specified file </s>
funcom_train/40945842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IContextMenu getContextMenu() { if (contextMenu == null) { contextMenu = new IContextMenu(); if (usePaintableIdsInDOM) { DOM.setElementProperty(contextMenu.getElement(), "id", "PID_TOOLKIT_CM"); } } return contextMenu; } COM: <s> singleton method to get instance of apps context menu </s>
funcom_train/26595216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkPrevious() throws DException { if (iterator.last()) { FieldBase fb = (FieldBase) iterator.getColumnValues(childReference); while (fb.isNull()) { if (iterator.previous()) { fb = (FieldBase) iterator.getColumnValues(childReference); } else { iterator.next(); return; } } status = VALIDSTATE; } else { isHavingData = false; } } COM: <s> this method is responsible to assist the maxmin iterator for </s>
funcom_train/11794201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NodeList getNodesAtXPath(String pXPath, Object pContext) { NodeList result = null; try { result = (NodeList) getXPath().evaluate(pXPath, pContext, XPathConstants.NODESET); } catch (XPathExpressionException e) { // do nothing; we'll return a null... } return result; } COM: <s> returns a list of nodes matching the given xpath within the given context </s>
funcom_train/13995951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void tearDownChangeSubscribers() { eventBroker.unsubscribeChange(getMockKey(IDS[0], TYPES[0]), changeSubscribers[0]); eventBroker.unsubscribeChange(getMockKey(IDS[0], TYPES[0]), changeSubscribers[1]); eventBroker.unsubscribeChange(getMockKey(IDS[1], TYPES[0]), changeSubscribers[2]); eventBroker.unsubscribeChange(getMockKey(IDS[0], TYPES[1]), changeSubscribers[3]); } COM: <s> tears down change subscribers </s>
funcom_train/4557930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPaymentSettingSelectValidExpiresMonthYear() { repEng.newStep("342", "Payment Settings-Select valid Expires month/year for credit card"); //1. Goto User Settings:Payment Settings page //2. Select one credit card //3. Input valid Card Number and Security Code //4. Select valid Expires Month/Year // Expires month/year should be accepted // Next button should be enabled. } COM: <s> 342 payment settings select valid expires month year for credit card </s>
funcom_train/4658276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copy3() throws SVNException { File dstPath = new File(workdir + "/mac_commit/日本語だべ3.txt"); manager.getCopyClient().doCopy(url.appendPath(Normalizer.decompose("mac_commit/日本語だべ.txt",false), true), SVNRevision.HEAD, dstPath); manager.getCommitClient().doCommit( new File[]{ new File( workdir + "/mac_commit/") }, false, "", false, true ); } COM: <s> copy url wc in same dir with different name </s>
funcom_train/34262505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getDeleteActionButton() { if(this.deleteActionButton == null) { this.deleteActionButton = FmsButtonFactory.createDeleteButtonNoCallback(); this.deleteActionButton.setToolTipText(FmsResourceBundle.getString(FmsResourceBundleKeys.DELETE_cc) + " " + FmsResourceBundle.getString(FmsResourceBundleKeys.ACTION_cc)); } return this.deleteActionButton; } COM: <s> gets delete action button </s>
funcom_train/46382426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CellTransform getCameraTransform() { if (cameraNode != null) { return new CellTransform(cameraNode.getWorldRotation(), cameraNode.getWorldTranslation(), cameraNode.getWorldScale().x); } return new CellTransform(null, new Vector3f(0, 0, 0)); } COM: <s> return the transform of the camera </s>
funcom_train/42670045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setObservatoryClientListener() { // Make sure the JMS Template for listening to incoming message is setup if (observatoryClientJmsTemplate == null) { this.setupConnectionToClientQueue(); } // If the incoming handler is null, create a default base one if (observatoryClientListener == null) { this.observatoryClientListener = new ObservatoryClientListener( observatoryClientJmsTemplate, securityProxy); } observatoryClientListener.setTimingPrefix(timingPrefix); // Start the thread this.observatoryClientListener.start(); } COM: <s> this method takes in an object that extends the observatory client listener </s>
funcom_train/2878187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getCDAsString(long waitTimeout) throws Exception { try { return "sfConfig extends {\n" + getComponentDescription(waitTimeout).toString() + "}"; } catch (Exception e) { if (sfLog().isDebugEnabled()) sfLog().warn(e.getMessage(),e); throw e; } } COM: <s> get the resulting component description in a string format </s>
funcom_train/25372173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printDialog() { if (m_PrinterJob.printDialog()) { m_PrinterJob.setPrintable(this,m_PageFormat); try { m_PrinterJob.print(); } catch (PrinterException printerException) { m_PageStartY = 0; m_PageEndY = 0; m_CurrentPage = -1; System.out.println("Error Printing Document"); } } } COM: <s> shows the print dialog </s>
funcom_train/23216721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSystemClockPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_WorldModel_systemClock_feature"), getString("_UI_PropertyDescriptor_description", "_UI_WorldModel_systemClock_feature", "_UI_WorldModel_type"), ContractPackage.Literals.WORLD_MODEL__SYSTEM_CLOCK, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the system clock feature </s>
funcom_train/5868586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void putToContext(String name,Object bean){ Component comp = Component.forName(name); ScopeType scope; if(comp!=null){ scope = comp.getScope(); }else{ scope = ScopeType.CONVERSATION; } putToContext(name,bean,scope); } COM: <s> put bean into seams context br </s>
funcom_train/14269393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Version other) { int result = major - other.major; if (result == 0) { result = minor - other.minor; } if (result == 0) { result = subminor - other.subminor; } if (result == 0 && !nullEquals(modifier, other.modifier)) { if (modifier == null) { result = 1; } else if (other.modifier == null) { result = -1; } else { result = modifier.compareToIgnoreCase(other.modifier); } } return result; } COM: <s> compares two version numbers according to their major minor and subminor </s>
funcom_train/16512083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IFigure createFigure() { Figure f = new Figure(); f.setOpaque(true); f.setBackgroundColor(new Color(Display.getCurrent(), 242, 248, 255)); // soft baby blue f.setLayoutManager(new XYLayout()); return f; } COM: <s> creates the base figure canvas of the editor </s>
funcom_train/5436949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPartControl(Composite parent) { if(!checkWPcap()) { createDisabledView(parent); return; } viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); drillDownAdapter = new DrillDownAdapter(viewer); viewer.setContentProvider(new NetworkInterfacesViewContentProvider(getViewSite())); viewer.setLabelProvider(new NetworkInterfacesViewLabelProvider()); viewer.setInput(getViewSite()); controller = new NetworkInterfacesController(this); hookContextMenu(); hookDoubleClickAction(); contributeToActionBars(); } COM: <s> this is a callback that will allow us </s>
funcom_train/39314477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDescription() { System.out.println("testGetDescription"); filter.addExtension("extension"); assertNotNull(filter.getDescription()); String actual1 = filter.getDescription(); //assertNotNull(actual); //assertNull(actual); System.out.println("Done testGetDescription"); } COM: <s> test of get description method of class terp paint file filter </s>
funcom_train/38417528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle2D getUniversalRectangle(Rectangle2D rect) { Point2D p1 = this.mStar.getUniversalPositionFromSheetLocal(rect.getMinX(),rect.getMinY()); Point2D p2 = this.mStar.getUniversalPositionFromSheetLocal(rect.getMaxX(),rect.getMaxY()); Rectangle2D res = new Rectangle2D.Double(); res.setFrameFromDiagonal(p1,p2); return res; } COM: <s> get universal from sheet local bounds </s>
funcom_train/8008635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertSubmitListener(SubmitListener l) { if (_listeners == null) { _listeners = new Vector(); } for (int i = 0; i < _listeners.size(); i++) { if (((SubmitListener) _listeners.elementAt(i)) == l) { return; } } _listeners.insertElementAt(l, 0); } COM: <s> this method inserts a listener at the beginning of the the listener list </s>
funcom_train/10589253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addRepeaterWidget(Repeater repeater, Widget okwdg) { if (this.repeaterWidgets == null) this.repeaterWidgets = new HashMap(); Set widgets = (Set) this.repeaterWidgets.get(repeater); if (widgets == null) { widgets = new HashSet(); this.repeaterWidgets.put(repeater, widgets); } widgets.add(okwdg); newAdditions.add(okwdg); } COM: <s> adds to the list a widget descendant of a repeater </s>
funcom_train/18837235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String canHorizontal(int y, int startX, int endX) { for(int x = Math.min(startX, endX) + 1; x < Math.max(startX, endX); x++) { if(curState.pieceAt(x, y) != null) { return "horizontal move: someone blocks the way"; } } return null; } COM: <s> can move horizontally without any interfere </s>
funcom_train/2293196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CmsUUID switchToTempProject() throws CmsException { // store the current project id in member variable m_currentProjectId = getSettings().getProject(); CmsUUID tempProjectId = OpenCms.getWorkplaceManager().getTempFileProjectId(); getCms().getRequestContext().setCurrentProject(getCms().readProject(tempProjectId)); return tempProjectId; } COM: <s> helper method to change the current project to the temporary file project </s>
funcom_train/15745928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendOperation(JID jid, Operation op, int delay) { /* 1. execute locally */ doc.execOperation(op); /* 2. transform operation. */ JupiterActivity jupiterActivity = algorithm.generateJupiterActivity(op, this.user, null); /* sent to client */ // connection.sendOperation(jid, req,delay); connection.sendOperation(new NetworkRequest(this.user, jid, jupiterActivity, delay)); } COM: <s> send operation only for two way protocol test </s>
funcom_train/5855285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(int row, int column) { int address = 4 * row; int value = engine.load(address); String hexAddress = Integer.toHexString(address); String hexValue = Integer.toHexString(value); return Util.prefix(hexAddress, '0', 8) + ": " + Util.prefix(hexValue, '0', 8); } COM: <s> return the value at the specified index </s>
funcom_train/31013103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeTime(PrintWriter writer) { if (this.getLastRecord().getTime() == null) { writer.print("- "); } else { String dateString = new java.text.SimpleDateFormat("[dd/MMM/yyyy:HH:mm:ss +0200]").format( this.getLastRecord().getTime().getTime()); writer.print(dateString); writer.print(" "); } } COM: <s> write the access time to the log </s>
funcom_train/31106888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(Document document, OutputStream in) throws DocumentException { DataOutputStream dataOut = null; try { dataOut = createDataOutputStream(in); writeDocument(document, dataOut); } catch (IOException e) { throw new DocumentException(e); } finally { if ( dataOut != null ) { try { dataOut.close(); } catch (Exception e) { } } } } COM: <s> p writes a document from the given stream using sax p </s>
funcom_train/23786615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getCheckedValuesType(javax.faces.context.FacesContext facesContext) { ValueExpression valueExpression=engine.getValueExpressionProperty(Properties.CHECKED_VALUES); if (valueExpression==null) { return null; } if (facesContext==null) { facesContext=javax.faces.context.FacesContext.getCurrentInstance(); } return valueExpression.getType(facesContext.getELContext()); } COM: <s> return the type of the property represented by the </s>
funcom_train/8339489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPersistObject() throws Exception { WabitWorkspace workspace = new WabitWorkspace(); CountingWabitPersister counter = new CountingWabitPersister(); WorkspacePersisterListener listener = new WorkspacePersisterListener( new StubWabitSwingSession(), counter, true); WabitImage firstImage = new WabitImage(); workspace.addImage(firstImage); WabitImage image = new WabitImage(); workspace.addImage(image); listener.persistObject(workspace); assertEquals(3, counter.getPersistObjectCount()); assertEquals(image.getUUID(), counter.getLastPersistObject().getUUID()); } COM: <s> tests that persisting an object will persist the objects children as well </s>
funcom_train/3862171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleConnectionException(String sourceUrl, Throwable e) { if (e instanceof IOException) { cContext.getSperowiderModel().markInvalidURL(sourceUrl, -1, e.getMessage()); } else { SperoLog.DOWNLOAD_ERROR.error("Error in download.", e); } } COM: <s> io exceptions get marked as invalid urls </s>
funcom_train/3913628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ExpressionProperty getExpression(Uol uol, String propId) { String key = getKey(uol, propId); ExpressionProperty property = (ExpressionProperty) fetchFromCache(key); if (property == null) { property = new ExpressionProperty(uol, propId); addToCache(key, property); } return property; } COM: <s> return a expression property based on the passed parameters </s>
funcom_train/3496291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hideImage(final int imageIndex) { Runnable doHideImage = new Runnable() { public void run() { if (imageIndex==1) { ic1.updateImage(tmpImage); ic1.repaint(); } else if (imageIndex==2) { ic2.updateImage(tmpImage); ic2.repaint(); } else { ic3.updateImage(tmpImage); ic3.repaint(); } } }; SwingUtilities.invokeLater(doHideImage); } // end hideImage() COM: <s> hides intermediate images for the ebla vision system </s>
funcom_train/18745268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToNodeEdgeMap(Map<N,Set<E>> currentMap, N node, E edge) { Set<E> edgeSet = currentMap.get(node); if (edgeSet == null) { currentMap.put(node, edgeSet = createSmallEdgeSet()); } edgeSet.add(edge); } COM: <s> adds an edge to a given node to edgeset mapping </s>
funcom_train/19635855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getIndex(Edge e) { for (int i=0; i<getSize(); i++) if ( e == getData(i) ) return i; // item not in heap logger.error("Edge e: " + e.getSource() + "-" + e.getDestination() + "(" + e.getLength() + ") is not in the heap"); return -1; } COM: <s> get index of item in the heap </s>
funcom_train/33839289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean replaceKey(Object oldKey, Object newKey) { if (!keyed.containsKey(oldKey) || keyed.containsKey(newKey)) { return false; } Object oldVal = keyed.get(oldKey); int index = ordered.indexOf(oldKey); remove(index); return add(index, newKey, oldVal); } COM: <s> replace the key of a given element </s>
funcom_train/49790940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNodeEditPartTest() throws IOException { File template = this.template; File output = this.output; String expected = getExpectedContent(readFile(template), template); if (!output.exists() || !readFile(output).equals(expected)) { System.out.println("Writing '" + output + "'..."); FileWriter fw = new FileWriter(output); fw.write(expected); fw.close(); } } COM: <s> check the node edit part </s>
funcom_train/26202136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void navLinkPrevious() { if (prev == -1) { printText("doclet.Prev_Letter"); } else { printHyperLink("index-" + prev + ".html", "", getText("doclet.Prev_Letter"), true); } } COM: <s> print the previous unicode character index link </s>
funcom_train/49469174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RiskImpactId createImpact(Impact imp) throws Exception, RaciException{ Db db = dbRW(); try{ _logger.info("RiskAssessment : createImpact "+imp); db.begin(); int peopleId = getCurrentUser(); DbPerso.checkUserCanCreateImpact(db, peopleId, imp.getRiskReviewId()); RiskImpactId impId = DbImpact.createImpact(db, imp, peopleId); db.commit(); return impId; } catch (Exception e) { store(e); throw e; } finally { db.safeClose(); } } COM: <s> create an impact for a risk review </s>
funcom_train/13426561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void launchTimer() { // cancel any existing timer if (timer != null) { timer.cancel(); timer = null; } // set up for one minute from now Calendar checkTime = Calendar.getInstance(); checkTime.add(Calendar.MINUTE, 1); //checkTime.add(Calendar.SECOND, 10); // launch the timer timer = new Timer(); timer.schedule(new DirectoryCheckTask(), checkTime.getTime()); Logger.debug("Timer set for " + checkTime.getTime()); } COM: <s> launch the timer thats used for directory checks </s>
funcom_train/6329345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsAll(Collection c) { Iterator itr; if (c instanceof OzoneCollection) { itr = ((OzoneCollection) c)._org_ozoneDB_internalIterator(); } else { itr = c.iterator(); } int pos = c.size(); while (--pos >= 0) if (!contains(itr.next())) return false; return true; } COM: <s> tests whether this collection contains all the elements in a given </s>
funcom_train/18122391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getVariableAccess(String variableName) { variableName = variableName.toUpperCase(); if (variableName.equals("PAGE")) { return "(getCurrentPage())"; } if (numPageFields.contains(variableName) || variableName.equals("NUM_PAGES")) { return "PAGE_COUNT"; } return "(" + env.getJavaFieldAccessorName(variableName) +"())"; } COM: <s> for a variable named var name </s>
funcom_train/31688002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean inheritableContains(double x, double y) { Rectangle2D.Float rect = new Rectangle2D.Float(this.getX()+3, this.getY()+50, this.m_isInheritable.getWidth(), 15); return rect.contains(new Double(x).intValue(), new Double(y).intValue()); } COM: <s> checks if the inheritence checkbox contains a given co ordinate </s>
funcom_train/37034290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void log(String message) { Logger logger = null; if (host != null) logger = host.getLogger(); if (logger != null) logger.log("HostConfig[" + host.getName() + "]: " + message); else System.out.println("HostConfig[" + host.getName() + "]: " + message); } COM: <s> log a message on the logger associated with our host if any </s>
funcom_train/34636302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getElementName(Object sourceData) { if (sourceData instanceof TreeSelection) { TreeSelection treeSel = (TreeSelection) sourceData; Object fe = treeSel.getFirstElement(); if (fe instanceof CodeFile || fe instanceof Chapter) { return null; } else if (fe instanceof Image) { return "img"; } else if (fe instanceof CodeSnippet) { return "coderef"; } } else if (sourceData instanceof DragData) { return "coderef"; } return null; } COM: <s> returns the name of the xml tag that corresponds to the dragged object </s>
funcom_train/51605103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonCancel() { if (jButtonCancel == null) { jButtonCancel = new JButton(); jButtonCancel.setText(Messages.getMessage(Messages.messageCancel)); jButtonCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { doClose(); } }); } return jButtonCancel; } COM: <s> this method initializes j button cancel </s>
funcom_train/17287252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkOptionalFields(RhizomeDocument doc) { // Check other fields: String[] e = { UserEnum.GIVENNAME.getKey(), UserEnum.SURNAME.getKey(), UserEnum.DESCRIPTION.getKey() }; for(String k: e ) { if(this.hasParam(k )) doc.addMetadatum( new Metadatum(k, Scrubby.cleanText(this.getFirstParam(k, "").toString())) ); } return true; } COM: <s> check any optional fields and add them to the document if desired </s>
funcom_train/39537141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getViewUri(String projectFileName, String xmlViewPath) { String viewUri=""; if(projectFileName!=null && ! projectFileName.equals("") && xmlViewPath!=null && ! xmlViewPath.equals("")){ Map<String, String> map=projectNameToViewPathsToUriMap.get(projectFileName); if(map!=null) { viewUri=map.get(xmlViewPath); } } return viewUri; } COM: <s> returns the uri of the view corresponding to the given xml view path </s>
funcom_train/12149593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWorkspaceProperty( String rUri, NodeRevisionDescriptor rNrd ) { UriHandler rUh = UriHandler.getUriHandler( rUri ); String wsUri = rUh.getAssociatedWorkspaceUri(); if( wsUri != null ) { rNrd.setProperty( new NodeProperty(P_WORKSPACE, propertyHelper.createHrefValue(wsUri)) ); } else { rNrd.removeProperty(P_WORKSPACE); } } COM: <s> set the workspace property if needed </s>
funcom_train/28749697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOrderedby(String newVal) { if ((newVal != null && this.orderedby != null && (newVal.compareTo(this.orderedby) == 0)) || (newVal == null && this.orderedby == null && orderedby_is_initialized)) { return; } this.orderedby = newVal; orderedby_is_modified = true; orderedby_is_initialized = true; } COM: <s> setter method for orderedby </s>
funcom_train/16981795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFile(Station s, int f, int t) { if(this.receivedData.containsKey(s)){ HashMap h=(HashMap)this.receivedData.get(s); h.put(new Integer(f), new Integer(t)); }else{ HashMap h=new HashMap(); h.put(new Integer(f), new Integer(t)); this.receivedData.put(s, h); } } COM: <s> add a new file into the hash map received data </s>
funcom_train/17675452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeToPNonTxForCommit(VersantPersistenceManagerImp rpm) { stateM = STATE_P_NON_TX; dfgLoaded = false; setLoadRequired(); resetLoadedFields(); this.state.makeClean(); replaceSCOFields(); if (doChangeChecking) { this.origState.clear(); maintainOrigState(state, rpm); } else { this.origState.clear(); } toBeEvictedFlag = false; } COM: <s> this is called from commit and retain values is set </s>
funcom_train/49268409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ObjectMapper determineResultMapping(Method source, Method target) { Class<?> sourceResult = source.getReturnType(); Class<?> targetResult = target.getReturnType(); if (sourceResult == Void.TYPE) { // method has no result, so needs no mapping return null; } else { return chooseObjectMapper(targetResult, sourceResult); } } COM: <s> determines the mapping of method results target type source type </s>
funcom_train/18165743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void definePackage(String className) { // Extract the package name from the class name, String pkgName = className; int index = className.lastIndexOf('.'); if (-1 != index) { pkgName = className.substring(0, index); } definePackage("__" + pkgName, "", "", "", "", "", "", null); } COM: <s> package definition is preceded by to ensure it never conflicts with actual class </s>
funcom_train/21325844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOutputFile(int runID, String savedDir, String evalFilename) { if (writeEvaluation2File) { try { String filename = savedDir + "/" + evalFilename + "-eval-"+ runID + ".csv"; evaluation = new PrintStream(new FileOutputStream(filename)); } catch (IOException e) { System.out.println("ERROR: can't set fitness" + "evaluation output file"); } } } COM: <s> create output stream file for recording fitness evaluation </s>
funcom_train/23944070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String exportPrivateKey(String alias, char[] password) { KeystoreManager mgr = new KeystoreManager(); mgr.load(locationPrefix + location, password()); ByteArrayOutputStream out = new ByteArrayOutputStream(); try { mgr.exportPrivateKey(alias, password, out, false); return out.toString("UTF-8"); } catch (IOException ex) { LOG.warn(ex.toString(), ex); return ""; } } COM: <s> export the given private key </s>
funcom_train/4405079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initComponents() { // We use a BorderLayout for the component BorderLayout layout = new BorderLayout(); this.setLayout(layout); layout.setHgap(5); // Add content panel at the center this.add(boardPanel, BorderLayout.CENTER); // Add NextPiecePanel and put it on the left (by default) this.add(nextPiecePanel, BorderLayout.WEST); boardPanel.getBoard().addBoardListener(nextPiecePanel); } COM: <s> this method initializes the layout of this panel </s>
funcom_train/45623316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addManagedAssembliesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ResolveManifestFilesType_managedAssemblies_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ResolveManifestFilesType_managedAssemblies_feature", "_UI_ResolveManifestFilesType_type"), MSBPackage.eINSTANCE.getResolveManifestFilesType_ManagedAssemblies(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the managed assemblies feature </s>
funcom_train/20893744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mixQuestions() { if (this.answers != null) { Random ran = new Random(); int random; Answer temp; for(int i=0;i<answers.length;i++){ random = ran.nextInt(3); temp = answers[i]; answers[i] = answers[random]; answers[random] = temp; } } } COM: <s> mixes up the questions so its impossible to know </s>
funcom_train/13874968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRootVariablePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RelationDomain_rootVariable_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RelationDomain_rootVariable_feature", "_UI_RelationDomain_type"), QvtrelationPackage.Literals.RELATION_DOMAIN__ROOT_VARIABLE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the root variable feature </s>
funcom_train/44315009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getDate( String name, Date defaultValue ) throws NamedValueParseException { String parameter = _accessor.getValue( name ); if ( isEmpty( parameter ) ) { return defaultValue; } Date value = toDate( parameter.trim() ); if ( value != null ) { return value; } throw new NamedValueParseException( name ); } COM: <s> returns the named parameter as a date </s>
funcom_train/46479163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addThreatActorPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Access_ThreatActor_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Access_ThreatActor_feature", "_UI_Access_type"), IS1Package.Literals.ACCESS__THREAT_ACTOR, true, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the threat actor feature </s>
funcom_train/33353093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel3() { if (jPanel3 == null) { jPanel3 = new JPanel(); jPanel3.setLayout(new FlowLayout()); jPanel3.setBounds(new Rectangle(9, 6, 249, 29)); jPanel3.add(dateText, null); jPanel3.add(timeText, null); } return jPanel3; } COM: <s> this method initializes j panel3 </s>
funcom_train/42534637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reportDelete (){ String htmFileName = Global.WorkDir + Application.FS + "reports" // NOI18N + Application.FS + reportName + ".htm"; // NOI18N boolean success = (new File(htmFileName)).exists(); if (success) { success = (new File(htmFileName)).delete(); } } COM: <s> deletes a report file </s>
funcom_train/44841086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String toString(Object obj) { if (obj instanceof java.util.Date) { return dateTimeMSFormat.format((java.util.Date) obj); } else if (obj instanceof java.util.Calendar) { return dateTimeMSFormat.format(((java.util.Calendar) obj).getTime()); } else return obj.toString(); } COM: <s> converts an object into a string </s>
funcom_train/5860879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean doSave() { if (gameDataFile == null) { if (!getFilename()) return false; } // if (!GameDataIO.save(gameDataFile, gameData)) { // // TODO: Better error handling // System.out.println("Error saving."); // return (false); // } return true; } COM: <s> perform the actual save </s>
funcom_train/35282516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadStatsView() { statsView = new StatsView("Statistics View", assetManager, renderer.getStatistics()); // move it up so it appears above fps text statsView.setLocalTranslation(0, fpsText.getLineHeight(), 0); guiNode.attachChild(statsView); } COM: <s> attaches statistics view to gui node and displays it on the screen </s>
funcom_train/14244181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(final java.awt.event.ActionEvent event) { try { Object[] argValue = { _element }; _action.invoke(_actionObj,argValue); } catch(Exception e) { System.out.println(e.toString() + " in UMLListMenuItem.actionPerformed()"); } } COM: <s> this method is invoked when the menu item is selected </s>