__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/24627663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean eventBeforeAfter(AWTEvent e, Point rel) { if (super.eventBeforeAfter(e, rel)) return true; // posted by somebody else ////System.out.println("eBA "+getBrowser().getCurNode()); ////System.out.println("rel="+rel); return (rel!=null && contains(rel)); // opaque -- have to check because can be called by self when mouse moves outside } COM: <s> lets events pass through so disable behavior works </s>
funcom_train/28199774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent ae) { if (wasCancelled || (initTask != null)) { //If cancelled or already started, our job is done, go away. detach(); return; } if ((comp4Init != null) && comp4Init.isDisplayable()) { //If the component has a parent onscreen, we're ready to run. start(); } } COM: <s> impl of action listener called from hierarchy changed through a timer </s>
funcom_train/4779790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean removeMember(final AuthzUser user) throws AuthzNotGroupMemberException { assert users != null; LOGGER.debug("removeMember(AuthzUser) entered. user={}", user); Preconditions.checkNotNull(user, "User is null"); if (!users.contains(user)) { LOGGER.error("removeMember(AuthzUser) user is not a member of this group"); throw new AuthzNotGroupMemberException(); } return users.remove(user); } COM: <s> remove user member </s>
funcom_train/50040125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(GenomicAnnotation arg0) { if(getChromosome() != null && arg0.getChromosome() != null && !getChromosome().equals(arg0.getChromosome())) { return getChromosome().compareTo(arg0.getChromosome()) * 1000000000; } return getStart() != arg0.getStart() ? getStart() - arg0.getStart() : getEnd() - arg0.getEnd(); } COM: <s> default compare to method if annotations are in the same chromosome </s>
funcom_train/42887060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean remove(Object elt) { int i = indexFor(hash(elt), table.length); Entry<E> prev = table[i]; Entry<E> e = prev; while (e != null) { Entry<E> next = e.next; if (e.val.equals(elt)) { size--; if (prev == e) table[i] = next; else prev.next = next; return true; } prev = e; e = next; } return false; } COM: <s> removes the specified object from this set if present </s>
funcom_train/28751717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPassed(Long newVal) { if ((newVal != null && this.passed != null && (newVal.compareTo(this.passed) == 0)) || (newVal == null && this.passed == null && passed_is_initialized)) { return; } this.passed = newVal; passed_is_modified = true; passed_is_initialized = true; } COM: <s> setter method for passed </s>
funcom_train/22589325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeFields() { fields = new Vector(); addFieldTHIS(); addFieldGETCLASS(); if (inspectedObject.getClass().isArray()) { this.addArrayFields(); return; } if (!basicInspector) { if (inspectedObject instanceof Collection) { this.addCollectionFields(); return; } else if (inspectedObject instanceof Map) { this.addMappingFields(); return; } else if (inspectedObject instanceof Class) { this.addClassFields(); return; } } this.addObjectFields(); return; } COM: <s> initializes the fields according to the objects type </s>
funcom_train/8774091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireConnected(final Stream stream) { assert stream != null; // to prevent ConcurrentModificationException ApplicationListener[] myListeners = this.listeners.toArray(new ApplicationListener[0]); for(ApplicationListener listener: myListeners) { try { listener.connected(stream); } catch(Throwable e) { Utils.handleUncaughtException(e, exceptionHandler); } } } COM: <s> fire an event if a ap2 ap connection is connected </s>
funcom_train/37518371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void extractFields() { ArrayList results = new ArrayList(); for( int i = 0; i < fieldsAndInits.length; i++ ) { if( fieldsAndInits[i] instanceof JFieldDeclarationType ) { results.add( fieldsAndInits[i] ); } } fields = new JFieldDeclarationType[results.size()]; fields = (JFieldDeclarationType[]) results.toArray( fields ); } COM: <s> extracts the field declarations from code fields and inits code </s>
funcom_train/11677282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EndpointDefinition createEndpointDefinition(OMElement elem) { OMAttribute address = elem.getAttribute(new QName("uri")); EndpointDefinition endpointDefinition = new EndpointDefinition(); if (address != null) { endpointDefinition.setAddress(address.getAttributeValue()); } extractCommonEndpointProperties(endpointDefinition, elem); extractSpecificEndpointProperties(endpointDefinition,elem); return endpointDefinition; } COM: <s> creates an endpoint definition instance using the xml fragment specification </s>
funcom_train/49046743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButtonMenuItem getJRadioButtonMenuItem3() { if (tankOpt3 == null) { tankOpt3 = new JRadioButtonMenuItem(); tankOpt3.setText("10"); //tankOpt3.setBackground(Color.WHITE); //tankOpt3.setPreferredSize(new Dimension(10,10)); tankOpt3.setBorder(null); } return tankOpt3; } COM: <s> this method initializes tank opt3 </s>
funcom_train/7647227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getChars(int start, int end, char[] buffer, int index) { // NOTE last character not copied! // Fast range check. if (0 <= start && start <= end && end <= count) { System.arraycopy(value, start + offset, buffer, index, end - start); } else { throw new StringIndexOutOfBoundsException(); } } COM: <s> copies the specified characters in this string to the character array </s>
funcom_train/48046000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLatestVersionID(String regionID) { ZoneRules.checkNotNull(regionID, "Region ID must not be null"); for (ZoneRulesVersion version : versions.get().values()) { if (version.isRegionID(regionID)) { return version.getVersionID(); } } throw new CalendricalException("Unknown time-zone region: " + groupID + ':' + regionID); } COM: <s> gets the latest available version of the groups data for a region </s>
funcom_train/32823560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSyncConflictResolutionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SemiConnectedWorkflow_syncConflictResolution_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SemiConnectedWorkflow_syncConflictResolution_feature", "_UI_SemiConnectedWorkflow_type"), ModelPackage.eINSTANCE.getSemiConnectedWorkflow_SyncConflictResolution(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the sync conflict resolution feature </s>
funcom_train/36125169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void include(String url) throws ServletException, IOException { validateNonNullParameter(url, "url"); if (!url.startsWith("/")) { url = getRequest().getServletPath() + getControllerPath() + url; } getContext().getRequestDispatcher(url).include( getRequest().getServletRequest(), getResponse().getServletResponse()); } COM: <s> includes the content of a resource servlet jsp page html file in the </s>
funcom_train/16618787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateImageText() { lockcmb = true; cmbImages.setSelectedIndex(currentImageIndex); lblPicImage.setText(String.format(lblPicImageFormatString, numberOfImages)); lblTimePicImage.setText(new SimpleDateFormat("HH:mm:ss").format(session.getNestImage().getTimeDateTaken())); lockcmb = false; } COM: <s> updates the picture labels with the correct time and image number </s>
funcom_train/4974010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int lastIndexOf(Object o, int index) { if (index >= elementCount) throw new IndexOutOfBoundsException(index + " >= "+ elementCount); if (o == null) { for (int i = index; i >= 0; i--) if (elementData[i]==null) return i; } else { for (int i = index; i >= 0; i--) if (o.equals(elementData[i])) return i; } return -1; } COM: <s> returns the index of the last occurrence of the specified element in </s>
funcom_train/45247893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JRadioButton getJRadioButtonRaizSim() { if (jRadioButtonRaizSim == null) { jRadioButtonRaizSim = new JRadioButton(); jRadioButtonRaizSim.setBounds(new Rectangle(453, 61, 64, 21)); jRadioButtonRaizSim.setOpaque(false); jRadioButtonRaizSim.setSelected(true); jRadioButtonRaizSim.setText("Sim"); } return jRadioButtonRaizSim; } COM: <s> this method initializes j radio button raiz sim </s>
funcom_train/47989653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkAllLanguagesOccurence(Set<String> foundLangs, int line) { if(!foundLangs.containsAll(allLanguages)) { printWarning(line, "The specific-language blocks do not handle " + "all possible languages"); for(String lang: allLanguages) { if(!foundLangs.contains(lang)) { System.err.println(" The " + lang + " language is missing."); } } } } COM: <s> checks if the set of found languages contains all posible supported </s>
funcom_train/10231380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void matchFragmentPair(URI fragment1, URI fragment2, MappingConsumer callback, List<AbstractMappingFilter> filters) { logger.info("Scheduling matching of fragments " + fragment1.toString() + " and " + fragment2.toString()); m_openTasks.add(new FragmentMatchingTask(fragment1, fragment2, callback, filters)); if(!m_bStarted) start(); } COM: <s> adds a new fragment pair to be matched </s>
funcom_train/5669135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void _error(String info) { Object[] message = new Object[1]; String string = info; message[0] = _ellipsis(string, 400); Object[] options = {"Dismiss"}; // Show the MODAL dialog int selected = JOptionPane.showOptionDialog( _context, message, "Error", JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE, null, options, options[0]); } COM: <s> show the specified error message </s>
funcom_train/38864341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print() { // Print Title System.out.println(); System.out.println(Title); System.out.println(SubTitle1); System.out.println(SubTitle2); switch(getFormat) { case 0: printByYear(); break; case 1: printByMonth(); break; case 2: printByDay(); break; } } COM: <s> print the inventory depending on which format was requested </s>
funcom_train/38806640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected GanttPolygon createDiamondShape(int topX, int topY, int width, int height) { topY += padding_v; int[] xPoints = new int[]{topX, topX + width / 2, topX, topX - width / 2}; int[] yPoints = new int[]{topY, topY + height / 2, topY + height, topY + height / 2}; return new GanttPolygon(xPoints, yPoints, 4); } COM: <s> create diamond shape for milestone </s>
funcom_train/1012755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColor(Color color) throws GLException { boolean noNeedForFlush = (haveCachedColor && (cachedColor != null) && color.equals(cachedColor)); if (!noNeedForFlush) { flushGlyphPipeline(); } getBackingStore().setColor(color); haveCachedColor = true; cachedColor = color; } COM: <s> changes the current color of this text renderer to the supplied </s>
funcom_train/8639458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String printStack() { if (stack.empty()) return ""; StringBuffer s = new StringBuffer(); for (int k = 0; k < stack.size(); ++k) s.append('.').append((String)stack.get(k)); return s.substring(1); } COM: <s> outputs the stack as the sequence of elements separated </s>
funcom_train/44778794
/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 (!(obj instanceof Identifier)) { return false; } Identifier id = (Identifier) obj; if (myString == null) { try { return myInt == id.getNumber(); } catch (NumberFormatException nfe) { // do nothing } } return toString().equals(obj.toString()); } COM: <s> this determines if two identifiers </s>
funcom_train/50090214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processIOSettingQuestion(IOSetting setting) { String questionName = setting.getName(); if (props != null) { String propValue = props.getProperty(questionName, setting.getSetting()); try { setting.setSetting(propValue); } catch (CDKException exception) { String message = "Submitted Value (" + propValue + ") is not valid!"; out.println(message); } } } COM: <s> processes the iosettings by listing the question giving the options </s>
funcom_train/8407444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Node getNodeFromCache() { if (cacheSize == 0) { return null; } Node cachedNode = firstCachedNode; firstCachedNode = cachedNode.next; cachedNode.next = null; // This should be changed anyway, but defensively // set it to null. cacheSize--; return cachedNode; } COM: <s> gets a node from the cache </s>
funcom_train/19300714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getEscapedForm() { if (escapedForm == null) { StringBuffer buffer = new StringBuffer(EscapeUtil.escape(getLexicalForm())); buffer.insert(0, "\""); buffer.append("\""); appendType(buffer); escapedForm = buffer.toString(); } return escapedForm; } COM: <s> provide a legible representation of a literal following the n triples </s>
funcom_train/38350132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPages() { mainPage = new ProjectCreationPage("basicNewProjectPage"); mainPage.setTitle("JAXB Project"); mainPage.setDescription("Create a new project resource."); addPage(mainPage); fJavaProjectPage = new NewJavaProjectWizardPage(ResourcesPlugin.getWorkspace().getRoot(), mainPage); } COM: <s> helper method creates the pages for the wizard </s>
funcom_train/1224316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addBillingDetails(BillingDetails billingDetails) { if (billingDetails == null) throw new IllegalArgumentException("Can't add a null BillingDetails."); this.getBillingDetails().add(billingDetails); if (getBillingDetails().size() == 1) { setDefaultBillingDetails(billingDetails); } } COM: <s> adds a tt billing details tt to the set </s>
funcom_train/17143173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public ScriptEngine getScriptEngineByName(String language) { ScriptEngine scriptEngine = _scriptEngineMap.get(language); if (scriptEngine == null) { scriptEngine = getNewScriptEngineByName(language); _scriptEngineMap.put(language, scriptEngine); } return scriptEngine; } COM: <s> i should also create one for extension </s>
funcom_train/48366607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Device deviceForDescriptor(final DeviceDescriptor descriptor) { if (descriptor != null) { final Attribute attr = descriptor.getAttributeForDescriptor(DeviceDb.ATTRIBUTE_NAME); final Variant v = attr.getValue(); final String name = v.asString(); return deviceForName(name); } return null; } COM: <s> the descriptor of a remote bluetooth device </s>
funcom_train/4358538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HttpSession getSession() { if (facade == null){ if (SecurityUtil.isPackageProtectionEnabled()){ final StandardSession fsession = this; facade = (StandardSessionFacade)AccessController.doPrivileged(new PrivilegedAction(){ public Object run(){ return new StandardSessionFacade(fsession); } }); } else { facade = new StandardSessionFacade(this); } } return (facade); } COM: <s> return the code http session code for which this object </s>
funcom_train/123362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(CharSequence csq) throws IOException { final int length = csq.length(); for (int i = 0; i < length;) { char c = csq.charAt(i++); if (c < 0x80) { _byteBuffer.put((byte) c); } else { write(c); } } } COM: <s> writes the specified character sequence </s>
funcom_train/3898057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void ensureDefaultRootEntries() { /* * There should be one "Resources" group */ DataComponent[] rootLD = getRootEntry().getChildren(ResourceGroupEntry.class); if(rootLD.length == 0) { ResourceGroupEntry rg = new ResourceGroupEntry(this, "Resources"); getRootEntry().addChild(rg); } } COM: <s> ensure that there are always default root group entries </s>
funcom_train/29632314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putFingerprintCA2(byte[] iFpr) throws OpenPGPCardException{ if(iFpr.length != 20) throw new IllegalArgumentException("Fingerprint must be exactly 20 bytes long"); putGenericData(TLV_FPR_CA2[0],TLV_FPR_CA2[1],iFpr,20); } COM: <s> stores the ca2 fingerprint 20 bytes on the card for ultimately trusted keys </s>
funcom_train/42068323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSamplerDataPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ChunkSampler_samplerData_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ChunkSampler_samplerData_feature", "_UI_ChunkSampler_type"), WavPackage.Literals.CHUNK_SAMPLER__SAMPLER_DATA, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the sampler data feature </s>
funcom_train/47702799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List readConfigXML(String xmlname) throws Exception { logger.log(Level.INFO, "Read databse configuration file " + xmlname); ConfigurationXMLReader r = new ConfigurationXMLReader(xmlname); this.list = r.parse(); if (this.list == null) { logger.log(Level.SEVERE, "Error: Read configuration error!"); throw new Exception("Error: Read configuration error!"); } logger.log(Level.INFO, "Read databse configuration file is completed!"); return this.list; } COM: <s> read xml file according to the fullfilepath of xml </s>
funcom_train/13895516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IsotopeOrderItem getIOItem(int isotopeOrderItemID) { IsotopeOrderItem item = null; try { ResultSet rs = this.ids.getIOItem(isotopeOrderItemID); if (rs.next()) { // get the first and only record; item = setIsotopeOrderItem(rs); } } catch (SQLException e) { log .warning("An attempt was made to get and IO Item and it failed.."); log.warning(e.getMessage()); } finally { this.cleanUp(); } return item; } COM: <s> this method gets a specified line item </s>
funcom_train/3581921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void expandDown(double x) { int addSize = (int) Math.ceil((minimum - x) / binWidth); int newContents[] = new int[addSize + contents.length]; minimum -= addSize * binWidth; int n; newContents[0] = 1; for (n = 1; n < addSize; n++) newContents[n] = 0; for (n = 0; n < contents.length; n++) newContents[n + addSize] = contents[n]; contents = newContents; } COM: <s> expand the contents so that the lowest bin include the specified </s>
funcom_train/35722329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { MainView mainView = new MainView(); NextCoffeeServiceClientImpl nextCoffeeService = new NextCoffeeServiceClientImpl( GWT.getModuleBaseURL() + "nextcoffee" ); RootPanel.get("mainView").add(mainView); mainView.addClientList(nextCoffeeService); //RootPanel.get("mainView").add( nextCoffeeService.getView() ); } COM: <s> this is the entry point method </s>
funcom_train/26245625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getProperty(String name) { String value = ""; if (planet == null) return value; try { Method method = planet.getClass().getMethod("get"+name); Object result = method.invoke(planet); value = ""+result; try { double i = Double.parseDouble(value); DecimalFormat format = new DecimalFormat(); format.setMaximumFractionDigits(1); value = format.format(i); } catch (NumberFormatException e) { // Do nothing. } } catch (Throwable e) { e.printStackTrace(); value = ""; } return value; } COM: <s> get the named property from the planet object </s>
funcom_train/32823919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean performFinish() { super.performFinish(); WizardNewProjectCreationPage name = ((WizardNewProjectCreationPage)super.getStartingPage()); IProject project = null; String proj=name.getProjectName(); project=ResourcesPlugin.getWorkspace().getRoot().getProject(proj); genCode = new GenerateCode(project); try { genCode.createFolders(); genCode.populateMIDPLibs(); } catch (Exception ex) { ex.printStackTrace(); } return true; } COM: <s> this method is called when finish button is pressed in </s>
funcom_train/5437311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createColumnInfo() { int cols = getNumCols(); colInfo = new ColumnInfo[cols]; for(int i = 0; i < cols; i++) { int format = _getColumnFormat(cfd, i); String title = _getColumnTitle(cfd, i); int width = _getColumnWidth(format); colInfo[i] = new ColumnInfo(format, title, width); } } COM: <s> create the column data corresponding to the </s>
funcom_train/49410966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String setSpecEncode(String input) { String str = null; try { str = URLEncoder.encode(input, "UTF-8"); } catch (UnsupportedEncodingException ex) { ex.printStackTrace(); return null; } return str.replace('%', '*'); } COM: <s> urlencode set spec values then replace with </s>
funcom_train/8347475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTxtProvinciaD() { if (txtProvinciaD == null) {//GEN-END:|87-getter|0|87-preInit // write pre-init user code here txtProvinciaD = new TextField("Provincia", null, 32, TextField.ANY);//GEN-LINE:|87-getter|1|87-postInit // write post-init user code here }//GEN-BEGIN:|87-getter|2| return txtProvinciaD; } COM: <s> returns an initiliazed instance of txt provincia d component </s>
funcom_train/22962398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParameter(String key, Object value) { if(parameters.get(key) != null) { throw new IllegalStateException("Parameter '" + key + "' already present for " + (reportParameters.get(key) == null ? "the main report." : "subreport: '" + reportParameters.get(key) + "'.")); } parameters.put(key, value); } COM: <s> parameter must not colide with other subreport or main report parameters </s>
funcom_train/36426109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(final Object o) { if (o == null || o.getClass() != this.getClass()) { return false; } return Relation.unify(((AbstractFactAppraisal) o).getRelation(), null, this.getRelation(), null); } COM: <s> attention equals of abstract fact appraisal violates the hash code equals contract </s>
funcom_train/33492621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writePage() throws IOException { try { FileOutputStream foStream = new FileOutputStream(outputFile); foStream.write(content); foStream.close(); done = true; } catch (FileNotFoundException ex) { ex.printStackTrace(); } catch (IOException ex) { ex.printStackTrace(); } } COM: <s> command to write this page to disc </s>
funcom_train/24934790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean occupiesNodeOnEdge( int x, int y ) { Iterator it = fNodesOnEdge.iterator(); while ( it.hasNext() ) { NodeOnEdge node = (NodeOnEdge) it.next(); if ( node.occupies( x, y ) && ( !isNodeSpecial( node ) || shouldNodeBeMoveableRightNow( node ) ) ) { return true; } } return false; } COM: <s> checkes if there is a node laying under the x y coordinate </s>
funcom_train/14157942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel getMSecondCardLabel() { if (mSecondCardLabel == null) { mSecondCardLabel = new JLabel(); mSecondCardLabel.setText(""); mSecondCardLabel.setName("mSecondCardLabel"); mSecondCardLabel.setIcon(new ImageIcon(getClass().getResource("/lanholdempoker/images/cardset/back.png"))); mSecondCardLabel.setBackground(new Color(0.3f, 0.4f, 0.3f)); } return mSecondCardLabel; } COM: <s> this method initializes m second card label </s>
funcom_train/38538020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeRangeZ(Number s, Number e) throws PropagationFailureException { if (currentNz != null) { currentNz.removeRange(s,e); } else if (currentGz != null){ for (int i=0; i<currentGz.getNodeCount(); i++) { ((NumNode) currentGz.getNode(i)).removeRange(s,e); } } } COM: <s> removes a range of values from the domain for the current z </s>
funcom_train/8483486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NATLocalFarRef createEmptyActor() throws InterpreterException { Packet noParams = new Packet(NATTable.EMPTY); Packet noinitcode = new Packet(new NATMethod(Evaluator._ANON_MTH_NAM_, NATTable.EMPTY, new AGBegin(NATTable.of(Evaluator.getNil())), NATTable.EMPTY)); return createActor(noParams, noinitcode); } COM: <s> auxiliary creation method to create an actor with an empty behaviour </s>
funcom_train/20932127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCards(ArrayList<Card> c){ int i=0; for(Card card : c){ this.cards.add(card); card.setBounds( 2*CARD_YSPACING, 0, CARD_WIDTH, CARD_HEIGHT); this.add(card, 0); i++; } trimToSize(); } COM: <s> adds a given collection of cards to the stack </s>
funcom_train/38315652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doEndTag() throws JspTagException { String val = null; JLCPUser user = (JLCPUser) pageContext.getAttribute("currentBuddy"); if (user == null) return SKIP_PAGE; val = user.getLastName(); JspWriter out = pageContext.getOut(); try { out.write(val); } catch (IOException e) { throw new JspTagException("Error writing to page"); } return EVAL_PAGE; } COM: <s> get the user from the parent tag and print out the users lastname </s>
funcom_train/18892886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTimeBased(boolean timeBased) { if (timeBased) { if (filter != null && isTimeBased()) return; this.filter = new TimeFilter(originalFilter); } else { if (filter != null && !isTimeBased()) return; this.filter = originalFilter; } } COM: <s> sets the usage of time based filtering besides the normal filtering </s>
funcom_train/19746331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean createDirIfNotExists() { File dir = new File(backupDirPath); boolean created = false; if (!dir.exists()) { if (log.isDebugEnabled()) { log.debug(backupDirPath + " does not exist, trying to create it"); } created = dir.mkdir(); } else { created = true; } return created; } COM: <s> tries to create a dbbackup directory if it does not exist </s>
funcom_train/550341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initTables() { if (runningFromShell) splash.setMessage("Initializing components..."); attributeTableModel.addErrorListener(errorHistory); attributeTableModel.addErrorListener(errorPopup); commandTableModel.addErrorListener(errorHistory); commandTableModel.addErrorListener(errorPopup); if (runningFromShell) splash.setMessage("Initializing collections..." + done); } COM: <s> initialization of tables attributes command etc </s>
funcom_train/31040837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkAcceptFlags(int acceptFlags) { boolean components = (acceptFlags & TapestryNamespaceLookup.ACCEPT_COMPONENTS) > 0; boolean pages = (acceptFlags & TapestryNamespaceLookup.ACCEPT_PAGES) > 0; Assert.isTrue(!(components && pages), "error: trying to lookup both pages & components!"); Assert.isTrue((components || pages), "error: must seach for one of pages or components"); this.acceptFlags = acceptFlags; } COM: <s> method check accept flags </s>
funcom_train/36915704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { sendAll(new Message("CLOSED")); while (broadcastDispatcher.size() > 0) { try { Thread.sleep(10); } catch (InterruptedException ex) {} } try { socket.close(); while (!socket.isClosed()) {} } catch (IOException ex) { System.out.println("[SERVER] Could not close connection, its probably been closed for us..."); } listening = false; } COM: <s> stops listening and closes all existing connections </s>
funcom_train/4535049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDefaultConferenceService() { if (conferenceService == null) { try { Collection<String> col = MultiUserChat.getServiceNames(SparkManager.getConnection()); if (col.size() > 0) { conferenceService = col.iterator().next(); } } catch (XMPPException e) { Log.error(e); } } return conferenceService; } COM: <s> returns the default conference service </s>
funcom_train/16785470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel9() { if (jPanel9 == null) { jLabel7 = new JLabel(); jLabel7.setText("password: "); jLabel7.setForeground(Color.GRAY); jPanel9 = new JPanel(); jPanel9.setLayout(new BorderLayout()); jPanel9.add(jLabel7, BorderLayout.WEST); jPanel9.add(getJTextField2(), BorderLayout.CENTER); getJTextField2().setEnabled(false); } return jPanel9; } COM: <s> this method initializes j panel9 </s>
funcom_train/43558467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void collectInitialized(Canvas canvas) { // some renderer info set("canvas.class", canvas.getClass().getCanonicalName()); final CanvasRenderer renderer = canvas.getCanvasRenderer(); set("canvas.renderer.class", renderer.getClass().getCanonicalName()); if (renderer instanceof LwjglCanvasRenderer) { set("canvas.renderer.lwjgl.adapter", Display.getAdapter()); set("canvas.renderer.lwjgl.version", Display.getVersion()); } } COM: <s> run this after you initialized a canvas </s>
funcom_train/45247830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JNumberFloatField getJNumberFloatFieldRelacaoTN93() { if (jNumberFloatFieldRelacaoTN93 == null) { jNumberFloatFieldRelacaoTN93 = new JNumberFloatField(); jNumberFloatFieldRelacaoTN93.setLocation(new Point(345, 90)); jNumberFloatFieldRelacaoTN93.setFont(new Font("Arial", Font.PLAIN, 12)); jNumberFloatFieldRelacaoTN93.setSize(new Dimension(65, 20)); } return jNumberFloatFieldRelacaoTN93; } COM: <s> this method initializes j number float field relacao tn93 </s>
funcom_train/19426354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assignPlayerToNation(Player player, Nation nation) { // Mentioned in texinfo-docs (2005-07-03) assert nation.getPlayer() == null : "Game.assignPlayerToNation says: " + "Attempt to assign one Nation to multiple Players!!!"; assert players.contains(player); assert nations.contains(nation); player.addNation(nation); nation.setPlayer(player); // nationIDs.add(nation.getID()); } COM: <s> assigns the given player to the given nation </s>
funcom_train/2852826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean mkdir (String base) throws Exception { if (base == null || base.equals("")) throw new IllegalArgumentException ( "null or empty base directory name"); String s = new StringBuffer (base) .append(dirName).toString(); File dir = new File(s); if (dir.exists()) dir.delete(); return dir.mkdir(); } COM: <s> create the physical directory below the given base directory </s>
funcom_train/26317485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reverseFacing() { facing = MovePath.getAdjustedFacing(facing, MoveStepType.TURN_RIGHT); facing = MovePath.getAdjustedFacing(facing, MoveStepType.TURN_RIGHT); facing = MovePath.getAdjustedFacing(facing, MoveStepType.TURN_RIGHT); } COM: <s> for yaws reverse the current facing </s>
funcom_train/51129546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateStats(LeagueElement leagueElement) { TeamStats[] teamStats = team.getAllStats(leagueElement); PlayerStats[] playerStats = player.getAllStats(leagueElement); for (int i = 0; i < teamStats.length; i++) { playerStats[i].addPenaltyMinutes(2); teamStats[i].addPenaltyMinutes(2); } } COM: <s> update team and player stats </s>
funcom_train/50464080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void storeCurrentDesktop() { BLXStorageHandler docFactory = DocSrvBLXStorageHandler.getRootDocHandler(); docFactory = docFactory.getChildHandler(DESKTOP_PATH); try { if(currentDesktop.isDirty() || saveAllChildren) { currentDesktop.store(saveAllChildren, docFactory); } } catch(Exception _exp) { _exp.printStackTrace(); } } COM: <s> store the current desktop into a document file </s>
funcom_train/7426732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Component findShowingComponentAt(final Component component, final int x, final int y) { if (!component.contains(x, y)) { return null; } if (component instanceof Container) { final Container contain = (Container) component; final Component child = findShowingChildAt(contain, x, y); if (child != null) { return child; } } return component; } COM: <s> finds the best visible component or subcomponent at the specified </s>
funcom_train/20533742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logEnd(ActionMapping mapping, HttpServletRequest request) { LOG.trace(new StringBuffer(128).append("Requested Path [") .append(mapping.getPath()).append("] - End [") .append(mapping.getType()).append("]")); } COM: <s> logs the end of the execution of an action </s>
funcom_train/39398797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performTasks() { synchronized (taskQueue) { Iterator<Task> iter = taskQueue.listIterator(); while (iter.hasNext()) { Task job = (Task)iter.next(); iter.remove(); job.perform(); } } synchronized (connectionQueue) { Iterator<Connection> iter = connectionQueue.listIterator(); while (iter.hasNext() && !maxConnectionsReached()) { Connection connection = (Connection)iter.next(); iter.remove(); try { connection.connect(); } catch (IOException e) { connection.close("IO Exception occured while connecting."); } } } } COM: <s> removes timeouted peers from the data structures of the download manager instance </s>
funcom_train/51830129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getSnapButton() { if (snapButton == null) { snapButton = new JButton(); snapButton.setText(localization .getProperty("loc-RemoteControlTab-snapButton")); snapButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { camera.takeSnapShot(null); } }); } return snapButton; } COM: <s> this method initializes snap button </s>
funcom_train/35280704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateLastFilterIndex() { lastFilterIndex = -1; for (int i = filters.size() - 1; i >= 0 && lastFilterIndex == -1; i--) { if (filters.get(i).isEnabled()) { lastFilterIndex = i; return; } } if (lastFilterIndex == -1) { cleanup(); } } COM: <s> compute the index of the last filter to render </s>
funcom_train/37079143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocationRelativeToFrame(Dimension frameDim) { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); // set offset from frame 20,30 int x = (screenSize.width - frameDim.width) / 2 + 20; int y = (screenSize.height - frameDim.height) / 2 + 30; getFrame().setLocation(x,y); } COM: <s> set location of type panel relative to apollo frame dimension </s>
funcom_train/34616843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getMinLeadingSpacesCount(List<List<StyledToken>> styledTokensCopy) { int minCount = Integer.MAX_VALUE; for (int i = 0; i < getLines().size(); i++) { List<StyledToken> line = styledTokensCopy.get(i); if (!isEmptyLine(line)) { int leadingSpacesCount = getLeadingSpacesCount(line); minCount = Math.min(minCount, leadingSpacesCount); } } return minCount; } COM: <s> returns the minimum number of leading spaces of all lines </s>
funcom_train/44870091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WCMCrossHairBean getWCMCrossHairBean() { if (WCMCrossHairBean == null) { WCMCrossHairBean = new WCMCrossHairBean(); WCMCrossHairBean.setColor(new Color(255, 153, 255)); WCMCrossHairBean.setX1(getXInput()); WCMCrossHairBean.setY1(getFSlope()); if (presentation) { WCMCrossHairBean.setH(9); WCMCrossHairBean.setV(9); WCMCrossHairBean.setLineWidth(3); } } return WCMCrossHairBean; } COM: <s> this method initializes wcmcross hair bean </s>
funcom_train/29881691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrentZoomFactor(double pZoomFactor) { mCurrentZoomFactor = pZoomFactor; // From the passed in zoom factor, find which is the zoom notch index for (int i = sZoomArrayIndexMin; i <= sZoomArrayIndexMax; i++) { if (sZoomNotchesArray[i] >= pZoomFactor) { mZoomArrayIndex = i; break; } } } COM: <s> set the current zoom factor </s>
funcom_train/16513308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Distribution (IDistribution original){ this.scenario = original.getScenario(); this.min = original.getMin(); this.max = original.getMax(); this.mean = original.getMean(); this.type = original.getType(); this.variance = original.getVariance(); } COM: <s> creates an copy of the handed original object </s>
funcom_train/41720659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addListeners() { model.addAttributeChangeListener(new AttributeChangeListener<BlockShape>() { public void attributesChanged( AttributeChangeEvent<BlockShape> e) { processAttributeChanged(e); } }); model.addObjectListener(new ObjectListener() { public void objectAdded(ObjectEvent e) { processObjectAdded(e); } public void objectRemoved(ObjectEvent e) { processObjectRemoved(e); } }); } COM: <s> add the listeners for this instance </s>
funcom_train/43887797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public AttributeDescriptor node(ComplexType schema, AttributeType type) { for (Iterator itr = list(schema).iterator(); itr.hasNext();) { AttributeDescriptor node = (AttributeDescriptor) itr.next(); if (node.type() == type) { return node; } } return null; } COM: <s> finds the node associated with the provided type </s>
funcom_train/48601310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TestJUnitTeam createTeam(Attributes attrs) { TestJUnitTeam team = new TestJUnitTeam(); //getting the values of the team's fields team.setIid(attrs.getValue("", "iid")); team.setName(attrs.getValue("", "name")); team.setUpdated(attrs.getValue("", "updated")); team.setSummary(attrs.getValue("", "summary")); return team; } COM: <s> this method permits to create a new team </s>
funcom_train/41151483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkBuiltStatus() { boolean result = m_ClassifierBuilt; if ( (!result) && (m_Testset != null) ) { try { buildClassifier(m_Trainset, m_Testset); result = m_ClassifierBuilt; } catch (Exception e) { throw new IllegalStateException(e); } } return result; } COM: <s> checks whether the classifier was built and if not performs the build but </s>
funcom_train/12560989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lAddCommand(Command cmd, int i) { super.lAddCommand(cmd, i); // restore the value of the original appearanceMode if ((imgItem.numCommands >= 1) && (appearanceMode == Item.PLAIN)) { appearanceMode = imgItem.appearanceMode == Item.BUTTON ? Item.BUTTON : Item.HYPERLINK; lRequestInvalidate(true, true); } } COM: <s> notifies l f of a command addition in the corresponding image item </s>
funcom_train/23828186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTypes(Repository in) { try { RepositoryConnection conn = in.getConnection(); RepositoryResult<Statement> si = conn.getStatements(getOrigin(), RDF.TYPE, null, true); while (si.hasNext()) { Statement s = si.next(); this._types.add((Resource) FresnelUtilities.dupValue(s.getObject())); } si.close(); conn.close(); } catch (RepositoryException e) { // TODO: how to handle this exception } } COM: <s> sets rdf type values for the resource </s>
funcom_train/38291719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void movedAgent(AID agentID, ContainerID srcID, ContainerID destID) throws NotFoundException { AgentDescriptor ad = platformAgents.acquire(agentID); if (ad == null) { throw new NotFoundException("Agent "+agentID.getName()+" not found in GADT"); } ad.setContainerID((ContainerID)destID); fireMovedAgent((ContainerID)srcID, (ContainerID)destID, agentID); platformAgents.release(agentID); } COM: <s> notify the platform that an agent has just moved </s>
funcom_train/29770349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyNewsListeners(FeedSpec fs, NewsItem[] news) { LOGGER.finest("(" + news.length + ") news arrived for feed: " + fs); List<NewsListener> list = listeners.get(fs); if (list != null) { for (NewsListener nl : list) { nl.onNews(news); } } } COM: <s> notifies news listener abount upcoming news items </s>
funcom_train/16913380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix getCovarianceMatrix() { Matrix m = new Matrix(dimensions, dimensions); for (int i = 0; i < dimensions; i++) { for (int j = i; j < dimensions; j++) { m.set(i, j, getCovariance(i, j)); if (i != j) { m.set(j, i, m.get(i, j)); // This is a symmetric matrix } } } return m; } COM: <s> returns a covariance matrix for the dataset </s>
funcom_train/44165704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element updateNationType(Element element) { Game game = getFreeColClient().getGame(); Player player = game .getFreeColGameObject(element.getAttribute("player"), Player.class); NationType nationType = getGame().getSpecification() .getNationType(element.getAttribute("value")); player.setNationType(nationType); gui.refreshPlayersTable(); return null; } COM: <s> handles an update nation type message </s>
funcom_train/40866562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map toMap() { int itemNum = orderLineCount; if(shippingAndHandlingAmount != null) { super.put("item_" + itemNum + "_unitPrice", shippingAndHandlingAmount.toString()); super.put("item_" + itemNum + "_productCode", "shipping_and_handling"); } this.validate(); return super.toMap(); } COM: <s> returns a map containing the key value pairs for this request </s>
funcom_train/10010232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void split(Region region, int separatorNr) { if (separatorNr < separatorList.size()) { String content = region.getContent(); String separator = separatorList.get(separatorNr); String[] childContentList = content.split(separator); for(String childContent : childContentList) { Region child = new Region(region, childContent); split(child, separatorNr + 1); region.addChild(child); } } } COM: <s> splits region using separator with given number from separator list </s>
funcom_train/3577679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDescriptionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_InterfacesType_description_feature"), getString("_UI_PropertyDescriptor_description", "_UI_InterfacesType_description_feature", "_UI_InterfacesType_type"), SchemaPackage.eINSTANCE.getInterfacesType_Description(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the description feature </s>
funcom_train/1226005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void mergeClusters(Group pSource, Group pTarget) { List<GraphVertex> lSourceNodes = pSource.getNodes(); for (int lNodeIndex = lSourceNodes.size()-1; lNodeIndex > -1; lNodeIndex--) { GraphVertex lVertex = lSourceNodes.get(lNodeIndex); pTarget.addNode(lVertex); pSource.removeNode(lVertex); } } COM: <s> merge two clusters </s>
funcom_train/13203767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ISupport firstChild() { ISupport ret = null; Node r = m_current.getFirstChild(); while (r!=null) { Node a = null; if ((ret=accept(r))==null) { // Check the descending while ((a=WalkerHelper.descendent(r, a))!=null && (ret=accept(a))==null); if (ret!=null) { r = a; break; } } else { break; } r=r.getNextSibling(); } if (r!=null) { m_current = r; } return ret; } COM: <s> gets the first child object implementing the interface </s>
funcom_train/36462919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void httpGetInvocationOneway() throws InvocationException { log.info("Doing a HTTP GET oneway invocation to endpoint "+ endpoint.toExternalForm()); try { newClient(); newMethod(endpoint, IConstants.HTTP_GET_METHOD); client.executeMethod(method); method.releaseConnection(); } catch(Exception e) { log.severe("Caught exception while invoking service:"); e.printStackTrace(); // do not give an error for fire and forget } } COM: <s> do a http get invocation to the endoint associated with this backend </s>
funcom_train/8689859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logVmCrash(FormatterElement[] feArray, JUnitTest test, String testCase) { logVmExit( feArray, test, "Forked Java VM exited abnormally. Please note the time in the report" + " does not reflect the time until the VM exit.", testCase); } COM: <s> take care that some output is produced in report files if the </s>
funcom_train/3925895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readObject(java.io.ObjectInputStream oos) throws java.io.IOException { try { GlobalProgressIndicator.markProgress(); oos.defaultReadObject(); } catch ( ClassNotFoundException e ) { e.printStackTrace(); throw new java.io.IOException(); } } COM: <s> read in serialized object mark progress if global progress indicator is set up </s>
funcom_train/4926740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPrizeMoneyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Tournament_prizeMoney_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Tournament_prizeMoney_feature", "_UI_Tournament_type"), DomainPackage.Literals.TOURNAMENT__PRIZE_MONEY, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the prize money feature </s>
funcom_train/46859088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMnuitmExportSimulation() { if (mnuitmExportSimulation == null) { mnuitmExportSimulation = new JMenuItem(); mnuitmExportSimulation.setText("Export..."); mnuitmExportSimulation.setIcon(new ImageIcon(getClass().getResource("/resources/icons/clear.png"))); mnuitmExportSimulation.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ExportSimulation(); } }); } return mnuitmExportSimulation; } COM: <s> this method initializes mnuitm export simulation </s>