__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/33142689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { if (thread == null) { thread = new Thread("Metric Dispatcher Thread") { public synchronized void run() { try { for (;;) { Metric metric = null; synchronized (queue) { if (queue.size() > 0) { metric = queue.remove(0); } } if (metric == null) { wait(); } else { try { System.out.println("Sending - " + metric); socket.send(createDatagramPacket(metric)); } catch (IOException e) { e.printStackTrace(); } } } } catch (InterruptedException e) { } } }; thread.start(); } } COM: <s> start dispatching metrics </s>
funcom_train/13995487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map convertIdentifiablesToKeys(Map data) { Map result = new HashMap(); for (Iterator i = data.entrySet().iterator(); i.hasNext();) { Map.Entry originalEntry = (Map.Entry) i.next(); Object value = originalEntry.getValue(); if (value instanceof Identifiable) { value = ((Identifiable) value).getID(); } result.put(originalEntry.getKey(), value); } return result; } COM: <s> converts all code identifiable code objects to keys for dao </s>
funcom_train/14078480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAppTitle() { // Fetch the document path and extract the file name String docName = Application.getCiteBook().getProperty( CiteBook.FILENAME_PROPERTY); if (docName.equals("")) docName = "Untitled"; else { File docFile = new File(docName); docName = docFile.getName(); } // Set the application's title bar. this.setTitle("TextCite (" + docName + ")"); } COM: <s> discovers the name of the currently loaded cite book and displays an </s>
funcom_train/13363588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String normalizeBoolean(String val) { if (val == null) { return "false"; } if (val.equalsIgnoreCase("on")) { return "true"; } if (val.equalsIgnoreCase("checked")) { return "true"; } if (val.equalsIgnoreCase("true")) { return "true"; } return "false"; } COM: <s> converts a boolean string to a normalized form </s>
funcom_train/22927553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintNode(JGraphPane graphPane, JPowerGraphGraphics g, Node node, int size, SubGraphHighlighter theSubGraphHighlighter) { JPowerGraphPoint nodePoint = graphPane.getScreenPointForNode(node); paintNode(graphPane, g, node, size, theSubGraphHighlighter, nodePoint); } COM: <s> paints the supplied node </s>
funcom_train/39487271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void beginGraph() throws IOException { graph = new BufferedWriter(new FileWriter(out_filename)); if (format==GDF_FORMAT) { graph.write("nodedef>name,label,style,color"); } else { // dot graph.write("digraph jpf_state_space {"); } graph.newLine(); } /** * In the case of the DOT graph it is just adding the final "}" at the end. COM: <s> put the header for the graph into the file </s>
funcom_train/1458517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void clearTempIntroOutroSections(int sectionLastUniqueIndex) { // clear out any sections that were temporarily created... for (Section s : this.tempIntroOutroSections) { this.getSections().remove(s); } this.tempIntroOutroSections.clear(); this.getSections().setLastUniqueIndex(sectionLastUniqueIndex); } COM: <s> clears out any temporary intro or outro sections </s>
funcom_train/49026852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getCibiCB() { if (cibiCB == null) { cibiCB = new JCheckBox(); cibiCB.setText("cibi"); cibiCB.setFont(new Font("Dialog", Font.PLAIN, 12)); cibiCB.setSelected(true); cibiCB.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ricercaCibi.setEnabled(getCibiCB().isSelected()); } }); } return cibiCB; } COM: <s> this method initializes cibi cb </s>
funcom_train/21686478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getToneGeneratorButton() { if (toneGeneratorButton == null) {//GEN-END:|27-getter|0|27-preInit // write pre-init user code here toneGeneratorButton = new Command("Tone generator", Command.OK, 0);//GEN-LINE:|27-getter|1|27-postInit // write post-init user code here }//GEN-BEGIN:|27-getter|2| return toneGeneratorButton; } COM: <s> returns an initiliazed instance of tone generator button component </s>
funcom_train/278389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setXmlRowElementName(String xmlRowElementName) { this.xmlRowElementName = xmlRowElementName; char[] chars = xmlRowElementName.toCharArray(); for (int i=0;i < chars.length; i++) { if (!Character.isJavaIdentifierPart(chars[i])) { addError("{0} is not a valid character in an xml element name", new Object[]{new Character(chars[i])}); } } } COM: <s> sets the xml row element name </s>
funcom_train/1170515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addOriginalAbilities(Card c, SpellAbility sa) { if (!originalAbilities.containsKey(c)) { ArrayList<SpellAbility> list = new ArrayList<SpellAbility>(); list.add(sa); originalAbilities.put(c, list); } else originalAbilities.get(c).add(sa); } COM: <s> p add original abilities </s>
funcom_train/22356444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reviewRegionAndUnits(Region r) { if (r == null) return; if (TaskTablePanel.log.isDebugEnabled()) { TaskTablePanel.log.debug("TaskTablePanel.reviewRegionAndUnits(" + r + ") called"); } reviewRegion(r); if (r.units() == null) return; for (Unit u : r.units()) { reviewUnit(u); } } COM: <s> reviews a region with all units within </s>
funcom_train/13874145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTargetVariablePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_VariableAssignment_targetVariable_feature"), getString("_UI_PropertyDescriptor_description", "_UI_VariableAssignment_targetVariable_feature", "_UI_VariableAssignment_type"), QvtcorePackage.Literals.VARIABLE_ASSIGNMENT__TARGET_VARIABLE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the target variable feature </s>
funcom_train/37822151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean step() { if (current.next == null) { suspendUpdates(); try { derive(); } finally { resumeUpdates(); } } if (current.next != null) { Entry<State,Action> e = null; Level old = current; current = current.next; e = current.successors.get(current.current); notifyAll(new NotifyStep(old.successors.get(old.current).getKey(), e.getValue(), e.getKey())); return true; } else return false; } COM: <s> make a derivation step </s>
funcom_train/21844442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(final InstructionContext env) throws JBasicException { final String varName = env.instruction.stringOperand; if( !env.codeStream.fDynamicSymbolCreation && env.localSymbols.localReference(env.instruction.stringOperand) == null) throw new JBasicException(Status.UNKVAR, env.instruction.stringOperand); env.localSymbols.insert(varName, (env.instruction.integerOperand != 0)); } COM: <s> store a boolean constant value in a named variable </s>
funcom_train/40702084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void eventsGetMembers(Long eid, AsyncCallback<EventMembers> callback) { Json j = new Json ().put ( "eid", eid ); callMethodRetObject ( "events.getMembers", j.getJavaScriptObject (), EventMembers.class, callback ); } COM: <s> returns membership list data associated with an event </s>
funcom_train/25122284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createCategory (String groupCategoryLocalName) throws InfException { OntModel ontmodel = modelo.getModelo(); OntClass categoryClass = ontmodel.createClass(NS_OTA + groupCategoryLocalName); OntClass otaServiceClass = ontmodel.getOntClass (NS_OTA+ "OTAService"); otaServiceClass.addSubClass(categoryClass); ontmodel.commit(); } COM: <s> adds a new group service category that will be subclassof otaservice </s>
funcom_train/22232333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPlaneR(Vector4f planeR) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_PLANE_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("TexCoordGeneration6")); if (isLive()) ((TexCoordGenerationRetained)this.retained).setPlaneR(planeR); else ((TexCoordGenerationRetained)this.retained).initPlaneR(planeR); } COM: <s> sets the r coordinate plane equation </s>
funcom_train/2759279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JmsConsumer createNewConsumer() throws JMSException { if(_destination == null) { throw new IllegalStateException("Must specify a destination to consume messages from."); } if(_messageListener == null) { throw new IllegalStateException("Must specify a message listener that messages will be delivered to."); } JmsConsumer jmsConsumer = new JmsConsumer(this); jmsConsumer.init(); return jmsConsumer; } COM: <s> creates a new consumer that starts to listen for messages </s>
funcom_train/26660014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MediaLocal createMedia(String prefix) throws CreateException { MediaLocal ml = mediaHome .create(UIDGenerator.getInstance().createUID()); ml.setFilesetId(prefix + ml.getPk()); ml.setMediaStatus(MediaDTO.OPEN); if (log.isInfoEnabled()) log.info("New media created:" + ml.getFilesetId()); return ml; } COM: <s> creates a new media </s>
funcom_train/12813646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getFieldValueByUCD(String ucd, boolean queriable_only) throws Exception { MetaClass mc = Database.getCachemeta().getClass(SaadaOID.getClassNum(this.oidsaada)); for( AttributeHandler ah: mc.getAttributes_handlers().values() ) { if( (!queriable_only || ah.isQueriable() ) && ucd.equals(ah.getUcd()) ) { return this.getFieldValue(ah.getNameattr()); } } return null; } COM: <s> return the value of the first field having the requested ucd </s>
funcom_train/27805891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void submitButtonClicked(MouseEvent evt) { // fechar frame! mandar resposta para fechar janelas!!!! Iterator<BidFrame> it = bids.iterator(); if (it != null) {// pode ser null se n houver abstracts.... while (it.hasNext()) { it.next().processBid(this.sessionId); } } JOptionPane.showMessageDialog(this, "Submit Accepted, closing Bidding Window."); mainWindow.setVisible(false); mainWindow.dispose(); } COM: <s> responds to submit button press and processes the bids </s>
funcom_train/41467030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResourceReservation decodeResourceReservation(String value) throws ParseException { // resourceReservation ="g"/"cl"/"be" if (value.equalsIgnoreCase("g")) { return ResourceReservation.Guaranteed; } else if (value.equalsIgnoreCase("cl")) { return ResourceReservation.ControlledLoad; } else if (value.equalsIgnoreCase("be")) { return ResourceReservation.BestEffort; } else { throw new ParseException("Invalid value for EchoCancellation :" + value, 0); } } COM: <s> decode resource reservation object from given text </s>
funcom_train/20215681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getAddCommand() { if (addCommand == null) {//GEN-END:|92-getter|0|92-preInit // write pre-init user code here addCommand = new Command("Add file/directory...", Command.ITEM, 1);//GEN-LINE:|92-getter|1|92-postInit // write post-init user code here }//GEN-BEGIN:|92-getter|2| return addCommand; } COM: <s> returns an initiliazed instance of add command component </s>
funcom_train/35846886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setTargetTextColor() { if (getPanelTarget() == null) { return; } Object c = textColorField.getSelectedItem(); if (c instanceof Color) { ((FigText) getPanelTarget()).setTextColor((Color) c); } getPanelTarget().endTrans(); } COM: <s> change the color of the text element according to the selected value </s>
funcom_train/34672252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Properties getParametersAsProperties(String name, ConfigurationOwner owner, CoreUser user, Core core) { Properties props=null; Group g=getGroup(name, owner, user, core); if (g!=null) { props=new Properties(); for(Parameter p: g.getParameter()) { props.setProperty(p.getName(), p.getValue()); } } return props; } COM: <s> fetch all the parameters in a group and return them as a java </s>
funcom_train/40610061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delayTest() { // wait X seconds for test delay try { long delay = 15000; System.out.println("wait " + (delay / 1000) + " seconds for test delay buffer"); Thread.sleep(delay); } catch (InterruptedException e) { e.printStackTrace(); } } COM: <s> centralize a delay method </s>
funcom_train/3076543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDescValue() { StringBuffer buf = new StringBuffer(); for(int i = 0; i < this.descValue.size(); i++) buf.append("\t" + (String)this.descValue.get(i) + "\n"); return buf.toString(); } COM: <s> returns client spec description is string form lines separated by n t </s>
funcom_train/3794550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CommandContext getCmdCtx(String name) { for (CommandContext c : _sons) { if (c.getName().equals(name)) return c; } CommandContext parent; while ((parent = this.getParentContext()) != null) { if (parent.getName().equals(name)) return parent; } return null; } COM: <s> looks in the branch and returns the command context named name </s>
funcom_train/5512261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeCannon(){ dt = .25; // the time increment in seconds bm = 4*Math.pow(10,-5); // a necessary number, refer to 'Computational Physics' pg. 26 gravity = 9.8; // in meters/(second squared) // create the path vector path = new Vector(); } COM: <s> initializes the cannon variables to those of the input panel and creates the </s>
funcom_train/12273196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer str = new StringBuffer(); str.append("[Source="); str.append(getSourceName()); str.append(",Target="); str.append(getTargetName()); str.append(":Response="); str.append(getResponseLength()); str.append(" bytes]"); return str.toString(); } COM: <s> return the kerberos authentication details as a string </s>
funcom_train/927793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyToClipBoard() { if (m_Chartpanel != null) { Image img = m_Chartpanel.getChart().createBufferedImage(m_Chartpanel.getWidth(), m_Chartpanel.getHeight()); ImageSelection imageSelection = new ImageSelection(img); Toolkit.getDefaultToolkit().getSystemClipboard().setContents(imageSelection, null); } } COM: <s> copy current graph to clipboard as image </s>
funcom_train/41879876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e){ if(e.getSource() == testButton){ if(chroma.setGamutPoint(Integer.parseInt(testTextField_x.getText()), 300-Integer.parseInt(testTextField_y.getText())) == false){ System.out.println(" the (xx,yy) out of range.! "); } return; } } COM: <s> activated when test mode is on </s>
funcom_train/8733981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkState() { boolean valid = true; this.invalidFieldEditor = null; // The state can only be set to true if all // field editors contain a valid value. So we must check them all if (this.fields != null) { int size = this.fields.size(); for (int i = 0; i < size; i++) { FieldEditor editor = (FieldEditor) this.fields.get(i); valid = valid && editor.isValid(); if (!valid) { this.invalidFieldEditor = editor; break; } } } setValid(valid); } COM: <s> recomputes the pages error state by calling code is valid code for </s>
funcom_train/2884753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send(byte[] bytes) { try { synchronized( connection ) { ByteBuffer headerBuffer = ByteBuffer.wrap(headerBytesOut); headerBuffer.putInt(0, MAGIC_NUMBER); headerBuffer.putInt(4, bytes.length); ByteBuffer msgBuffer = ByteBuffer.wrap(bytes); connection.write(headerBuffer); connection.write(msgBuffer); } } catch(IOException ioex) { logClose("blocking transport encoutented exception when sending", ioex); shutdown(); } } COM: <s> used to send an object on this connection </s>
funcom_train/47184071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkPatientExists(long pid) throws DBException { Connection conn = null; PreparedStatement ps = null; try { conn = factory.getConnection(); ps = conn.prepareStatement("SELECT * FROM Patients WHERE MID=?"); ps.setLong(1, pid); ResultSet rs = ps.executeQuery(); return rs.next(); } catch (SQLException e) { e.printStackTrace(); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } COM: <s> returns whether or not the patient exists </s>
funcom_train/8638777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getAscent(String text) { int max = 0; char chars[] = text.toCharArray(); for (int k = 0; k < chars.length; ++k) { int bbox[] = getCharBBox(chars[k]); if (bbox != null && bbox[3] > max) max = bbox[3]; } return max; } COM: <s> gets the ascent of a code string code in normalized 1000 units </s>
funcom_train/3966531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String nextStep() { if (qubitPrepare < numQubits){ // The vector panel does not need to be updated until the last preparation updateVectorPlot = false; // If this is the last preparation then the vector panel will need to be updated if (qubitPrepare == numQubits-1){ updateVectorPlot = true; } // Prepare the register for the current prepare qubit String action = prepareRegister(); qubitPrepare++; return action; } else { // The vector plot will be updated next time the UI is updated. updateVectorPlot = true; return performIteration(); } } COM: <s> provide the next step of the iteration </s>
funcom_train/25505492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getIgnoreFirstLine() { if (ignoreFirstLine == null) { ignoreFirstLine = new JCheckBox(); ignoreFirstLine.setText(LocalizationData.get("ImportDialog.ignoreFirstLine")); //$NON-NLS-1$ ignoreFirstLine.setSelected(true); ignoreFirstLine.setToolTipText(LocalizationData.get("ImportDialog.ignoreFirstLine.toolTip")); //$NON-NLS-1$ } return ignoreFirstLine; } COM: <s> this method initializes ignore first line </s>
funcom_train/50911267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getMean() { if (!gotMean || mean == Double.NaN) { count = realArray.size(); if (count == 0) { throw new RuntimeException("No points"); } sum = realArray.sumAllElements(); mean = sum / (double) count; gotMean = true; } return mean; } COM: <s> get mean value </s>
funcom_train/44157404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createLayout() { // create the form layout DesignGridLayout layout = new DesignGridLayout(this); setLayout(layout); layout.row().left().add(searchFor); layout.row().grid().add(searchField, 2); layout.row().right().add(searchButton); if (options != null) { for (JComponent component : options) { layout.row().left().add(component); } } } COM: <s> layout the form components </s>
funcom_train/47980441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendLocationChangedBroadcast(){ GeoPoint currentGeoPoint = parseLocation(mCurrentLocation); Intent i = new Intent(INTENT_LOCATION_CHANGED); i.putExtra(Const.BUNDLE_KEY_LOCATION_CHANGED_LAT, currentGeoPoint.getLatitudeE6()); i.putExtra(Const.BUNDLE_KEY_LOCATION_CHANGED_LON, currentGeoPoint.getLongitudeE6()); mContext.sendBroadcast(i); } COM: <s> send location changed broadcast to inform all listening components </s>
funcom_train/26090746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Repository repository, Object plugin) { if (plugin instanceof Function) { repository.put(((Function) plugin).getName().toLowerCase(), plugin); } else { log.debug("FunctionLoader: " + plugin.getClass() + " not of Type " + getLoadClass()); } } COM: <s> add a plugin to the known plugin map </s>
funcom_train/20896124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetPasswd() { System.out.println("setPasswd"); String pwd = ""; User instance = new User(); instance.setPasswd(pwd); // 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 passwd method of class it </s>
funcom_train/46818653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void configureResourceBundle(String language) { if (language == null) { language = Locale.getDefault().getCountry(); } if (language.toLowerCase().contains("de")) { locale = Locale.GERMAN; } else if (language.toLowerCase().contains("en")) { locale = Locale.ENGLISH; } else { // default supported locale locale = Locale.GERMAN; } // load the properties file resBundle = PropertyResourceBundle.getBundle("resources/steuerung", locale); } COM: <s> sets the locale for the status messages </s>
funcom_train/37024186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRegisterContructorTake2(){ assertEquals("Is DummyKS loaded?",DummyKSS.class,((DummyKSS)d.getData(DummyKSS.class)).getClass()); assertEquals("Is DummyKS2 loaded?",DummyKSS2.class,((DummyKSS2)d.getData(DummyKSS2.class)).getClass()); } COM: <s> verify that the constructor loads the data objects properly </s>
funcom_train/13227066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMLInfiniteInteger remainder(JMLInfiniteInteger n) { //@ assume n != null; if (n instanceof JMLFiniteInteger) { BigInteger s = val.remainder(((JMLFiniteInteger)n).val); //@ assume s != null; return new JMLFiniteInteger(s); } else if (n.signum() == +1) { return this; } else { return this.negate(); } } COM: <s> return the remainder of this integer divided by the argument </s>
funcom_train/21530998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel getJLabel7() { if (jLabel7 == null) { jLabel7 = new JLabel(); jLabel7.setBounds(91, 7, 82, 15); jLabel7.setText("Holding ID"); jLabel7.setFont(new java.awt.Font("Arial", 1, 10)); jLabel7.setHorizontalAlignment(SwingConstants.RIGHT); } return jLabel7; } COM: <s> this method initializes j label7 </s>
funcom_train/17846350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(Program p) throws Exception { checkThread(); for(int i = 0; i < mShownChannelArr.length; i++) { if(p.getChannel().equals(mShownChannelArr[i])) { for(ProgramPanel panel : mShownProgramColumn[i]) { if(panel.getProgram().equals(p)) { return true; } } } } return false; } COM: <s> checks if this model contains a program </s>
funcom_train/8639782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toPdf(int midSize, OutputStream os) throws IOException { os.write((byte)type); while (--midSize >= 0) os.write((byte)((offset >>> (8 * midSize)) & 0xff)); os.write((byte)((generation >>> 8) & 0xff)); os.write((byte)(generation & 0xff)); } COM: <s> writes pdf syntax to the output stream </s>
funcom_train/25342243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetOwnTitles() { Collection<RegisteredTitle> titles = new ArrayList<RegisteredTitle>(this.titles.values()); for (RegisteredTitle title : titles) { if (title.isOwnTitle()) { title.setOwnTitle(false); if (title.isUnused()) { this.titles.remove(title.getId()); } } } } COM: <s> removes the own title flag from all registered titles and removes those </s>
funcom_train/34628352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void build(IResource resource) throws CoreException { if (monitor == null) { throw new IllegalStateException(); } buildRunning = true; Thread buildThread = new Thread(this); buildThread.start(); try { buildResource(resource); } finally { buildRunning = false; try { buildThread.join(); } catch (InterruptedException e) { Thread.interrupted(); monitor.setCanceled(true); stopBuild(); } } } COM: <s> the main method </s>
funcom_train/19398924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File pathname) { final String expectedName = new File( basename ).getName(); final String actualName = pathname.getName(); if (ext.length() == 0 || actualName.endsWith(ext)) { if( actualName.startsWith( expectedName ) ) { return true; } } return false; } COM: <s> accepts files ending with a code </s>
funcom_train/4360919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeResource(String name) { try { envCtx.unbind(name); } catch (NamingException e) { logger.error(sm.getString("naming.unbindFailed", e)); } ObjectName on = (ObjectName) objectNames.get(name); if (on != null) { Registry.getRegistry(null, null).unregisterComponent(on); } } COM: <s> set the specified resources in the naming context </s>
funcom_train/13670794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ObjectInfoHeader getMetaHeaderFromOid(ObjectOid oid, boolean throwExceptinIfNotFound, boolean useCache) { OidAndBytes oab = layer4ToLayer3(oid); if (oab == null) { if (throwExceptinIfNotFound) { throw new ODBRuntimeException(NeoDatisError.OBJECT_WITH_OID_DOES_NOT_EXIST.addParameter(oid)); } return null; } NonNativeObjectInfo nnoi = layer3ToLayer2(oab, false); return nnoi.getHeader(); } COM: <s> todo use the use cache boolean </s>
funcom_train/2484775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addStateEventListener(S state, StateEventListener<I> listener) { if (state == null || listener == null) { throw new NullPointerException(); } Set<StateEventListener<I>> listeners = stateEventListeners.get(state); if (listeners == null) { listeners = new HashSet<StateEventListener<I>>(); stateEventListeners.put(state, listeners); } listeners.add(listener); } COM: <s> registers a state event listener to receive transition event notifications </s>
funcom_train/16544526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(PanelChat c){ /* Add a chatframe at the specified index */ try{ chatManager.add(c); new DebugMessage("Add a ChatFrame at[" + chatManager.size()+"]"); } catch(Exception e){ new DebugMessage("Cannot add a ChatFrame to the ChatManager: " + e.getMessage()); } } COM: <s> add a chat frame to this chat manager </s>
funcom_train/43590181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTable getUnscrobbledTracksTable() { if (unscrobbledTracksTable == null) { unscrobbledTracksTable = new JTable(); unscrobbledTracksTable.setShowGrid(true); //unscrobbledTracksTable.setIntercellSpacing(new Dimension(0, 0)); unscrobbledTracksTable.setGridColor(new Color(255, 240, 240)); //unscrobbledTracksTable.setIntercellSpacing(new Dimension(5, 5)); } return unscrobbledTracksTable; } COM: <s> this method initializes unscrobbled tracks table </s>
funcom_train/5399642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test001Ok() { form = getForm("form_complex_date_001"); values.put("field_001", "30"); values.put("field_002", "6"); values.put("field_003", "2003"); if (!validateForm(values)) { fail(MSG_003); } printValues(); } COM: <s> field 001 valid day integer </s>
funcom_train/41024659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSlider getJSlider() { if (jSlider == null) { jSlider = new JSlider(); jSlider.setMinimum(MarkerDetector.THRESHOLD_MIN); jSlider.setMaximum(MarkerDetector.THRESHOLD_MAX); jSlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { final JSlider slider = (JSlider) e.getSource(); setThreshold(slider.getValue()); } }); } return jSlider; } COM: <s> this method initializes j slider </s>
funcom_train/26317142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void reportSendException(Exception ex, SendPacket packet) { System.err.print(getConnectionTypeAbbrevation()); System.err.print(" error sending command #"); System.err.print(packet.getCommand()); System.err.print(": "); System.err.println(ex.getMessage()); reportLastCommands(); } COM: <s> reports receive exception to the code system </s>
funcom_train/3836550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton4() { if (jButton4 == null) { jButton4 = new JButton(); jButton4.setText("Pause"); jButton4.setIcon(new ImageIcon(getClass().getResource( "/icons/media-playback-pause.png"))); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { doStop(); jButton3.setEnabled(true) ; } }); } return jButton4; } COM: <s> this method initializes j button4 </s>
funcom_train/13273478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateCeilingShininessRadioButtons(RoomController controller) { if (controller.getCeilingShininess() == null) { SwingTools.deselectAllRadioButtons(this.ceilingMattRadioButton, this.ceilingShinyRadioButton); } else if (controller.getCeilingShininess() == 0) { this.ceilingMattRadioButton.setSelected(true); } else { // null this.ceilingShinyRadioButton.setSelected(true); } } COM: <s> updates ceiling shininess radio buttons </s>
funcom_train/11737223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PropertyState addProperty(NodeState parent, String name) { PropertyId id = new PropertyId(parent.getNodeId(), toName(name)); PropertyState child = new PropertyState(id, PropertyState.STATUS_EXISTING, false); if (listener != null) { child.setContainer(listener); } states.put(id, child); parent.addPropertyName(toName(name)); return child; } COM: <s> add a property </s>
funcom_train/31806350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefaultResource(String key, String value) { /* * Initializers cannot override default properties */ if (defaults.get(key) != null) { Exception ex = new Exception("Cannot override default properties:" + key + " = " + value + " , current value = " + defaults.get(key)); ex.printStackTrace(); return; } defaults.put(key, value); } COM: <s> sets default property </s>
funcom_train/787357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void garbageCollect(VisualTable labels) { Iterator iter = labels.tuples(); while ( iter.hasNext() ) { VisualItem item = (VisualItem)iter.next(); if ( !item.isStartVisible() && !item.isEndVisible() ) { labels.removeTuple(item); } } } COM: <s> remove axis labels no longer being used </s>
funcom_train/50446523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { log.debug("Shutting down..."); for (Iterator i = proxies.iterator(); i.hasNext();) { TimesliceProxy tsp = (TimesliceProxy) i.next(); tsp.getSession().kill(); } while (!proxies.isEmpty()) { try { Thread.sleep(100); } catch (InterruptedException ignored) { // do nothing } } done = true; wakeUp(); log.debug("Shut down."); } COM: <s> shuts down this proxy runner </s>
funcom_train/26492269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector getAllSubcats (Node cat) { Vector result = new Vector(); NodeList theKids = cat.getChildNodes(); for (int i = 0 ; i < theKids.getLength() ; i++) { Node n = theKids.item(i); if (n.getNodeName().equals("category")) { result.add(n); } } return result; } COM: <s> get all subcategories of category of the nodish persuasion </s>
funcom_train/31296240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPMutate(double p) { // // if the probability is bogus, set it to 1.0. // later this might be an exception. // if (!(p >= 0.0 && p <= 1.0)) { pMutate = 1.0; } else { pMutate = p; } } COM: <s> setter for the mutation probability </s>
funcom_train/20883186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void firePropertyChangeEvent(PropertyChangeEvent event) { if (propertyChangeListeners == null) { return; } Enumeration E = propertyChangeListeners.elements(); while (E.hasMoreElements()) { PropertyChangeListener pl = (PropertyChangeListener) E.nextElement(); pl.propertyChange(event); } } COM: <s> sends a code property change event code </s>
funcom_train/12189443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doTestNot(Sequence sequence) throws Exception { // invoke the method boolean expected = !(PipelineExpressionHelper.fnBoolean(sequence).asJavaBoolean()); BooleanValue actual = PipelineExpressionHelper.fnNot(sequence); // check the result assertEquals("unexpected fnBoolean(Sequence) result", expected, actual.asJavaBoolean()); } COM: <s> method that invokes the </s>
funcom_train/22341608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cross(Vec3 v1, Vec3 v2) { // Temporary variables in case this vector is given the method as a parameter double x, y; x = v1.y * v2.z - v1.z * v2.y; y = v1.z * v2.x - v1.x * v2.z; this.z = v1.x * v2.y - v1.y * v2.x; this.x = x; this.y = y; } COM: <s> sets this vector to the cross product of the vectors v1 and v2 </s>
funcom_train/11379143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fail() { // remove this file from the index CorruptFileInfo removed = fileIndex.remove(file.toString()); if (removed == null) { LOG.error("trying to remove file not in file index: " + file.toString()); } else { LOG.error("fixing " + file.toString() + " failed"); } pendingFiles--; } COM: <s> updates file index to record a failed attempt at fixing a file </s>
funcom_train/42567079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTime(Time time) { // Obtain the time in terms of Hour, minutes, and am/pm Time12 time12 = time.getTime12(); snmHour.setValue(new Integer(time12.hour)); snmMinute.setValue(new Integer(time12.minute)); if(time12.amPm == Time.AM) { jcbAmPm.setSelectedItem(AM); } else { jcbAmPm.setSelectedItem(PM); } } COM: <s> sets the time to a given time </s>
funcom_train/26096656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Type getCodomain() { if (codomain != null && codomain.eIsProxy()) { InternalEObject oldCodomain = (InternalEObject)codomain; codomain = (Type)eResolveProxy(oldCodomain); if (codomain != oldCodomain) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, MCRL2Package.FUNCTION_TYPE__CODOMAIN, oldCodomain, codomain)); } } return codomain; } COM: <s> returns the value of the em b codomain b em reference </s>
funcom_train/21633528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadChannel(final Node channel) { final NodeList nl = channel.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { final Node node = nl.item(i); final String nodename = node.getNodeName(); if (nodename.equalsIgnoreCase("item")) { loadItem(node); } else { if (node.getNodeType() != Node.TEXT_NODE) { this.attributes.put(nodename, RSS.getXMLText(node)); } } } } COM: <s> load the channle node </s>
funcom_train/49199832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOverviewMapLinksPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_OverviewMap_overviewMapLinks_feature"), getString("_UI_PropertyDescriptor_description", "_UI_OverviewMap_overviewMapLinks_feature", "_UI_OverviewMap_type"), ExhibitionPackage.Literals.OVERVIEW_MAP__OVERVIEW_MAP_LINKS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the overview map links feature </s>
funcom_train/51526409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getDishButtonPanel() { if (dishButtonPanel == null) { dishButtonPanel = new JPanel(); dishButtonPanel.setLayout(new GridBagLayout()); dishButtonPanel.add(getNewDishButton(), new GridBagConstraints()); dishButtonPanel.add(getSaveButton(), new GridBagConstraints()); dishButtonPanel.add(getLoadButton(), new GridBagConstraints()); } return dishButtonPanel; } COM: <s> this method initializes dish button panel </s>
funcom_train/20486573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(boolean return_when_done) { final SwingWorker worker = new SwingWorker() { public Object construct() { return new NodeDistanceTask(); }//construct }; worker.start(); if (return_when_done) { worker.get(); // maybe use finished() instead } }//starts COM: <s> calculates the apsp in a separate thread </s>
funcom_train/10666462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Result testaddNotificationParam2() throws Exception { startTimer(); timer.addNotification(LibTimer.TIMER_TYPE, null, LibTimer.TEST_DATA, timeCalc(1000), LibTimer.PERIOD, LibTimer.REPEATS); stopTimer(); return result(); } COM: <s> adding notifications to the timer service with parameter string message </s>
funcom_train/12155958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMyPage() throws Exception { doTransform("myPage.xml transformation failed", getInputSourceForClassResource("acme-xdime-cp.xsl"), getInputSourceForClassResource("acme-home-page.xml"), getInputSourceForClassResource("acme-home-page.xml")); } COM: <s> tests that a sample page with custom stylings is transformed according </s>
funcom_train/8967442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void round() { if (!(this.exponent >= 0 && this.mantissa != 0)) return; if (exponent < 0x3fffffff) { makeZero(sign); return; } int shift = 0x4000003e-exponent; if (shift <= 0) return; mantissa += 1L<<(shift-1); // Bla-bla, this works almost mantissa &= ~((1L<<shift)-1); normalize(); } COM: <s> rounds this code real code value to the closest value that </s>
funcom_train/28368699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addVerLimitsListener(ActionListener al) { verLimListenersV.add(al); al.actionPerformed(verLimEvent); //for ( int k = 0, n = verLimListenersV.size(); k < n; k++ ) { // ( (ActionListener) verLimListenersV.get( k ) ).actionPerformed( verLimEvent ); //} } COM: <s> adds a feature to the ver limits listener attribute of the </s>
funcom_train/51556528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Template getTemplate() throws Exception { if (!getVelocityEngine().resourceExists(getTemplateRootPath())) { putResourceIntoRepsitory(getCmsObject(), getCmsObject().readFile(getTemplatePath())); } return getVelocityEngine().getTemplate(getTemplateRootPath(), DEFAULT_VELOCITY_ENCODING); } COM: <s> return the velocity template object for the given </s>
funcom_train/48714055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processInputEvents(double secondsElapsed){ InputEvent ie; while(!guiInputQueue.isEmpty()){ ie = guiInputQueue.dequeueEvent(); switch(ie.inputEventType){ case InputEvent.IE_TYPE_SLIDER: processSliderEvent((IESlider) ie ); break; case InputEvent.IE_MOUSE_DOWN: mouseDownEvent((IEMouse) ie); break; case InputEvent.IE_MOUSE_DRAG: mouseDragEvent((IEMouse) ie); break; case InputEvent.IE_MOUSE_UP: mouseUpEvent((IEMouse) ie); break; case InputEvent.IE_MOUSE_CLICK: mouseClickEvent((IEMouse) ie); break; } } } COM: <s> gui events generated have been interpreted and placed </s>
funcom_train/7748734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object strip(Object attribute) { if ( attribute==null ) { return null; } attribute = convertAnythingIteratableToIterator(attribute); if ( attribute instanceof Iterator ) { List a = new ArrayList(); Iterator it = (Iterator)attribute; while (it.hasNext()) { Object o = (Object) it.next(); if ( o!=null ) a.add(o); } return a; } return attribute; // strip(x)==x when x single-valued attribute } COM: <s> return a new list w o null values </s>
funcom_train/20364339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void randomize() { Runnable run = new Runnable() { public void run() { bioPanel.enableDiceAction( false ); int level = model.getData().getLevel(); Archetype archetype = bioPanel.getSelectedArchetype(); Person newPerson = Generator.getRandomPerson( archetype, level ); model.setData( newPerson); bioPanel.enableDiceAction( true ); } }; Thread thread = new Thread( run ) ; thread.start(); } COM: <s> randomize character based on current level and current profile </s>
funcom_train/35148796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean computeCavalry() { if (isCavalry() != null) { return isCavalry(); } if (getElements() == null || getElements().size() == 0) return null; // compute cavalry with respect to troop synthesis for (ArmyElement ae : getElements()) { if (!ae.getArmyElementType().isTroop()) continue; if (!ae.getArmyElementType().isCavalry()) return false; } return true; } COM: <s> computes whether the army is cavalry as follows checks the </s>
funcom_train/22339922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getJTabbedPane() { if (this.jTabbedPane == null) { this.jTabbedPane = new JTabbedPane(); this.jTabbedPane.addTab("Sequence", null, getSequencePanel(), null); this.jTabbedPane.addTab("Date", null, getDatePanel(), null); } return this.jTabbedPane; } COM: <s> this method initializes j tabbed pane </s>
funcom_train/9104389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getStopCommand() { if (stopCommand == null) {//GEN-END:|49-getter|0|49-preInit // write pre-init user code here stopCommand = new Command("Stop", Command.STOP, 0);//GEN-LINE:|49-getter|1|49-postInit // write post-init user code here }//GEN-BEGIN:|49-getter|2| return stopCommand; } COM: <s> returns an initiliazed instance of stop command component </s>
funcom_train/5399408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean evaluate(Object httpSession) { if (httpSession == null) { return true; } try { HttpSession session = (HttpSession) httpSession; return session.isNew(); } catch (ClassCastException ccex) { throw new IllegalArgumentException("IsNewPredicate accepts only HttpSession objects"); } } COM: <s> checks if given parametr represents new http session </s>
funcom_train/3101005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected OwlTermInfo literal(ALiteral literal) { OwlTermInfo owlTermInfo = new OwlTermInfo(this); String literalString = literal.toString(); if (this.isProbableUri(literalString)) { owlTermInfo.isURI = true; owlTermInfo.uri = literalString; } else { owlTermInfo.isLiteral = true; owlTermInfo.literal = literalString; } return owlTermInfo; } COM: <s> returns the owl term info of the given rdf literal </s>
funcom_train/40772401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadDefinition(String scriptLocation) { Binding binding = new Binding(); binding.setVariable("parentContext", getApplicationContext()); binding.setVariable("registry", getObjectRegistry()); binding.setVariable("attendant", this); binding.setVariable("gse", getGroovyScriptEngine()); try { getGroovyScriptEngine().run(scriptLocation, binding); } catch (ResourceException e) { logger.error(e, e); } catch (ScriptException e) { logger.error(e, e); } } COM: <s> loads the groovy object definition file </s>
funcom_train/45108678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int moveTestUpByMenuOption(int testIndex) throws Exception { TreePath foundPath = scenarioTree.getPathForRow(testIndex); if (foundPath == null) { throw new Exception("Path not found test index: " + testIndex); } JPopupMenuOperator pp = new JPopupMenuOperator(scenarioTree.callPopupOnPath(foundPath)); pp.pushMenu(jmap.getTestMoveUpMenuItem()); return 0; } COM: <s> call the pop up on the selected test and psh the moveup coise </s>
funcom_train/15801927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getProperty(String name, String def) throws DatabaseException { if (name == null) name = def; if (name != null && name.length() > 0 && name.charAt(0) == '@') { Matches m = define(name.substring(1)); if (m != null) { String s = m.next().toString(); int pos0 = s.indexOf('\n'); if (pos0 == -1) return s; return s.substring(pos0+1).trim(); } } return name; } COM: <s> if code name code begins with </s>
funcom_train/37514058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String dimension() { if (!ctype.isArrayType()) return ""; int d = 2*depth; if (d <= brackets.length()) return brackets.substring(0,d); String s = ""; while (d > brackets.length()) { s = s + brackets; d -= brackets.length(); } s = s + brackets.substring(0,d); return s; } COM: <s> returns the dimension information either as a zero length string or as a </s>
funcom_train/37231060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMethod(Object o, XPathExpression xpath, String method) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException, InstantiationException { setMethod(o, xpath, method, true, String.class); } COM: <s> apply a method on a object with the value found by the xpath </s>
funcom_train/10583384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SiteTree getTree(Area area) throws SiteException { String key = getKey(area); SiteTree sitetree; try { SessionHolder sessionHolder = (SessionHolder) area.getPublication().getSession(); sitetree = (SiteTree) sessionHolder.getRepositorySession().getRepositoryItem( this.siteTreeFactory, key); } catch (Exception e) { throw new SiteException(e); } return sitetree; } COM: <s> returns the sitetree for a specific area of this publication </s>
funcom_train/7639729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doTestSampleProject(String name) { try { StubSampleProjectWizard newProjCreator = new StubSampleProjectWizard( name, getOsSdkLocation()); newProjCreator.init(null, null); newProjCreator.performFinish(); IProject iproject = validateProjectExists(name); validateNoProblems(iproject); } catch (CoreException e) { fail("Unexpected exception when creating sample project: " + e.toString()); } } COM: <s> tests the sample project with the given name </s>
funcom_train/3022505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isAllCaps(String name) { for (int ndx = 0; ndx < name.length(); ndx++) { char ch = name.charAt(ndx); if (ch == '_') { // OK } else if (Character.isUpperCase(ch)) { // OK } else { return false; } } return true; } COM: <s> gets the all caps attribute of the hungarian namer object </s>