__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/23411350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addParentObjectivePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Objective_parentObjective_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Objective_parentObjective_feature", "_UI_Objective_type"), OMPackage.Literals.OBJECTIVE__PARENT_OBJECTIVE, false, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the parent objective feature </s>
funcom_train/47320386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return " (" + center()[0] + ", " + center()[1] + ") " + minMax()[0] + ", " + minMax()[2] + " " + minMax()[1] + ", " + minMax()[3]; } COM: <s> enkel to string som gir fin info om alternativ for testing </s>
funcom_train/13850515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addProxyRoot(Class proxyClass, Collection roots) { Class[] interfaces = proxyClass.getInterfaces(); for (int j = 0; j < interfaces.length; j++) { addIfPublic(interfaces[j], roots); } Class superClass = proxyClass.getSuperclass(); if (superClass != null) { addProxyRoot(superClass, roots); } } COM: <s> add to the given set of roots the public interfaces implemented by </s>
funcom_train/18963683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void standardTreePrep() { TreeUtils.rotateByLeafCount(tree); treeNode = new PositionedNode(tree.getRoot()); treeNode.calculatePositions(); width = NodeUtils.getLeafCount(treeNode); height = treeNode.getNodeHeight(); maxLeafTime = 0.0; maxLeafTime = getMaxLeafTime(treeNode); maxLeafTime *= 1.5; sizeOfScale = getSizeOfScale( height / 5.0); } COM: <s> rotates the tree by leaf count creates a positioned node version of the </s>
funcom_train/25735901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AnnotatedPeak getSortedPeakAt(int i) { if (lastActivePeakIndex == -1) { throw new IndexOutOfBoundsException(i + " index out of bound : " + "no fragment generated."); } if (i < 0) { i += lastActivePeakIndex + 1; } else if (i > lastActivePeakIndex) { throw new IndexOutOfBoundsException(i + " index out of bound : " + "empty zone"); } return sortedPeaks[i]; } COM: <s> get peak at index i from sorted list </s>
funcom_train/25308813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String replaceResourceReference(String url) { String sourceRef = (String) this.getContext().getAttributes().get(ContextAttributes.RESOURCE_ATTACHMENT); url = url.replace(RESOURCE_REF, APPLICATION_REF + sourceRef); url = this.replaceAppReference(url); return url; } COM: <s> method to transform the url applying the resource reference url </s>
funcom_train/12166823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSelectWithoutItemFails() throws Exception { checkValidationFailsFromFile("validation-xml/select-without-item-fails.xml", "validation-error-missing-content", new Object[] { XFormElements.SELECT, XFormElements.ITEM.toString() }); } COM: <s> ensure that select without an item fails </s>
funcom_train/23713980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean remove(ActorAddress aa) { boolean removed = false; if (inConnectors != null && inConnectors.removeElement(aa)) { removed = true; } if (outConnectors != null && outConnectors.removeElement(aa)) { removed = true; } if (requesterConnectors != null && requesterConnectors.removeElement(aa)) { removed = true; } return removed; } COM: <s> remove connector association from the port </s>
funcom_train/41163728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(ToForumPost entity) { EntityManagerHelper.log("deleting ToForumPost instance", Level.INFO, null); try { entity = getEntityManager().getReference(ToForumPost.class, entity.getForumPostId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent to forum post entity </s>
funcom_train/39879208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isWiredHeadsetOn() { if (AudioSystem.getDeviceConnectionState(AudioSystem.DEVICE_OUT_WIRED_HEADSET,"") == AudioSystem.DEVICE_STATE_UNAVAILABLE && AudioSystem.getDeviceConnectionState(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE,"") == AudioSystem.DEVICE_STATE_UNAVAILABLE) { return false; } else { return true; } } COM: <s> checks whether audio routing to the wired headset is on or off </s>
funcom_train/17711970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reloadConfig() { Vector v = Configuration.getForumsDefined(); for (int i = 0; i < v.size(); i++) { Forum f = (Forum) v.elementAt(i); if (threads.containsKey(f)) { SMFConnection conn = threads.get(f); conn.signal(SMFSignal.RELOAD_CONFIG); } else { addForum(f); } } } COM: <s> reload the configuration </s>
funcom_train/11407258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AegisType createType(Method m, int index) { TypeClassInfo info = createClassInfo(m, index); info.setDescription((index == -1 ? "return type" : "parameter " + index) + " of method " + m.getName() + " in " + m.getDeclaringClass()); return createTypeForClass(info); } COM: <s> create a aegis type for a method parameter </s>
funcom_train/16796246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFreeColumn(String heading) { for(int i=0; i<headings.length; i++) { if (headings[i]==null) { columns[i] = new double[maxRows]; headings[i] = heading; if (i>lastColumn) lastColumn = i; return i; } if (headings[i].equals(heading)) return COLUMN_IN_USE; } addColumns(); lastColumn++; columns[lastColumn] = new double[maxRows]; headings[lastColumn] = heading; return lastColumn; } COM: <s> sets the heading of the the first available column and </s>
funcom_train/28545579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addWrapper(EntityType aEntity) { if (isDomainEntity(aEntity)) { final URI uri = aEntity.getIRI().toURI(); WrapperType wrapper = uriToWrapper.get(uri); if (wrapper == null) { wrapper = createWrapper(aEntity); uriToWrapper.put(uri, wrapper); } } else { log.fine("entity not added to wrapper manager " + "because it's not a domain entity " + aEntity); } } COM: <s> adds a wrapper around a entity to the collection of wrappers being </s>
funcom_train/38725941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double perimeter(double[] x, double[] y){ double perimeter = 0.0; for(int i = 0; i < x.length-1; i++){ double[] p1 = {x[i],y[i]}; double[] p2 = {x[i+1],y[i+1]}; perimeter += L2Norm(p1, p2); } return perimeter; } COM: <s> computes the perimeter of a contour </s>
funcom_train/34264200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initRepositoryBox() { this.RepositoryBox.setEditable(false); this.RepositoryBox.setRenderer(new RepositoryListCellRenderer()); WorkspaceNavigatorConfig lDesktop =(WorkspaceNavigatorConfig)params.get(FmsConstants.param_WORKSPACE_NAVIGATOR_CONFIG); for (int i=0; i < lDesktop.sizeOrganizationRepositoryList(); ++i) { this.RepositoryBox.addItem(lDesktop.getOrganizationRepository(i)); } this.setDefaultRepository(); } COM: <s> populates the repository combo box </s>
funcom_train/24262158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFieldValidationN8() { try { User user = (User) jenineHawthorn.clone(); user.setPostCode(""); curationService.addUser(admin, user); fail(); } catch(MacawException exception) { int totalNumberOfErrors = exception.getNumberOfErrors(); assertEquals(1, totalNumberOfErrors); int numberOfErrors = exception.getNumberOfErrors(MacawErrorType.INVALID_USER); assertEquals(1, numberOfErrors); } } COM: <s> ensure that the post code of the address has a value </s>
funcom_train/16392320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initLocation(){ StringTokenizer sttokenizer; int height = 0, width, maxwidth = 0; int lineheight; drawpath = new GeneralPath( (Shape) new Rectangle.Double( 5, 5, 10, 10 )); this.setLocation( rand.nextInt( 500 ), rand.nextInt( 400 ) ); } COM: <s> initialize the location of the visual vertex by generating a random </s>
funcom_train/34664356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void valueChanged() { setPresentsDefaultValue(false); boolean oldState = this.isValid; refreshValidState(); if (this.isValid != oldState) { fireStateChanged(IS_VALID, oldState, this.isValid); } String newValue = this.textField.getText(); if (!newValue.equals(this.oldValue)) { fireValueChanged(VALUE, this.oldValue, newValue); this.oldValue = newValue; } } COM: <s> informs this field editors listener if it has one about a change </s>
funcom_train/13272738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateAutoCompletionStrings() { DefaultUserPreferences defaultPreferences = new DefaultUserPreferences(false, this); for (String property : defaultPreferences.getAutoCompletedProperties()) { for (String autoCompletionString : defaultPreferences.getAutoCompletionStrings(property)) { addAutoCompletionString(property, autoCompletionString); } } } COM: <s> adds to auto completion strings the default strings of the new chosen language </s>
funcom_train/46391694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayMaintenancePanel() throws VMCSException{ SimulatorControlPanel scp = mCtrl.getSimulatorControlPanel(); if(mpanel == null) mpanel = new MaintenancePanel((Frame) scp, this); mpanel.display(); mpanel.setActive(MaintenancePanel.DIALOG, true); // setActive of password, invalid and valid display. } COM: <s> setup the maintenance panel and display it </s>
funcom_train/31679345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CharSequence subSequence(int start, int end) { if ((start < 0) || (end < 0) || (start > end) || (end > this.length())) throw new IndexOutOfBoundsException(); CharArray chars = new CharArray(); chars._array = _array; chars._offset = _offset + start; chars._length = end - start; return chars; } COM: <s> returns a new character sequence that is a subsequence of this sequence </s>
funcom_train/1242413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Frame createDialogParentFrame() { if (display != Display.getCurrent()) { SWT.error(SWT.ERROR_THREAD_INVALID_ACCESS); } Shell parent = display.getActiveShell(); if (parent == null) { throw new IllegalStateException("No Active Shell"); } return createDialogParentFrame(parent); } COM: <s> creates an awt frame suitable as a parent for awt swing dialogs </s>
funcom_train/28279356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractContextUiBridge getUiBridgeForEditor(IEditorPart editorPart) { UiExtensionPointReader.initExtensions(); AbstractContextUiBridge foundBridge = null; for (AbstractContextUiBridge bridge : bridges.values()) { if (bridge.acceptsEditor(editorPart)) { foundBridge = bridge; break; } } if (foundBridge != null) { return foundBridge; } else { return DEFAULT_UI_BRIDGE; } } COM: <s> todo cache this to improve performance </s>
funcom_train/28754851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExtrsrcother(String newVal) { if ((newVal != null && this.extrsrcother != null && (newVal.compareTo(this.extrsrcother) == 0)) || (newVal == null && this.extrsrcother == null && extrsrcother_is_initialized)) { return; } this.extrsrcother = newVal; extrsrcother_is_modified = true; extrsrcother_is_initialized = true; } COM: <s> setter method for extrsrcother </s>
funcom_train/18025897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColorByDataSetId(String colorByDataSetId) { String oldVal = this.colorByDataSetId; this.colorByDataSetId = colorByDataSetId; update(); if ( !colorByDataSetId.equals("") ) updatePsym(); propertyChangeSupport.firePropertyChange("colorByDataSetId", oldVal, colorByDataSetId); } COM: <s> the dataset plane to use to get colors </s>
funcom_train/37519821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addObject( readonly Object param ) { // We create the new list node as an representation object. // Note how the constructor parameter annotations are adapted! rep DListNode nn = new rep DListNode( param, null, first ); if( first != null ) { // Again note how the parameter type is adapted! // The method signature is "relative" to the caller. first.setPrevious( nn ); } first = nn; if( last == null ) { last = first; } } COM: <s> the elements we add into the list can be owned by any </s>
funcom_train/7270087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateRowHeight() { int increment = ThemeSettings.FONT_SIZE_INCREMENT.getValue(); if (increment != 0) { FontMetrics fm = getFontMetrics(getFont()); this.checkBoxList.setRowHeight(Math.max(fm.getHeight() + 5, DEFAULT_ROW_HEIGHT+2)); } } COM: <s> updates the row height appropriately </s>
funcom_train/18727731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void open(final JaxoGraph graph) { if (graph == null) { return; } final String shortName = JaxoIO.shortName(graph.getSaveFileName()); addTab(new JaxoTab(theCanvas, graph), JaxoIO.baseName(shortName), false, true); thePanel.distributePropertyChange("Jaxo.recentFile", null, graph.getSaveFileName()); } COM: <s> opens the new graph graph without opening the file chooser dialog </s>
funcom_train/43213463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String convertToStringLine(ProjectFilePart pfp) { return Base16.encode(pfp.getRelativeName().getBytes()) + "~" + Base16.encode(pfp.getHash().toByteArray()) + "~" + Base16.encode(pfp.getPadding()) + "~\n"; } COM: <s> p helper method to convert a project file part p </s>
funcom_train/15625566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void preSelect(@NotNull final Point start, @NotNull final Point end) { beginTransaction(); try { calculateRec(start, end); setFlags(cornerMin.x, cornerMin.y, cornerMax.x, cornerMax.y, GRID_FLAG_SELECTING); } finally { endTransaction(); } } COM: <s> rectangle defined by two points gets preselected </s>
funcom_train/6329022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get(Object key) { Iterator entries = ((OzoneSet) entrySet())._org_ozoneDB_internalIterator(); int pos = size(); while (--pos >= 0) { Map.Entry entry = (Map.Entry) entries.next(); if (equals(key, entry.getKey())) return entry.getValue(); } return null; } COM: <s> returns the value mapped by the given key </s>
funcom_train/36459913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetToOriginalVolumes() { BooleanControl select = originallySelectedPort; if (select != null) { select.setValue(true); } for (String line : lines) { FloatControl volume = volumeControls.get(line); if (volume != null) { volume.setValue(originalVolumes.get(line)); } } } COM: <s> reset to the original volumes </s>
funcom_train/46775109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mkdir() throws SmbException { String path = getUncPath0(); if( path.length() == 1 ) { throw new SmbException( "Invalid operation for workgroups, servers, or shares" ); } /* * Create Directory Request / Response */ if( log.level > 2 ) log.println( "mkdir: " + path ); send( new SmbComCreateDirectory( path ), blank_resp() ); attrExpiration = sizeExpiration = 0; } COM: <s> creates a directory with the path specified by this </s>
funcom_train/14464923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setRDFName(String rdfname) { rdfname= workingdir + getRelativePath(rdfname, workingdir); if (!(new File( rdfname)).exists()) { reportError("DOML File " + rdfname + " does not exist.", "Initializing"); return false; } this.rdfname= rdfname; return true; } COM: <s> allows setting of an existing rdfname </s>
funcom_train/4126015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getGoodsInput() { if (getGoodsInputType() == null) { return 0; } else if (canAutoProduce()) { return getGoodsInputAuto(colony.getProductionOf(getGoodsInputType())); } else { return calculateGoodsInput(getMaximumGoodsInput(), 0); } } COM: <s> returns the amount of goods being used to get the current </s>
funcom_train/44778922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getLoci() { List result = new ArrayList(); Iterator itr = iterator(); while (itr.hasNext()) { GenotypeExperiment exp = (GenotypeExperiment) itr.next(); Locus current = exp.getLocus(); if ((current != null) && (!result.contains(current))) { result.add(current); } } return result; } COM: <s> returns list of unique loci associated with </s>
funcom_train/7623118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void show() { if (mNextView == null) { throw new RuntimeException("setView must have been called"); } INotificationManager service = getService(); String pkg = mContext.getPackageName(); TN tn = mTN; try { service.enqueueToast(pkg, tn, mDuration); } catch (RemoteException e) { // Empty } } COM: <s> show the view for the specified duration </s>
funcom_train/31069632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readProperties(Properties properties) throws PropertyException { url = properties.getStringProperty(PK_COMPONENT_URL, url); method = properties.getStringProperty(PK_COMPONENT_METHOD, method); parameter = properties.getStringProperty(PK_COMPONENT_PARAMETER, parameter); object = (Persistent) properties.getObjectProperty(PK_REQUEST_OBJECT, object); } COM: <s> persisent method to read the properties collection or stream into local </s>
funcom_train/21483836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFullConstructor() { new StopWatch(); try { throw new CacheException("test"); } catch (CacheException e) { assertEquals("test", e.getMessage()); } catch (NoSuchMethodError e) { if (System.getProperty("java.version").startsWith("1.3")) { assertTrue(true); } } } COM: <s> this will fail on jdk1 </s>
funcom_train/1559932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void populateModel( Object [] data){ model = new DefaultTableModel(numRows, numColumns); int r=0; int c=0; for(int i=0; i < Math.min(data.length, this.numRows * this.numColumns); i++){ model.setValueAt(data[i], r, c); ++c; if(c == this.numColumns){ c = 0; ++r; } } setModel(model); } COM: <s> loads a one dimensional array of data into the table model </s>
funcom_train/11069483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(final String name, final Object value) { if (vars.containsKey(name)) { //first try to override local setLocal(name, value); } else if (parent != null && parent.has(name)) { //then check for global parent.set(name, value); } else { //otherwise create a new local variable setLocal(name, value); } } COM: <s> assigns a new value to an existing variable or creates a new one </s>
funcom_train/40621609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPendingHTML(int row, int column, String html) { if (isFilledIn) { throw new UnsupportedOperationException( "Cannot call setPendingHTML after either setWidget/setText/setHTML has been called or the table has been attached to the DOM"); } List<Object> l = ensureRow(row); ensureCell(l, column, html); } COM: <s> sets cells html that will be included in the table upon initialization </s>
funcom_train/49789325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String calculateOldId(Element element) { Node n = element.getParentNode(); if (n == null || n instanceof Document || !(n instanceof Element)) { return "/"; // root } return calculateOldId((Element) n) + "/@" + element.getNodeName() + "." + getNodeIndex(element); } COM: <s> calculate what would be the old id for this element </s>
funcom_train/19307007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T pop(final PsOperator operatorCode) throws PsOperatorException { if (this.list.size() <= this.getMinimumStackSize()) { throw new PsOperatorException(this.getUnderflowError(), operatorCode); } final T object = this.list.remove(this.list.size() - 1); return object; } COM: <s> discards and returns the top element from the stack </s>
funcom_train/22233108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChild(Node child) { if (child instanceof SharedGroup) { throw new IllegalArgumentException(J3dI18N.getString("Group2")); } if (isLiveOrCompiled()) { if (! (child instanceof BranchGroup)) throw new RestrictedAccessException(J3dI18N.getString("Group12")); if(!this.getCapability(ALLOW_CHILDREN_EXTEND)) throw new CapabilityNotSetException(J3dI18N.getString("Group16")); } ((GroupRetained)this.retained).addChild(child); } COM: <s> appends the specified child node to this group nodes list of children </s>
funcom_train/41725685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onEvent(Event evt) { boolean handled = false; if ((evt.type & Event.EVENT_MASK) == Event.POINTER_EVENT) { handled = handlePointerEvent(evt); } else if ((evt.type & Event.EVENT_MASK) == Event.KEY_EVENT) { handled = handleKeyEvent(evt); } else if ((evt.type & Event.EVENT_MASK) == Event.SB_EVENT) { handled = onSoftBarEvent(evt); } if (handled) Runtime.getInstance().repaint(); return handled; } COM: <s> fires a sb event param a is the one of </s>
funcom_train/40421137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Feature getPart(Assembly assembly, String partName) { Feature[] parts = assembly.getParts(); String[] partNames = assembly.getPartNames(); for (int i = 0; i < parts.length; i++) { if (partName.equals(partNames[i])) { return parts[i]; } } if (GWT.isClient()) { GWT.log("Part \"" + partName + "\" not found in " + assembly + "."); } return null; } COM: <s> look up the named part in the given assembly </s>
funcom_train/22572358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setCommunity(ICommunity community) { fCommunity = community; fTitle.setText(fCommunity == null ? "" : StringUtils.safeString(fCommunity.getTitle())); //$NON-NLS-1$ fDescription.setText(fCommunity == null ? "" : StringUtils.safeString(fCommunity.getDescription())); //$NON-NLS-1$ fSharingBox.setRights(fCommunity); } COM: <s> sets the community to be viewed and or editted </s>
funcom_train/24532566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object doGetObject(String aString) { String initString = BeanUtilities.createCharacterInitString(aString.charAt(0)); if (!fIsCharacterClass) { return BeanUtilities.createJavaObject(fDataType, fResourceSet, initString); } else { initString = "new Character(" + initString + ")"; //$NON-NLS-1$ //$NON-NLS-2$ return BeanUtilities.createJavaObject(fDataType, fResourceSet, initString); } } COM: <s> returns the object that the string represents </s>
funcom_train/3830005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GM_Object removeObjectAt( int index ) throws GM_Exception { if ( index < 0 ) { return null; } if ( index > ( this.getSize() - 1 ) ) { throw new GM_Exception( "invalid index/position: " + index + " to remove a geometry!" ); } GM_Object gmo = (GM_Object)aggregate.remove( index ); setValid( false ); return gmo; } COM: <s> removes the gm object at the submitted index from the aggregation </s>
funcom_train/50187045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showDocuments(String path) { File rootdoc = new File(path); StringBuffer files = new StringBuffer(); log.info("\ncurrent rootdoc = " + new File("").getAbsolutePath()); String suffix = ".xml"; printAllDocuments(rootdoc, suffix, files); // update shell DebugManager.updateShell(files.toString()); } COM: <s> this method displays all available documents </s>
funcom_train/9940961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUpdateAttributeString(String updateAttribute) { clear(); String[] updateAttributes = updateAttribute.split("_"); if (updateAttributes.length < 4) { return; } dayOfWeek = updateAttributes[0]; try { dayOfMonth = Integer.parseInt(updateAttributes[1]); } catch (NumberFormatException e) { } month = updateAttributes[2]; String[] hourAndMinute = updateAttributes[3].split(":"); if (hourAndMinute.length < 2) { } try { hour = Integer.parseInt(hourAndMinute[0]); minute = Integer.parseInt(hourAndMinute[1]); } catch (NumberFormatException e) { } } COM: <s> sets the update attribute string </s>
funcom_train/50812214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean connectionExists(InetSocketAddress remote) { InetAddress r_addr = remote.getAddress(); synchronized (conns) { for(Iterator i = conns.iterator(); i.hasNext(); ) { Connection c = (Connection) i.next(); if(c.getAddress().getAddress().equals(r_addr)) { return true; } } } return false; } COM: <s> indicate if a connection exists to the remote site </s>
funcom_train/32179433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDayCountActual() { final SerialDate d1 = SerialDate.createInstance(1, MonthConstants.APRIL, 2002); final SerialDate d2 = SerialDate.createInstance(2, MonthConstants.APRIL, 2002); final int count = SerialDateUtilities.dayCountActual(d1, d2); assertEquals(1, count); } COM: <s> problem actual day count </s>
funcom_train/22367922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateAdvancedSearchTextField() { DefaultMutableTreeNode node = (DefaultMutableTreeNode) getComponentControlled().getComplexRulesTree().getModel().getRoot(); String query = ""; if (node != null) { query = createQuery(node); } getComponentControlled().getAdvancedSearchTextField().setText(query); } COM: <s> updated advanced search text field with rule tree content </s>
funcom_train/21891929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawIcon(Graphics g, int x, int y, int width, int height) { Image i = ClanImageProvider.get("item/"+getType()+"/icon"); g.drawImage(i,x,y,x+width,y+height,0,0,i.getWidth(null), i.getHeight(null), null); } COM: <s> draw the small icon e </s>
funcom_train/12369300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawLine(GL gl, Vector3D from, Vector3D to) { gl.glColor4f(0, 0, 0, 1); gl.glDisable(GL.GL_LIGHTING); gl.glLineWidth(this.edgeSize.getValue()/10f); gl.glBegin(GL.GL_LINES); gl.glVertex3f(from.x, from.y, from.z); gl.glVertex3f(to.x, to.y, to.z); gl.glEnd(); if(this.useLighting.getValue()){ gl.glEnable(GL.GL_LIGHTING); } } COM: <s> helper method to draw a simple straight line </s>
funcom_train/34527865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void iterateComps( Menu parent ) { Menu menu = ( Menu )parent; for ( int i = 0; i < menu.getItemCount(); i++ ) { Object comp = menu.getItem( i ); if ( comp instanceof MenuItem ) { if ( isProjectMenu( ( MenuItem ) comp ) ) ( ( MenuItem )comp ).setEnabled( true ); } if ( comp instanceof Container ) { //iterateComps( ( Container )comp ); } } } COM: <s> called from the enable project menus method </s>
funcom_train/4288284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addVariantPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ConstraintDefinition_variant_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ConstraintDefinition_variant_feature", "_UI_ConstraintDefinition_type"), ConstraintsPackage.Literals.CONSTRAINT_DEFINITION__VARIANT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the variant feature </s>
funcom_train/39380966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddContainerToItself() { MockContext context = MockContext.initContext(); try { Form form = new Form("form"); form.add(form); Assert.assertFalse("Cannot add container to itself", true); } catch (RuntimeException expected) { Assert.assertTrue(true); } } COM: <s> checks that click vetoes the addition of a container to itself </s>
funcom_train/51364689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CompileMessage getCompileMessage(Severity sev, SAXParseException e) { CompileMessage message = new CompileMessage(e.getLineNumber(), e.getColumnNumber(), sev, e.getClass().getName(), new Object[]{e.getMessage()}); return message; } COM: <s> turns an sax parse exception into a compile message </s>
funcom_train/24937110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isCandidateForAnalysis() { // GenericJob gj = EngineThread.getGenericJob(); if (!loop.isBounded()) { return false; } if (loop.getIterations() > MAX_ITERATION_THRESHOLD) { return false; } if (loop.getFeedbackPoints().size() == 1) { return false; } if (!loop.isIterative()) { return false; } if (loop.getIterations() < 1) { return false; } return true; } COM: <s> find if this loop is candidate for full analysis </s>
funcom_train/28427057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo (TrinomialLFSR x) { if (L > x.L) return 1; if (L < x.L) return -1; if (K > x.K) return 1; if (K < x.K) return -1; BigRegister ba = this.toBigRegister(); BigRegister bb = x.toBigRegister(); return ba.compareTo(bb); } COM: <s> compare this lfsr to the argument returning 1 0 or 1 for </s>
funcom_train/29774735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRegisteredName(final String registeredName) { if (this.registeredName != null) { // It had another name before, we have to clean HibernatePBEEncryptorRegistry.getInstance(). unregisterHibernatePBEByteEncryptor(this.registeredName); } this.registeredName = registeredName; HibernatePBEEncryptorRegistry.getInstance(). registerHibernatePBEByteEncryptor(this); } COM: <s> sets the registered name of the encryptor and adds it to the registry </s>
funcom_train/7412961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean parse() { try { ParcoParser.prog_return ret = parser.prog(); result = (CommonTree)ret.getTree(); return parser.isCorrect(); } catch (RecognitionException e) { System.err.println("FATAL: unhandled error"); throw new RuntimeException(e); } catch (RuntimeException e) { return false; } } COM: <s> main method for parsing </s>
funcom_train/29667771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayMemos() throws FormatterException { if (getMemoList().size()> 0) { System.out.println("Following errors occurred:"); // print any error memos for (int i = 0; i < getMemoList().size(); ++i) { IMemo memo = (IMemo)getMemoList().get(i); System.out.println(getSubstitutedLocalizedString(memo)); } } } COM: <s> this is a small utility method that dispalys all the memos </s>
funcom_train/40341889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GQuery find(String... filters) { JsNodeArray array = JsNodeArray.create(); for (String selector : filters) { for (Element e : elements) { for (Element c : $(selector, e).elements) { array.addNode(c); } } } return pushStack(unique(array), "find", filters[0]); } COM: <s> searches for all elements that match the specified css expression </s>
funcom_train/15491035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void nudgeCorner(int key) { if (ic==null) return; double inc = 1.0/ic.getMagnification(); switch(key) { case KeyEvent.VK_UP: y2R-=inc; break; case KeyEvent.VK_DOWN: y2R+=inc; break; case KeyEvent.VK_LEFT: x2R-=inc; break; case KeyEvent.VK_RIGHT: x2R+=inc; break; } grow(ic.screenXD(x+x2R), ic.screenYD(y+y2R)); } COM: <s> nudge end point of line by one pixel </s>
funcom_train/1151342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element saveAsXML(Document xmldoc) { Element e = xmldoc.createElement(Priors.NODE.PRIOR); e.setAttribute(ATTR.TYPE, getType().toString()); e.setAttribute(ATTR.MODE, ""+mode); e.setAttribute(ATTR.VAR, ""+var); e.setAttribute(ATTR.ABSOLUTE, ""+absolute); e.setAttribute(ATTR.SKEW, ""+skew); //CLASS = "class", FEATURE = "feature", return e; } COM: <s> constructs an xml prior element describing this prior </s>
funcom_train/43425052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Page previous() { switch(this) { case FEATURE : {return NULLPAGE;} case CANDIDATES : {return FEATURE;} case PICK : {return CANDIDATES;} case SCALE : {return PICK;} case REFERENCE : {return SCALE;} case BREAKPOINT : {return REFERENCE;} //case UTILITY : {return REFERENCE;} //case DIFFERENTIATION : {return SATURATION;} //case SATURATION : {return UTILITY;} case BARRIER : {return BREAKPOINT;} case TARGET : {return BARRIER;} case DEPENDENCY : {return TARGET;} } return NULLPAGE; } COM: <s> returns the rpevious page </s>
funcom_train/2505038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public KeyBag getPrivateKey(String alias, String password) throws SecurityServiceException { if (Constants.USE_SECURITY) { if (Constants.KEYSTORE_TYPE.equalsIgnoreCase(Constants.IAIK_KEYSTORE) || Constants.KEYSTORE_TYPE.equalsIgnoreCase(Constants.PKCS12_KEYSTORE)) return new KeyBag(KeyBag.IAIK_ME_JCE, keyManagement.getPrivateKey(alias, Constants.PRIVATE_KEYSTORE_PASSWORD)); else return new KeyBag(KeyBag.IAIK_ME_JCE, keyManagement.getPrivateKey(alias, password)); } else return null; } COM: <s> returns the private key for the provided alias and password </s>
funcom_train/3373219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getColumnCount(int rowspan) { if (validateIfNecessary()) { int cols = 0; for (int counter = 0; counter < getChildCount(); counter++) { TableCellElementInfo cell = (TableCellElementInfo) getChild(counter); if (cell.getRowCount() >= rowspan) { cols += cell.getColumnCount(); } } return cols; } return 0; } COM: <s> returns the column count of the number of columns that have </s>
funcom_train/49268386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { LOGGER.trace("Source method " + method.getName() + " invoked"); LoggerUtils.trace(LOGGER, "parameter", args); MethodMapper methodMapping = methodMappings.get(method); if (methodMapping != null) { return methodMapping.invokeInstanceMethod(target, args); } else { String message = "No mapping found for source method " + method.getName(); LOGGER.error(message); throw new UnmappedMethodException(message); } } COM: <s> invoke a method on the target object </s>
funcom_train/24434737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProjectStatus(String token, Long projectId, Status status) { User user = userManager.getByToken(token); Project project = projectDao.getById(projectId); if (user != null && project != null && user.getId() == project.getUserId()) { project.setStatus(status); projectDao.save(project); } } COM: <s> sets project status to indicated value </s>
funcom_train/41279023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected long collectCached(long bytes, boolean check) { CacheGeneration gen, next; long collected = 0; CacheStore store = filter.getStore(); gen = (CacheGeneration) store.getLRUGeneration(); while (gen != null) { next = filter.getStore().getPrevGeneration(gen); collected += gen.collectSpace(bytes - collected, check); if (collected >= bytes) { break; } gen = next; } return collected; } COM: <s> collect the existing resources </s>
funcom_train/10600179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void configure(Configuration conf) throws ConfigurationException { Configuration[] parameters = conf.getChildren(); this.properties = new Properties(); for (int i = 0; i < parameters.length; i++) { String key = parameters[i].getName(); String val = parameters[i].getValue(""); this.properties.put(key, val); } } COM: <s> fill in initial context properties from passed configuration </s>
funcom_train/47528715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SocketAndStreams checkout(SocketDestination destination) { try { // time checkout long start = System.nanoTime(); SocketAndStreams sas = (SocketAndStreams) pool.borrowObject(destination); updateStats(System.nanoTime() - start); return sas; } catch(Exception e) { throw new UnreachableStoreException("Failure while checking out socket for " + destination + ": ", e); } } COM: <s> checkout a socket from the pool </s>
funcom_train/38976248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeTracker() { queueToTrackerThreadIfEnabled(new Runnable() { @Override public void run() { tracker.setDebug(gaDebug); tracker.setDryRun(gaDryRun); tracker.setSampleRate(gaSampleRate); tracker.setAnonymizeIp(gaAnonymizeIp); } }); } COM: <s> set the various parameters of the google analtyics tracker instance </s>
funcom_train/28345213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Channel lazilyGetAndConnect(String chanHandle, Channel channel) throws ConnectionException, NoSuchChannelException { Channel tmpChan; if(channel == null) { tmpChan = getChannel(chanHandle); if ( tmpChan == null ) { throw new NoSuchChannelException(this, chanHandle); } } else { tmpChan = channel; } tmpChan.connectAndWait(); return tmpChan; } COM: <s> a method to make an epics ca connection for a given pv name </s>
funcom_train/18187415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPrivateSelfCall() { Self self = new Self(PrivateSelfCallingClass.class); PrivateSelfCallingClass s = (PrivateSelfCallingClass) self .cast(PrivateSelfCallingClass.class); s.m1(); assertTrue(s.isM1Called()); assertTrue(s.isM2Called()); } COM: <s> shows that it possible to have calls to private methods within code that </s>
funcom_train/1952372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAddrPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SmartModule_addr_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SmartModule_addr_feature", "_UI_SmartModule_type"), SmartPackage.Literals.SMART_MODULE__ADDR, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the addr feature </s>
funcom_train/47279849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SourceTableRecord makeSourceTableRecord(List<Object> displayValues, List<Object> keyValues) { SourceTableRecord node = getSourceTableRecord(keyValues); if (node == null) { node = new SourceTableRecord(getPool().getProject(), displayValues, keyValues); addSourceTableRecord(node); } else { node.setDisplayValues(displayValues); } return node; } COM: <s> attempts to look up the existing source table record instance in </s>
funcom_train/44222846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showDialog(JDialog dialog) { Dimension dlgSize = dialog.getPreferredSize(); Container c = this.basePanel.getTopLevelAncestor(); Dimension ctrSize = c.getSize(); Point ctrLoc = c.getLocation(); dialog.setLocation((ctrSize.width - dlgSize.width) / 2 + ctrLoc.x, (ctrSize.height - dlgSize.height) / 2 + ctrLoc.y); dialog.setVisible(true); } COM: <s> p show the given dialog </s>
funcom_train/35414094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public lalr_item shift() throws internal_error { lalr_item result; /* can't shift if we have dot already at the end */ if (dot_at_end()) throw new internal_error( "Attempt to shift past end of an lalr_item"); /* create the new item w/ the dot shifted by one */ result = new lalr_item(the_production(), dot_pos() + 1, new terminal_set(lookahead())); /* change in our lookahead needs to be propagated to this item */ add_propagate(result); return result; } COM: <s> produce the new lalr item that results from shifting the dot one position </s>
funcom_train/20885830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset(boolean removeMarker) { if (this.marker != null) { this.nextCharIndex = this.marker.nextCharIndex; this.skipLF = this.marker.skipLF; this.lineIndex = this.marker.lineIndex; this.columnIndex = this.marker.columnIndex; if (removeMarker) { removeMarker(); } } } COM: <s> moves back to the position marked with </s>
funcom_train/16913389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMenu getMenuRandomize() { if (getData() instanceof NumericTable) { JMenu menu = new JMenu("Randomize"); menu.add(TableActionManager .getRandomizeAction((NumericTable) getData())); menu.add(TableActionManager .getSetTableBoundsAction((NumericTable) getData())); return menu; } return null; } COM: <s> return a menu with items for randomizing table values </s>
funcom_train/26604678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed(IDocumentTree tree, java.awt.event.MouseEvent e) { if (e.isPopupTrigger()) { Object node = tree.getSelectedNode().getUserObject(); showEditingMenu(tree, node, e.getX(), e.getY()); } } COM: <s> invoked when a mouse button has been pressed on a component </s>
funcom_train/40382691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attach(CalendarWidget widget) { super.attach(widget); appointmentGrid.setCellPadding(5); appointmentGrid.setCellSpacing(0); appointmentGrid.setBorderWidth(0); appointmentGrid.setWidth("100%"); //DOM.setStyleAttribute(appointmentGrid.getElement(), "tableLayout", "fixed"); calendarWidget.getRootPanel().add(appointmentGrid); calendarWidget.getRootPanel().add(appointmentGrid); } COM: <s> adds the calendar view to the calendar widget and performs required formatting </s>
funcom_train/26225578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void optimizeClass(String fileName) throws UnpositionedError { ClassInfo info; MethodInfo[] methods; info = readClassFile(fileName); optimizeClass(info, options.optimize, options.verbose); writeClassFile(info, options.destination == null ? fileName : options.destination + File.separatorChar + at.dms.util.Utils.splitQualifiedName(info.getName())[1] + ".class"); } COM: <s> reads optimizes and writes a class file </s>
funcom_train/12278258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrentPageForm(AbstractWizardForm currentPageForm) { this.currentPageForm = currentPageForm; for(int i = 0; i < currentPageForm.getStepIndex(); i++) { ((WizardStep)steps.get(i)).setAvailable(true); } if(!forms.contains(currentPageForm)) { forms.add(currentPageForm); } } COM: <s> set the current form for the active page </s>
funcom_train/15878025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removePeerConnection( NetworkConnection connection ) { try { connections_mon.enter(); //copy-on-write ArrayList conn_new = new ArrayList( connections_cow ); boolean removed = conn_new.remove( connection ); if( !removed ) return false; connections_cow = conn_new; return true; } finally{ connections_mon.exit(); } } COM: <s> remove the given connection from the downloader </s>
funcom_train/51629194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeExistingAccessor(final IMethod accessor, final ListRewrite rewrite) throws JavaModelException { final MethodDeclaration declaration= (MethodDeclaration) ASTNodes.getParent(NodeFinder.perform(rewrite.getParent().getRoot(), accessor.getNameRange()), MethodDeclaration.class); if (declaration != null) rewrite.remove(declaration, null); } COM: <s> removes an existing accessor method </s>
funcom_train/51542102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int glfUnloadFont() { if (currentFont < 0 || fonts[currentFont] == null) return GLF_ERROR; GLFFont font = fonts[currentFont]; if (font != null) { for (int i = 0; i < MAX_FONTS; ++i) { GLFSymbol symbol = font.symbols[i]; if (symbol != null) { symbol.vertices = null; symbol.facets = null; symbol.lines = null; font.symbols[i] = null; } } fonts[currentFont] = null; } currentFont = -1; return GLF_OK; } COM: <s> unload current font from memory </s>
funcom_train/25084374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getObjectAttribute() { if( this.objectAttribute.getValue() != null ) { if (this.objectAttribute.getValue().isLiteralText()) { return String.valueOf(this.objectAttribute.getValue() .getExpressionString()); } return (String) this.objectAttribute.getValue() .getValue(getELContext()); } return null; } COM: <s> return the value of the property object attribute </s>
funcom_train/7457730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Builder mergeFrom(final UnknownFieldSet other) { if (other != getDefaultInstance()) { for (final Map.Entry<Integer, Field> entry : other.fields.entrySet()) { mergeField(entry.getKey(), entry.getValue()); } } return this; } COM: <s> merge the fields from </s>
funcom_train/19718019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireChatroomLeft(MultiUserChat muc, String jid, String nick) { System.err.println(nick + " (" + jid + ") leaves"); ChatEvent e = new ChatEvent(Type.ROOM_LEAVE, new Date()); e.setChatroom(muc.getRoom()); e.setJid(jid); e.setNick(nick); Set<ChatListener> ls = listeners.get(muc); if (ls != null) for (ChatListener listener : ls) listener.onChatroomLeave(e); } COM: <s> notified all chat listeners that a chatroom has been left by someone </s>
funcom_train/2581831
/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 != null) { if (obj instanceof Quarter) { Quarter target = (Quarter) obj; return (this.quarter == target.getQuarter() && (this.year == target.getYearValue())); } else { return false; } } else { return false; } } COM: <s> tests the equality of this quarter object to an arbitrary object </s>
funcom_train/15365062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeDWordBigEndian(int i) { buffer[currentOffset++] = (byte) i; buffer[currentOffset++] = (byte) (i >> 8); buffer[currentOffset++] = (byte) (i >> 16); buffer[currentOffset++] = (byte) (i >> 24); } COM: <s> p writes a dword big endian p </s>
funcom_train/1785541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StringManipulation getInstanceOfStringMani(StringCondition sm) { switch(sm.getType()) { case HEADNOUN: return new Head(); case COMP_HEADNOUN: return new ComplementHeadNoun(); case FIRST_PART: return new FirstPart(); case COMP_FIRST_PART: return new ComplementFirstPart(); case PASSIVE: return new Passive(); case ACTIVE: return new Active(); case MODIFIER: return new Modifier(); case VERB: return new Verb(); case WORD_CLASS: return new WordClass(); } return null; } COM: <s> get an instance of the corresponding string condition </s>