__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/805701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteChild(IBioResource delResource){ if (delResource instanceof BioResource) { if (delResource.getPersistedResource().delete()==false){ logger.debug("Could not delete resource: " + delResource.getName() + " [" + delResource.getPath() + "]"); return false; } //Delete from children (model) BioResource biores = (BioResource) delResource; remove(biores); return true; } return false; } COM: <s> remove from children and delete persisted object </s>
funcom_train/31929768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected VM_CompiledMethod genCode() throws VerifyError { // The byte code verifier is dead; needs replacement. // if (VM.VerifyBytecode) { // VM_Verifier verifier = new VM_Verifier(); // verifier.verifyMethod(this); // } if (VM.writingBootImage) { return VM_BootImageCompiler.compile(this); } else { return VM_RuntimeCompiler.compile(this); } } COM: <s> generate the code for this method </s>
funcom_train/8878176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateRentals(ForRentBO rb, ForSaleBO sb){ try{ System.out.println("Change rentals(controller)...."); ForSaleDAO.getInstance().save(sb); ForRentDAO.getInstance().save(rb); System.out.println("Rental update save was successful"); } catch (DataException ex){ ex.printStackTrace(); } } COM: <s> this is the save method used in the batch process </s>
funcom_train/17345440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSignature() { StringBuffer buf = new StringBuffer(); buf.append(name + "("); for (int i = 0; i < params.size(); i++) { if (i > 0) { buf.append(" "); } buf.append(params.get(i).toOliveString()); } buf.append(")"); return buf.toString(); } COM: <s> returns the signature portion without curly braces </s>
funcom_train/28159934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void visitSpecBody(JmlSpecBody self) { Debug.msg("In helper visitSpecBody"); JmlSpecBodyClause[] specClauses = self.specClauses(); JmlGeneralSpecCase[] specCases = self.specCases(); if (specClauses != null) { for (int i = 0; i < specClauses.length; i++) { specClauses[i].accept(this); } } if (specCases != null) visitSpecCases(specCases); } COM: <s> prints specification body </s>
funcom_train/10269053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RSetOfMarkings pb(RSetOfMarkings I) { RSetOfMarkings Z = new RSetOfMarkings(); RMarking M; for (Iterator i = I.getMarkings().iterator(); i.hasNext();) { M = (RMarking)i.next(); Z.addAll(pb(M)); } Z = getMinimalCoveringSet2(Z); return Z; } COM: <s> this method is called with a set of rmarkings to generate </s>
funcom_train/28708117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setElement(Element element) { this.element = element; contentNode = element.getContent(); properties.clear(); Iterator iter = element.getProperties().entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); String id = (String) entry.getKey(); Property prop = (Property) entry.getValue(); properties.put(id, prop.getValue()); } } COM: <s> sets the element associated with this node </s>
funcom_train/16484096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void addMesh(String elementName, TransformGroup tg) { TransformGroup importGroup = new TransformGroup(); importGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); importGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_READ); importGroup.setCapability(TransformGroup.ALLOW_PICKABLE_READ); importGroup.setCapability(TransformGroup.ALLOW_PICKABLE_WRITE); importGroup.setCapability(TransformGroup.ENABLE_PICK_REPORTING); Node rtNode = getMesh(elementName, false); importGroup.addChild(rtNode); tg.addChild(importGroup); } COM: <s> using fs protocol file you can specify meshes residing on local </s>
funcom_train/28368140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parse(final Element cur) { if (cur.getChild("group") == null) return; for (final Object e : cur.getChildren("group")) { final Group g = Group.buildFromXML((Element)e); groups.put(g.getName(), g); } } COM: <s> parse the population from the entities section of the xml file </s>
funcom_train/36165296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void throwEventToListeners(CompilerEvent event) { try { Iterator<CompilerListener> it = adapters.keySet().iterator(); while (it.hasNext()) { CompilerListener listener = it.next(); listener.actionPerformed(event); } } catch (Exception exception) {//just ignore errors that any listeners might have. } } COM: <s> throws an event to all items currently listening to events thrown </s>
funcom_train/50462739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(int index, Action action) { synchronized(items) { items.add(index, action); DCMenuModelEvent event = new DCMenuModelEvent(DCMenuModelEvent.ADD_EVENT, index, action, this); fireMenuChanged(event); } } COM: <s> add an action to this menu model </s>
funcom_train/46575418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NodeList getPropertyNodeList(String xpath) throws AppToyException { XPathExpression xpe = null; NodeList nl = null; try { xpe = xp.compile(xpath); nl = (NodeList) xpe.evaluate(config.getDocumentElement(),XPathConstants.NODESET); } catch (XPathExpressionException e) { throw new AppToyException(String.format("XPathExpression '%s' invalid",xpath),AppToyException.PROGRAM|AppToyException.APPLICATION); } finally { xp.reset(); } return nl; } COM: <s> p retrieves a node list by a given xpath argument p </s>
funcom_train/29272116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchAllCards() { return mDb.query(CARD_TABLE, new String[] {KEY_ROWID, KEY_CATEGORY, KEY_BOX, KEY_FRONT, KEY_BACK}, null, null, null, null, KEY_FRONT); } COM: <s> returns all cards </s>
funcom_train/40433460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void charge() { log.trace("Entering charge"); String xmlMessage = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<charge-order xmlns=\"" + NAMESPACE + "\" google-order-number=\"" + orderNumber + "\"/>\n"; send(xmlMessage); log.trace("Leaving charge"); } COM: <s> attempts to charge the order for the full order amount </s>
funcom_train/402704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocal(final File value) { if (value == null) { throw new NullPointerException("value"); } if (value.exists() && !value.isDirectory()) { throw new BuildException("local should be a directory"); } localName = value; try { canonicalPath = localName.getCanonicalPath(); } catch (IOException ex) { throw new BuildException(ex); } } COM: <s> sets local directory for base of mapping </s>
funcom_train/25192244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void decrement () { // set the load value to the maximum of 0 or 5 minus the current // value int load = Math.max (0, loadAdvertisement.percentage.intValue () - incrementUnit); // set the new load value into the advertisement loadAdvertisement.percentage = new Integer (load); // log an appropriate message System.err.println (agent.getName () + " decrements to " + load); // update the agent agent.modify (); } COM: <s> decrement the load value </s>
funcom_train/20239005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdOKCadGR() { if (cmdOKCadGR == null) {//GEN-END:|98-getter|0|98-preInit // write pre-init user code here cmdOKCadGR = new Command("Salvar", Command.OK, 0);//GEN-LINE:|98-getter|1|98-postInit // write post-init user code here }//GEN-BEGIN:|98-getter|2| return cmdOKCadGR; } COM: <s> returns an initiliazed instance of cmd okcad gr component </s>
funcom_train/2731695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double scanReal() throws InputMismatchException { clearBuffer(); skipWhites(); if (lookahead == '-') { appendBuffer(); next(); } else if (lookahead == '+') { next(); } matchDigit(); appendBuffer(); next(); while (Character.isDigit(lookahead)) { appendBuffer(); next(); } if (lookahead == '.') { appendBuffer(); next(); matchDigit(); while (Character.isDigit(lookahead)) { appendBuffer(); next(); } } return Double.parseDouble(bufferToString()); } COM: <s> converts the current token into a real </s>
funcom_train/46123095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onShow() { txtWidth.setText(MainFrame.getCurrentEnv().getImage().getWidth() + ""); txtHeight.setText(MainFrame.getCurrentEnv().getImage().getHeight() + ""); ratio = Double.parseDouble(txtWidth.getText()) / Double.parseDouble(txtHeight.getText()); } COM: <s> when the controls are first shown we need to set their values </s>
funcom_train/12278468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changePrivateKeyPassphrase(String username, String oldPassphrase, String newPassphrase) throws FatalKeyException { try { changePassphrase(username, oldPassphrase, newPassphrase); } catch (Exception e) { log.error("Error changing users private key passphrase", e); throw new FatalKeyException("Failed to change private key passphrase", e); } } COM: <s> change the private key passphrase </s>
funcom_train/31404299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean next() { if (count == 0) { current = null; return false; } current = stack[--count]; // pop if (current instanceof ClassTypeContainer) { pushAll(((ClassTypeContainer)current).getTypes()); if (current instanceof ClassType) { ClassType cct = (ClassType)current; pushAll(cct.getFields()); pushAll(cct.getConstructors()); pushAll(cct.getMethods()); } } return true; } COM: <s> proceeds to the next element if available </s>
funcom_train/3834619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GM_Envelope getFileMBR() { double xmin = shp.getFileMBR().west; double xmax = shp.getFileMBR().east; double ymin = shp.getFileMBR().south; double ymax = shp.getFileMBR().north; return GeometryFactory.createGM_Envelope( xmin, ymin, xmax, ymax ); } COM: <s> returns the minimum bounding rectangle of all geometries br </s>
funcom_train/180871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cell(Object value) throws IOException { if (value != null) { if (value instanceof String) { nativeContent(encodeString(value.toString())); } else if (value instanceof java.util.Date) { nativeContent(encodeDate((java.util.Date)value)); } else if (value instanceof Boolean) { nativeContent(encodeBoolean((Boolean)value)); } else if (value instanceof Number) { nativeContent(encodeNumber((Number)value)); } else { // as is nativeContent(value.toString()); } } colSpan(1); } COM: <s> add a cell to out stream </s>
funcom_train/31077474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void firePickedEvent(PickMouseEvent event) { checkListeners(); Object[] listeners = this.listenerList.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == PickMouseListener.class) { ((PickMouseListener)listeners[i+1]).picked(event); } } } COM: <s> send the pick node to listeners </s>
funcom_train/38529258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startLoopThread() { if (configured) { if (loopThread == null) { loopThread = new GoodThread(this);// defaults to RUN state loopThread.setPriority(ThreadPriorities.MESSAGING); loopThread.setName("Monitor Thread"); loopThread.setDaemon(true); loopThread.start(); } broadcaster.broadcast(BroadcastEvent.Command.MONITORS_ENABLED); } else { throw new IllegalStateException(getClass().getName() + ".start(): " + "called before the monitors were configured."); } } COM: <s> start monitors interval updating loop </s>
funcom_train/21983138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHostAddress() throws JShaftException { try { return InetAddress.getLocalHost().getHostAddress(); } catch (UnknownHostException Ex) { JShaftException myEx = (JShaftException) new JShaftException("Unable to find host IP address").initCause(Ex); logger.error("", myEx); throw myEx; } } COM: <s> returns the host ip address </s>
funcom_train/45812196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getCreateActions(String[] platforms) { List actions = new ArrayList(); for (int i=platforms.length-1; i >= 0; i--) { if (c_actions.containsKey(platforms[i])) actions.addAll((List)c_actions.get(platforms[i])); } return actions; } COM: <s> internal gets the actions to be performed in the database as </s>
funcom_train/43417063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkLocalVariableAccess(final char localVariableNumber) { if (routineContextStack.size() == 0) { throw new IllegalStateException("no routine context set"); } if (localVariableNumber >= getCurrentRoutineContext().getNumLocalVariables()) { throw new IllegalStateException("access to non-existent local variable: " + (int) localVariableNumber); } } COM: <s> this function throws an exception if a non existing local variable </s>
funcom_train/43245191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNOKOneName() { System.out.println("setNOKOneName"); String nOKOneName = ""; EmergencyContactObject instance = new EmergencyContactObject(); instance.setNOKOneName(nOKOneName); // 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 nokone name method of class org </s>
funcom_train/9673108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InetAddress getFirstNeighbor(){ String hostname; InetAddress firstNode=null; hostname=JOptionPane.showInputDialog(null, "Please specify the ip-address/hostname of your first UniNet neighbor :","Neighbor research", JOptionPane.PLAIN_MESSAGE); try{firstNode=InetAddress.getByName(hostname);} catch(UnknownHostException e){} return firstNode; } COM: <s> request to the user the address of the first neighbor </s>
funcom_train/38288732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String isDeclosable(Element e, ElementExp exp) { SchemaLevelNodeIterator iterator = IteratorBuilder .createDeclosingIterator(e); ExpressionAcceptor acc = schema.validator.createAcceptor(exp .getContentModel()); try { schema.validator.feedAttributes(acc, (Element) e.getParentNode(), false, true); schema.validator.validateIterator(acc, iterator, true, false, -1); } catch (SchemaException ex) { logger.log(Level.FINE, ex.getLocalizedMessage(), ex); return ex.getLocalizedMessage(); } return null; } COM: <s> checks if given element is declosable if the contents of given element </s>
funcom_train/41101641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addInteger(int integer) { byte[] elem = new byte[]{ (byte)(integer >> 24 & 0xff), (byte)(integer >> 16 & 0xff), (byte)(integer >> 8 & 0xff), (byte)(integer & 0xff) }; elements.addElement(elem); } COM: <s> add an integer to the payload </s>
funcom_train/29932779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addColumn(String name, Integer type, Integer length, Integer precision, Integer scale, boolean nullable,boolean unique, Object defaultValue,Integer pkIndex, Integer position ) throws IESException { this.addColumn(new Column(name,type,length,precision,scale,nullable,unique,defaultValue, this.getDBVendor(),pkIndex,position)); } COM: <s> add a column to the tables column collection </s>
funcom_train/45703651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void enumerateOptions() { SpeechProcessingManager spm = SpeechProcessingManager.getInstance(); spm.speak("Please, provide value from the following options", wordsPerMinute); if (!optionsEmpty()) { for (int i = 0; i < options.length; i++) { spm.speak(options[i], wordsPerMinute); pause(INTERMEDIATE_INTERACTION_PAUSE); } } } COM: <s> ennumerates all the possible options </s>
funcom_train/33789848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getSearchTextField() { if (searchTextField == null) { searchTextField = new JTextField(); searchTextField.setBounds(new Rectangle(145, 30, 280, 30)); searchTextField.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent e) { executeSearch(); } }); } return searchTextField; } COM: <s> this method initializes search text field </s>
funcom_train/12147861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCollection (NodeRevisionDescriptor revisionDescriptor) { boolean result = false; if (revisionDescriptor == null) return true; NodeProperty property = revisionDescriptor.getProperty("resourcetype"); if ((property != null) && (property.getValue().equals(NodeRevisionDescriptor.COLLECTION_TYPE))) { result = true; } return result; } COM: <s> method is collection </s>
funcom_train/24350868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IChainedToken add(int index, IChainedToken token) { if (badNewToken(token) || !toIndex(index)) return null; IChainedToken prior = fLast; if (fCurrent != null) prior = fCurrent.getPrevious(); chain(prior, token); chain(token, fCurrent); fCurrent = token; fLength += token.getLength(); fSize += 1; return token; } COM: <s> adds inserts the provided token at the specified index </s>
funcom_train/23275772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getLocal() { Vector ret = new Vector(); for (Enumeration e = v.elements() ; e.hasMoreElements() ;) { Object este = e.nextElement(); if (este.getClass() == FileLocal.class) ret.add(este); } return ret; } COM: <s> gets a list of all local sources </s>
funcom_train/40409582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scheduleReportAndWait() throws IOException, ServiceException, InterruptedException { finishedReportJobId = reportService.scheduleReportJob(reportJob); testReportUtils = new ReportUtils(testUser, finishedReportJobId); if(!testReportUtils.waitForReportReady()) { fail("Report could not be scheduled"); } } COM: <s> schedules a report and waits for it to finish </s>
funcom_train/39973610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean intersectsBox(AABB box) { Vec3D t = box.sub(this); return MathUtils.abs(t.x) <= (extent.x + box.extent.x) && MathUtils.abs(t.y) <= (extent.y + box.extent.y) && MathUtils.abs(t.z) <= (extent.z + box.extent.z); } COM: <s> checks if the box intersects the passed in one </s>
funcom_train/37061757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { die = false; OutputStream out = console.getOutputStream(); try { while (!die) { byte c = getByte(); if (c == ESCAPE) processEscape(); else console.getOutputStream().write(c); } } catch (IOException e) { e.printStackTrace(); } } COM: <s> initiates communication with the remote machine </s>
funcom_train/3446957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getColorIndex(int row) { if (colorColumn == null) return -1; if (colorColumn.isValueUndefined(row)) return -1; Object v = categories.get(colorColumn.getValueAt(row)); if (v == null) return -1; int index = ((Integer) v).intValue(); return index % category.length; } COM: <s> returns the color at the specified index </s>
funcom_train/1196469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getMapFeatures(Envelope env) throws CampusTourException { FeatureCollection features = null; try { //Get the features features = wfsServer.getFeatures(env); } catch (IOException e) { throw new CampusTourException("Unable to retreive features from server!", e); } List list = new ArrayList(); //Add each feature to a list so we dont have to rerequest them FeatureIterator iter = features.features(); while(iter.hasNext()) { list.add(iter.next()); } return list; } COM: <s> this creates a list of the feature objects </s>
funcom_train/30240003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public URL convertToURL(URL base, String test){ URL url = new URL(test); if(!url.isValid()){ String prefix = base.scheme +"://"+ base.getUserPart() + base.server + base.getPortPart(); url = new URL(prefix+"/"+test); } if(url != null && url.isValid()){ return url; } else { return null; } } COM: <s> try to create a valid url from the test string </s>
funcom_train/44156637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getId(DepGraphArtifact artifact) { if (m_ids.containsKey(artifact.getQualifiedName())) { return m_ids.get(artifact.getQualifiedName()); } else { String newId = "n" + ++m_idCounter; m_ids.put(artifact.getQualifiedName(), newId); return newId; } } COM: <s> get a uniqe id </s>
funcom_train/27864362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draggingHorizontalSlider(int dx){ if (hslider.vx + dx + hsliderRS.getWidth() < rightBt.vx - rightBtRS.getWidth() && hslider.vx + dx - hsliderRS.getWidth() > leftBt.vx + leftBtRS.getWidth()){ hslider.move(dx, 0); updateCameraHorizontalPosition(); } } COM: <s> call this method when the horizontal slider is manipulated e </s>
funcom_train/19399322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int batchLookup(BatchLookup op) { final int tupleIndex = op.tupleIndex; assert tupleIndex < op.ntuples; btree.touch(this); final int entryIndex = this.keys.search(op.keys[tupleIndex]); if (entryIndex < 0) { // Not found. op.values[tupleIndex] = null; return 1; } // Found. op.values[tupleIndex] = this.values[entryIndex]; return 1; } COM: <s> looks up one or more tuples </s>
funcom_train/8343405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sizeRowsByIcons() { int largestIconSize = 0; DefaultTreeCellRenderer renderer = (DefaultTreeCellRenderer) theTree .getCellRenderer(); largestIconSize = Math.max(Math.max(renderer.getOpenIcon() .getIconHeight(), renderer.getClosedIcon().getIconHeight()), renderer.getLeafIcon().getIconHeight()); theTree.setRowHeight(largestIconSize); } COM: <s> sets the size of the row based on the size of the icon </s>
funcom_train/3596712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int spaceBackwards(int pos) { int result = pos; try { while ((result > 0) && ntv.getDocument().getText(result-1,1).equals(" ")) { result--; } } catch (BadLocationException ex) { System.out.println("!"); } return result; } COM: <s> pos is a position in the transcription view </s>
funcom_train/9994199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTerminAt() throws AssertionFailedException { System.out.println("terminAt"); Termine instance = new Termine(); int num_1 = 0; Termin expResult_1 = null; Termin result_1 = instance.terminAt(num_1); assertEquals(expResult_1, result_1); fail("The test case is a prototype."); } COM: <s> test of test termin at method of class termine </s>
funcom_train/24379264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getTypeAsNode(Node node, TextEntryInteractionType type){ if (type != null) { QName qname = new QName("http://www.imsglobal.org/xsd/imsqti_v2p1", "textEntryInteraction"); JAXBElement<TextEntryInteractionType> jaxbe = new JAXBElement<TextEntryInteractionType>(qname, TextEntryInteractionType.class, type); node = getNode(node, jaxbe); } return node; } COM: <s> gets the text entry interaction type as a dom node </s>
funcom_train/26216775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addSuccessor(BSPPathBox state) { // LOG.fine("addSuccessor"); Node node = new Node(); if (node != null) { node.userState = state; successors.add(node); // LOG.fine("Number of added successors: " + successors.size()); // LOG.fine("state: " + state); return true; } return false; } // END addSuccessor COM: <s> user calls this to add a successor to a list of successors </s>
funcom_train/34282354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintComponent(Graphics g) { //long startTime = System.currentTimeMillis(); backgroundPainter.paint(g, getVisibleRect()); // Paint the main part of the text area. TextUI ui = getUI(); if (ui != null) { // Not allowed to modify g, so make a copy. Graphics scratchGraphics = g.create(); try { ui.update(scratchGraphics, this); } finally { scratchGraphics.dispose(); } } //long endTime = System.currentTimeMillis(); //System.err.println(endTime-startTime); } COM: <s> paints the text area </s>
funcom_train/41164726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoSingleTextTeacher entity) { EntityManagerHelper.log("deleting CoSingleTextTeacher instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoSingleTextTeacher.class, entity.getSingleTextTeacherId()); 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 co single text teacher entity </s>
funcom_train/19607868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CartGoods getBySessionGoodsNo(String sessionId,String goodsNo){ EntityManager em = EMF.getEM(); String jql = "select from CartGoods cg where cg.sessionId =:sessionId and cg.goodsNo=:goodsNo"; Query query = em.createQuery(jql); query.setParameter("sessionId", sessionId); query.setParameter("goodsNo", goodsNo); List<CartGoods> list = query.getResultList(); if(list.size() > 0){ return list.get(0); }else{ return null; } } COM: <s> session goods no </s>
funcom_train/7513122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void append(Component component, int noFormColumns, int noFormRows) { final GridBagConstraints gbc = new GridBagConstraints(); gbc.anchor = GridBagConstraints.NORTHWEST; gbc.gridx = currentColumnPair * 4; gbc.gridy = gridY; gbc.gridwidth = noFormColumns * 4 - 1; gbc.gridheight = noFormRows * 2 - 1; gbc.weightx = 1; innerPanel.add(component, gbc); gridY += (noFormRows * 2) - 2; } COM: <s> append a component that spans multiple form columns and form rows </s>
funcom_train/28367642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void adaptTasks() { final int theSatisfaction = getFinalSatisfaction(); for (final String taskName : tasks.keySet()) { final AdaptiveTaskInstance t = (AdaptiveTaskInstance) tasks.get(taskName); t.adaptationStep(theSatisfaction - mLastSatisfaction); } if (theSatisfaction > mMaxSatisfaction) { mMaxSatisfaction = theSatisfaction; } } COM: <s> adaptation of all tasks </s>
funcom_train/17162981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getModoPasivo() { if (modoPasivo == null) { modoPasivo = new JCheckBox(); modoPasivo.setBounds(new Rectangle(171, 30, 102, 21)); modoPasivo.setToolTipText("Activa el modo pasivo del protocolo"); modoPasivo.setText("Modo Pasivo"); modoPasivo.setSelected(true); modoPasivo.setBackground(new Color(102, 204, 255)); modoPasivo.addActionListener(this); modoPasivo.setActionCommand(PASIVO); } return modoPasivo; } COM: <s> this method initializes modo pasivo </s>
funcom_train/810612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCvRefPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CVParamType_cvRef_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CVParamType_cvRef_feature", "_UI_CVParamType_type"), MzmlPackage.Literals.CV_PARAM_TYPE__CV_REF, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the cv ref feature </s>
funcom_train/13596549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getMOpenRecent() { if (mOpenRecent == null) { mOpenRecent = new JMenu(Messages .getString("DictionaryMakerMain.MenuOpenRecent")); //$NON-NLS-1$ mOpenRecent.setIcon(new ImageIcon(getClass().getClassLoader() .getResource("images/History16.gif"))); //$NON-NLS-1$ } return mOpenRecent; } COM: <s> this method initializes file menu j menu item m open recent </s>
funcom_train/3424529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIdAttributeNode(int elemIndex, int attrIndex) { int chunk = attrIndex >> CHUNK_SHIFT; int index = attrIndex & CHUNK_MASK; int extra = getChunkIndex(fNodeExtra, chunk, index); extra = extra | ID; setChunkIndex(fNodeExtra, extra, chunk, index); String value = getChunkValue(fNodeValue, chunk, index); putIdentifier(value, elemIndex); } COM: <s> adds an attribute node to the specified element </s>
funcom_train/10282160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanAllCompleted() { synchronized (mDownloadList) { Iterator it = mDownloadList.iterator(); while (it.hasNext()) { Download d = (Download) it.next(); int lState = d.getState(); if (lState == COMPLETED || lState == ERROR || lState == CANCELLED) { it.remove(); } } } } COM: <s> clean all completed errorneous and cancelled downloads </s>
funcom_train/22900431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void defineMoons(){ int temp; if (size<=earthDiameter){ temp = -1; } else if (size >=1.5* earthDiameter) { temp = 1; } numMoonlets = Main.dice(1,4); numSmallMoons = Main.dice(1,4); numMedMoons = Main.dice(1,5); numLargeMoons = Main.dice(1,5); } COM: <s> moons for terrestrial worlds </s>
funcom_train/4745595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadTree() { rootNode = new TreeNodeImpl(); List<GroupDescription> groups = baseFunctionsManager.getGroups(); int count = 0; if (groups != null) { for (GroupDescription d : groups){ TreeNodeImpl groupNode = new TreeNodeImpl(); groupNode.setData(new GroupTreeNode(d)); rootNode.addChild(count, groupNode); addPermissionNodes(groupNode, d); count ++; } } } COM: <s> entry point creates the tree of groups and permissions </s>
funcom_train/18751548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu createDisplayMenu() { JMenu result = new JMenu(Options.DISPLAY_MENU_NAME) { @Override public void menuSelectionChanged(boolean selected) { removeAll(); JGraph jgraph = getGraphPanel().getJGraph(); JPopupMenu popupMenu = getPopupMenu(); jgraph.fillOutEditMenu(popupMenu, true); jgraph.fillOutDisplayMenu(popupMenu); popupMenu.addSeparator(); popupMenu.add(createOptionsMenu()); super.menuSelectionChanged(selected); } }; return result; } COM: <s> creates and returns a display menu for the menu bar </s>
funcom_train/3076949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAllSchedulesOfProject(String projectName) { List facades = new ArrayList(); Iterator it = Luntbuild.getDao().loadProject(projectName).getSchedules().iterator(); while (it.hasNext()) { Schedule schedule = (Schedule) it.next(); facades.add(schedule.getFacade()); } return facades; } COM: <s> return all schedules configured for specified project </s>
funcom_train/47219024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ITaskInstance getTaskInstance(String tiid) throws IllegalArgumentException, DatabaseException { ITaskInstance taskInstance = dap.getTaskInstance(tiid); if (taskInstance != null) { return taskInstance; } String errorMessage = "Fetch task instance - A task instance with id '" + tiid + "' could not be found."; log.error(errorMessage); throw new IllegalArgumentException(errorMessage); } COM: <s> returns a task instance from the persistence layer </s>
funcom_train/31125561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(byte[] data) throws IOException { if (packetMode) { writeByte((byte) data.length); writeByte((byte)(data.length >> 8)); } for(int i = 0; i < data.length; i++) writeByte(data[i]); flushBuffer(); } COM: <s> write bytes to the device </s>
funcom_train/13557856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBACIsWorking() throws CardServiceException { traceApdu = true; service.doBAC(); assertTrue(getLastSW() == 0x9000); assertTrue(service.canSelectFile(PassportService.EF_DG1)); assertTrue(service.canReadFile(PassportService.EF_DG1, true)); assertTrue(service.canSelectFile(PassportService.EF_DG2)); assertTrue(service.canReadFile(PassportService.EF_DG2, true)); } COM: <s> after bac we can read mrz dg1 and photo dg2 </s>
funcom_train/38318135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JComponent add (JComponent component) { _components.add(component); final JPanel p= new JPanel(new BorderLayout()) { public Dimension getMinimumSize () { return SizeGroup.this.getMinimumSize(super.getMinimumSize()); } public Dimension getPreferredSize () { return SizeGroup.this.getPreferredSize(super.getPreferredSize()); } public Dimension getMaximumSize () { return SizeGroup.this.getMaximumSize(super.getMaximumSize()); } }; p.add(component, BorderLayout.CENTER); return p; } COM: <s> adds the specified component to the size group and returns </s>
funcom_train/49938661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeLine(int y) { for (int cY = y; cY > 0; cY--) { copyLine(cY - 1, cY); } for (int x = 1; x < width - 1; x++) { field[0][x] = 0; } } COM: <s> moves all lines down </s>
funcom_train/33835031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getSIStatus() { if (sIStatus == null) {//GEN-END:|59-getter|0|59-preInit // write pre-init user code here sIStatus = new StringItem(" ", null);//GEN-LINE:|59-getter|1|59-postInit // write post-init user code here }//GEN-BEGIN:|59-getter|2| return sIStatus; } COM: <s> returns an initiliazed instance of s istatus component </s>
funcom_train/28176949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer getInteger(String key) { try { return Integer.valueOf(getStringRecursive(key)); } catch (MissingResourceException e) { if (isVerbose) { System.err.println("Warning ResourceBundleUtil[" + baseName + "] \"" + key + "\" not found."); //e.printStackTrace(); } return new Integer(-1); } } COM: <s> get an integer from the resource bundle </s>
funcom_train/8009868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HtmlTextEdit newFloatEdit(String table, String column, boolean primaryKey, int size, String format) { return newEditColumn(table, column, primaryKey, size, 25, DataStore.DATATYPE_FLOAT, format); } COM: <s> this method creates a new float edit column </s>
funcom_train/9994184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNeedTermine() throws AssertionFailedException { System.out.println("needTermine"); LoadScreen instance = null; boolean expResult_1 = false; boolean result_1 = instance.needTermine(); assertEquals(expResult_1, result_1); fail("The test case is a prototype."); } COM: <s> test of test need termine method of class load screen </s>
funcom_train/50332496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInputCard(int cardNum) { if (cardNum>63) { warn("C/MRI - isInputCard - cardNum out of range"); return (false); } if (nodeType==SMINI) { if (cardNum==2) return(true); else return (false); } return (cardTypeLocation[cardNum]==INPUT_CARD); } COM: <s> public method to test for input card type </s>
funcom_train/29612864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UserInfoBean open() { // Create the dialog window Shell shell = new Shell(getParent(), getStyle()); shell.setText(getText()); shell.setSize(new Point(295, 238)); shell.setLocation(400, 200); createContents(shell); shell.pack(); shell.open(); Display display = getParent().getDisplay(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } // Return the entered value or null return userInfo; } COM: <s> opens dialog and returns the input in a user info object </s>
funcom_train/44156678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void project(DependencyGraph graph) throws MojoExecutionException { /* * Remove all DepGraphArtifacts, which do not contain any dependencies * and are not referenced by any artifact */ removeUnusedArtifacts(graph); if (graph.getArtifacts().size() == 0) { s_log.error("There were no Artifacts resolved. " + "Maybe there's a problem with a user supplied filter."); throw new MojoExecutionException("No artifacts resolved"); } getProjector().project(graph); } COM: <s> project the given graph </s>
funcom_train/37854589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SVNCommitInfo doCommit(File[] paths, boolean keepLocks, String commitMessage, boolean force, boolean recursive) throws SVNException { return doCommit(paths, keepLocks, commitMessage, null, null, false, force, SVNDepth.getInfinityOrEmptyDepth(recursive)); } COM: <s> committs local changes to the repository </s>
funcom_train/46188088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BlogEntry loadBlogEntry(Blog blog, String blogEntryId) throws PersistenceException { File path = new File(getPath(blog, blogEntryId, GMT)); File file = new File(path, blogEntryId + ".xml"); return loadBlogEntry(blog, file); } COM: <s> loads a specific blog entry </s>
funcom_train/19810807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Resolution view() { if (this.myIsern.hasCollaboration(this.getName())) { this.collaboration = this.myIsern.getCollaboration(this.getName()); return new ForwardResolution("/collaborationView.jsp"); } else { return new ForwardResolution("/collaborationNotExist.jsp"); } } COM: <s> finds the collaboration to display </s>
funcom_train/21614351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetListByGroup() throws Exception { ListWorkflowRecordForm form = dcimanage.getListWorkflowRecordForm(); form.setWorkflowGroupID("1"); int groupSize = 10; assertEquals("the workflow list By Group(id:1)::", groupSize, workflowDAO.getFullList(form).size()); } COM: <s> get workflow list by group id </s>
funcom_train/28426994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void engineUpdate (byte input) { // compute number of bytes still unhashed; ie. present in buffer int i = (int)(count % BLOCK_LENGTH); count++; // update number of bytes buffer[i] = input; if (i == BLOCK_LENGTH - 1) transform(buffer, 0); } COM: <s> continue a ripemd160 message digest using the input byte </s>
funcom_train/26574227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { java.util.Collection coll; Iterator it = null; List rs = null; coll = yearlyLists.values(); it = coll.iterator(); while (it.hasNext()) { rs = (List) it.next(); rs.clear(); } yearlyLists.clear(); allYears.clear(); initialise(); } COM: <s> clear cyclist in order to create or load a new cyclist </s>
funcom_train/14166438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initRegularCoordinates(){ int numVert = vertices.size(); this.regularCoordinates = new HashMap(numVert); for (int numNeur=0; numNeur<numVert; numNeur++){ double [] regCoords = ((SphereCoords) sphereCoordsBackingStore.get(numNeur)).getCartesianCoordinates(); regularCoordinates.put(vertices.get(numNeur), regCoords); } } COM: <s> sets up the regular coordinate hash map </s>
funcom_train/26645178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(String filterName) { FilterListConfig<?> fl = (FilterListConfig<?>) metaData.getParent().getValueConfig(); if( fl==null ) { log.warn("Parent "+metaData.getParent().getPath()+" did not have a filter list configuration item."); return false; } FilterItem<?> namedFilter = fl.getNamedFilter(filterName); if( namedFilter==null ) { return false; } return true; } COM: <s> indicates if the given filter is available in this filter list </s>
funcom_train/16753094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton1() { if (jButton1 == null) { jButton1 = new JButton(); jButton1.setText("Cancel"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { getThisDialog().setResult(false); getThisDialog().setVisible(false); } }); } return jButton1; } COM: <s> this method initializes j button1 </s>
funcom_train/37640126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _repaintLineNums() { JScrollPane front = _defScrollPanes.get(_model.getActiveDocument()); if (front != null) { JViewport rhvport = front.getRowHeader(); if (rhvport != null) { Component view = rhvport.getView(); if (view != null) view.repaint(); } } } COM: <s> repaints the line numbers on the active scroll pane </s>
funcom_train/19318353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDouble(String name, double value) throws JMSException { if(isBodyModifiable()) { try { map.put(name, new Double(value)); } catch(NullPointerException e) { throw new JMSException(e.getMessage()); } } else { throw new MessageNotWriteableException("MapMessage read_only"); } } COM: <s> sets a code double code value with the specified name into the map </s>
funcom_train/28126092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showPreferencesDialog() { getPreferencesDialog().setVisible(true); if (getPreferencesDialog().isRestartRequired()) { JOptionPane.showMessageDialog (this, gu().getString(Strings.CHANGES_NO_EFFECT_UNTIL_RESTART), gu().getString(Strings.RESTART_REQUIRED), JOptionPane.INFORMATION_MESSAGE); } } COM: <s> displays the preferences dialog </s>
funcom_train/18744252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Aspect relabel(TypeLabel oldLabel, TypeLabel newLabel) { Aspect result = this; if (hasContent()) { Object newContent = this.contentKind.relabel(getContent(), oldLabel, newLabel); if (newContent != getContent()) { result = new Aspect(getKind(), this.contentKind, newContent); } } return result; } COM: <s> returns an aspect obtained from this one by changing all </s>
funcom_train/14122412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setShadowPosition() { this.shadowPanel.setPixelSize(this.progressBar.getOffsetWidth(), this.progressBar.getOffsetHeight()); this.shadowPanel.setPopupPosition(this.progressBar.getPopupLeft() + this.systemVariables[3], this.progressBar.getPopupTop() + this.systemVariables[3]); } COM: <s> sets position and size of progress bar drop shadow </s>
funcom_train/6451761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean load() { try { File f = getUserConfFile(); if (f.exists()) { super.load(new FileInputStream(f)); return true; } } catch (Exception e) { System.err.println("Error reading preferences"); e.printStackTrace(); } return false; } COM: <s> returns true if the file is loaded correctly </s>
funcom_train/49703499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public boolean checkSecret(Request request, String identifier, char[] secret) { UserManager manager = (UserManager)getContext().getAttributes().get("UserManager"); //SensorBaseLogger.getLogger().info("Authenticating: " + identifier + " " + new String(secret)); return manager.isUser(identifier, new String(secret)); } COM: <s> returns true if the passed credentials are ok </s>
funcom_train/20080410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Frame setURL(String url) { Frame f = new Frame(url); MyDOM.setStyleAttribute(f.getElement(), "frameborder", "0"); f.setSize("100%", "100%"); getContent().removeAll(); getContent().add(f); return f; } COM: <s> sets a url for the content area of the shell </s>
funcom_train/49608788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GuestType getGuestType(String username,EntityManager em,int id) throws Throwable { try { GuestType vo = JPAMethods.find(username, em, GuestType.class, id); if (vo==null) throw new Exception("No GuestType found having id: "+id); return vo; } catch (Throwable ex) { Logger.error(null, ex.getMessage(), ex); throw ex; } } COM: <s> retrieve a specific guest type </s>
funcom_train/51616169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addKey(String name, String match, String use) { builder.begin("key"); builder.addAttributes(AttributeList.EMPTY .addAttribute("name",name) .addAttribute("match",match) .addAttribute("use", use) ); builder.end(); } COM: <s> create an key element </s>
funcom_train/3946158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMasteryscorePropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DocumentRoot_masteryscore_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_masteryscore_feature", "_UI_DocumentRoot_type"), AdlcpRootv1p2Package.eINSTANCE.getDocumentRoot_Masteryscore(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the masteryscore feature </s>
funcom_train/18525528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse() throws IOException, SAXException { if (props != null) { InputSource is = LanguageFileLoader.getReference().getLanguageInputStream(LanguageFileLoader.PARAMETER_XML_FILE); if (is != null) { getParser().setContentHandler(this); getParser().setErrorHandler(this); getParser().parse(is); } } } COM: <s> parse the parameter </s>
funcom_train/25421836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStyleClass(String columnKey) { if ((getColumnKey().length() > 0) && getColumnKey().equalsIgnoreCase(columnKey)) { if (getDirection().equals(SortDirection.asc)) { return "ascending"; } else { return "descending"; } } return ""; } COM: <s> gets the style class for a column key </s>