__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/10519123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void regenerateSupportClasses(File descriptorFile) throws Exception { // create a Java task to do the rebuild String[] args = getCommandLine(false, descriptorFile); try { weblogic.ejbc.main(args); } catch (Exception e) { // run with no exit for better reporting String[] newArgs = getCommandLine(true, descriptorFile); weblogic.ejbc.main(newArgs); } } COM: <s> perform the weblogic </s>
funcom_train/39408084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextFieldPercentage() { if (jTextFieldPercentage == null) { jTextFieldPercentage = new JTextField(); jTextFieldPercentage.setPreferredSize(new Dimension(50,20)); jTextFieldPercentage.setMinimumSize(new Dimension(50,20)); jTextFieldPercentage.setToolTipText("Percentage"); jTextFieldPercentage.addKeyListener(new KeyListener(true, true, 5)); } return jTextFieldPercentage; } COM: <s> this method initializes j text field percentage </s>
funcom_train/1116558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getAddbutton() { if (addbutton == null) { addbutton = new JButton(); addbutton.setText(Resource.getPlainResourceString("Add")); addbutton.setIcon(new ImageIcon(getClass().getResource( "/resource/Add16.gif"))); addbutton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { task_add(); } }); } return addbutton; } COM: <s> this method initializes addbutton </s>
funcom_train/29779599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runInitMethod(Object target) { if (initMethod != null) { Reflector.getReflector(target.getClass()).invoke(target, initMethod, null, null); } else if (defaultInitMethod != null) { Reflector reflector = Reflector.getReflector(target.getClass()); if (reflector.methodExists(defaultInitMethod, null, null)) { reflector.invoke(target, defaultInitMethod, null, null); } } } COM: <s> runs the initialization method on the target object </s>
funcom_train/26024394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void configureGraph(JGraphEditor editor, JGraph graph) { ToolTipManager.sharedInstance().registerComponent(graph); graph.setTransferHandler( new JGraphpadTransferHandler(editor.getKit().createVertex())); graph.setMarqueeHandler(new JGraphpadMarqueeHandler(editor)); graph.setInvokesStopCellEditing(true); graph.setJumpToDefaultPort(true); graph.setMoveOutOfGroups(true); graph.setMoveIntoGroups(true); graph.setDragEnabled(true); graph.setCloneable(true); graph.setOpaque(false); } COM: <s> hook for subclasses to configure a new graph </s>
funcom_train/18514290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRecFile(File f) { recFile = f; CESE.getEnvironment().getModelManager().setStatusBar(); recNumberField.setValue(0); CESE.getEnvironment().getModelManager().setClamp(); setupRecord(); recNumberField.setToolTipText(ResourceManager .getResource("Current_record_number") + " (" + getRecNumber() + "/" + recNumberField.getMaxConstraint() + ")"); CESE.getEnvironment().getModelManager().setRecordActions(true); } COM: <s> sets new record file </s>
funcom_train/11737230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeNode(NodeState child) throws ItemStateException { NodeState parent = (NodeState) getItemState(child.getParentId()); if (child.isShareable()) { if (child.removeShare(parent.getNodeId()) == 0) { child.setParentId(null); } } parent.removeChildNodeEntry(child.getNodeId()); } COM: <s> remove a node </s>
funcom_train/39126534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Lane lane) { projectLane.addChildLane(lane); // System. out.println(" about to lane.onload");f lane.onLoad(); editHistoryContainer.push(this, EditHistoryRecordableAction.EDIT_HISTORY_TYPE_ADD, lane); } COM: <s> adds a lane to the project and updates the history </s>
funcom_train/652249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IProfile getProfile(String profileId) { IProfile profile = (IProfile) profiles.get(profileId); if (profile == null) { IProfileDescriptor descriptor = getProfileDescriptor(profileId); if (descriptor == null) { CssCore.log("Profile '" + profileId + //$NON-NLS-1$ "' not found."); //$NON-NLS-1$ descriptor = getDefaultProfileDescriptor(); } if (descriptor != null) { profile = instantiateProfile(descriptor); profiles.put(profileId, profile); } } return profile; } COM: <s> returns the profile associated with the specified extension id </s>
funcom_train/26100505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GlobalAssignment localSearch() { int i,j,minWeight = solution.getWeight(); GlobalAssignment bestsolution = new GlobalAssignment(this.solution); GlobalAssignment solution = new GlobalAssignment(this.solution); for(i=0;i<solution.getAnwserList().size();i++) { for(j=i+1;j<solution.getAnwserList().size();j++) { solution.exchange(i,j); if(solution.getWeight() < minWeight) { bestsolution = new GlobalAssignment(solution); } } } return bestsolution; } COM: <s> second phase of solution creation imporves solution evaluated with </s>
funcom_train/37824552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addInterface(ConfigBase base){ if( get(base.getAttribute()) != null ) return; if( Debug.isOk(Debug.CONFIG) ) Debug.println("WindowConfiguration.addInterface(" + base +")"); put(base.getAttribute(),base); list.add(base); if( Debug.isOk(Debug.CONFIG) ) Debug.dumpMap("WindowConfiguration.addInterface: ",this); } COM: <s> a part of the config window is added to this window configuration </s>
funcom_train/32800701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStringLiteralPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_StringLiteralExpCS_stringLiteral_feature"), getString("_UI_PropertyDescriptor_description", "_UI_StringLiteralExpCS_stringLiteral_feature", "_UI_StringLiteralExpCS_type"), OclPackage.Literals.STRING_LITERAL_EXP_CS__STRING_LITERAL, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the string literal feature </s>
funcom_train/30229347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean play(Card c, Deck d, CardColor color) { if (hand.remove(c)) { // Remove card from hand c.setColor(color); // Try to change card color c.playOn(d.getLast()); // Play card d.add(c); // Add card to the deck Card oldPlay = lastPlay; lastPlay = c; propertyChangeSupport.firePropertyChange(PROP_LASTPLAY, oldPlay, lastPlay); return true; } return false; } COM: <s> plays a card on a deck trying to change its color </s>
funcom_train/16462091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showMonth(Object dialog) { LOG.trace("ENTER"); current.set(Calendar.DATE, 1); String curMonth = getMonthAsString(this.curMonth) + " " + curYear; Object lbMonth = ui.find(dialog, COMPONENT_LB_MONTH); LOG.debug("Current month [" + curMonth + "]"); ui.setText(lbMonth, curMonth); for (int i = 1; i <= 6; i++) { fillRow(dialog, "pn" + i); } LOG.trace("EXIT"); } COM: <s> fill all the dates in the dialog for the current month </s>
funcom_train/47824596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delay(int miliseconds, double factor) { int milis=0; switch (this.randomDistributionType) { case Distribution.typeGaussian: milis = (int) (miliseconds + (timeDistribution.nextGaussian() * factor ) ); break; // TODO: fix poisson and gausian integration case Distribution.typePoisson: milis = (int) (miliseconds * (timeDistribution.nextPoisson(randomLambda) * miliseconds) ); break; default: milis=miliseconds; } // switch if (milis < 0) { milis=0; } // if sleep( milis ); } // delay COM: <s> sleep for some time </s>
funcom_train/15491230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void convertToGray16() { if (type==ImagePlus.GRAY16) return; if (!(type==ImagePlus.GRAY8 || type==ImagePlus.GRAY32)) throw new IllegalArgumentException("Unsupported conversion"); ImageProcessor ip = imp.getProcessor(); imp.trimProcessor(); imp.setProcessor(null, ip.convertToShort(doScaling)); imp.setCalibration(imp.getCalibration()); //update calibration } COM: <s> converts this image plus to 16 bit grayscale </s>
funcom_train/20804677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void link(SnifferAgent sniffer){ sniffergraph= new SnifferGraph(sniffer); this.getContentPane().add(new JScrollPane(sniffergraph.getGraph()));// Set up the graph this.pack(); this.setVisible(true); //if the window is closed addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { setVisible(false); } }); } COM: <s> links code jsniffer code instance with an agent </s>
funcom_train/2713044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void execute(InputParams in, OutputParams out) { if (ActionManager.getActionById(MenuConstants.VIEW_STATUS_BAR). isSelected()) { getContext().getEditorComponents().getStatusBar().setVisible(true); } else { getContext().getEditorComponents().getStatusBar().setVisible(false); } } COM: <s> if editor status bar is not visible it makes </s>
funcom_train/48241232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Item getBeforeIndex(int index) { if (index <= 0 || index > size) { throw new IndexOutOfBoundsException("index " + index + " is out of bounds"); } Item currItem = head; for (int cnt = 2; cnt < index; cnt++) { currItem = currItem.nextItem; } return currItem; } COM: <s> returns the item before the specified index </s>
funcom_train/5345981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSupernodeSupernodeConnection() { //Is remote host a supernode... if (! isSupernodeConnection()) return false; //...and am I a leaf node? String value=getPropertyWritten(HeaderNames.X_ULTRAPEER); if (value==null) return false; else return Boolean.valueOf(value).booleanValue(); } COM: <s> returns true iff the connection is an ultrapeer and i am a ultrapeer </s>
funcom_train/40356205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void structuredPlayRound() { updateRoundLabel(); historyLabel.setVisible (true); diceOutcomesField.setVisible (true); statusLabel.setVisible (true); diceLabel.setVisible (true); roundDiceList = new ArrayList<Integer>(); diceTimer.start(); actionLabel.setText ("Rolling..."); } COM: <s> simulates the users strategy </s>
funcom_train/39198919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printParameters(final PrintStream stream, final Map<String, String[]> parameterMap) { for (String key : parameterMap.keySet()) { String valuesString = ""; for (String value : parameterMap.get(key)) { if (valuesString.length() > 0) valuesString += ", "; valuesString += value; } stream.println("\t" + key + " = " + valuesString); } } COM: <s> for debugging only </s>
funcom_train/35669381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fclTreeRuleBlockActivation(AST tree) { String type = tree.getFirstChild().getText(); Gpr.debug(debug, "Parsing: " + type); if( type.equalsIgnoreCase("MIN") ) ruleImplicationMethod = new RuleImplicationMethodMin(); else if( type.equalsIgnoreCase("PROD") ) ruleImplicationMethod = new RuleImplicationMethodProduct(); else throw new RuntimeException("Unknown (or unimplemented) 'ACT' method: " + type); } COM: <s> parse rule implication method or rule activation method </s>
funcom_train/5513255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseSFVec3f(String str, float[] result) { int i = 0; StringTokenizer strtok = new StringTokenizer(str); String sval; while (i < 3 && strtok.hasMoreTokens()) { sval = strtok.nextToken(); result[i++] = Float.parseFloat(sval); } } COM: <s> parse a string representing a sfvec3f and put the result </s>
funcom_train/42750581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Query query(Object... phrases) throws SQLException { Phrases p = null; if (phrases.length == 1 && phrases[0] instanceof Phrases) p = (Phrases) phrases[0]; else p = new Phrases(phrases); String sql = p.getSql(false); Query q = queryMap.get(sql); if(q != null) { // get all literals with no null escapes p.next(); q.refresh(Literal.collectLiterals(p.getCurrentClause())); return q; } q = new Query(new ConnectionWrapper(this), p); queryMap.put(sql, q); return q; } COM: <s> execute a lettuce query sequence </s>
funcom_train/25075301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTargetLabelExpressionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RichReferenceFigure_targetLabelExpression_feature"), getString("_UI_RichReferenceFigure_targetLabelExpression_description"), GraphdescPackage.Literals.RICH_REFERENCE_FIGURE__TARGET_LABEL_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_AppearancePropertyCategory"), null)); } COM: <s> this adds a property descriptor for the target label expression feature </s>
funcom_train/48407405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPortKindPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_WorkProductPort_portKind_feature"), getString("_UI_PropertyDescriptor_description", "_UI_WorkProductPort_portKind_feature", "_UI_WorkProductPort_type"), SpemxtcompletePackage.eINSTANCE.getWorkProductPort_PortKind(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the port kind feature </s>
funcom_train/3182807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { int oldPriority = Thread.currentThread().getPriority(); Thread.currentThread().setPriority(Thread.MAX_PRIORITY); while (!isStopped) { printStream.print("\b*"); try { sleep(1); } catch (InterruptedException e) { e.printStackTrace(); } } Thread.currentThread().setPriority(oldPriority); } COM: <s> runs the thread </s>
funcom_train/7645223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doRequest() throws IOException { // do nothing if we've already sent the request if (sentRequest) { // If necessary, finish the request by // closing the uncached output stream. if (resHeader == null && os != null) { os.close(); readServerResponse(); getContentStream(); } return; } doRequestInternal(); } COM: <s> handles an http request along with its redirects and authentication </s>
funcom_train/42710535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getJButtonUpdatePosition() { if (jButtonUpdatePosition == null) { jButtonUpdatePosition = new JButton(); jButtonUpdatePosition.setText("Update"); jButtonUpdatePosition.setBounds(new Rectangle(10, 180, 121, 21)); jButtonUpdatePosition.setEnabled(false); jButtonUpdatePosition.setActionCommand("UpdatePosition"); } return jButtonUpdatePosition; } COM: <s> this method initializes j button update position </s>
funcom_train/50313969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendBroadcastMessage(String message) throws CmsException { if(isAdmin()) { if(m_sessionStorage != null) { m_sessionStorage.sendBroadcastMessage(message); } } else { throw new CmsException("sendBroadcastMessage() not allowed", CmsException.C_NO_ACCESS); } } COM: <s> returns a list of all currently logged in users </s>
funcom_train/18303114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void hookDoubleClickAction() { viewer.addDoubleClickListener(new IDoubleClickListener() { public void doubleClick(DoubleClickEvent event) { IStructuredSelection selection = getSelection(); Object selected = selection.getFirstElement(); // send notify event into the awareness pipeline doubleClickAction.run(); if (selected instanceof IFolder) { expand(selected); // viewer.expandToLevel(selected, 1); } } }); } COM: <s> adds support for double clicking the elements </s>
funcom_train/21437849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setReducingEndType(ResidueType new_type) { Residue redend = getRoot(); if( redend!=null && redend.isReducingEnd() && !redend.isCleavage() && !redend.getTypeName().equals(new_type.getName()) ) { redend.setType(new_type); return true; } return false; } COM: <s> set the reducing end marker for this glycan structure </s>
funcom_train/45828221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear(int bitIndex) { if (bitIndex < 0) throw new IndexOutOfBoundsException("bitIndex < 0: " + bitIndex); int wordIndex = wordIndex(bitIndex); if (wordIndex >= wordsInUse) return; long cv = this.getWord(wordIndex); cv &= ~(1L << bitIndex); this.setWord(wordIndex, cv); recalculateWordsInUse(); checkInvariants(); } COM: <s> sets the bit specified by the index to </s>
funcom_train/8743269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isUpToDate() { //occurrences file File occFile = new File(occurrences_csv); //last written index file File occLastFile = new File(index_path + SORTED_CONCEPTID_NAMES + "1.csv"); if (occFile.exists() && occLastFile.exists()) { return occFile.lastModified() < occLastFile.lastModified(); } return false; } COM: <s> method to determine if the index is up to date as a whole </s>
funcom_train/43202642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ID parseId(String stringID) { Flow[] allFlows = GUI.getInstance().getAllFlows(); for (int i = 0; i < allFlows.length; i++) { if (stringID.equals(allFlows[i].toString())) return allFlows[i].getID(); //should only by one with this ID } return null; } COM: <s> get the id of a flow expressed as a string </s>
funcom_train/45686222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showUserGuide() { File htmlFile = sspConfig.getFileUserGuide(); try { Desktop.getDesktop().browse(htmlFile.toURI()); } catch (IOException e) { JOptionPane.showMessageDialog(jfMain, sspConfig.getL() .get("notyet"), sspConfig.getL().get("Help"), JOptionPane.ERROR_MESSAGE); } } COM: <s> shows the user guide </s>
funcom_train/16676037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getButtonMonthDecrease() { if (buttonMonthDecrease == null) { buttonMonthDecrease = new JButton(); buttonMonthDecrease.setName("JButtonMonthDecrease"); buttonMonthDecrease.setText("<<"); buttonMonthDecrease.setFont(getDefaultFont()); buttonMonthDecrease.setMargin(new Insets(2, 4, 2, 4)); } return buttonMonthDecrease; } COM: <s> returns the button to decrease months </s>
funcom_train/10011359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCollectTestsNamedAfterPackage() { TestSuite ts = (TestSuite)XTestSuite.collectTestsWithinPackage( TestXTestSuite.class, "junit.extensions.xtestsuite.abtests"); assertEquals( "Expecting test's name to be 'junit.extensions.xtestsuite.abtests'", "junit.extensions.xtestsuite.abtests", ts.getName() ); } COM: <s> tests that the suite enclosing the tests that are </s>
funcom_train/10593222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { try { JCO.removeClientPool(this.mySID); } catch (Exception ex) { getLogger ().error ("Web3DataSource: couldn't" + " return Web3DataSource", ex); } this.properties = null; this.mySID = null; getLogger ().debug ("Web3DataSource disposed."); } COM: <s> dispose properly of the pool </s>
funcom_train/17203421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void perform(IR ir) { // (1) Find candidates to split simpleCandidateSearch(ir); // (2) Split them boolean needCleanup = haveCandidates(); while (haveCandidates()) { splitCandidate(nextCandidate(), ir); } // (3) If something was split optimize the CFG if (needCleanup) { branchOpts.perform(ir); } } COM: <s> do simplistic static splitting to create hot traces </s>
funcom_train/37578462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSQLKeywords() throws SQLException { if (Trace.TRACE) { Trace.trace(); } return "BEFORE,BIGINT,BINARY,CACHED,DATETIME," + "LIMIT,LONGVARBINARY,LONGVARCHAR,OBJECT,OTHER,SAVEPOINT," + "TEMP,TEXT,TRIGGER,TINYINT,VARBINARY,VARCHAR_IGNORECASE"; } COM: <s> retrieves a comma separated list of all of this databases sql keywords </s>
funcom_train/50077499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() throws Exception { if (this.config.getDiscardQueuedTasksOnShutdown()) { this.threadPool.shutdownNow(); } else { this.threadPool.shutdownAfterProcessingCurrentlyQueuedTasks(); this.threadPool.awaitTerminationAfterShutdown( this.config.getShutdownWaitTime()); } this.threadPool = null; this.taskQueue = null; this.failedTasks.clear(); } COM: <s> stops the thread pool and if configured will wait for queued tasks </s>
funcom_train/42567231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void editSection(ActionEvent event) { final Section selected = table.getSelectedSection(); if(selected != null) { final CourseEditor parent = this; SwingUtilities.invokeLater(new Runnable() { public void run() { // Run the editor SectionEditor editor = new SectionEditor(parent, selected); editor.setVisible(true); } }); } else { // If no section is selected, display error message JOptionPane.showMessageDialog( this, "No section is selected.", "Error", JOptionPane.ERROR_MESSAGE ); } } COM: <s> open up the section editor to edit a section </s>
funcom_train/20656271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCmdSave() { if (cmdSave == null) { cmdSave = new JButton(); // cmdSave.setText("Save"); // Generated cmdSave.setIcon(new ImageIcon(Config.iconPath + "save.png")); cmdSave.setToolTipText("Save"); cmdSave.setSize(40, 25); cmdSave.addActionListener(ApplicationManager.application); } return cmdSave; } COM: <s> this method initializes cmd save </s>
funcom_train/12269928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Symbol getSymbol(String pfamId){ String key = this.id2symbolMap.get(pfamId); Symbol sym = null; if(null == key){ key = nextFreeSymbol(); this.id2symbolMap.put(pfamId, key); sym = this.symbolIdx.get(key); this.resource.setGraphics(pfamId, new SymbolId(sym).toJSon().toString()); } else { sym = this.symbolIdx.get(key); } return sym; } COM: <s> returns a symbol depending on the submited id </s>
funcom_train/25529131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double getNumberOfNonSymbols(int iMinRank, int iMaxRank) { double dSum = 0; for (int iCnt=iMinRank; iCnt <= iMaxRank; iCnt++) { dSum += NonSymbolsPerRank.getValue(iCnt); } return dSum; } COM: <s> returns the number of non symbols summed over a specific range of ranks </s>
funcom_train/11004916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getWordWrap(){ EscherOptRecord opt = (EscherOptRecord)getEscherChild(_escherContainer, EscherOptRecord.RECORD_ID); EscherSimpleProperty prop = (EscherSimpleProperty)getEscherProperty(opt, EscherProperties.TEXT__WRAPTEXT); return prop == null ? WrapSquare : prop.getPropertyValue(); } COM: <s> returns the value indicating word wrap </s>
funcom_train/2879091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void terminateApplication(Prim target) throws RemoteException { if (target == null) { return; } Reference name; try { name = target.sfCompleteName(); } catch (RemoteException ignore) { name = null; } try { target.sfDetachAndTerminate(TerminationRecord.normal(name)); } catch (NoSuchObjectException ignore) { //app is already terminated, do not fail a test. } } COM: <s> terminate a named application </s>
funcom_train/50314344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void subtract (int x, int y, int width, int height) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (width < 0 || height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT); try { lockToolkit(); long rgnHandle = Fox.FXRegion_new(x, y, width, height); Fox.FXRegion_substract(handle, rgnHandle); Fox.FXRegion_delete(rgnHandle); } finally { unlockToolkit(); } } COM: <s> subtracts the given rectangle from the collection of polygons </s>
funcom_train/25427995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BattleResult battle(Fleet attacker, Fleet defender, Cell terrain) { BattleResult result = new BattleResult(); FightResult fightResult = defender.fight (attacker, terrain.calculateDefenseBonus(), terrain.calculateAttackBonus()); result.setWinner(fightResult.getWinners()); result.setLooser(fightResult.getLoosers()); result.setTerrain(terrain); return result; } COM: <s> every battle involves two parts attacker and defender </s>
funcom_train/13993565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setPropertyMap(Map propertyMap) { for (Iterator i = propertyMap.entrySet().iterator(); i.hasNext();) { Map.Entry entry = (Map.Entry) i.next(); getPropertyValue((String) entry.getKey()) .setValue(entry.getValue()); } } COM: <s> sets the properties in the property map </s>
funcom_train/28216350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int flt() { this.runState = MOTOR_RUN_STATE_IDLE; //this.regulationMode = REGULATION_MODE_MOTOR_SPEED; this.mode = MOTOR_RUN_STATE_IDLE; try { return nxtCommand.setOutputState(id, (byte)0, 0x00, regulationMode, turnRatio, runState, 0); } catch (IOException ioe) { System.out.println(ioe.getMessage()); return -1; } } COM: <s> stops the motor without using brakes </s>
funcom_train/46768750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean splitSpace(Space space, int level, int target, ArrayList spaceList) { if (space.group1.size() + space.group2.size() <= target) { spaceList.add(space); return true; } if (level > maxLevels) { spaceList.add(space); return true; } Space[] spaces = space.getQuadSpaces(); for (int j=0;j<4;j++) { splitSpace(spaces[j], level+1, target, spaceList); } return false; } COM: <s> considering splitting a space into 4 sub spaces </s>
funcom_train/37078877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSyntenySpeciesToDatabase(String speciesToDbString) { int arrowIndex = speciesToDbString.indexOf("->"); String species = speciesToDbString.substring(0,arrowIndex); String db = speciesToDbString.substring(arrowIndex+2); getSpeciesToDbMap().put(species.trim(),db.trim()); // trim whitespace } COM: <s> species to db string expected format droshophila melanogaster gadfly3 </s>
funcom_train/13965851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StoreResponse set(MCElement e) { try { startCacheWrite(); setCmds += 1;//update stats // increment the CAS counter; put in the new CAS e.cas_unique = casCounter++; this.cacheStorage.put(e.keystring, e, e.data_length); return StoreResponse.STORED; } finally { finishCacheWrite(); } } COM: <s> set an element in the cache </s>
funcom_train/39904535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void registerReciever() { if (r != null) return; r = new BroadcastReceiver() { @Override public void onReceive(Context c, Intent i) { String phone_state = i.getStringExtra(TelephonyManager.EXTRA_STATE); if (!phone_state.equals(TelephonyManager.EXTRA_STATE_OFFHOOK)) { debugLog("received "+phone_state+", time to go bye bye, thanks for playing!"); finish(); } } }; registerReceiver(r, new IntentFilter("android.intent.action.PHONE_STATE")); } COM: <s> register phone state receiver </s>
funcom_train/9768249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToLastSnapshot(String property, double value) { if (snapshots.size() < 1) { System.err.println("addToLastSnapshot: snapshots.size() < 1"); return; } snapshots.get(snapshots.size() - 1).addProperty(property, new Double(value)); } COM: <s> adds property to the last snapshot </s>
funcom_train/31339756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopService() { fBatchedBuffer.cancel(false); DynamicDAO.removeEntityListener(INews.class, fNewsListener); DynamicDAO.removeEntityListener(ISearchMark.class, fSearchMarkListener); DynamicDAO.removeEntityListener(IBookMark.class, fBookMarkListener); DynamicDAO.removeEntityListener(IFolder.class, fFolderListener); } COM: <s> shutdown this service </s>
funcom_train/15927394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resourceChanged(IResource changedResource) { Object obj= fResourceToItem.get(changedResource); if (obj == null) { // not mapped } else if (obj instanceof Item) { updateItem((Item) obj); } else { // List of Items List list= (List) obj; for (int k= 0; k < list.size(); k++) { updateItem((Item) list.get(k)); } } } COM: <s> must be called from the ui thread </s>
funcom_train/1865599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMLElement exportXML(){ XMLElement root = new XMLElement(); root.setName("location"); XMLElement mtx = new XMLElement(); mtx.setName("matrix"); root.addChild(mtx); for (int i=0;i<3;++i){ XMLElement row = new XMLElement(); mtx.addChild(row); row.setName("row"); for (int j =0; j<3;++j){ XMLElement col = new XMLElement(); row.addChild(col); col.setName("col"); String content = String.valueOf(transform.get(i, j)); col.setContent(content); } } return root; } COM: <s> exports contents of observation point to xml </s>
funcom_train/36172322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClientData(int clientDataId) throws IOException, IllegalDataDefinition { if (dataBuffer == null) { throw new IllegalDataDefinition(Messages.getString("DataDefinitionWrapper.2")); //$NON-NLS-1$ } sc.setClientData(clientDataId, datadefid, 0, 1, totalSize, bytes()); } COM: <s> set client data using the current data definition </s>
funcom_train/51120056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Resource getItemIcon(Object itemId) { Resource explicit = (Resource) itemIcons.get(itemId); if (explicit != null) return explicit; if (getItemIconPropertyId() == null) return null; Property ip = getContainerProperty(itemId, getItemIconPropertyId()); if (ip == null) return null; Object icon = ip.getValue(); if (icon instanceof Resource) return (Resource) icon; return null; } COM: <s> get the item icon </s>
funcom_train/40383171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateLaunchInternalASFromConfig(final ILaunchConfiguration config) { int port = 8888; boolean noserver = false; try { port = config.getAttribute(ATTR_PORT, port); noserver = config.getAttribute(ATTR_NOSERVER, noserver); } catch (final CoreException e) { // ignore } portDialogField.setText(String.valueOf(port)); doNotLaunchInternalASDialogField.setSelection(noserver); } COM: <s> updates the gwt internal as attributes from the specified launch </s>
funcom_train/10231266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element toXmlElement(Document a_doc) { Element elemX509Cert = a_doc.createElement(XML_ELEMENT_NAME); elemX509Cert.setAttribute("xml:space", "preserve"); XMLUtil.setValue(elemX509Cert, Base64.encode(toByteArray(), true)); return elemX509Cert; } COM: <s> creates xml element of certificate consisting of x509 certificate </s>
funcom_train/18742806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Observer createErrorListener() { return new Observer() { @Override public void update(Observable o, Object arg) { if (arg != null) { GraphJCell errorCell = getJModel().getErrorMap().get(arg); if (errorCell != null) { getJGraph().setSelectionCell(errorCell); } } } }; } COM: <s> creates the listener of the error panel </s>
funcom_train/42090962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFilePathPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Component_filePath_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Component_filePath_feature", "_UI_Component_type"), C2Package.Literals.COMPONENT__FILE_PATH, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the file path feature </s>
funcom_train/14216048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getOrderDirectionIcon(String field) { if(this.orderDirection==0 && this.orderBy.equals(field)) return "<img src=\"images/ascending.gif\" alt=\"ascending\" />"; else if(this.orderDirection==1 && this.orderBy.equals(field)) return "<img src=\"images/descending.gif\" alt=\"descending\" />"; else return ""; } COM: <s> gets the order direction image </s>
funcom_train/28262689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void listAvailableServices() { p.called("listAvailableServices"); if (serviceList != null) { int index = 0; for (Map.Entry<String, BNode> entry : serviceList.entrySet()) { p.out(index++ + ":" + entry.getKey());// + " " + entry.getValue()); } } } COM: <s> list the available services to the standard output </s>
funcom_train/1041214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void raise(final EventObject ev) { new Thread() { public void run() { //first, recursively find the root rendering Pipeline root = Pipeline.this; while (root.parent != null) root = root.parent; //notify the listeners from the root rendering root.notifyListeners(ev); } }.start(); } COM: <s> asynchronously notifies each registered listener of an event and propagates </s>
funcom_train/18496948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Composite getFieldEditorParent(String helpKey) { Composite parent = new Composite(getFieldEditorParent(), SWT.NULL); parent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); WorkbenchHelp.setHelp(parent, NiceXslPlugin.PLUG_IN_ID + "." + helpKey); return parent; } COM: <s> create a parent control for a field editot with a help key </s>
funcom_train/18111895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEthnicOriginOfPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EthnicOrigin_EthnicOriginOf_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EthnicOrigin_EthnicOriginOf_feature", "_UI_EthnicOrigin_type"), BioDBPackage.Literals.ETHNIC_ORIGIN__ETHNIC_ORIGIN_OF, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the ethnic origin of feature </s>
funcom_train/39877528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dump(Printer pw, String prefix) { pw.println(prefix + "usagePercent: " + usagePercent); pw.println(prefix + "durationMicros: " + durationMicros); pw.println(prefix + "usageDetails: " + usageDetails); pw.println(prefix + "checkinDetails: " + checkinDetails); } COM: <s> dump a battery info instance to a printer </s>
funcom_train/12644572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle union(Rectangle r) { int x1 = Math.min(x, r.x); int x2 = Math.max(x + width, r.x + r.width); int y1 = Math.min(y, r.y); int y2 = Math.max(y + height, r.y + r.height); return new Rectangle(x1, y1, x2 - x1, y2 - y1); } COM: <s> computes the union of this code rectangle code with the </s>
funcom_train/33846460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void executeFindBugsTest(final RunnableWithExceptions runnable) throws Exception { TestRunnerThread thread = new TestRunnerThread(runnable); thread.start(); try { thread.join(); } catch (InterruptedException e) { throw new IllegalStateException(); } if (thread.getDetectorAdapter() == null) { throw new IllegalStateException("Test code did not complete"); } thread.getDetectorAdapter().finishTest(); } COM: <s> execute some junit test code inside a detector2 class running inside a </s>
funcom_train/26532658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getValue(String name) { DataRepository data = getDataRepository(); String prefix = getPrefix(); if (prefix == null) prefix = ""; String dataName = DataRepository.createDataName(prefix, name); SimpleData d = data.getSimpleValue(dataName); return (d == null ? null : d.format()); } COM: <s> get a value from the data repository </s>
funcom_train/16174800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void nextStep() { if( steplist == null ) { currentStep = null; notifyListener(); return; } currentIndex++; if( steplist.size() <= currentIndex ) { currentStep = null; notifyListener(); return; } currentStep = steplist.get( currentIndex ); currentStep.setStarted(); notifyListener(); return; } COM: <s> goes forward in the list of available steps of the tutorial </s>
funcom_train/24932202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSubsettedAssocEnd(MAssociationEnd ae) { assocEnd().cls().model().subsetAssociationsGraph(). addEdge(new DirectedEdgeBase(assocEnd().association(), ae.association())); //his subseting set contains me and my subseted set contains him this.fsubsetedSet.add(ae); ae.subset().fsubsettingSet.add(super.assocEnd()); } COM: <s> adds subseted by this </s>
funcom_train/9759940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void update(Runnable runnable) { if (runnable instanceof SafeChange) fireElementStateChanging(fFileEditorInput); IWorkbench workbench= PlatformUI.getWorkbench(); IWorkbenchWindow[] windows= workbench.getWorkbenchWindows(); if (windows != null && windows.length > 0) { Display display= windows[0].getShell().getDisplay(); display.asyncExec(runnable); } else { runnable.run(); } } COM: <s> posts the update code behind the running operation </s>
funcom_train/18322065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void compile(StateMachine sm, Transition t) { compile(sm, t, t.getGuard()); if (t.getEvent() != null) { compile(sm, t.getEvent()); } List l = t.getOutputActions(); if (l != null) { for (Iterator i = l.iterator(); i.hasNext(); ) { Action e = (Action)i.next(); compile(sm, t, e); } } } COM: <s> compiles given transition with its guard event and output actions </s>
funcom_train/28418555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getListModelIndexOf(Object object, ListModel model) { for (int i = 0; i < model.getSize(); i++) { if (model.getElementAt(i).equals(object)) { //System.out.println(model.getElementAt(i) + " matched " + object); return i; } } return -1; } COM: <s> returns the index of the given object in the list model </s>
funcom_train/33427568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Audio getAudio(String audioId) throws FileNotFoundException { Iterator<Post> it = iteradorPost(); while(it.hasNext()){ Post post = (Post) it.next(); for (Audio audio : post.getListaDeAudio()) { if (audio.getId().equals(audioId)) { return audio; } } } throw new FileNotFoundException(Constantes.ATRIBUTO_INVALIDO.getName()); } COM: <s> recupera o audio </s>
funcom_train/28339703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double normInf() { int i; // loop control double dblMax; // running maximum dblMax = 0.0; for (i=0; i<6; i++) if (Math.abs( this.getElem(i) ) > dblMax ) dblMax = Math.abs( this.getElem(i) ); return dblMax; }; COM: <s> return the l infinity norm of the vector </s>
funcom_train/37805844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNewBoard(final FreetalkBoard newBoard) { final FreetalkBoard existingBoard = model.getBoardByName(newBoard.getName()); if (existingBoard == null) { model.addNodeToTree(newBoard); // maybe this boardfolder already exists, scan for new messages // TOF.getInstance().searchUnreadMessages(newBoard); } } COM: <s> checks if board is already existent adds board to board tree </s>
funcom_train/37903928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HashMap describeCollection(String rootCollection) throws EXistException, PermissionDeniedException { try { return describeCollection((rootCollection==null)?XmldbURI.ROOT_COLLECTION_URI:XmldbURI.xmldbUriFor(rootCollection)); } catch (Throwable e) { handleException(e); return null; } } COM: <s> the method code describe collection code </s>
funcom_train/32113632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showChar(char c, int x0, int y0) { char[] ch = {c}; if (offscreenImage==null) init(); offscreen.setColor(backgroundColor); offscreen.fillRect(cellW*x0, cellH*(y0-1), cellW, cellH); offscreen.setColor(foregroundColor); offscreen.drawChars(ch, 0, 1, cellW*(x0), cellH*(y0)-4); } COM: <s> shows a character at a specific position </s>
funcom_train/28296631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetPropertyNonExistentData() throws Exception { Entry entry = dvm.new Entry(Package.class, Sphere.class, Package.NAME, Sphere.NAME); dvm.set(entry); DataConversion<Integer, Color3f> conversion = createConversion(); try { dvm.setProperty(IsClassOf.class, Package.CLASSES_ATTR, Sphere.COLOR_ATTRIBUTE, conversion); } catch (IllegalArgumentException e) { assertTrue(true); } } COM: <s> test set property non existent data </s>
funcom_train/32081309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawPoint (int x, int y) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); checkGC(DRAW); int rect = OS.gcnew_Rect(x, y, 1, 1); int brush = OS.Pen_Brush(data.pen); OS.DrawingContext_DrawRectangle(handle, brush, 0, rect); OS.GCHandle_Free(brush); OS.GCHandle_Free(rect); } COM: <s> draws a pixel using the foreground color at the specified </s>
funcom_train/44695810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AbstractDocument postProcess(AbstractDocument document) { if (postProcessors != null) { ArrayList ps; // to make it a bit more race condition resistent synchronized (this) { ps = new ArrayList(postProcessors); } for (int N = ps.size(), i = 0; i < N; ++i) document = ((Processor)ps.get(i)).postProcess(document, this); } return document; } COM: <s> post processes a document through the pipe of </s>
funcom_train/19401468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object nextObject(Random rnd, Class cls, boolean allowNull) { if(cls==null) { // random object type. return nextObject(rnd, allowNull); } else { // specific object type. return nextObject(rnd, getType(cls), allowNull); } } COM: <s> return an instance of the specified type with a random value </s>
funcom_train/16914872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkBoundaryFields() { maxRangeField.setEnabled(!model.isAutoRange()); minRangeField.setEnabled(!model.isAutoRange()); maxDomainField.setEnabled(!model.isAutoDomain()); minDomainField.setEnabled(!model.isAutoDomain()); } COM: <s> updates the boundary fields </s>
funcom_train/41163872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(MaRole entity) { EntityManagerHelper.log("deleting MaRole instance", Level.INFO, null); try { entity = getEntityManager().getReference(MaRole.class, entity.getRoleId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent ma role entity </s>
funcom_train/25282573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void select(final Graphics gfx, final int length) { selectionbox_length = length; gfx.setColor(Color.black); gfx.fillRect(x, y, length, length); gfx.fillRect(x + width - length, y, length, length); gfx.fillRect(x, y + height - length, length, length); gfx.fillRect(x + width - length, y + height - length, length, length); } COM: <s> draws the four selection boxes on the shapes corners </s>
funcom_train/15400194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double getArea() { float[] spacing = _header.getImagePixelSpacingArray(); if ((spacing == null) || (spacing[0] == 0)) { spacing = new float[] { 1, 1 }; } return(Math.PI * ((getWidth() * spacing[0]) / 2.0) * ((getHeight() * spacing[1]) / 2.0)); } COM: <s> calculates the area of ellipse </s>
funcom_train/42958814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean authenticate(String username, String password) throws AuthException { UserDAO dao = new UserDAO() ; User currUser = dao.findByUsername(username) ; String salt = currUser.getPassword().substring(0,2) ; String cryptText = JCrypt.crypt(salt, password) ; if (cryptText.compareTo(currUser.getPassword())==0) { return true ; } else { return false; } } COM: <s> verifies the password versus the database for the given username password </s>
funcom_train/42079539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getToolUrl(String loId, String repId, String userLogin, String userPass) { String url = toolUrl .replaceAll(":id", loId) .replaceAll(":rep", repId) .replaceAll(":login", userLogin) .replaceAll(":pass", userPass); return url; } COM: <s> parametrize the tool url of the learning object type </s>
funcom_train/16530106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assemble() { DefaultMutableTreeNode pathComponent = (DefaultMutableTreeNode)stepTree.getLastSelectedPathComponent(); StepInfo si = (StepInfo) pathComponent.getUserObject(); String text = stepTitleTextField.getText(); if( text != null & si != null ) { si.setCustomName(text); StepChooseDialogUI.this.setCustomStepInfo(si); System.out.println("SI " + si); } } COM: <s> gets the selected node and sets it </s>
funcom_train/46758867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean missing(TableColumnModel column, List<RefModel> allModelRefs) { if (refKeyMap.size() == 0) { for (RefModel ref : allModelRefs) { refKeyMap.put(ref.getRefKey(), new Boolean(true)); } } return !refKeyMap.containsKey(column.getRefKey()); } COM: <s> missing from refs </s>
funcom_train/11729041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddVersionLabel() throws RepositoryException { int initialLength = vHistory.getVersionLabels().length; vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false); String[] labels = vHistory.getVersionLabels(); assertEquals("A version label that has been successfully added must increes the total number of version labels available in the history.", initialLength + 1, labels.length); } COM: <s> test if the number of labels available in the version history is increased </s>
funcom_train/41417390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCollided(Sprite s) { int posX = s.getX(); int posY = s.getY(); if (isValidPosition(posX, posY)) { return s.collidesWith(this.breakableLayer, true) || s.collidesWith(this.unbreakableLayer, true); } else { return true; } } COM: <s> collision check with walls and outer world </s>