__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/12700898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object createNewModel() throws FrameworkRuntimeException { if (this.m_modelClass==null) throw new FrameworkRuntimeException("The controller has no assigned model"); try { return this.m_modelClass.newInstance(); } catch (Exception e) { throw new FrameworkRuntimeException("Could not create model",e); } } COM: <s> create a new instance of the assigned model </s>
funcom_train/12705723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initConfig() throws XFormsException { final String initParameter = getContext().getInitParameter( WebFactory.BETTERFORM_CONFIG_PATH); String configPath = WebFactory.resolvePath(initParameter, getContext()); if ((configPath != null) && !(configPath.equals(""))) { this.xformsProcessor.setConfigPath(configPath); this.configuration = Config.getInstance(); } } COM: <s> passes the betterform defaults </s>
funcom_train/43245276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetECOneStreetAddr3() { System.out.println("setECOneStreetAddr3"); String eCOneStreetAddr3 = ""; EmergencyContactDG3Object instance = new EmergencyContactDG3Object(); instance.setECOneStreetAddr3(eCOneStreetAddr3); // 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 econe street addr3 method of class org </s>
funcom_train/1627291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createTransitions(State sourceState, State targetState, Guard guard, List<Event> eventList, List<Action> actionList) { for (Event event : eventList) { GTransition transition = (GTransition) sm.createTransition(sourceState, targetState, guard, event); saveActionsForTransition(transition, actionList); transition.getLabel().update(); } } COM: <s> creates transitions using specified data </s>
funcom_train/44705271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getTargetURL(ContentItem target) { if ( target == null ) { return null; } else if ( target instanceof Asset ) { Asset asset = (Asset)target; return Utilities.getAssetPath( asset, null ); } else { return "/" + Utilities.getItemLocation(target); } } COM: <s> return the url of code target code on the destination live server </s>
funcom_train/22754022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DataItemDef getDataItemDef(FormatReader read) throws FormatProcessException { DataItemDef did = read.getDataItemDef(this.getSourceID()); if (null == did) { throw new FormatProcessException("Cannot find Data Item Definition " + this.getSourceID()); } return did; } COM: <s> returns the data item def referred to by the source id field </s>
funcom_train/26036316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void incrementProfile(RuleClauseCode clause) { if (profile != null) { String index = clause.toString(); Count count = profile.get(index); if (count == null) { profile.put(index, new Count(clause).inc()); } else { count.inc(); } } } COM: <s> record a rule invocation in the profile count </s>
funcom_train/21252361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addManyPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Property_many_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_Property_many_feature", "_UI_Property_type"), EntityPackage.Literals.PROPERTY__MANY, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the many feature </s>
funcom_train/50858482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getInstance(Component component) throws ApplicationException { BaseComponent baseComponent = null; try { baseComponent = (BaseComponent)Class.forName(component.getClassName()).newInstance(); baseComponent.jinitialize(component.getParameters()); } catch(Exception e) { Debug.log(e); throw new ApplicationException(e); } return baseComponent; } COM: <s> creates and return instance of named object </s>
funcom_train/28172854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetStartDate() { System.out.println("getStartDate"); Duration instance = new Duration(new SimpleDate(2008, 12, 25), new SimpleDate(2008, 12, 31)); SimpleDate expResult = new SimpleDate(2008, 12, 25); SimpleDate result = instance.getStartDate(); assertEquals(expResult, result); } COM: <s> test of get start date method of class duration </s>
funcom_train/47928454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMoveQued(int move) { int yus = move - 1; String txt = ""; if (yus < 4) { txt = physical[yus]; } if (yus >= 4 && yus <= 7) { txt = celestia[yus - 4]; } if (yus >= 8 && yus <= 11) { txt = status[yus - 8]; } return txt; } COM: <s> gets the name of a qued move </s>
funcom_train/12184483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refresh(ScrolledComposite scroller) { Composite scrollable = (Composite)scroller.getContent(); scrollable.setSize(scrollable.computeSize(SWT.DEFAULT, SWT.DEFAULT)); scrollable.layout(); scroller.setMinSize(scroller.computeSize(SWT.DEFAULT, SWT.DEFAULT)); } COM: <s> refresh the scroll bar area </s>
funcom_train/21656380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtCancelarLito1() { if (btCancelarLito1 == null) { btCancelarLito1 = new JButton(); btCancelarLito1.setBounds(new Rectangle(612, 568, 150, 23)); btCancelarLito1.setMnemonic('v'); btCancelarLito1.setText("Volver al Menu"); btCancelarLito1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ControladorPrincipal.mostrarMenuEditarProyecto(); } }); } return btCancelarLito1; } COM: <s> this method initializes bt cancelar lito1 </s>
funcom_train/35513630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IEntity findFirstByDescription(Class<? extends IEntity> clazz, String description) { HibernateTemplate hibernateTemplate = this.getHibernateTemplate(); hibernateTemplate.setMaxResults(0); List<IEntity> entityList = hibernateTemplate.find("from " + clazz.getName() + " WHERE description = ?", description); return entityList.size() > 0 ? entityList.get(0): null; } COM: <s> it is used to fetch only the first object which matches the criteria </s>
funcom_train/33239090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { if (this.server != null) { this.server.close(); this.server = null; } if (this.dbm != null) { this.dbm.close(); this.dbm = null; } if (this.servercon != null) { this.servercon.close(); this.servercon = null; } } COM: <s> close everything one step at a time </s>
funcom_train/43244895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetCurrentPoolSize() { System.out.println("setCurrentPoolSize"); int currentPoolSize = 0; ServerStatusObject instance = new ServerStatusObject(); instance.setCurrentPoolSize(currentPoolSize); // 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 current pool size method of class org </s>
funcom_train/26282782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean orderOK(int player, Order order) { if (order instanceof DipOrder) return orderOK((DipOrder) order, player); else if (order instanceof RetOrder) return orderOK((RetOrder) order, player); else if (order instanceof AdjOrder) return orderOK((AdjOrder) order, player); else throw new RuntimeException("Unknown order type."); } COM: <s> checks the validity of an order </s>
funcom_train/45895479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintTo(Graphics2D g2, int x0, int y0) { int color = 0xFFFFCC00; if (disabled) { color = 0xFFC0C0C0; } else if (pressed) { color = 0xFFFF0000; } else if (selected) { color = 0xFFFFFFFF; } int textWidth = commons.text().getTextWidth(size, commons.labels().get(label)); commons.text().paintTo(g2, x0 + x + (width - textWidth) / 2, y0 + y, size, color, commons.labels().get(label)); } COM: <s> paint the label </s>
funcom_train/7272189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void backAction() { if( selectionPanel.isVisible() ) return; CardLayout cl = (CardLayout)(cardPanel.getLayout()); cl.show(cardPanel, SELECTION_PANEL); okButton.setText(I18n.tr("Next")); backButton.setEnabled(false); } COM: <s> if the selection list is displayed return else </s>
funcom_train/24237437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int calculatePosition(String text, String searchText) { // char index of our ruleset title in file int index = text.indexOf(searchText); // count new line characters for position setting int newLineNumber = 0; try { for(int s = 0; s < index; s++) { if(text.charAt(s) == '\n') { newLineNumber++; } } } catch(Exception e){} if(index + newLineNumber == 0) index++; return index + newLineNumber; } COM: <s> calculates position of search text occurence in text </s>
funcom_train/4521102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(ProcesoElectoral entity) { LogUtil.log("deleting ProcesoElectoral instance", Level.INFO, null); try { entity = entityManager.getReference(ProcesoElectoral.class, entity .getProcesoElectoralId()); entityManager.remove(entity); LogUtil.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { LogUtil.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent proceso electoral entity </s>
funcom_train/41068582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetTime() { System.out.println("setTime"); long t = 0L; MIDITimedMessage instance = new MIDITimedMessage(); instance.setTime(t); // 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 time method of class com </s>
funcom_train/44431084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { StringBuffer sb = new StringBuffer(64); // This looks like a bug because it is not symmetrical with the accompanying equals(). // sb.append(title).append(description).append(link); sb.append(title).append(description).append(link); return sb.toString().hashCode(); } COM: <s> returns a hash code value for the object </s>
funcom_train/262148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getPortList() { if (portList == null) { Vector<String> availablePorts = new Vector<String>(); Iterator<CommPortIdentifier> it = CommUtil.getInstance() .getPortIdentifiers(); while (it.hasNext()) { availablePorts.add(it.next().getName()); } portList = new JComboBox(availablePorts); } return portList; } COM: <s> get a combo box with all available comm ports </s>
funcom_train/22054388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSize(int iX, int iY) { super.setSize(iX, iY); Misc.debug(this, "Changing size to: " + iX + ", " + iY); label_info.setBounds(new Rectangle(0, 0, iX, 17)); } COM: <s> re size the panel and re position all components </s>
funcom_train/7640869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ThreadInfo getThreadSelection(ISelection selection) { if (selection == null) { selection = mThreadViewer.getSelection(); } if (selection instanceof IStructuredSelection) { IStructuredSelection structuredSelection = (IStructuredSelection)selection; Object object = structuredSelection.getFirstElement(); if (object instanceof ThreadInfo) { return (ThreadInfo)object; } } return null; } COM: <s> returns the current thread selection or code null code if none is found </s>
funcom_train/8232035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand9() { if (okCommand9 == null) {//GEN-END:|100-getter|0|100-preInit // write pre-init user code here okCommand9 = new Command("Nueva busqueda", Command.OK, 0);//GEN-LINE:|100-getter|1|100-postInit // write post-init user code here }//GEN-BEGIN:|100-getter|2| return okCommand9; } COM: <s> returns an initiliazed instance of ok command9 component </s>
funcom_train/32968355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetInt() { System.out.println("setInt"); LLEvent instance = new LLEvent(); instance.setInt(1); assertEquals(1, instance.getInt()); instance.setInt(-1); assertEquals(-1, instance.getInt()); } COM: <s> test of set int method of class org </s>
funcom_train/12187977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String encodedValue(String value) { StringBuffer buffer = new StringBuffer(value); for (int i = buffer.length() - 1; i >= 0; i--) { if (buffer.charAt(i) == '&') { buffer.replace(i, i + 1, "&amp;"); } } return buffer.toString(); } COM: <s> utility method that encodes characters in the given string </s>
funcom_train/31660673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class findImplementation(Class interfase) throws IOException, ClassNotFoundException { String className = findString(interfase.getName()); Class impl = classLoader.loadClass(className); if (!interfase.isAssignableFrom(impl)) { throw new ClassCastException("Class not of type: " + interfase.getName()); } return impl; } COM: <s> assumes the class specified points to a file in the classpath that contains </s>
funcom_train/17203457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetBasicBlockMap() { basicBlockMap = new BasicBlock[getMaxBasicBlockNumber() + 1]; for (Enumeration<BasicBlock> bbEnum = cfg.basicBlocks(); bbEnum.hasMoreElements();) { BasicBlock block = bbEnum.nextElement(); basicBlockMap[block.getNumber()] = block; } } COM: <s> recompute the basic block map so can use get basic block int </s>
funcom_train/18090905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetAuthHeaderSetsUsernameAndPassword() throws Exception { Request req = new Request(); Header h = new Header("Authentication", "Basic " + new BASE64Encoder().encode("richard:secret".getBytes())); req.setHeader(h); assertEquals("richard", req.getUsername()); assertEquals("secret", req.getPassword()); } COM: <s> test that setting the authentication header directly sets the username </s>
funcom_train/168558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testElapsedGreaterThanExpected() { double duration = initialMax - initialMin; elapsedTimeNode.setValue(401); elapsedTime = elapsedTimeNode.getValue(); g.end(); assertEquals(elapsedTime - duration, axisX.getNodeRecursive("min") .getValue(), 0.0); assertEquals(elapsedTime, axisX.getNodeRecursive("max").getValue(), 0.0); } COM: <s> if the elapsed time is greater than the expected time then the elapsed </s>
funcom_train/25280941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPrintData() { StringBuilder sb = new StringBuilder(); for(DecompressionStop stop : decoplan) { sb.append("Stop at " + stop.getDepth() + " meter for " + stop.getTime() + " minutes with " + stop.getGas().getO2() + "% O2" + System.getProperty("line.separator")); } return sb.toString(); } COM: <s> get the data in a readable format </s>
funcom_train/34519307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TypeDef getTypeDefByName(String ns, String name){ for (int i=0;i<typeDefs.size();i++){ TypeDef def = (TypeDef)(typeDefs.get(i)); if (ns.equals(def.getNamespace()) && name.equals(def.getName())) return def; } return null; } COM: <s> returns the type def with the given name and namespace </s>
funcom_train/44852733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MemberHistory createHistory() throws BOMChangeValueException { MemberHistory outHistory; try{ outHistory = (MemberHistory)BOMHelper.getMemberHistoryHome().create(); for (String lPropertyName : getPropertyNames2()) { if (!MemberHome.KEY_PASSWORD.equals(lPropertyName)) { outHistory.set(lPropertyName, this.get(lPropertyName)); } } } catch (Exception exc){ throw new BOMChangeValueException("MemberImpl.createHistory: " + exc.getMessage()); } return outHistory; } COM: <s> creates a history entry and fills it with the values of the actual </s>
funcom_train/33895853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getObjects(Class clazz, Map criterias) { Criteria criteria = getSession().createCriteria(clazz); for (Iterator iter = criterias.keySet().iterator(); iter.hasNext();) { String key = (String) iter.next(); criteria.add(Restrictions.eq(key, criterias.get(key))); } return criteria.list(); } COM: <s> get results by criterias </s>
funcom_train/37070960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setType(String type) { if (type.equalsIgnoreCase(GENOMIC)) { this._instance = new AddNucleotideSequence("genomic"); } else if (type.equalsIgnoreCase(MRNA)) { this._instance = new AddNucleotideSequence("mrna"); } else if (type.equalsIgnoreCase(PROTEIN)) { this._instance = new AddAminoAcidSequence(); } else { throw new IllegalStateException(type); } } COM: <s> initializes which sequence adder we need to use </s>
funcom_train/19325538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int traitOrphans(final FObj fobj, final FoContext context) { final PdOrphans property = (PdOrphans) getProperty( FoProperty.ORPHANS); if (property != null) { return property.getValue(context, fobj); } return PdOrphans.getValueNoInstance(context, fobj); } COM: <s> returns the orphans property </s>
funcom_train/41704269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long getLong(String attribute) { try { if (rs != null) { return rs.getLong(attribute); } else { throw new NullPointerException(); } } catch (Exception ex) { System.out.println("DB.getLong() ran into an error " + ex.getMessage()); ex.printStackTrace(); } throw new NullPointerException(); } COM: <s> returns the long data under the stated column name </s>
funcom_train/25196810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setFile(String arg) { if (properties.getProperty(PROP_FILE) != null) { return logBanner("one.file", arg); } else if ("".equals(arg)) { return logBanner("empty.file", arg); } properties.setProperty(PROP_FILE, arg); return true; } COM: <s> setter for the file name </s>
funcom_train/44565040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DcObject getReferencedObject() { if (reference == null) { try { reference = DataManager.getItem( getReferencedModuleIdx(), getReferencedID(), DcModules.get(getReferencedModuleIdx()).getMinimalFields(null)); } catch (Exception e) { logger.warn(e, e); } } return reference; } COM: <s> retrieves the referenced object </s>
funcom_train/43098666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object buildConstraint(Object constrElement) { MModelElement constrainedElement = (MModelElement) constrElement; if (constrainedElement == null) { throw new IllegalArgumentException("the constrained element is " + "mandatory and may not be " + "null."); } MConstraint con = (MConstraint) createConstraint(); con.addConstrainedElement(constrainedElement); con.setNamespace(constrainedElement.getNamespace()); return con; } COM: <s> builds a constraint that constraints the given modelelement </s>
funcom_train/7621710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedGroup(int groupPosition) { ExpandableListPosition elGroupPos = ExpandableListPosition .obtainGroupPosition(groupPosition); PositionMetadata pm = mConnector.getFlattenedPos(elGroupPos); elGroupPos.recycle(); super.setSelection(pm.position.flatListPos); pm.recycle(); } COM: <s> sets the selection to the specified group </s>
funcom_train/39169049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(int index, ProcessingResource pr){ if(pr instanceof LanguageAnalyser){ strategiesList.add(index, new AnalyserRunningStrategy((LanguageAnalyser)pr, RunningStrategy.RUN_ALWAYS, null, null)); }else{ strategiesList.add(index, new RunningStrategy.UnconditionalRunningStrategy(pr, true)); } super.add(index, pr); } COM: <s> set a pr at a specified location </s>
funcom_train/40312397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsSearchable_InvalidColumn1() { try { ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry); resMetaData.isSearchable(-1); fail("SQLException is expected."); } catch(SQLException e) { //ensure the SQLException is thrown by isSearchable method. assertEquals("The sqlstate mismatches", "22003", e.getSQLState()); } } COM: <s> tests is searchable with negative column index </s>
funcom_train/1194239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Gauge getVolumeGauge() { if (volumeGauge == null) {//GEN-END:|507-getter|0|507-preInit // write pre-init user code here volumeGauge = new Gauge(LocalizationSupport.getMessage("VOLUMELEVEL"), true, 100, 50);//GEN-LINE:|507-getter|1|507-postInit // write post-init user code here }//GEN-BEGIN:|507-getter|2| return volumeGauge; } COM: <s> returns an initiliazed instance of volume gauge component </s>
funcom_train/26365250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void presence(JabberComm moJabberComm, String Resource) { myResource = Resource; if (moJabberComm.groupChatEnter("GroupChatEnter",room, server, myResource, nick) != Constants.SEND_SUCCEEDED) System.out.println("problem joining chatroom"); } COM: <s> officially announce my presence join the groupchat room </s>
funcom_train/40419842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkForSanity() { String dir = CRUtil.resolveSystemProperties(CONFIG_DIR); File confDir = new File(dir); if (confDir.exists() && confDir.isDirectory()) { log.debug("Loading configuration from " + dir); } else { String errMsg = "CONFIGURATION ERROR: Configuration directory does" + " not seem to contain a" + " valid configuration. The directory " + dir + " must exist and contain valid configuration files."; log.error(errMsg); System.err.println(errMsg); } } COM: <s> checks for common configuration mistakes </s>
funcom_train/7508571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMakeEmptyClassName() throws ConfigurationException { Object obj = null; try { obj = ObjFactory.make("", "testMakeEmptyClassName"); assertFalse("Should not be reached - not a subclass", obj != null); } catch(ConfigurationException ex) { Throwable cause = ex.getCause(); assertTrue( cause instanceof IllegalArgumentException); } } COM: <s> test that illegal argument exception is thrown as the cause when the </s>
funcom_train/1213814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshStats() { wrestlerByClassDiv.updateStats(); boutsByDivision.updateStats(); boutsBySessionMat.updateStats(); boutsByMat.updateStats(); wrestlerByClassDivChart.updateStats(); boutsByDivisionChart.updateStats(); boutsBySessionMatChart.updateStats(); boutsByMatChart.updateStats(); } COM: <s> notify the child panels to update their statistics </s>
funcom_train/5432440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int totalPop() { int ret=0; Enumeration e=cities.elements(); while(e.hasMoreElements()) { Enumeration e2=((City)e.nextElement()).citizens.elements(); while(e2.hasMoreElements()) { ret+=((PeopleUnit)e2.nextElement()).howMany; } } return ret; } COM: <s> find out how many people are in the population pools </s>
funcom_train/8461390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Note getLowestNote() { /*Note lowestNote = (Note)m_notes.elementAt(0); for (int i=1; i<m_notes.size(); i++) if (((Note)(m_notes.elementAt(i))).isLowerThan(lowestNote)) lowestNote = (Note)m_notes.elementAt(i); return lowestNote;*/ return getLowestNote(this.toArray()); } COM: <s> returns the lowest note among the notes composing this multi note </s>
funcom_train/8225167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* public UserDB getUser(String login, String password){ Query query = entityManager.createQuery("SELECT u FROM UserDB u WHERE u.login = ?1 AND u.password = ?2"); query.setParameter(1, login).setParameter(2,password); List res = query.getResultList(); if (res.isEmpty()) return null; else return (UserDB)res.get(0); } COM: <s> it fully retrieves a user from the system </s>
funcom_train/33149293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void controlChildren(InvocationContext icb) throws Exception { Iterator it = getChildren().iterator(); while (it.hasNext()) { if (icb.getController().proceed()) { String childName = (String) it.next(); //icb.getServletContext().log(getChild(childName).getClass() + ":" + getChild(childName).getName()); getChild(childName).control(icb); } else break; } } COM: <s> this method can be overridden by a subclass to do application </s>
funcom_train/13720340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int insertException(LogRecord rec, int recordpk) throws SQLException { Throwable th = rec.getThrown(); if (th == null) return 0; stmtException.setInt(EXCEPTION_INDEX_RECORDFK, recordpk); stmtException.setString(EXCEPTION_INDEX_MESSAGE, th.toString()); if (stmtException.executeUpdate() < 1) return -1; return 1; } COM: <s> inserts a row on the exception table if there was an exception thrown </s>
funcom_train/25702499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addGlobalListener (X3DFieldEventListener listener) { // Listen to all fields from the movement wrapper X3DFieldDefinition [] movementWrapperFieldDefinitions = x3dNode.getFieldDefinitions(); int nFields = movementWrapperFieldDefinitions.length; for (int i = 0; i < nFields; i++) { X3DField field = x3dNode.getField(movementWrapperFieldDefinitions[i].getName()); field.addX3DEventListener(listener); } } COM: <s> add a listener to all the wrapper fields </s>
funcom_train/14615436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isSuffixValid( String name ) throws TemplateException { if (!(filenameSuffix == null || name.endsWith(filenameSuffix))) { throw new TemplateException("The requested name, \"" + name + "\", does not have the filename suffix \"" + filenameSuffix + '\"'); } return true; } COM: <s> determine whether the filename ends with the appropriate filename </s>
funcom_train/43567518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isZedAICoreModule(RNGDocument doc, Nodes absdefs) { String test = doc.getFile().getName(); for (int i = 0; i < absdefs.size(); i++) { ProcessingInstruction pi = (ProcessingInstruction)absdefs.get(i); URI uri = resolveSchema(pi.getValue()); if(uri.toString().endsWith(test)) { return true; } } return false; } COM: <s> determine whether doc is referenced from an absdef pi </s>
funcom_train/2620877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setupTestCapability() { simpleJdbcTemplate.update( "insert into solardras.capability (id,dr_kind,max_power,max_energy,max_var) " +"values (?,?,?,?,?)", TEST_CAPABILITY_ID, "Test", 11, 12, 13); } COM: <s> insert a test capability into the solardras </s>
funcom_train/11379415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getSleepInterval() { long sleepInterval = getCSConf().getLong( "mapred.capacity-scheduler.init-poll-interval", INITIALIZATION_THREAD_POLLING_INTERVAL); if(sleepInterval <= 0) { throw new IllegalArgumentException( "Invalid initializater poller interval " + sleepInterval); } return sleepInterval; } COM: <s> amount of time in milliseconds which poller thread and initialization </s>
funcom_train/22791401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void submitEditMode(boolean submit) { Component component = getEditorComponent(); if (component!=null) { if (submit && getRowCount()>0 && getColumnCount()>0 ){ editCellAt(0,0); } editingCanceled(new ChangeEvent(this)); } } COM: <s> submit leave an edit mode if any </s>
funcom_train/3024209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scale(double value) { super.scale(value); nameLabel.scale(value); roles.scale(value); // Rescale the children Component[] children = getComponents(); for (int ndx = 0; ndx < children.length; ndx++) { if (children[ndx] instanceof UMLLine) { ((UMLLine)children[ndx]).scale(value); } } } COM: <s> sets the scaling factor </s>
funcom_train/43196727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object put(Object key, Object value) { checkRealm(); Object result = wrappedMap.put(key, value); if (!Util.equals(result, value)) { if (result==null) { fireMapChange(Diffs.createMapDiffSingleAdd(key, value)); } else { fireMapChange(Diffs.createMapDiffSingleChange(key, result, value)); } } return result; } COM: <s> associates the provided code value code with the code key code </s>
funcom_train/5857311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getUserRoles(String _userName) { log.debug("getUserRoles: name="+_userName); ArrayList result=new ArrayList(); for (Enumeration i=this.getUserRoles().elements();i.hasMoreElements();) { UserRole ur=(UserRole)i.nextElement(); if (_userName.equals(ur.getUserName())) { result.add(ur.getRoleName()); } } return result; } COM: <s> describe code get user roles code method here </s>
funcom_train/21034128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stateChanged(ChangeEvent e) { Object obj = e.getSource(); if (obj instanceof DCMenuItem) { DCMenuItem menuItem = (DCMenuItem) obj; if (menuItem.isSelected()) { if (menuItem.isArmed()) menuItem.setIcon(deleteIcon); else menuItem.setIcon(selectIcon); } } } COM: <s> invoked when the target of the listener has changed its state </s>
funcom_train/21952466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeFrame(JInternalFrame f) { super.closeFrame(f); updateDesktopSize(); // workaround for bug in jdk 1.5 (sigh) SwingUtilities.invokeLater(new Runnable() { public void run() { java.awt.KeyboardFocusManager mgr = java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager(); pane.requestFocusInWindow(); } }); } COM: <s> p this extends the behaviour of default desktop manager by </s>
funcom_train/47608155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadGameRules() throws IOException { assert(!gameStarted); Player[] np; try { Scanner scan = new Scanner(new File(rulesFile)); np = new Player[scan.nextInt()]; scan.nextLine(); for(int i=0; i<np.length; ++i) np[i] = new Player(scan.nextLine()); setPlayers(np); loadMap(mapName); } catch( Exception e ) { MainWindow.die(e); } accessible = new int[world.getRegionCount()]; groups = new GroupManager(world); } COM: <s> loads the game rules </s>
funcom_train/31156941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInWorld(Position newPosition) { double x = newPosition.getX(); double y = newPosition.getY(); if (x <= getTopleftX() && x >= getBottomrightX() && y <= getTopleftY() && y >= getBottomrightY()) { return true; } return false; } COM: <s> determines whether the given position is inside the world </s>
funcom_train/40222644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clickCardController(RowView rv, MouseEvent me) { // Respond to DoubleClick events if (me.getClickCount() > 1) { Column theRow = (Column) rv.getModelElement(); if (theRow == null) { throw new IllegalArgumentException ("BCastle::clickCardController() received invalid RowView."); } } } COM: <s> react to the mouse click both a press and release on a particular </s>
funcom_train/10635875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSession() throws Exception { SSLEngine engine = getEngine(); SSLSession session = engine.getSession(); if ((session == null) || (!session.getCipherSuite() .endsWith("_NULL_WITH_NULL_NULL"))) { fail("Returned session is null " + "or not TLS_NULL_WITH_NULL_NULL"); } } COM: <s> get session method testing </s>
funcom_train/25921166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int adjustSize(PlatformIcon icon, double factor) { try { SDLSurface temp = SDLGfx.rotozoomSurface(icon.getIconImage(), 1.0, factor, true); icon.setIconImage(temp, temp.getWidth(), temp.getHeight()); } catch (SDLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (GUIException e) { // TODO Auto-generated catch block e.printStackTrace(); } // refactoring return 1; } COM: <s> adjusts size of icons </s>
funcom_train/38306564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumAreas() { int numAreas = 0; int numSegments = chartData.size(); for (int i = 0; i < numSegments; i++) { double[] row = (double[]) chartData.get(i); numAreas = Math.max(numAreas, row.length); } return numAreas; } COM: <s> gets the number of areas </s>
funcom_train/41165531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(MaParagraphForm entity) { EntityManagerHelper.log("deleting MaParagraphForm instance", Level.INFO, null); try { entity = getEntityManager().getReference(MaParagraphForm.class, entity.getParagraphFormId()); 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 ma paragraph form entity </s>
funcom_train/39162786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { Set datastores = new HashSet(this); super.clear(); Iterator iter = datastores.iterator(); while (iter.hasNext()) { fireDatastoreClosed(new CreoleEvent((DataStore) iter.next(), CreoleEvent.DATASTORE_CLOSED)); } // while } // clear() COM: <s> removes all of the elements from this set </s>
funcom_train/2578064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Size2D arrangeRN(Graphics2D g2, Range widthRange) { Size2D s = arrangeNN(g2); if (widthRange.contains(s.getWidth())) { return s; } double ww = widthRange.constrain(s.getWidth()); return arrangeFN(g2, ww); } COM: <s> arranges the content for this title assuming a range constraint for the </s>
funcom_train/42211698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Locale resolveLocale(HttpServletRequest request) { Locale locale = (Locale) WebUtils.getSessionAttribute(request, LOCALE_SESSION_ATTRIBUTE_NAME); if (locale == null) { try { locale = determineDefaultLocale(request); } catch (ApplicationException e) { // ultimate fallback setting locale = new Locale("en"); } } return locale; } COM: <s> method resolve locale </s>
funcom_train/38723751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkStopConditions() { if ( stopConditions == null ) stopConditions = conf.getStopConditions(); for (int i = 0; i < stopConditions.size(); i++) { if ( stopConditions.get(i).checkStopCondition(this) ) { //System.out.println("StopCondition fired: "+stopConditions.get(i).getReason()); return true; } } return false; } COM: <s> runs through all stop conditions until it finds one that is met </s>
funcom_train/1443296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void informTactic(Info info) { if (info == null) return; if (info.getInfoType() == Info.TYPE_PTYPE) this.tactic.receivedPlayerTypeInf((PlayerTypesInfo) info); if (info.getInfoType() == Info.TYPE_AURAL) this.tactic.receivedAuralInfo((AuralInfo) info); if (info.getInfoType() == Info.TYPE_COACHVI) this.tactic.receivedVisualInfo((CoachVisualInfo) info); } COM: <s> this method calls the tactic of the coach dependent on the info type </s>
funcom_train/48261112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWork() { log.info("testWork. 데이터베이스 초기화 수행"); try { InitCommandWorker initCommandWorker = new InitCommandWorker(); initCommandWorker.work(null); } catch(CommandWorkerException ex) { log.info("testWork. 실패. " + ex.getMessage()); log.debug(LogUtil.stackTraceToString(ex)); } } COM: <s> test of work method of class init command worker </s>
funcom_train/9990151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object apply(Context context, Object arg) { Object result = null; if (arg == null) { throw new NullArgument("Null argument to cos()"); } if (arg instanceof Number) { result = new Double(Math.cos(((Number) arg).doubleValue())); } else { throw new TypeError("Wrong argument type to cos()"); } return result; } COM: <s> returns the cosine of the argument </s>
funcom_train/20603030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateAllInfo(NodeDescriptor node) { boolean noErrors = true; try { node.updateInfo(); } catch (NodeException e) { logger.warn("exception trying to update " + node, e); noErrors = false; } for (Module module: modules.values()) { try { module.notifyNode(node); } catch (NodeException e) { logger.warn("exception trying to update " + node, e); noErrors = false; } } return noErrors; } COM: <s> updates the info of the node related to the cluster </s>
funcom_train/21611678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParsePrepositionPredicateConstBodyDeclarationNumber() throws MUParserException { ParseTree pt = parser.parse("preposition", "PredicateDeclaration( ) : 12 ; "); System.out.println("parse tree: " + pt); checkParsing( pt, "predicate_name", "(", ")", ":", "numeric", ";" ); } COM: <s> tests parsing of predicate number body declaration </s>
funcom_train/13938403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void change(Object data){ if(data.getClass().equals(pdata.getClass())){ pdata = data; AvoGlobal.paramEventHandler.notifyParamModified(); }else{ System.out.println("No change made in Param.change since data was not same type as originally constructed."); System.out.println(" --> " + data.getClass().getName() + " != " + pdata.getClass().getName()); } } COM: <s> change the data associated with a parameter </s>
funcom_train/4586979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String create() { try { logger.debug("create"); UserInfo user = new UserInfo(); BeanUtils.copyProperties(request, user); user = userService.createUser(user); xmlBean.setCode("0"); xmlBean.setMessage(user.getUsername() + " 保存成功"); } catch (RuntimeException e) { logger.debug(e.getMessage()); xmlBean.setCode("-1"); xmlBean.setMessage(e.getMessage()); } message = xmlBean.toXmlString(); return SUCCESS; } COM: <s> method create user </s>
funcom_train/41164785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(ToLinks entity) { EntityManagerHelper.log("saving ToLinks instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved to links entity </s>
funcom_train/13274652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLongitudeInDegrees(float longitudeInDegrees) { if (longitudeInDegrees != this.longitudeInDegrees) { float oldLongitudeInDegrees = this.longitudeInDegrees; this.longitudeInDegrees = longitudeInDegrees; this.propertyChangeSupport.firePropertyChange(Property.LONGITUDE_IN_DEGREES.name(), oldLongitudeInDegrees, longitudeInDegrees); } } COM: <s> sets the edited longitude of the center </s>
funcom_train/10190707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Header getHeader(String hname) { SipParser par = new SipParser(m_strString, indexOfHeader(hname)); if (!par.hasMore()) { return null; } par.skipN(hname.length()); int begin = par.indexOf(':') + 1; int end = par.indexOfEOH(); if (begin > end) { return null; } String hvalue = m_strString.substring(begin, end).trim(); m_nIndex = end; return new Header(hname, hvalue); } COM: <s> returns the first occurence of header i hname i </s>
funcom_train/1548988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove() { if (collection != null) { if (last != null) { collection.remove(last); } else { throw new IllegalStateException("next() must have been called for remove() to function"); } } else { throw new UnsupportedOperationException("No Collection associated with this Iterator"); } } COM: <s> removes the last retrieved element if a collection is attached </s>
funcom_train/33948106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator getDepictedInstances(SelectionRegion region) { HashSet aSet = (HashSet)getRegionDepictsTable().get(region); if (aSet == null) { aSet = new HashSet(); getRegionDepictsTable().put(region,aSet); } return aSet.iterator(); } COM: <s> returns all the depicted instances for a given region </s>
funcom_train/18457475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllJFCEventDataListeners() { Object[] listeners = m_listenerList.getListenerList(); for (int i = 0; i < listeners.length; i += 2) { if (listeners[i] == JFCEventDataListener.class) { m_listenerList.remove(JFCEventDataListener.class, (EventListener) listeners[i + 1]); } } } COM: <s> remove all listeners </s>
funcom_train/8317206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String convertStringToDate(String strDate) { return strDate.substring(0, 3) + "/" + strDate.substring(4, 5) + "/" + strDate.substring(6, 7) + " " + strDate.substring(8, 9) + ":" + strDate.substring(10, 11) + ":" + strDate.substring(12, 13); } COM: <s> 2009 05 26 </s>
funcom_train/44287217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addProgressValue(String text) { progress.setIndeterminate(false); progress.setMaximum(FrameMain.PROGRESS_MAX + 1); progress.setValue(progress.getValue() + 1); progress.setStringPainted(true); progress.setString(LocalMessage.get("message:" + text)); } COM: <s> increases value of progress bar and displays a message </s>
funcom_train/38277327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addUsers_role(long user_id, long role_id) throws ClassNotFoundException, InstantiationException, IllegalAccessException, SQLException { Communities_users_role communities_users_roles = new Communities_users_role(); communities_users_roles.setCommunitie_id(this.getCommunitie_id()); communities_users_roles.setUser_id(user_id); communities_users_roles.setRole_id(role_id); Communities_users_rolesCollection.insert(communities_users_roles); }; COM: <s> add a n users role to the communitie </s>
funcom_train/9985485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String renderChildren(VisNode node) { if (!node.hasChildren()) return ""; // run over all children StringBuilder sb = new StringBuilder(); for (VisNode child : node.getChildren()) { System.out.println(child.getName() + " " + child.getClass().getSimpleName()); sb.append(child.render(this)).append(" "); } return sb.toString(); } COM: <s> this method is called to process the child rendering </s>
funcom_train/46764392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResourceModel getResource(final long resourceId, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { if (call.isStoreAudit()) { BaseData.getSecurity().storeAudit(call.getUserRefId(), resourceId, "Viewed Resource", call); } return SchedulingData.getResource(resourceId, call); }}; return (ResourceModel) call(method, call); } COM: <s> return the single resource model for the primary key </s>
funcom_train/2522479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date setTime(int hour, int minute, int second){ c.set(c.HOUR_OF_DAY, hour); c.set(c.MINUTE, minute); c.set(c.SECOND, second); c.clear(c.MILLISECOND); super.setTime(c.getTimeInMillis()); return this; } COM: <s> changes the time only </s>
funcom_train/44898390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() throws ComponentMonitorException { this.bgc.shutdown(); // Clear the binding of "cmtest.pb.type" try { Context ctx = containerSupport.getServerAddress().getContext(); ctx.unbind(CMTYPE_KEY); } catch (NamingException ne) { logger.error("Error in unbind", ne); } } COM: <s> shuts down communication </s>
funcom_train/18811480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadBasicExtensionPoint(DESC descriptor, IConfigurationElement element, String extendingPluginId) { descriptor.setConfigurationElement(element); descriptor.setId(element.getAttribute("id")); descriptor.setName(element.getAttribute("name")); descriptor.setInfo(element.getAttribute("info")); descriptor.setPlugin(getPluginDescriptor(extendingPluginId)); String iconPath = element.getAttribute("icon"); if(iconPath != null){ ImageDescriptor icon = loadImageDescriptor(descriptor.getPlugin().getId(), iconPath); descriptor.setIcon(icon); } } COM: <s> loads the default properties off the extension with these properties </s>
funcom_train/15955238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean EvaluateBoolean(Invocation inv)throws ExpressionException { int liCount = 0; int liNo = fExpressions.length; for(int i = 0; i < liNo;i++) { if( fExpressions[i].EvaluateBoolean(inv) ) { liCount++; if( 1 < liCount ) /* test for chortcut */ { return false; } } }/*for*/ if( liCount == 1) return true; else return false; } COM: <s> performs evaluation returning primitive code boolean code value </s>