__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/9863049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getParamTypes() { final List result = new ArrayList(); final ParamType[] qtparams = aQuestionType.getParams(); for (int i = 0; i< qtparams.length; ++i) { final ParamType p = qtparams[i]; result.add(Type.typeForClass(p.getValueType().create().getClass())); } return result; } COM: <s> get the parameter types for the question </s>
funcom_train/1662770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNodes(Node[] nodes) { SimpleXML nodesNode = new SimpleXML("nodes"); for (Node node : nodes) { SimpleXML nodeNode = nodesNode.append("node"); nodeNode.append("name", node.getName()); nodeNode.append("hostname", node.getHostname()); nodeNode.append("port", String.valueOf(node.getPort())); } rootNode.replace(nodesNode); rootNode.remove("node-address"); rootNode.remove("node-port"); } COM: <s> sets the list of configured nodes </s>
funcom_train/38972748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lookupLocation() { if(this.locationSource != null) { Location newLocation = this.locationSource.getLocation(); this.locationTimestamp = Calendar.getInstance().getTime(); if(this.location == null || !this.location.equals(newLocation)) { this.location = newLocation; this.setChanged(); } this.notifyObservers(); } else { System.err.println("No Location Source"); } } COM: <s> this method forces a location discovery </s>
funcom_train/13943425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLyrics(String l) { try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(bos); out.writeObject(l); out.close(); setLyrics(bos.toByteArray()); } catch (IOException e) { log.error("error setting lyrics: " + e.getMessage()); } } COM: <s> set lyrics as string </s>
funcom_train/28662155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeOutput(char[] chars, int numberOfChars) { // write out string try { out.write(chars, 0, numberOfChars); } catch (Exception e) { LogUtil.logError(XorPlugin.PLUGIN_ID, "Exception while writing to the output stream", e, false); //$NON-NLS-1$ } } COM: <s> writes out the specified char data </s>
funcom_train/31399526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setWidths() { TableColumnModel cm = getColumnModel(); for ( int i = 0; i < model.getColumnCount(); i++) { TableColumn col = cm.getColumn( i); int width = model.getColumnWidth( i); if ( width > 0) { // col.setMinWidth( width); col.setPreferredWidth( width); } } } COM: <s> sets the widths of the columns it gets the column with </s>
funcom_train/10907133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeTJMappedChar(char codepoint) { if (bufTJ == null) { bufTJ = new StringBuffer(); } if (bufTJ.length() == 0) { bufTJ.append("[").append(startText); } writeChar(codepoint, bufTJ); } COM: <s> writes a char to the tj buffer </s>
funcom_train/22233637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNormalIndex(int index) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_NORMAL_INDEX_READ)) throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray13")); return ((IndexedGeometryArrayRetained)this.retained).getNormalIndex(index); } COM: <s> retrieves the normal index associated with the vertex at </s>
funcom_train/25220357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void after(Alternative alt1, Grammar alt1Grammar, Block alt2, Grammar alt22Grammar,char operation){ Block alt2Copy=new Block(alt2); GrammarTreeAccesor access=new NodeAccessor(); access.setElementToAccess(alt2Copy); CommonTree block=access.getElement(); block=getOperationWrapper(block, operation); //alt2CopyTree=getOperationWrapper(alt2CopyTree, operation); access.setElementToAccess(alt1); CommonTree alt1Tree=access.getElement(); alt1Tree.getChildren().add(alt1Tree.getChildren().size()-1, block); } COM: <s> this method adds the contents of alt2 after alt1 </s>
funcom_train/3417595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractStringBuilder insert(int offset, char str[]) { if ((offset < 0) || (offset > length())) throw new StringIndexOutOfBoundsException(offset); int len = str.length; int newCount = count + len; if (newCount > value.length) expandCapacity(newCount); System.arraycopy(value, offset, value, offset + len, count - offset); System.arraycopy(str, 0, value, offset, len); count = newCount; return this; } COM: <s> inserts the string representation of the code char code array </s>
funcom_train/49469950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer addTechnology(Technology t) throws Exception, RaciException { Db db = dbRW(); try { db.begin(); _logger.info("Asset : addTechnology "+t); checkUserCanModify(db); Integer ret = DbTechnology.addTechnology(db, t); db.commit(); return ret; } catch (Exception e) { store(e); throw e; } finally { db.safeClose(); } } COM: <s> add a technology to the database provide the t data structure filled with </s>
funcom_train/30169068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension paintLegend(Graphics2D g, Dimension dim, boolean use_less_more_simbol, boolean dash, int depth) { if (legendRenderer == null) { instanceLegendRenderer(); } return legendRenderer.paintLegend(this, g, dim, use_less_more_simbol, dash, depth); } COM: <s> asf this method paints raster objects legend to the argument graphics object </s>
funcom_train/51575040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setAttribs(final MuSocket msock, final Font fontFace, final Color fgColour, final Color bgColour) { JMText text; // our temporary text object text = msock.getTextWindow(); if (fontFace != null) { text.setFont(fontFace); } if (fgColour != null) { text.setForeground(fgColour); text.setBackground(bgColour); } } COM: <s> set the attributes for the given mu socket </s>
funcom_train/3390235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MemberDefinition findAnyMethod(Environment env, Identifier nm) throws ClassNotFound { MemberDefinition f; for (f = getFirstMatch(nm) ; f != null ; f = f.getNextMatch()) { if (f.isMethod()) { return f; } } // look in the super class ClassDeclaration sup = getSuperClass(); if (sup == null) return null; return sup.getClassDefinition(env).findAnyMethod(env, nm); } COM: <s> find any method with a given name </s>
funcom_train/9758346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean dependsOn(Object element0, Object element1) { if (element0 == null || element1 == null) return false; String pluginDesc0= (String)fDescriptorMapping.get(element0); String pluginDesc1= (String)fDescriptorMapping.get(element1); // performance tuning - code below would give same result if (pluginDesc0.equals(pluginDesc1)) return false; Set prereqUIds0= (Set)fPrereqsMapping.get(pluginDesc0); return prereqUIds0.contains(pluginDesc1); } COM: <s> returns whether one configuration element depends on the other element </s>
funcom_train/37444459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createNotADoubleMessage(final String key, final String value) { final StringBuffer message = new StringBuffer(100); message.append("key=").append(key); message.append(":value=").append(value); message.append(":Not a double:bundles="); message.append(toString()); return message.toString(); } COM: <s> creates a message specifying that the supplied value corresponding to </s>
funcom_train/33770741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Panel createMediasPanel(){ VerticalPanel p = new VerticalPanel(); p.setWidth("100%"); Label title = new Label(" --- MEDIAS SELECTIONNES"); title.addStyleName("cart_itemtypetitle"); mediasTable = new FlexTable(); mediasTable.addStyleName("cart_itemtable"); ColumnFormatter cf = mediasTable.getColumnFormatter(); for(int i=0; i<5; i++) cf.addStyleName(i,"cart_itemnum"); ScrollPanel scroll = new ScrollPanel(mediasTable); scroll.setSize("100%","150px"); p.add(title); p.add(scroll); return p; } COM: <s> crate media panel </s>
funcom_train/48562250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doSaveAll() { List<QuestionAnswerDetails> list = display.getData(getInterviewId()); LoadingIndicator.loadingStarted(Interviewer.constants.saving()); rpcService.updateQuestionAnswer(list, new AsyncCallback<Void>() { public void onFailure(Throwable caught) { LoadingIndicator.loadingFinished(); } public void onSuccess(Void result) { LoadingIndicator.loadingFinished(); Label isSavedInfo = display.getIsSavedInfo(); isSavedInfo.setText(Interviewer.constants.allSaved()); isSavedInfo.setStyleName("textSaved"); } }); } COM: <s> save all answers </s>
funcom_train/34594881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getBalancedLevel() { int total = 0; for (int i = 0; i < m_base.length; ++i) { total += m_base[i]; } int level = (int)Math.round(113.0 - 0.074 * ((double)total)); if (level < 0) { level = 0; } else if (level > 100) { level = 100; } return level; } COM: <s> get a balanced level for this species using this formula </s>
funcom_train/50189093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireStartResultCDATA() { if (hasTraceListeners()) { // count of registered tracelisteners int countListener = traceListeners.size(); for (int i = 0; i < countListener; i++) { TraceListener currentListener = (TraceListener) traceListeners.elementAt(i); // call the according method on tracelistener currentListener.startResultCDATA(); } } } COM: <s> indicates the start cdata event of the result document </s>
funcom_train/9007901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLatestMeasurement() { if(numericalRecordEntries.size() < 1 ) { //throw excepton maybe? Doesn't seem like an exceptional case //Then again, returning -1 seems explicitly wrong return -1; } else { NumericalRecordEntry entry = (NumericalRecordEntry) numericalRecordEntries.elementAt(numericalRecordEntries.size() -1); return entry.getRecordValue(); } } COM: <s> gets the latest measurement that has been recorded </s>
funcom_train/20228452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Individual[] population) { double[] currentSolution; fileManager.printIterationHeader(iteration++); for (int i = 0; i < populationSize; i++) { currentSolution = population[i].getSolution(); xAxis[i] = currentSolution[0]; yAxis[i] = currentSolution[1]; zAxis[i] = population[i].getSolutionFitness(); fileManager.printPosition(xAxis[i], yAxis[i], zAxis[i]); } } COM: <s> updates this observer to reflect the current configuration of the population </s>
funcom_train/25201936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String read(int len) throws IOException { int c; StringBuilder sb = new StringBuilder(); pointer += len; for (int i = 0; i < len; i++) { c = dvi.read(); if (c < 0) { throw new EOFException(); } sb.append((char) c); } return sb.toString(); } COM: <s> read a number of bytes </s>
funcom_train/46752703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFirstName(String firstName) { if (Converter.isDifferent(this.firstName, firstName)) { String oldfirstName= null; oldfirstName = this.firstName; this.firstName = firstName; setModified("firstName"); firePropertyChange(String.valueOf(USERS_FIRSTNAME), oldfirstName, firstName); } } COM: <s> user first name </s>
funcom_train/1729180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName() { StringBuffer fullName = new StringBuffer(getFirstName().length() + getLastName().length() + 1); fullName.append(getFirstName()); if (!"".equals(getLastName())) { fullName.append(" "); fullName.append(getLastName()); } return fullName.toString(); } COM: <s> gets the name </s>
funcom_train/34069923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (mUrl == null) { StringBuffer url = new StringBuffer(); url.append(mProtocol).append("://").append(mHost); if (mPort != -1) { url.append(":").append(mPort); } url.append(mFile); mUrl = url.toString(); } return mUrl; } COM: <s> returns the url in full string form </s>
funcom_train/40692986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectNextCard() { if (selectedCard == null) select((RolodexCard) cards.get(0)); final int currentIndex = cards.indexOf(selectedCard); if (currentIndex + 1 >= cards.size()) return; select((RolodexCard) cards.get(currentIndex + 1)); } COM: <s> select the next card in the list </s>
funcom_train/32057804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testActionPerformed() { System.out.println("testActionPerformed"); GPGraphpad graphpad = new GPGraphpad(); FileRecent3 file3 = new FileRecent3(graphpad); ActionEvent action = new ActionEvent(new Object(),ActionEvent.ACTION_PERFORMED,"command"); file3.actionPerformed(action); } COM: <s> tests action performed method of class file recent3 </s>
funcom_train/3084726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void nextChart() { int chartIndex = list.getSelectionModel().getMinSelectedIndex(); chartIndex++; if (chartIndex > (chartFactory.getChartTypes().size() - 1)) chartIndex = 0; list.getSelectionModel().setSelectedIndex(chartIndex, true); chartPanel.setChart(chartFactory.createAChart(chartIndex)); } COM: <s> the next chart method cycles to the next chart type </s>
funcom_train/44679614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matches match(Feature target, FeatureCollection candidates) { Matches survivors = new Matches( candidates.getFeatureSchema(), candidates.getFeatures()); for (Iterator i = matchers.iterator(); i.hasNext(); ) { FeatureMatcher matcher = (FeatureMatcher) i.next(); survivors = matcher.match(target, survivors); } return survivors; } COM: <s> applies the feature matchers in sequence to the list of candidates </s>
funcom_train/16606071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getStmtCoverageCount(int num) { Integer lineNumber = num; Line<?> stmt = stmtMap.get(lineNumber); if (stmt != null) return stmt.getCount(); // If it's not a stmt, then it must be a method Line<?> method = methodMap.get(lineNumber); if (method != null) return method.getCount(); // If it's not a stmt or a method, the line doesn't exist, and we return // -1 return -1; } COM: <s> retrieves the number of times a particular line number was covered </s>
funcom_train/37079041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private UpdateTransaction setID(AnnotatedFeatureI annot,String newId) { TransactionSubpart ts = TransactionSubpart.ID; UpdateTransaction ut = new UpdateTransaction(annot,ts,annot.getId(),newId); ut.editModel(); ut.setSource(this); return ut; } COM: <s> sets annot id returns update transaction </s>
funcom_train/34508082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateMeansByPushingGoal(IntendedMeans intMeans, Literal assump) { logger.fine("precondition has not been satisfied: " + assump.toString() + " now searching another plan to satisfy it."); PlanBodyImpl testGoal = new PlanBodyImpl(PlanBody.BodyType.achieve, Literal.parseLiteral(assump.toString())); intMeans.getCurrentStep().add(0, testGoal); } COM: <s> pushes a predicate as a first step goal of the intended means </s>
funcom_train/25339533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add_return(ComputerProblem param) { if (local_return == null) { local_return = new ComputerProblem[] {}; } // update the setting tracker local_returnTracker = true; java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(local_return); list.add(param); this.local_return = (ComputerProblem[]) list.toArray(new ComputerProblem[list.size()]); } COM: <s> auto generated add method for the array for convenience </s>
funcom_train/22965478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setImage(byte[] imageData) { log.debug("setImage - enter with byte stream. byte is " + (imageData != null ? "non null" : "null")); try { _image = ImageIO.read(new ByteArrayInputStream(imageData)); } catch (Exception e) { log.warn("setImage - exception", e); } log.debug("setImage - exit"); } COM: <s> sets the frames read from a blob using image io read method </s>
funcom_train/12619609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void wipeSprite(int[] setImage, int[] fromImage){ if (!headless){ for (int i = 0; i < spriteHeight && doWipe; i++) { for (int j = 0; j < spriteWidth; j++){ if (this.sprite[i * spriteWidth + j] != background){ int index = (width * (this.getPositionY()+i)) + (this.getPositionX()+j); setImage[index] = fromImage[index]; } } } } } COM: <s> wipe this sprite from the screen </s>
funcom_train/23199647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private JButton getPlayBtn() { // if (playBtn == null) { // playBtn = new JButton(); // playBtn.setText(I18nFactory.createI18n().getMessage( // DemoGlobalCommands.play.name())); // playBtn.setActionCommand(DemoGlobalCommands.play.name()); // playBtn.addActionListener(getToolbarActionListener()); // playBtn.setEnabled(getSelected()); // // } // return playBtn; // } COM: <s> this method initializes play btn </s>
funcom_train/22919923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createQuest(final int level) { Quest quest = ServerCore.createQuest(level); if(quest != null) { Command com = CommandFactory.createSpeak( null, "&You got a quest: " + quest.getDescription() + "." ); enqueue(com); thePlayer.addQuest(quest); } else { Command com = CommandFactory.createSpeak( null, "&There are no suitable quests for you" ); enqueue(com); } } COM: <s> create a new quest for the player </s>
funcom_train/18469060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getQueryForReport() { buildWhereClauses(); //Kjo u hoq se merret nga raporti direkt String query = getQuery() + simpleWhereClause + " " + getOrderByClause(); System.out.println("SearchFilter.getQueryForReport:query = " + query); return query; } COM: <s> this is used only for reports </s>
funcom_train/38181832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HttpURLConnection getConnection() { HttpURLConnection con = null; try { con = (HttpURLConnection)serverURL.openConnection(); Debug.out("HTTP class: " + con.getClass().getName(), Debug.VERBOSE_VERBOSE); } catch (IOException e2) { Debug.stop("Error open HTTP connection: " + e2.getMessage()); } return con; } COM: <s> opens a http connection to server </s>
funcom_train/50736434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection findCandidateInterviews(CandidateInfo candidate) { if (candidate == null) throw new SystemException("Candidate was passed as NULL to method"); Collection interviews = null; Session session = ThreadProperties.getSession(); interviews = session.createQuery( "from Interview interview where (interview.person.id = ?) and" + " (interview.voided = 'F') order by interview.dateStart") .setLong(0, candidate.getPerson().getId().longValue()) .list(); return(interviews); } COM: <s> find all interviews for a candidate </s>
funcom_train/19080783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFinished() { this.isFinished = true; if (listeners != null) { synchronized (listeners) { for (MonitorListener listener : listeners) { listener.notifyChange(); } } // now we wait the acknowledge from the listeners try { while (true) { Thread.sleep(NOTIFICATION_PERIOD); synchronized (listeners) { if (listeners.isEmpty()) break; } } } catch (InterruptedException e) { // Ignore this error and terminate this thread } listeners = null; } } COM: <s> indicates this content is completely loaded </s>
funcom_train/14402125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initProfileInstance() { String keyProperty = iInstance.getProperty(REGISTERED_NAME_PROPERTY) .getValue().toString(); iKeys = new ArrayList<QueryTemplateKey>(); iKeys.add(new QueryTemplateKey(getCategory(), keyProperty)); iName = keyProperty + " [" + iInstance.getProperty(REGISTERED_VERSION_PROPERTY).getValue() .toString() + "]"; } COM: <s> sets the name and the keys of this profile or subprofile instance </s>
funcom_train/2666544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsDriver(ISQLDriver driver) { boolean result = false; for (Iterator<ISQLDriver> iter = _cache.getAllForClass(SQL_DRIVER_IMPL); iter.hasNext();) { ISQLDriver cachedDriver = iter.next(); if (cachedDriver.equals(driver)) { result = true; break; } } return result; } COM: <s> returns a boolean value indicating whether or not the specified driver </s>
funcom_train/4684497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enableAdvertising(boolean enable) { if (advertise != enable) { advertise = enable; if (enable) { if (state == IService.RUNNING && !RoutingPolicyManager.getInstance().isEndNode()) { advertizer = new RoutingNeighbor(lp, ourAddress); advertizer.start(); } } else { if (advertizer != null) { advertizer.stopThread(); advertizer = null; } } } } COM: <s> control if an advertising thread will be run </s>
funcom_train/49604238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean createRoad(LinkedList<Point> points, boolean createNodes, boolean addBuild) { Point start = points.getFirst(); start = points.getFirst(); for (Point p : points) { if (start.equals(p)) continue; createRoad(start, p, createNodes); if (addBuild) { // add this position an option for new areas AdjacencyMarker m1 = new AdjacencyMarker(start,p), m2 = new AdjacencyMarker(p,start); world.buildMarkers.add(m1); world.buildMarkers.add(m2); world.adjacentMarkers.add(m1); world.adjacentMarkers.add(m2); } start = p; } return true; } COM: <s> creates a road spanning the specified points createsnodes if needed and creates adjacencymarkers </s>
funcom_train/12166922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateElementOutputStateWithAtomicElement() { final boolean isElementAtomic = true; ElementOutputStateBuilderImpl builder = new ElementOutputStateBuilderImpl( context, parentOutputState, null, null, false, isElementAtomic); parentOutputState.expects.isSuppressing().returns(true); // Test with null container and layout. doTest(true, false, null, null, FormattingResult.SUPPRESS, builder); } COM: <s> make sure that if output state is calculated for atomic element and </s>
funcom_train/44162010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Field getField(String fieldid) { Field field = null; Collection col; try { col = prepareCollection(getReportName()); XMLResource document = (XMLResource)col.getResource(getReportName()); Document doc = makeDocument(document); field = this.queryMethods.makeFieldFromNode(doc, fieldid); if (col != null) { col.close(); } } catch (Exception e) { e.printStackTrace(); } return field; } COM: <s> get field gets field by id </s>
funcom_train/22359462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writePrices(Map<? extends ID, LuxuryPrice> map) throws IOException { if (map == null) return; Iterator<LuxuryPrice> i = map.values().iterator(); if (i.hasNext()) { write("PREISE"); newLine(); } while (i.hasNext()) { write(i.next()); } } COM: <s> write a region prices preise block to the underlying stream </s>
funcom_train/40852409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getJList() { if(jList == null) { jList = new JList(); jList.setModel(new ConfigListModel()); // jList.setBorder(new // LineBorder(MetalLookAndFeel.getControlShadow())); jList.setBorder(MetalBorders.getTextFieldBorder()); } return jList; } COM: <s> this method initializes j list </s>
funcom_train/48869028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToggleButton getGeneralizationButton() { if (generalizationButton == null) { generalizationButton = new JToggleButton("Generalization",new ImageIcon("resources/images/generalization.png")); generalizationButton.setToolTipText("Generalization"); group.add(generalizationButton); generalizationButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setSelectedButton(GENERALIZATION); } }); } return generalizationButton; } COM: <s> this method initializes generalization button </s>
funcom_train/10792051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node getNode(Join join, int idx) { if (_graph.size() <= idx) return null; Node node = (Node) _graph.get(idx); for (; node != null; node = node.next) if (node.join.equals(join)) return node; return null; } COM: <s> return the node for the specified join and index </s>
funcom_train/44704318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized protected void handleREJECTDatagram(FND_Datagram dgram) { byte d_r = dgram.getTransportControl()[0]; if (d_r == FND_Datagram.D_R_CMD || d_r == FND_Datagram.D_R_USM) { logger.warn("invalid REJECT datagram --> discarded"); } logger.warn("Last datagram has been REJECTed"); } COM: <s> this method handles reject datagrams </s>
funcom_train/1238338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void closePrintWriter(PrintWriter pw) { // If the output of this writer is wrapped within // another writer (JavaBeanWriter), then THAT // writer will close the PrintWriter, not this one. if (wrapperPW == null) { pw.close(); } } // closePrintWriter COM: <s> only close the print writer if the print writer belongs to </s>
funcom_train/20880886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getNodePath(Node node, String path) { // Check Node if (node != null && node.getNodeType() != node.DOCUMENT_NODE) { // Add Path path = "." + node.getNodeName() + path; // Recurse return getNodePath(node.getParentNode(), path); } else { // Return Path return path.substring(1); } } COM: <s> recurse a nodes parent tree to determine its resource path </s>
funcom_train/2369892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCards(final Player player, final List<Card> cardList) { synchronized (this) { List<Card> name2 = this.playerCards.get(player); if (name2 == null) { name2 = new ArrayList<Card>(); this.playerCards.put(player, name2); } name2.clear(); name2.addAll(cardList); this.fireChange(); } } COM: <s> sets the cards of the specified player </s>
funcom_train/2501310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override protected void setProperties(UIComponent component) { super.setProperties(component); if (all != null) component.getAttributes().put(ALL, all); if (hotKeys != null) component.getAttributes().put(HOTKEYS, hotKeys); if (browserBackButton != null) component.getAttributes().put(BROWSERBACKBUTTON, browserBackButton); } COM: <s> modify the properties of the component </s>
funcom_train/44839055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroy() { filterConfig.getServletContext().removeAttribute(Constants.CONFIG_KEY); try { securityConfig.domainManager.disconnect(); } catch (SecurityException x) { LogFactory.getLog(SecurityFilter.class).error("Error while disconnecting from DomainManager.", x); } securityConfig = null; } COM: <s> destroy method for this filter </s>
funcom_train/42201620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void main(String args[]) { if (args.length != 5){ System.err.println( "Usage: java Server [port number]" ); System.exit(1); } int port = Integer.parseInt(args[0]); System.out.println( "Wait while secure random numbers are initialized...." ); secureRandom = new SecureRandom(); secureRandom.nextInt(); System.out.println( "Done." ); new Server(port, args[1],args[2],args[3],args[4]); } COM: <s> create and start a server </s>
funcom_train/4932668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuBar getMenu() { if (getEulerMenuBar() == null || toolBar.getComponentCount() == 0) { // PENDING maybe do that in ProjectGUI_Updater.projectLoaded() setEulerMenuBar(new JMenuBar()); addMenus(); } return getEulerMenuBar(); } COM: <s> lazily build the menu bar and the toolbar </s>
funcom_train/7621428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFactory(Factory factory) { if (mFactorySet) { throw new IllegalStateException("A factory has already been set on this LayoutInflater"); } if (factory == null) { throw new NullPointerException("Given factory can not be null"); } mFactorySet = true; if (mFactory == null) { mFactory = factory; } else { mFactory = new FactoryMerger(factory, mFactory); } } COM: <s> attach a custom factory interface for creating views while using </s>
funcom_train/28339979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double norm2() { this.setElem(PhaseIndexHom.HOM, PhaseIndexHom.HOM, 0.0); double dblNorm = this.getMatrix().norm2(); this.setElem(PhaseIndexHom.HOM, PhaseIndexHom.HOM, 1.0); return dblNorm; }; COM: <s> return the l 2 norm of this matrix which is the maximum </s>
funcom_train/48151346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { super.reset(); JTextArea recordTable = getRecordTable(); for (int i = 0; i < n; i++) recordTable.append("\tY" + (i + 1) + "\tZ" + (i + 1)); deck.showCards(n, false); } COM: <s> reset the experiment </s>
funcom_train/3270965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleDestinationBrowseButtonPressed() { DirectoryDialog dialog = new DirectoryDialog(getContainer().getShell(), SWT.SAVE); dialog.setMessage(SELECT_DESTINATION_MESSAGE); dialog.setText(SELECT_DESTINATION_TITLE); dialog.setFilterPath(getDestinationValue()); String selectedDirectoryName = dialog.open(); if (selectedDirectoryName != null) { setDestinationValue(selectedDirectoryName); } } COM: <s> open an appropriate destination browser so that the user can specify a source </s>
funcom_train/10978029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGet() throws Exception { // Positive tests assertEquals("This is foo", (String) map.get("foo")); assertEquals("And this is bar", (String) map.get("bar")); assertEquals("We also have baz", (String) map.get("baz")); // Negative tests assertNull(map.get("bop")); } COM: <s> p test the code get code method </s>
funcom_train/44876166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addReverseDependencies(ClassDetail detail) { ClassDescription[] dependsOn = detail.getDependsOnClasses(); for (int i=0; i<dependsOn.length; i++) { Set referredToBy = getReferredToByCache(dependsOn[i].toString()); referredToBy.add(detail.getDescription()); } } COM: <s> internal method that adds this class to the list of classes </s>
funcom_train/20825309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeShow(final File file) { try { ShowWriter writer = new ShowWriter(file.getAbsolutePath()); writer.write(context.getShow()); setFrameTitle(file.getName()); } catch (ShowFileException e) { showFileOpenError(e); } } COM: <s> write show information to given file </s>
funcom_train/49654396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Object obj1, Object obj2) { EventScore a = (EventScore) obj1; EventScore b = (EventScore) obj2; Match m = MatchManager.getInstance().getMatch(matchName); int compare = m.getEvent(a).getName().compareTo(m.getEvent(b).getName()); if (!ascending) { compare *= -1; } return compare; } COM: <s> override compare so that event scores can be sorted by name </s>
funcom_train/44286936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addItemNoDup(String code, String label) { ComboItem item; int size = getItemCount(); for (int i = 0; i < size; i++) { item = (ComboItem)getItemAt(i); if (item.code.equals(code)) return; } addItem(new ComboItem(code, label)); } COM: <s> add an item code and label with no duplicate </s>
funcom_train/12083588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void WriteToFile(StringBuffer output, String filepath) { BufferedWriter bw=null; try { bw = new BufferedWriter(new FileWriter(filepath,true)); bw.write(output.toString()); } catch (Exception e) { logger.error(e.toString(),e); e.printStackTrace(); } finally { if(bw!=null) { try { bw.close(); } catch (IOException e) { logger.error(e.toString(),e); } } } } COM: <s> write output string to file </s>
funcom_train/46281693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeContents(List<Content> contentList) throws OmmsIndexerException { try { for (Content content : contentList) { Term term = new Term(IDX_FIELD, content.getId().toString()); indexWriter().deleteDocuments(term); } indexWriter().commit(); m_idxDirty = true; } catch (IOException e) { e.printStackTrace(); throw new OmmsIndexerException(ErrorCondition.internal_server_error , e.getMessage()); } } COM: <s> removes all given contents from the index </s>
funcom_train/29711426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DialogField getDialogField(String attrName) { initialize(); for (int i = 0, size = _dialogFields.size(); i < size; i++) { DialogField field = (DialogField) _dialogFields.get(i); IAttributeDescriptor attr = this.getAttributeDescriptor(field); if (attr != null && attr.getAttributeName().equals(attrName)) { return field; } } return null; } COM: <s> get the dialogfield for the corresponding attribute </s>
funcom_train/4461702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doubleClick(MouseEvent e, int colIndex, int rowIndex) { int col = colIndex - FIRST_COLUMN_CONTAINING_CHARSET; int row = rowIndex; if(distances.length < col) // out of range return; if(distances[col].length < row) return; double d = distances[col][row]; if(d >= 0) { // proper super.doubleClick(e, colIndex, rowIndex); } else ; // ignore } COM: <s> dont accept double clicks on invalid distances </s>
funcom_train/48588142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CalendarEventEntry createQuickAddEvent(String quickAddContent, Person author, String domainName, String calendarId) throws ServiceException, IOException, Exception { return createEvent(null, quickAddContent, author, null, true, null, domainName, calendarId); } COM: <s> creates a quick add event </s>
funcom_train/16771910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void exampleAccesAndIterate(MatchResult inputMatch) { for (MatchResult row : inputMatch.get("button-row")) { int buttonCount = 0; for (@SuppressWarnings("unused")MatchResult button : row.get("button")) { System.out.print("B(" + (buttonCount++) + ")\t"); } System.out.println(); } } COM: <s> example method illustrating how to iterate through the children of a match result </s>
funcom_train/24121372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputStream out) throws IOException { int size = this.getSize(); WMFConstants.writeLittleEndian(out, size); WMFConstants.writeLittleEndian(out, width); WMFConstants.writeLittleEndian(out, height); WMFConstants.writeLittleEndian(out, planes); WMFConstants.writeLittleEndian(out, bitCount); } COM: <s> writes the bitmap core header object to a stream </s>
funcom_train/48581948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdTotal() { if (cmdTotal == null) {//GEN-END:|558-getter|0|558-preInit // write pre-init user code here cmdTotal = new Command("Total", Command.ITEM, 0);//GEN-LINE:|558-getter|1|558-postInit // write post-init user code here }//GEN-BEGIN:|558-getter|2| return cmdTotal; } COM: <s> returns an initiliazed instance of cmd total component </s>
funcom_train/31651663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResourceSet getResourceSet(String collId, XMLResource resource, String xpath) throws java.lang.Exception{ org.xmldb.api.base.Collection collection = getCollection( collId ); XPathQueryService xpathService = (XPathQueryService)collection.getService("XPathQueryService", "1.0"); ResourceSet rs = xpathService.queryResource(resource.getId( ), xpath); return rs; } COM: <s> query a resource for a resource set </s>
funcom_train/28426903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Any_RSA_PKCS1Signature (String mdAlgorithm) { super(mdAlgorithm + "/RSA/PKCS#1"); try { md = MessageDigest.getInstance(mdAlgorithm); } catch (Exception e) { throw new CryptixException(getAlgorithm() + ": Unable to instantiate the " + mdAlgorithm + " MessageDigest\n" + e); } } COM: <s> constructor for an any rsa pkcs1 signature </s>
funcom_train/12181809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWithDuplicates() throws Exception { DuplicateNameValidator validator = new DuplicateNameValidator(); String names[] = {"B", "B", "D", "D", "A", "A", "PC1", "PC2"}; Element root = createDOM(names); validator.validate(root, ERROR_REPORTER); verifyValidationResult(getExpectedDuplicates()); } COM: <s> check that validation works with duplicates </s>
funcom_train/18111918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPostCodePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ContactDetails_PostCode_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ContactDetails_PostCode_feature", "_UI_ContactDetails_type"), BioDBPackage.Literals.CONTACT_DETAILS__POST_CODE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the post code feature </s>
funcom_train/31477116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean keyEvent(java.awt.event.KeyEvent e, int type) { int keyCode = e.getKeyCode(); if (isEditable()) { switch (type) { case KEY_PRESSED: super.keyEvent(e, type); if (keyCode == KeyEvent.VK_ENTER) fireTextEvent(); break; case KEY_TYPED: if ((getFont().getWidth(getText()) + getFont().getWidth("M")) < getWidth()) super.keyEvent(e, type); break; } return true; } return false; } COM: <s> handles return and fires text event if this field is editable </s>
funcom_train/4717577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBaseCents() { SynMessage msg = new SYN().synth(1).tuning(10).cents(); assertEquals("/SYN/ID1/TUNING", msg.getAddress()); assertEquals("FFi", msg.getTypetag()); assertEquals(new Integer(163840), msg.getArguments()[2]); } COM: <s> base frequency in cents </s>
funcom_train/23354098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateTemplateFromReaction(Reaction reaction) { if (reaction != null) { /** set a temporary negative Id to the template reaction */ long tempId = -System.currentTimeMillis(); LOGGER.debug("Creating new reaction template with temporary ID " + tempId); reaction.setId(tempId); /** reinitialize to default values */ if (!reaction.getDirection().equals(Direction.UN)) reaction.setDirection(Direction.UN); reaction.setUnId(null); reaction.setParents(null); reaction.setStatus(Status.NO); reaction.setXrefs(null); reaction.setDataComment(""); reaction.setReactionComment(""); } } COM: <s> anonymyzes a reaction </s>
funcom_train/42877206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getDiscSpaceFree() { logger.entering("de.axelwernicke.mypod.ipod.IPod", "getDiscSpaceFree"); long free = -1; free = FileUtils.getSpaceLeft(getIPodPath()); logger.exiting("de.axelwernicke.mypod.ipod.IPod", "getDiscSpaceFree"); return free; } COM: <s> getter for property disc space free </s>
funcom_train/42440697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MidiclipseConsole getConsole() { if (mConsole == null) { // Create Console try { mConsole = new MidiclipseConsole(); } catch (RuntimeException re) { // Don't let the console bring down the MIDIclipse UI IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, 0, "Errors occurred starting the MIDIclipse Console", re); log(status); mConsole = null; } } return mConsole; } COM: <s> gets the one and only midiclipse console managed by this plugin </s>
funcom_train/44869432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WCMDrawGeometricBean getPointOnL() { if (pointOnL == null) { pointOnL = new WCMDrawGeometricBean(); pointOnL.setShape(10); pointOnL.setFillColor(Color.black); pointOnL.setColor(Color.black); pointOnL.setX1(getXInput()); pointOnL.setY1(getLofX()); pointOnL.setV(3); pointOnL.setH(3); if (presentation) { pointOnL.setV(5); pointOnL.setH(5); pointOnL.setLineWidth(3); } } return pointOnL; } COM: <s> this method initializes point on l </s>
funcom_train/22563067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean associateGoal(final List<IGoal> goals, final IGoal activeGoal) { active = false; this.goal = null; for (IGoal goal : goals) { try { if (isGoalForProfile(goal)) { this.goal = goal; active = goal.equals(activeGoal); selected = active; break; } } catch (Exception e) { PortletUtils.handleError(LOG, e); } } return active; } COM: <s> finds the associated goal from the passed list of goals </s>
funcom_train/23267878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetFechaCobranza() { System.out.println("setFechaCobranza"); String fechaCobranza = ""; Giros instance = new Giros(); instance.setFechaCobranza(fechaCobranza); // 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 fecha cobranza method of class capa negocios </s>
funcom_train/35970355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReg(int addr, int vlaue) { if (addr >= 0x800000) { this.mpua23.setPinState(true); System.out.println("GPIO ON"); } else this.mpua23.setPinState(false); rawJEM.set((int) (M365_Base + (addr * 2)), vlaue); log.debug("g336xwrite:"+ Integer.toHexString(addr)+" : "+ Integer.toHexString(vlaue)); } COM: <s> write data to g3365 register </s>
funcom_train/5445068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void finalize() throws Throwable { try { // make sure the socket is disconnected before leaving if (getSocketState() == SOCKET_CONNECTED) getSocket().close(); } catch (IOException e) { ErrorLog.out("Could not close socket: " + e); } finally { super.finalize(); } } COM: <s> do cleanup before an instance of this class is garbage collected </s>
funcom_train/10769240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(String prefix, String uri) { if (uri == null) uri = ""; if (prefix == null) prefix = ""; if (__log.isTraceEnabled()) { __log.trace("register(prefix=" + prefix + ", uri=" + uri + ")"); } _prefixToUriMap.put(prefix, uri); } COM: <s> add a prefix to uri mapping to this context </s>
funcom_train/34503147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { this.shellServerThread = Thread.currentThread(); // accept incoming connections and invoke shells while (true) { Socket sock; try { sock = servSock.accept(); } catch (IOException e) { System.out.println("Halt."); break; } // instantiate a shell Shell<T> sh = null; try { sh = new Shell<T>(sock, this, this.commandTable, this.commandList, this.appDepData); } catch (Exception e) { continue; } Thread t = new Thread(sh); t.setName("A Shell"); t.setDaemon(false); t.start(); } } COM: <s> this shell server instance starts accepting incoming connections </s>
funcom_train/50875438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void beginTransaction() throws DAOException { if (transaction==null) { try { transaction = session.beginTransaction(); externalTransaction = true; } catch (HibernateException he) { transaction = null; externalTransaction = false; throw new DAOException("Error starting the transaction",he); } } log.debug(".beginTransaction - Start a new transaction in this Processor."); } COM: <s> start a new hibernate transaction </s>
funcom_train/37596888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetOpenJavadocDialogPosition() { initOpenJavadocDialog(); _openJavadocDialog.setFrameState("default"); if (DrJava.getConfig().getSetting(DIALOG_OPENJAVADOC_STORE_POSITION).booleanValue()) { DrJava.getConfig().setSetting(DIALOG_OPENJAVADOC_STATE, "default"); } } COM: <s> reset the position of the open javadoc dialog </s>
funcom_train/18793003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AlloyExpr visitForallPred(ForallPred allPred) { Pair<List<ExprVar>, AlloyExpr> decls = processQuantPredDecls(allPred); AlloyExpr pred = processQuantPred(allPred, false, decls.getSecond()); return pred.forAll((decls.getFirst())); } COM: <s> uses visit to recurisvely translate variables and predicates </s>
funcom_train/9941497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object getPreAuthenticatedPrincipal(HttpServletRequest request) { if (!enable) return null; String o = (String)(super.getPreAuthenticatedPrincipal(request)); if (o != null && !o.equals("")) { if (!userDetailsManager.userExists(o)) { loginHandler.newUserLogin(o, request); } else { // Update user loginHandler.existingUserLogin(o, request); } } return o; } COM: <s> this is called when a request is made the returned object identifies the </s>
funcom_train/22354937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showDialog() { replacerMap = magellan.library.utils.replacers.ReplacerHelp.getDefaultReplacerFactory(); if (rList == null) { rList = new LinkedList<String>(); } rList.clear(); rList.addAll(replacerMap.getReplacers()); Collections.sort(rList); list.setListData(rList.toArray()); super.setVisible(true); } COM: <s> initializes the dialog from </s>
funcom_train/36959083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void restoreRemovedWorkingSets() { IWorkingSetManager manager= PlatformUI.getWorkbench().getWorkingSetManager(); Iterator iterator= fRemovedWorkingSets.iterator(); while (iterator.hasNext()) { manager.addWorkingSet(((IWorkingSet)iterator.next())); } iterator= fRemovedMRUWorkingSets.iterator(); while (iterator.hasNext()) { manager.addRecentWorkingSet(((IWorkingSet)iterator.next())); } } COM: <s> adds back removed working sets to the working set manager </s>
funcom_train/48792550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String make_a_string(int x, int y) { int len; /* len of string */ int i; String str = ""; if (x == y) { len = x; } else { len = random(x, y); } for (i = 0; i < len; i++) { int j = random(0, 61); str = str + alpha.substring(j, j + 1); } return (str); } COM: <s> method make a string </s>