__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/44797686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete() throws Exception { boolean last = rs.isLast(); boolean first = rs.isFirst(); stateWatcher.seed(rs); rs.deleteRow(); if (!last) parentForm.next(); else if (!first) parentForm.previous(); else { transferIntoModel(parentForm.getModel(),true); stateWatcher.startInserting(); } stateWatcher.changed(rs); parentForm.getModel().resetDirty(); } COM: <s> deletes current record in result set </s>
funcom_train/32069276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addBankAgency(BankAgency bankAgency) { boolean addOk = getBankAgencys().add(bankAgency); if (addOk) { bankAgency.setBank((Bank)this); } else { if (logger.isWarnEnabled()) { logger.warn("add returned false"); } } return addOk; } COM: <s> add the passed bank agency to the bank collection </s>
funcom_train/45856728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void validateOpenbareRuimte(nl.vrom.www.bag.stuf._0120.OpenbareRuimte_type1[] param){ if ((param != null) && (param.length > 4)){ throw new java.lang.RuntimeException(); } if ((param != null) && (param.length < 1)){ throw new java.lang.RuntimeException(); } } COM: <s> validate the array for openbare ruimte </s>
funcom_train/26384266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveAccounts() { ObjectOutputStream oos = null; try { oos = new ObjectOutputStream(new FileOutputStream(STORAGE_PATH)); oos.writeObject(accountStorage); } catch (Exception e) { status.setText("Fails to save accounts"); } finally { if(oos!= null) { try { oos.flush(); oos.close(); } catch (IOException ioe) { } } } } COM: <s> save accounts to file storage path </s>
funcom_train/42199761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public A_PropertyPage getPropertyPage(Object object) { A_PropertyPage page = null; if(object != null) { Class<?> c = object.getClass(); page = pages.get(c); if(page == null) { while((c = c.getSuperclass()) != null) { if((page = pages.get(c)) != null) break; } } } if(page == null) page = pages.get(null); return page; } COM: <s> returns the property page that is associated with the object </s>
funcom_train/14122901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendAction() { // TODO ---- do it!!! clearErrors(); // TODO validate to, cc, bcc, subject, body if exists; show // validation info if necessary readForm(); if (validate()) { sendMail(); // TODO refresh sent folder } } COM: <s> sending mail action </s>
funcom_train/31208352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isReadOnly() throws SQLException { try { if(Trace.isEnabled()) Trace.trace(getId()); checkClosed(); if(Trace.isEnabled()) Trace.traceResult(readOnlyOptimization); return readOnlyOptimization; } catch(Throwable e) { throw convertThrowable(e); } } COM: <s> returns the value set by set read only </s>
funcom_train/43245273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetECOneStreetAddr3() { System.out.println("getECOneStreetAddr3"); EmergencyContactDG3Object instance = new EmergencyContactDG3Object(); String expResult = ""; String result = instance.getECOneStreetAddr3(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get econe street addr3 method of class org </s>
funcom_train/24532699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyAttributeSetting(EObject target, EStructuralFeature feature, Object value, int index) { if (!isDead()) { CompoundCommand buildUp = null; if (applyRules) buildUp = propertyAdd(target, feature, value, buildUp); if (buildUp == null) super.applyAttributeSetting(target, feature, value, index); else { buildUp.append(internalApplyAttributeSetting(target, feature, value, index)); internalAppend(buildUp); } } } COM: <s> add value at index </s>
funcom_train/51377395
/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 ValidValue)) { return false; } ValidValue vv = (ValidValue) obj; boolean returnVal = true; returnVal &= (this.getValue().equals(vv.getValue())); returnVal &= (this.getDescription().equals(vv.getDescription())); return returnVal; } COM: <s> indicates whether some other object is equal to this one </s>
funcom_train/38382562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MofPackage lookupGooseMetamodelRootMofPackage(ModelPackage gooseMetamodel_ModelPackage) { MofPackage mofPackage = null; Iterator metamodel_Iterator = gooseMetamodel_ModelPackage .getMofPackage() .refAllOfClass() .iterator(); while (metamodel_Iterator.hasNext()) { mofPackage = (MofPackage) metamodel_Iterator.next(); if (mofPackage.getName().equals(GOOSE_METAMODEL_MofPackageNAME)) { return mofPackage; } //if } //while return mofPackage; } // lookupGooseMetamodelRootMofPackage COM: <s> method lookup goose metamodel root mof package </s>
funcom_train/11791253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void login( String login, String password ) { selenium.open(SaapaConfig.getProperty("saapa.url")); waitForVisible( "j_username" ); selenium.type( "j_username", login ); selenium.type( "j_password", password ); selenium.click( "ok-login" ); logged = true; } COM: <s> login into the system with the specified user information </s>
funcom_train/18479440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Patch replace(Point3 orig_cp,Point3 new_cp) { Point3[] new_pts = new Point3[16] ; for(int i = 0; i < pts.length; i++) { new_pts[i] = pts[i] == orig_cp ? new_cp : pts[i] ; } return new Patch(new_pts) ; } COM: <s> replaces any occurences of the given control point with another one </s>
funcom_train/25792255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public void write(int b) throws IOException { //check the original stream and copy the output to there. if (m_originalErrorStream != null) { m_originalErrorStream.write(b); } m_errorBuffer += String.valueOf((char) b); // check for an endline if (((char) b) == '\n') { // output the string buffer to the gui and clear the buffer m_textPane.append(m_errorBuffer, COLOR_RED); m_errorBuffer = ""; } } COM: <s> overrides the write function of its parent so we can redirect the output </s>
funcom_train/37445899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setComponent(Component component) { /* if (this.component != component) { if (this.component != null) { this.component.removeBindingDomain(this); } this.component = component; if (component != null) { component.addBindingDomain(this); } } */ this.component = component; } COM: <s> this method adds a callback to the component to which a feature applies </s>
funcom_train/25733645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getModifName(Peptide peptide, double value) { String name = DEC_FORMAT.format(value); if (DOUBLE2ID_MODS.containsKey(name)) { return DOUBLE2ID_MODS.get(name); } else if (UNIMOD_MANAGER.hasModif(name)) { return UNIMOD_MANAGER.getModif(name).getId(); } else { if (isWarningEnabled) { System.err.println("warning: no modification found for value " + name + " in peptide " + peptide); } } return String.valueOf(value); } COM: <s> get the modif tag from the double value </s>
funcom_train/23998092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { anim.clear(); images.clear(); sceneNode.clear(); if ( imagesFlipX != null ) { for ( Image image : imagesFlipX ) { image.flush(); } imagesFlipX.clear(); } if ( imagesFlipY != null ) { for ( Image image : imagesFlipY ) { image.flush(); } imagesFlipY.clear(); } } COM: <s> clear the animation </s>
funcom_train/10925255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean shouldAddZip64Extra(ZipArchiveEntry entry, Zip64Mode mode) { return mode == Zip64Mode.Always || entry.getSize() >= ZIP64_MAGIC || entry.getCompressedSize() >= ZIP64_MAGIC || (entry.getSize() == ArchiveEntry.SIZE_UNKNOWN && raf != null && mode != Zip64Mode.Never); } COM: <s> whether to addd a zip64 extended information extra field to the </s>
funcom_train/14002435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireChangeEvent(DataChangeEventObject event) { for (int i = 0; i < m_outputs.size(); i++) { DataFlowComponent component = m_outputs.get(i); if (component instanceof DataChangeEventListener) { ((DataChangeEventListener) component).dataChange(event); } } } COM: <s> convenience method to send the given data change event to all listening outputs </s>
funcom_train/3064111
/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 i = entrySet().iterator(); if (key==null) { while (i.hasNext()) { Entry e = (Entry) i.next(); if (e.getKey()==null) return e.getValue(); } } else { while (i.hasNext()) { Entry e = (Entry) i.next(); if (key.equals(e.getKey())) return e.getValue(); } } return null; } COM: <s> returns the value to which this map maps the specified key </s>
funcom_train/14364762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getAmount() { double result = -1; Number newAmount = null; String amountText = MiscConverter.convertAmountToLocaleFormat(_amount); newAmount = MiscConverter.convertAmount(amountText); if (null != newAmount) { result = newAmount.doubleValue(); } return result; } COM: <s> return the transfer amount </s>
funcom_train/29682594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toXMLString() { Content c = encodeXML(this.getClass().getName(), Namespace.getNamespace("")); XMLOutputter outputter = new XMLOutputter(); outputter.setFormat(Format.getPrettyFormat()); Document d = new Document(); d.addContent(c); return outputter.outputString(d); } COM: <s> create string as found in xml encoding </s>
funcom_train/48463275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getSideBarLink(final IDiagramPanel diagramPanel) { JButton link = getResourceFactory().createButton("sidebarlink"); link.setUI(new LinkButtonUI()); link.setForeground(ThemeManager.getInstance().getTheme() .getMENUBAR_FOREGROUND_COLOR()); link.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { diagramPanel.maximizeMinimizeSideBar(); } }); return link; } COM: <s> create side bar link to show hide it </s>
funcom_train/20926356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getJTabbedPane() { if (jTabbedPane == null) { jTabbedPane = new JTabbedPane(); jTabbedPane.setName(""); jTabbedPane.addTab("Setup", null, getJPanel11(), null); jTabbedPane.addTab("Views", null, getJPanel(), null); } return jTabbedPane; } COM: <s> this method initializes j tabbed pane </s>
funcom_train/2877314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void placeResolve() throws SmartFrogResolutionException { ResolutionState resState = new ResolutionState(); do { resState.clear(); doPlaceResolve(resState); } while (resState.moreToResolve()); if (resState.unresolved().size() > 0) { throw new SmartFrogPlaceResolutionException(null, null, sfCompleteName(), resState.unresolved()); } } COM: <s> place resolves the component </s>
funcom_train/32202696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void evaluate(ImagavaContext aImagavaContext, Context aContext, Scriptable aScope, Reader aReader, String aFileName, int aLineNo, Object aSecurityDomain) throws IOException { aContext.evaluateReader(aScope, aReader, aFileName, aLineNo, aSecurityDomain); } COM: <s> called to internally execute the js </s>
funcom_train/2558343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void process(Method method, Annotation label) throws Exception { MethodPart part = factory.getInstance(method, label); MethodType type = part.getMethodType(); if(type == MethodType.GET) { process(part, read); } if(type == MethodType.IS) { process(part, read); } if(type == MethodType.SET) { process(part, write); } } COM: <s> this is used to classify the specified method into either a get </s>
funcom_train/43294233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean errorFound() { synchronized (m_ActiveThreadsLock) { //get value iterator Iterator iterator = m_ActiveThreads.values().iterator(); //current value? Boolean currentValue = null; //iterate over all values? while (iterator.hasNext()) { //get current value currentValue = (Boolean) iterator.next(); //error found? if (currentValue.booleanValue() == false) { //error found return true; } } //no error found return false; } } COM: <s> finds an error in the active threads list </s>
funcom_train/4892078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToJSONDate() { jsonWriter.object().key("test1").value(new Date(106, 7, 20)); jsonWriter.endObject(); assertEquals(jsonWriter.toString(),"{\"test1\":new Date(2006,7,20,0,0)}"); } COM: <s> date generation when outputing json </s>
funcom_train/32750127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List propertyNamesFor(AcceleratorNode aNode) { if (aNode == null) throw new IllegalArgumentException("can't get property names for null node"); PropertyAccessor nodeAccessor = getAccessorFor(aNode); if (nodeAccessor == null) throw new IllegalArgumentException( "unregistered node type: " + aNode.getClass().getName()); return nodeAccessor.propertyNames(); } COM: <s> returns a list of property names for the supplied node </s>
funcom_train/13693016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invertNodeSelection(){ GuiNode tmpnode = null; for(Enumeration en = nodes.elements(); en.hasMoreElements();) { tmpnode = (GuiNode)en.nextElement(); if (tmpnode == null) continue; tmpnode.setSelectionMode(!tmpnode.selectionMode); } repaint(); } COM: <s> inverts the node selection </s>
funcom_train/49315044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSetterMethodName(String propertyName) { int l = propertyName.length(); char[] data = new char[l + 3]; data[0] = 's'; data[1] = 'e'; data[2] = 't'; data[3] = Character.toUpperCase(propertyName.charAt(0)); if (l > 1) { propertyName.getChars(1, l, data, 4); } return new String(data); } COM: <s> builds the method name inserting the word code set code at the </s>
funcom_train/17905738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Connection getConnection() throws DataSourceException { try { if ((connection == null || connection.isClosed()) && getDatabaseConnection().isConnected()) { connection = ConnectionManager.getConnection(getDatabaseConnection()); } } catch (SQLException e) { throw new DataSourceException(e); } return connection; } COM: <s> returns the sql connection for this host </s>
funcom_train/44174578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object removeMin () { --length; Object data = this.root.data; Item child = this.root.child; if(child == null) { setRoot(null); if(checkPolicy.checkInvariant()) { checkInvariant(); } return data; } // parse one pairChildren(this.root); // parse two setRoot(linkChildren(root)); if(checkPolicy.checkInvariant()) { checkInvariant(); } return data; } COM: <s> removes and returns the minimum object </s>
funcom_train/15608418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void clearMappedBuffer(String lName) { Map lBufferMap = this.getFillBufferMapTemplateMethod(); if ((lBufferMap != null) && lBufferMap.containsKey(lName)) { lBufferMap.put(lName, null); } // Got the key. } // End method: clearMappedBuffer COM: <s> clears out contents of text buffers setup to hold text of elements </s>
funcom_train/47282644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCallonNoOccurrence() throws Exception { testInput = new MungeStepOutput<String>("test", String.class); testInput.setData("abcdefg"); step.connectInput(0, testInput); step.setFrom("h"); step.setTo("123"); step.open(logger); step.call(); List<MungeStepOutput> results = step.getMungeStepOutputs(); MungeStepOutput output = results.get(0); String result = (String)output.getData(); assertEquals("abcdefg", result); } COM: <s> this tests the case where the target string is not present the output </s>
funcom_train/37823354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean saveFile() { if (currentInstance == null) return false; if (currentInstance.getOpenFileName() == null || currentInstance.getOpenFileName().length() == 0) { //if no name was given to current module content, open a filechooser return (appWin.showSaveDialog(true) != null); } return saveFileAs(currentInstance.getOpenFileName()); } COM: <s> takes content from module and stores it in currently used file </s>
funcom_train/16763148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInterpolationTypes(int[] types) { interpolationType = types; if (interpolationType == null || interpolationType.length < 2) return; for (int i = 1; i < interpolationType.length; i++) if (interpolationType[i] != interpolationType[0]) throw new IllegalArgumentException( "Sorry, but at this time only one interpolation type " + "may be used in a single animation sequence"); } COM: <s> sets the interpolation types array for the keyframes </s>
funcom_train/20079366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert(Model child, int index) { adopt(child); children.add(index, child); if (index == getChildCount() - 1) { fireEvent(Add, child); } else { ChangeEvent evt = new ChangeEvent(Insert, this); evt.item = child; evt.index = index; notify(evt); } } COM: <s> inserts a child to the model and fires an insert event </s>
funcom_train/20307186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fire(BindingVector env, boolean isAdd) { Rule rule = context.getRule(); context.setEnv(env); if (! context.shouldFire(isAdd)) return; // Now fire the rule context.getEngine().requestRuleFiring(rule, env, isAdd); } COM: <s> propagate a token to this node </s>
funcom_train/3703424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set() { if ( !checkRelation(m_relation) ) { throw new IllegalArgumentException("Specified relation type not valid."); } if ( m_relation == MATCHES && m_type == LEFT_ORDERED ) { m_pattern = Pattern.compile(m_value); } } // of method COM: <s> initialization abstracted out of constructor for beanification </s>
funcom_train/2839625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Set parseTypes() { HashSet types = new HashSet(); StringTokenizer parser = new StringTokenizer(fileTypesText.getText(),"; ",false); while (parser.hasMoreTokens()) { types.add(parser.nextToken().toLowerCase()); } return types; } COM: <s> create a hash set of all the specified file types </s>
funcom_train/51193014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void registerHandler( String[] urlPaths, String beanName ) throws BeansException, IllegalStateException { Assert.notNull( urlPaths, "URL path array must not be null" ); for ( int j = 0; j < urlPaths.length; j++ ) { registerHandler( urlPaths[j], beanName ); } } COM: <s> register the specified handler for the given url paths </s>
funcom_train/5858809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getConflictUsers() { if (proxy == null) { return null; } short state = this.getUniqueStatus().shortValue(); if((state == FSStatus.POTENTIALLY_CONFLICT) || (state == FSStatus.REMOTELY_MODIFIED)) { return (Vector) proxy.getPropertyValue(PFSObject.POTENTIALUSERS); } return null; } COM: <s> returns the conflict users of the node </s>
funcom_train/26103362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateQuickMessage(long id, String message) { ContentValues vals = new ContentValues(); vals.put(KEY_QUICKMESSAGE, message); return mDb.update(QUICKMESSAGES_DB_TABLE, vals, KEY_ROWID + "=" + id, null) > 0; } COM: <s> updates a quick message in the database </s>
funcom_train/25690595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadCommand(HttpServletRequest request, HttpSession session) { this.validate(); launchAction = (String) request.getParameter("launchAction"); // see if we have a valid form if (isValid()) { setResponsePage(this.SUCCESS_JSP); } else { setResponsePage(this.ERROR_JSP); } } COM: <s> the callback method in which any pre processing of the command takes place </s>
funcom_train/38474065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double recalculateCurrentBudget(BudgetItem[] budget) { BigDecimal totalBudget = new BigDecimal(0); Date today = new Date(); for (int i = 0; i <= today.getMonth(); i++) { totalBudget = totalBudget.add(new BigDecimal(budget[i].getBudget())); } return totalBudget.doubleValue(); } COM: <s> method recalculate current budget </s>
funcom_train/20893940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMMaths(MMaths maths) { mMaths = maths; cMaths.setMMaths(maths); vObjectList.setMObjectList(mMaths.getMObjectList()); vCurveList.setMCurveList(mMaths.getMCurveList()); vCoords.setMCoords(mMaths.getMCoords()); vGraphic.setMGraphic(mMaths.getMGraphic()); } COM: <s> set a new main model object of visual maths mmaths </s>
funcom_train/21954228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hide() { /* Runnable runMe = new Runnable() { public void run() { mFrame.setVisible(false); mFrame.dispose(); } }; if (SwingUtilities.isEventDispatchThread()) { runMe.run(); } else { SwingUtilities.invokeLater(runMe); } */ } COM: <s> removes destroys the startup screen </s>
funcom_train/7876206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void layoutHorizontal() { scroll.setOrientation(Adjustable.HORIZONTAL); JPanel centro = new JPanel(new GridLayout(1, months.length)); for (int i = 0; i < months.length; i++) { centro.add(months[i]); } add(centro, BorderLayout.CENTER); layoutScrollAndYear(); } COM: <s> method used to layout horizontal </s>
funcom_train/9663950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void moveToPreviousCell() { EditableGrid grid = getPanel().getGrid(); if(!deactivateActiveCell()) return; if (grid.getCurrentColumn() > 0) moveCursorLeft(); else setCursor(grid.getCurrentRow() - 1, grid.getCellCount(grid.getCurrentRow()) - 1, false); } COM: <s> moves the cursor to the previous cell </s>
funcom_train/20881641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel() { if (jPanel == null) { jPanel.setLayout(new GridBagLayout()); jPanel = new JPanel(); jPanel.setSize(800, 600); jPanel.add(getJButton1(), null); jPanel.add(getJButton(), null); jPanel.add(getJButton2(), null); } return jPanel; } COM: <s> this method initializes j panel </s>
funcom_train/4291224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateTemplate() throws Qvtr2Exception { InterceptorTemplate mmt = new InterceptorTemplate(); String content = mmt.generate( ((RelationalContext)am.getAlternativeDefs().get(0) .getContext()).getContext().getTransformation()); // flush content to file try { File outFile = getOutputFilePath().toFile(); FileUtils.touch(outFile); FileWriter fw = new FileWriter(outFile); fw.write(content); fw.close(); } catch (IOException e) { throw new Qvtr2Exception("Unable to write the interceptor to file", e); } } COM: <s> actually generates the template </s>
funcom_train/1491760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTypifications(TaxonConceptDTO taxonConcept, HttpServletRequest request, HttpServletResponse response) throws Exception { if (taxonConcept.getRankValue()>=TaxonRank.FAMILY.getValue()) { request.setAttribute("typifications", taxonomyManager.getTypificationRecordsForTaxonConcept(taxonConcept.getKey())); } } COM: <s> adds any typification records </s>
funcom_train/48535264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateRegisters(int base) { registers = RegisterFile.getRegisters(); for(int i=0; i< registers.length; i++){ updateRegisterValue(registers[i].getNumber(), registers[i].getValue(), base); } updateRegisterUnsignedValue(15, RegisterFile.getProgramCounter(), base); } COM: <s> update register display using specified number base 10 or 16 </s>
funcom_train/8720050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getMinimumSize() { if (panel.getPreferredSize() != null) { return new Rectangle(0, 0, (int) panel.getPreferredSize().getWidth(), (int) panel.getPreferredSize().getHeight()); } else { return new Rectangle(0, 0, panel.getWidth(), panel.getHeight()); } } COM: <s> returns the size image needed to render the document without anything </s>
funcom_train/43890107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOpenDir() { initDS(""); try { assertNotNull(ds.getSchema("grafo")); assertNotNull(ds.getSchema("nodi")); assertNotNull(ds.getSchema("mixed")); } catch (IOException e) { fail(e.getMessage()); } } COM: <s> see if all the mif in data dir are recognized </s>
funcom_train/43097283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEmptyProject() { File file = CheckMain.getTestModel("testmodels/EmptyProject0161.zargo"); CheckMain.callMain(new String[] { "-nosplash", "-command", "org.argouml.uml.ui.ActionOpenProject=" + file.getAbsolutePath(), }); assertEquals("EmptyProject0161", ProjectManager.getManager().getCurrentProject().getBaseName()); } COM: <s> test an empty project </s>
funcom_train/39911923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetEh5() { System.out.println("setEh5"); TextField tf = null; Page1 instance = new Page1(); instance.setEh5(tf); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set eh5 method of class timesheetmanagement </s>
funcom_train/7351259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void testSerializeSkaringaJson() { try { for (int i = 0; i < getLoopCount(); ++i) { FileOutputStream ostream = new FileOutputStream(getTestId() + i); _trans.serializeToJson(_testObj, ostream); ostream.close(); } } catch (Exception e) { setError(true); Log.error(e); } } COM: <s> test json serialization with skaringa </s>
funcom_train/10281926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator getItemIterator() throws XFeedException { ArrayList lList = new ArrayList(); for (int i = 0; i < getRSSItems().length; i++) { lList.add(new XItemImpl(this, i)); } return lList.iterator(); } COM: <s> wraps the internal rss items into a conveninient </s>
funcom_train/44854738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void runLogin(VIFContext inContext) throws VException { Task lTask = TaskManagerImpl.getInstance().create(TaskManagerImpl.MASTER_TASK_NAME); inContext.setParameter("body", "startup"); String lRequestType = (String)inContext.get(AbstractContext.REQUEST_TYPE); if (lRequestType.length() > 0) { inContext.setParameter("forward", lRequestType); } lTask.setContext(inContext); lTask.run(); } COM: <s> redirects the task to the login page </s>
funcom_train/23271600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPlotBackgroundPaint(Paint paint) { Plot plot = this.chart.getPlot(); if (plot != null) { Paint old = plot.getBackgroundPaint(); plot.setBackgroundPaint(paint); firePropertyChange("plotBackgroundPaint", old, paint); } } COM: <s> sets the background paint and sends a </s>
funcom_train/14271756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doEndTag() throws JspTagException { try { final JspWriter out = getPageContext().getOut(); startTable(out); printTabHeaders(out); printBody(out); endTable(out); return Tag.EVAL_PAGE; } catch (IOException e) { err(e); throw new CCTagException("IO Error: " + e.getMessage(), e); } } COM: <s> having finished the tag we iterate over the tabs printing them out correctly </s>
funcom_train/5785499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireTreeStructureChanged(DOMNode oldRoot) { int len = treeModelListeners.size(); TreeModelEvent e = new TreeModelEvent(this, new Object[] {oldRoot}); for (int i = 0; i < len; i++) { ((TreeModelListener)treeModelListeners.elementAt(i)). treeStructureChanged(e); } } COM: <s> the only event raised by this model is tree structure changed with the </s>
funcom_train/5342485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removePongs(String loc, List l) { if(l != null) { BucketQueue bq = (BucketQueue)PONGS.get(loc); Iterator iter = l.iterator(); while(iter.hasNext()) { PingReply pr = (PingReply)iter.next(); bq.removeAll(pr); } } } COM: <s> removes the pongs with the specified locale and those </s>
funcom_train/37077487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setPos(int x, int y) { Point p = new Point(x, y); this.tier = calculateTierNumber(p); this.pixelPos = getPixelPosition(x, y, tier); this.tierPos = getTierPosition(x, y, tier); this.bp = getBasePair(x, y, tier); } COM: <s> updates the necessary position state </s>
funcom_train/21471671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getNetbeansString(int portID) { int port = VimPlugin.getDefault().getPreferenceStore().getInt( PreferenceConstants.P_PORT)+portID; String host = VimPlugin.getDefault().getPreferenceStore().getString( PreferenceConstants.P_HOST); String pass = VimPlugin.getDefault().getPreferenceStore().getString( PreferenceConstants.P_PASS); return "-nb:" + host + ":" + port + ":" + pass; } COM: <s> gives the vim argument with the port depending on the port id </s>
funcom_train/32355342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isFileUniqueInPrj(File file, Project prj) { String properties[] = new String[4]; String values[] = new String[4]; properties[0] = FileConstants.NAME; properties[1] = FileConstants.STATUS; properties[2] = FileConstants.TYPE; properties[3] = FileConstants.PRJID; values[0] = file.getNodeText(); values[1] = ItemConstants.ACTIVE; values[2] = String.valueOf(File.TYPE); values[3] = String.valueOf(prj.getId()); boolean exists = dtAdapter.itemExists(properties, values); return !exists; } COM: <s> checks if a file is unique in a project </s>
funcom_train/7507302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addNodeToStateTables(PastryNode newNode) { PastryNodeDescriptor pnd = PastryNodeDescriptor.instanceFor(newNode.getPastryId(), newNode.getProximityProtocol()); routingTable.addIfEmpty(pnd); leafSet.addLeaf(newNode.getPastryId()); neighborhoodSet.addNeighbor(pnd); } COM: <s> potentially updates the local state tables with the given </s>
funcom_train/3415522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean containsMapping(Object key, Object value) { Object k = maskNull(key); Object[] tab = table; int len = tab.length; int i = hash(k, len); while (true) { Object item = tab[i]; if (item == k) return tab[i + 1] == value; if (item == null) return false; i = nextKeyIndex(i, len); } } COM: <s> tests if the specified key value mapping is in the map </s>
funcom_train/50862397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeObserver() { observerNum--; if (observerNum < 0) { observerNum = 0; logger.log(Level.SEVERE, "addObserver(): " + "Observatory is already empty of observers."); throw new IllegalStateException("Observatory is already empty of observers."); } } COM: <s> removes an observer from the observatory </s>
funcom_train/19233273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getPropertyValue(Object pBean, String key) { if (pBean instanceof LWComponent) { return ((LWComponent) pBean).getPropertyValue(key); } else { // should never happen... System.out.println(this + " getPropertyValue: unhandled class for " + key + " on " + pBean); } return null; } COM: <s> get property value </s>
funcom_train/22380824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void configureWindowListener() { this.addWindowListener(new WindowListener(){ public void windowActivated(WindowEvent e) { } public void windowClosed(WindowEvent e) { } public void windowClosing(WindowEvent e) { if (CloseProject()) System.exit(0); } public void windowDeactivated(WindowEvent e) { } public void windowDeiconified(WindowEvent e) { } public void windowIconified(WindowEvent e) { } public void windowOpened(WindowEvent e) { } }); } COM: <s> things to check before window closed </s>
funcom_train/12071430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getDominatedTerminals() { Iterator iter = this.getDominatedElemTrees().iterator(); List l = new Vector(); while (iter.hasNext()) { ElemTree current = (ElemTree) iter.next(); l.add(current.getTerminal()); } return l; } COM: <s> returns a code list code of the terminals attached to the elementary trees </s>
funcom_train/24553736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List getCurrentPoints() { EditPartViewer viewer = getHost().getRoot().getViewer(); VisualInfo vi = VisualInfoPolicy.getVisualInfo(getHost().getModel(), viewer); Object bendpointsKV = vi != null ? vi.getKeyedValues().get(CDMModelConstants.VISUAL_BENDPOINTS_KEY) : null; List oldPoints = bendpointsKV instanceof List ? (List) bendpointsKV : null; return oldPoints; } COM: <s> get the current list </s>
funcom_train/10341197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJLogButtonPanel() { if (jLogButtonPanel == null) { jLogButtonPanel = new JPanel(); jLogButtonPanel.setLayout(new FlowLayout()); jLogButtonPanel.setPreferredSize(new Dimension(0, 100)); jLogButtonPanel.add(getBtnNewLogRecord(), null); jLogButtonPanel.add(getBtnUpdateLog(), null); } return jLogButtonPanel; } COM: <s> this method initializes j log button panel </s>
funcom_train/25717400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBinaryInt(int offset,int len,int data,boolean isSigned) { data=(int)normalizeBinary(data,len,isSigned); len=normalizeLength(len); validate(offset=normalizeOffset(offset),len); int fsiz=4; for(int i=fsiz;i<8;++i) byteLong[i]=0;//clear temporary byteLongBuffer.putInt(fsiz,data); byteBuffer.position(offset); byteBuffer.put(byteLong, fsiz, len); return; } COM: <s> function cobol binary usage number to buffer memory </s>
funcom_train/50849964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tick() { if (isAscending) { currentValue += stepValue; if (currentValue > maximumValue) { currentValue = maximumValue - stepValue; isAscending = false; } } else { currentValue -= stepValue; if (currentValue < minimumValue) { currentValue = minimumValue + stepValue; isAscending = true; } } } COM: <s> the next step </s>
funcom_train/46761274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long store(final PatientModel patient, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { IChainStore chain = new ChainStore(); try { Long patientId = store(patient, chain, call); chain.execute(); // return primary key return patientId; } catch (Exception ex) { Log.exception(ex); Log.error(patient); chain.rollback(); throw ex; } }}; return (Long) call(method, call); } COM: <s> save the patient model model creating a new patient or updating existing rows </s>
funcom_train/11080149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeOutAndCleanUp(FacesContext facesContext) throws IOException { facesContext.setResponseWriter(original); for (FastStringWriter buffer : buffers) { original.write(buffer.toString()); } // clean up. final Map<String, Object> map = facesContext.getExternalContext().getRequestMap(); map.remove(nameInRequest); } COM: <s> write the collected stuff in the original writer </s>
funcom_train/42059154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String invokeRubyAction(IRubyObject rubyObject) throws Exception { String method = proxy.getMethod(); if (method == null) { method = "execute"; } Ruby runtime = rubyObject.getRuntime(); IRubyObject rubyResult = rubyObject.callMethod(runtime .getCurrentContext(), method); return (String) JavaEmbedUtils.rubyToJava(runtime, rubyResult, java.lang.String.class); } COM: <s> this method interfaces with the jruby internal api </s>
funcom_train/47946055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File cache(File assetsCache, String path) throws IOException { File file = new File(assetsCache, path); if(!file.exists()) { InputStream in = getContext().getAssets().open(path); try { file.getParentFile().mkdirs(); OutputStream out = new FileOutputStream(file); try { byte[] buffer = new byte[4096]; int read; while((read = in.read(buffer)) != -1) { out.write(buffer, 0, read); } } finally { out.close(); } } finally { in.close(); } } return file; } COM: <s> caches an asset </s>
funcom_train/29829544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopBlocking(JID jid) { //JID noResJID = new JID(jid.getUsername(), jid.getServer(), null); JID noResJID = jid.getSimpleJID(); if (blockedJIDs.contains(noResJID)) blockedJIDs.remove(noResJID); } COM: <s> stops blocking messages from given jid and its resources </s>
funcom_train/36203370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void traceNodesAndEdges(Session session, Collection<Node> tracedNodes, Collection<SnapshotNode> enteredSnapshots) { for (Node node : tracedNodes) { traceNodes(node); for (Edge edge : node.getOutgoingEdges()) { // Do not trace the edge that starts at an active snapshot node. // Otherwise it is counted twice. if (FluxSolver.evalEdge(session, edge) && !enteredSnapshots.contains(edge.getStartNode())) { traceEdges(edge); } } } } COM: <s> traces the nodes and active outgoing edges </s>
funcom_train/12767570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TreeItem getFirstMatchingItem(TreeItem[] items){ for (int i = 0; i < items.length; i++){ if (patternFilter.isLeafMatch(treeViewer, items[i].getData()) && patternFilter.isElementSelectable(items[i].getData())) { return items[i]; } return getFirstMatchingItem(items[i].getItems()); } return null; } COM: <s> return the first item in the tree that matches the filter pattern </s>
funcom_train/44494806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertTextStartsWith(final String text, final String startingText) { String message = "assertTextStartsWith: '"+startingText+"' is not at the beginning of the given text"; int assertLevel = AssertLevel.NO_LEVEL; assertTextStartsWith(message, text, startingText, assertLevel); } COM: <s> asserts that the given starting text begins the given text </s>
funcom_train/50152796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getTopPanel() { if (topPanel == null) { topPanel = new JPanel(); topPanel.setLayout(new GridBagLayout()); topPanel.add(buttonPanel, GridBagConstraintsFactory.create(0, 1, GridBagConstraints.BOTH, 1.0, 0.0)); topPanel.add(getJScrollPane(), GridBagConstraintsFactory.create(0, 0, GridBagConstraints.BOTH, 1.0, 1.0)); } return topPanel; } COM: <s> this method initializes top panel </s>
funcom_train/28299125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteMembershipTypeEntity(long id) { this.startTransaction(); MembershipTypeEntity memberTypeEntity = em.find(MembershipTypeEntity.class, id); log.info("Deleting Membership Type Entity: " + memberTypeEntity); em.remove(memberTypeEntity); this.endTransaction(); return true; } COM: <s> delete the membership type entity with the id </s>
funcom_train/42224461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Spring (float x, float y, float mass, int zOrder, int springAffectDuration, boolean inverted, SpriteSheet spriteSheet){ this.active=true; this.body = new Body(new Circle(32),mass); width = 64; height = 52; body.setUserData(this); body.setRestitution(1f); body.setFriction(0f); body.setMoveable(false); body.setRotatable(false); setPosition(x,y); this.springAffectDuration = springAffectDuration; bounceAffect = false; this.inverted=inverted; bounceTimer = 0; this.zOrder = zOrder; this.spriteSheet=spriteSheet; animTable = new Hashtable<String,Animation>(); buildAnimTable(); } COM: <s> create a spring object </s>
funcom_train/6444666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createProxyFactory(ServerMetaData data) throws OpenEJBException { ProxyFactory factory = (ProxyFactory)toolkit.newInstance(data.getProxyFactoryClass()); factory.init(data.asProperties(data.getProxyMap())); ProxyManager.registerFactory("ivm_server", factory); ProxyManager.setDefaultFactory("ivm_server"); } COM: <s> creates and configures the selected proxy factory instance </s>
funcom_train/24000172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetReturnType() { System.out.println("getReturnType"); OclCollectionOneIterator instance = null; OclType expResult = null; OclType result = instance.getReturnType(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get return type method of class ocl collection one iterator </s>
funcom_train/34998803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String ensureAllAttributesAreSafe(String contents) { StringBuilder sb = new StringBuilder(contents.length()); try { Lexer lexer = new Lexer(contents); Node node; while ((node = lexer.nextNode()) != null) { if (node instanceof Tag) { Tag tag = (Tag) node; this.checkAndValidateAttributes(tag, false); sb.append(tag.toHtml()); } else { sb.append(node.toHtml()); } } } catch (Exception e) { throw new ForumException("Problems while parsing HTML: " + e, e); } return sb.toString(); } COM: <s> given an input analyze each html tag and remove unsecure attributes from them </s>
funcom_train/44011518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetTransSubTotal() { System.out.println("setTransSubTotal"); double transSubTotal = 0.0; TransactionBO instance = new TransactionBO(); instance.setTransSubTotal(transSubTotal); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set trans sub total method of class edu </s>
funcom_train/639215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadData(String input){ String[] inputArr = input.split(","); for(String element : inputArr){ for (int i = 0; i < availableIdsTableModel.getRowCount(); i++){ if(element.equals(availableIdsTableModel.getValueAt(i, 0))){ availableIdsTableModel.setValueAt("1", i, 1); availableIdsTableModel.setValueAt(cancelIcon, i,2); } } } } COM: <s> preselects the selected ids </s>
funcom_train/46859867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMnuitmOpen() { if (mnuitmOpen == null) { mnuitmOpen = new JMenuItem(); mnuitmOpen.setText("Open"); mnuitmOpen.setIcon(new ImageIcon(getClass().getResource("/resources/icons/open.png"))); mnuitmOpen.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { OpenProject(); } }); } return mnuitmOpen; } COM: <s> this method initializes mnuitm open </s>
funcom_train/49106212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InterchangeXmlType createInterchange() { if (getAclfNet().getInterchangeList() == null) getAclfNet().setInterchangeList(this.getFactory().createLoadflowNetXmlTypeInterchangeList()); InterchangeXmlType interchange = this.getFactory().createInterchangeXmlType(); getAclfNet().getInterchangeList().getInterchange().add(interchange); return interchange; } COM: <s> create a interchange object </s>
funcom_train/17009425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkModelExists() { File fModel = new File(siteModelDir + modelFilePrefix + ".Q"); isModelBuilt = fModel.exists(); if (isModelBuilt) { lastRemodelTimeMilli = fModel.lastModified(); if (remodelPeriodMilli > 0 && System.currentTimeMillis() - lastRemodelTimeMilli >= remodelPeriodMilli) { isModelBuilt = false; } } } COM: <s> check to see if a model already exists and is up to date </s>
funcom_train/36189777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(Dictionary dict) throws PSSParseException { String componentClassesStr = (String) dict.get("iPOJO-Components"); // Add the ipojo element inside the element list addElement(new Element("iPOJO", "")); parseElements(componentClassesStr.trim()); } COM: <s> looks for the code i pojo components code header </s>
funcom_train/7751810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SuperColumn getSuperColumnFromRow(final String rowKey, final String columnFamily, final String superColName, final ConsistencyLevel cLevel) throws Exception { return getSuperColumnFromRow(rowKey, columnFamily, toBytes(superColName), cLevel); } COM: <s> retrieve a super column from a row </s>