__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/50299584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSavepointRelease() throws Exception { connection.setAutoCommit(false); Savepoint svpt1 = connection.setSavepoint("test"); connection.releaseSavepoint(svpt1); checkInvalidSavepoint(svpt1); Savepoint svpt2 = connection.setSavepoint(); connection.releaseSavepoint(svpt2); checkInvalidSavepoint(svpt2); Savepoint svpt3 = connection.setSavepoint(); connection.commit(); checkInvalidSavepoint(svpt3); } COM: <s> test if savepoints are released correctly </s>
funcom_train/48406741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addApplicableMetaClassPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Kind_applicableMetaClass_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Kind_applicableMetaClass_feature", "_UI_Kind_type"), SpemxtcompletePackage.eINSTANCE.getKind_ApplicableMetaClass(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the applicable meta class feature </s>
funcom_train/32749426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PhaseMap transferMap(IProbe probe, double dblLen) throws ModelException { double s = dblLen; PhaseMatrix A = this.m_matGen; PhaseMatrix M = PhaseMatrix.identity(); M.plusEquals( A.times(s) ); M.plusEquals( A.times(A.times(0.5*s*s)) ); return new PhaseMap( M ); } COM: <s> returns the transfer map produced by the generator matrix over the </s>
funcom_train/7537315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object call(String method, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) throws XMLRPCException { Object[] params = { p0, p1, p2, p3, p4, p5, p6, }; return callEx(method, params); } COM: <s> convenience method call with seven parameters </s>
funcom_train/1482429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeByte(byte b) { assert slice != null; if (slice[upto] != 0) { upto = pool.allocSlice(slice, upto); slice = pool.buffer; offset0 = pool.byteOffset; assert slice != null; } slice[upto++] = b; assert upto != slice.length; } COM: <s> write byte into byte slice stream </s>
funcom_train/10950118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BigDecimal getTotalSalesTax() { BigDecimal totalTax = ZERO; for (int i = 0; i < shipInfo.size(); i++) { CartShipInfo csi = this.getShipInfo(i); totalTax = totalTax.add(csi.getTotalTax(this)).setScale(taxCalcScale, taxRounding); } return totalTax.setScale(taxFinalScale, taxRounding); } COM: <s> returns the tax amount from the cart object </s>
funcom_train/42905456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean check(VerificationReport report,ConditionVerifier validator) { boolean result = true; for (AbstractCondition p:this.constraints) result = result && p.check(report,validator); if (result) report.log(this,VerificationResult.SUCCESS); else report.log(this,VerificationResult.FAILURE,"some parts of this condition are not satisfied"); return result; } COM: <s> check this contract using a validator </s>
funcom_train/32362632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processUnhandledException(Event event, ISubscriber subscriber, Throwable x) { for (Iterator i = event.getEventQueue().getExceptionHandlers().iterator(); i.hasNext();) { IEventQueueExceptionHandler handler = (IEventQueueExceptionHandler) i.next(); try { handler.process(event, subscriber, x); } catch (Throwable t) { } } } COM: <s> notifies exception handlers about specified exception </s>
funcom_train/34105118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeRedundantNeighbors() { for (Vertex v : vertices) { Set<Vertex> leftV = left.get(v); Set<Vertex> rightV = right.get(v); for (Vertex u : leftV) { Set<Vertex> rightU = right.get(u); rightU.removeAll(rightV); } for (Vertex u : rightV) { Set<Vertex> leftU = left.get(u); leftU.removeAll(leftV); } } } COM: <s> removes neighbours that can be implied by other relationships </s>
funcom_train/48494600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCharts(ArrayList<InterfaceAnnotation> annotations) { // Remove old nodes removeChildren(interfaceNode, "charts"); removeChildren(interfaceNode, "chart"); // Create new nodes for (InterfaceAnnotation annotation : annotations) { Node tmp = annotation.toNode(doc); if (tmp != null) { String location = getStringValue(tmp, "name", "Chart"); addAttr(doc, tmp, "location", location); interfaceNode.appendChild(tmp); } } } COM: <s> adds charts to the document </s>
funcom_train/42874294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findEndRowIndex(int row) { int endRow; if (row == 0) { endRow = getPageSize() - 1; } else { endRow = (readShort(((getRowCountOffset() + 2) + (row - 1) * 2)) & 0x0fff) - 1; } return endRow; } COM: <s> search the previous row start values for the first non deleted </s>
funcom_train/39911095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSave() throws Exception { System.out.println("save"); // employee_client e = null; Employee_clientdao instance = new Employee_clientdao(); instance.save(e); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of save method of class dao </s>
funcom_train/3560969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int setSqlValues(PreparedStatement stmt, int i) throws DbException, SQLException { if (selector == null) { Iterator it = fromList.iterator(); Iterator intoit = intoList.iterator(); while (it.hasNext()) { DbSelector.setSqlValue(stmt, i++, it.next(), (DbColumn) intoit.next()); } } else { selector.setSqlValues(stmt, 1, intoList); } return i; } COM: <s> puts data into a prepared statement </s>
funcom_train/27929455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean vectorFind(Vector vec, String find) { for (int i = 0; i < vec.size(); i++) { Vector seek = (Vector) vec.get(i); String text; text = (String) seek.get(0); if (text.toLowerCase().indexOf(find) >= 0) { return true; } text = (String) seek.get(1); if (text.toLowerCase().indexOf(find) >= 0) { return true; } } return false; } COM: <s> trys to find a string in a vector </s>
funcom_train/35248812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOf(Object o) { checkArgument(o); int cnt = 0; for (Object anOriginalList : this.originalList) { if (clazz.isInstance(anOriginalList)) { if (o.equals(anOriginalList)) { return cnt; } cnt++; } } return -1; } COM: <s> get the index of sublist using a given object </s>
funcom_train/49627795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void computeStats() { StringBuilder wfString = new StringBuilder(this.text); for (String k : this.keywords) { wfString.append(' ').append(k); } if (this.title != null) { wfString.append(' ').append(this.title); } Map<String, Integer> wf = computeWordFrequency(wfString.toString()); this.wordFrequencies = wf; this.numWords = computeNumberOfWords(wfString.toString()); this.uniqueWords = computeUniqueWords(wf); } COM: <s> builds the basic stats data </s>
funcom_train/39062376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createCreationTimeArea(Composite parent) { Font font = parent.getFont(); Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2; composite.setLayout(layout); Label label = new Label(composite, SWT.NONE); label.setText(TaskListMessages.getString("TaskProp.creationTime")); //$NON-NLS-1$ label.setFont(font); creationTime = new Label(composite, SWT.NONE); creationTime.setFont(font); } COM: <s> method create creation time area </s>
funcom_train/36124488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPropertyByName(String property) { if (property.equals(PreferenceConstants.PROPERTY_TITLE)) return this.title; if (property.equals(PreferenceConstants.PROPERTY_PROJECT)) return this.project; if (property.equals(PreferenceConstants.PROPERTY_AREA)) return this.area; if (property.equals(PreferenceConstants.PROPERTY_STATUS)) return this.status; if (property.equals(PreferenceConstants.PROPERTY_ASSIGNED_TO)) return this.assignedTo; if (property.equals(PreferenceConstants.PROPERTY_CATEGORY)) return this.category; if (property.equals(PreferenceConstants.PROPERTY_FIX_FOR)) return this.fixFor; if (property.equals(PreferenceConstants.PROPERTY_PRIORITY)) return this.priority; return ""; //$NON-NLS-1$ } COM: <s> gets a property of the case by name </s>
funcom_train/24442602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public MappingCell createIdentityMappingCell(Integer id, Integer mappingId, Integer input, Integer output, String author, Date modificationDate, String notes) { return new MappingCell(id, mappingId, new MappingCellInput[]{new MappingCellInput(input)}, output, 1.0, IDENTIFY_FUNCTION, author, modificationDate, notes); } COM: <s> constructs an identity mapping cell </s>
funcom_train/10589409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validate() { if (!getCombinedState().isValidatingValues()) { this.wasValid = true; return true; } // Validate children first, then always validate self. Return combined result. final boolean valid = widgets.validate(); this.wasValid = super.validate() && valid; return this.wasValid; } COM: <s> delegates the code validate code down to the contained child widgets </s>
funcom_train/51337148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_negativeByteValues() throws UnsupportedEncodingException { if(isFixedLength()) return; final byte[][] a = new byte[1][]; a[0] = new byte[] { 64, -64 }; if (rabaCoder.isKeyCoder()) { doRoundTripTest(rabaCoder, new ReadOnlyKeysRaba(a)); } if (rabaCoder.isValueCoder()) { doRoundTripTest(rabaCoder, new ReadOnlyValuesRaba(a)); } } COM: <s> test with byte values which are negative values when interpreted as as </s>
funcom_train/33477199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setValue(byte[] args) throws InvalidArgumentsException { if (args.length < 2) { throw new InvalidArgumentsException( "Too few arguments given to SET_VALUE on " + getType()); } else if (args.length > 2) { throw new InvalidArgumentsException( "Too many arguments given to SET_VALUE on " + getType()); } byte highByte = args[0]; byte lowByte = args[1]; setValue(((highByte & 0xFF) << 8) + (lowByte & 0xFF)); } COM: <s> sets the raw value of this adc </s>
funcom_train/46736960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUpdateUserRef(DisplayModel updateUserRef) { if (Converter.isDifferent(this.updateUserRef, updateUserRef)) { DisplayModel oldupdateUserRef= new DisplayModel(this); oldupdateUserRef.copyAllFrom(this.updateUserRef); this.updateUserRef.copyAllFrom(updateUserRef); setModified("updateUserRef"); firePropertyChange(String.valueOf(TERMDETAILS_UPDATEUSERREFID), oldupdateUserRef, updateUserRef); } } COM: <s> date the term detail was last updated </s>
funcom_train/10237810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeToDatabase(String fileFormat, String fileName, String userName, String description){ this.fileName = fileName; //this.fileNameWithExt = fileName+"."+fileFormat; this.fileNameWithExt = fileName+".zip"; this.userName = userName; this.description = description; connect(fileFormat, "uFile"); } COM: <s> upload the file to database </s>
funcom_train/4509560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeOwner(JID jid) { // Get the current affiliation of the specified JID NodeAffiliate affiliate = getAffiliate(jid); if (affiliate.getSubscriptions().isEmpty()) { removeAffiliation(jid, NodeAffiliate.Affiliation.owner); removeSubscriptions(jid); } else { // The user has subscriptions so change affiliation to NONE addNoneAffiliation(jid); } } COM: <s> removes the owner affiliation of the specified entity jid </s>
funcom_train/43235442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printPosition() { System.err.println("positionEnd: " + positionEnd); for (int i = 0; i < positionEnd; i++) { System.err.format("position[%d].key=%c nextPosition=%d\n", i, Code .toCompatibilityJamo(position[i].key), position[i].nextPosition); } } COM: <s> it prints the segment position information to the console </s>
funcom_train/10912990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void deactivateNode(KnuthNode node, int line) { // Deactivate node... if (log.isTraceEnabled()) { log.trace("Removing " + node); } removeNode(line, node); // ... and remember it, if it was a good candidate lastDeactivated = compareNodes(lastDeactivated, node); } COM: <s> deactivate the given node </s>
funcom_train/9791909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector getLastNTurnsProduced(String name, int numberOfTurns) { Conversant c2 = getConversant(name); Vector vAllTurnsProduced = c2.getTurnsProduced(); Vector v = new Vector(); for (int i = vAllTurnsProduced.size() - 1 - numberOfTurns; i < vAllTurnsProduced .size(); i++) { v.addElement(vAllTurnsProduced.elementAt(i)); } return v; } COM: <s> returns the last n turns produced by a conersant </s>
funcom_train/20336335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void retrieveCinemas() { NameValuePair territory = new BasicNameValuePair(CineworldAPIAssistant.TERRITORY, this.settings.getString( Settings.SETTING_TERRITORY, "GB")); NameValuePair full = new BasicNameValuePair(CineworldAPIAssistant.FULL, "true"); NameValuePair key = new BasicNameValuePair(CineworldAPIAssistant.KEY, getString(R.string.cineworld_api_key)); new RetrieveCinemasTask(this, ActivityCallback.NO_REF, this).execute(territory, full, key); } COM: <s> retrieve the cinemas from the cineworld api </s>
funcom_train/22277295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveBy(int x, int y) { int i; Object nextComponent; i = rootComponents().count(); while(--i >= 0) { nextComponent = rootComponents().elementAt(i); if(nextComponent instanceof View && constructorComponentWasView(nextComponent)) { ((View)nextComponent).moveBy(x, y); } } } COM: <s> sends move by x y to all the root components that are views </s>
funcom_train/7866785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateTextField() { txtMascot.setText(MatConfig.getInstance().getGeneralProperty("DEFAULT_MASCOT_ALPHA")); txtOMSSA.setText(MatConfig.getInstance().getGeneralProperty("DEFAULT_OMSSA_EVALUE")); txtXTandem.setText(MatConfig.getInstance().getGeneralProperty("DEFAULT_XTANDEM_EVALUE")); } COM: <s> update the confidence textfield with the current value in the mat config </s>
funcom_train/10531532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File getExpectedWarningsOrErrorsFile(File outputDir, String expectedDirName) { String filename = TestPropertyMgr.PREFIX_WARNINGS_OR_ERRORS + TestPropertyMgr.EXT_EXPECTED; File file = new File(outputDir, expectedDirName + File.separatorChar + filename); if (LOGGER.isDebugEnabled()) { LOGGER.debug("EXPECTED_OUTPUT_FILE:" + file.getPath()); } return file; } COM: <s> get the expected warnings or errors file </s>
funcom_train/18071961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doMenuItemSelectLevel(ActionEvent e) { SelectLevelDialog dlg = new SelectLevelDialog(parent, parent.getModel().getMapData().getLevels()); dlg.setVisible(true); if(!dlg.isVisible()){ int index = dlg.getSelectedIndex(); if(index >= 0 && index < parent.getModel().getMapData().getNumLevels()){ parent.loadLevel(index); } } } COM: <s> call when select other level </s>
funcom_train/14417923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(BufferedReader fin) throws IOException { StreamTokenizer t = new StreamTokenizer(fin); for (int j = 0; j < sizeM; j++) for (int i = 0; i <= j; i++) { if (t.nextToken() != StreamTokenizer.TT_NUMBER) throw new IOException("Malformed input file"); setItem(i, j, t.nval); } // Scip the EOL that remains AFTER the last token is read fin.readLine(); } COM: <s> loads the matrix from a text stream </s>
funcom_train/4780141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTree getAccessRulesTree() { if (accessRulesTree == null) { accessRulesTree = new JTree(new DefaultMutableTreeNode(ResourceUtil.getString("application.server"))); accessRulesTree.addTreeSelectionListener(treeSelectionListener); accessRulesTree.setShowsRootHandles(true); accessRulesTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); accessRulesTree.setCellRenderer(new MyTreeCellRenderer()); accessRulesTree.setExpandsSelectedPaths(true); } return accessRulesTree; } COM: <s> this method initializes access rules tree </s>
funcom_train/3873725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startNetworkThread() { // stupid! this won't call OUR processMessages()! //client.startNetworkThread(); // // need our OWN thread! if (networkThread == null) { networkThread = new Thread(this, "org.freemmg.impl.ClientImpl.networkThread"); networkThread.start(); } } COM: <s> create thread that will keep processing the pending messages until </s>
funcom_train/49462883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean extract(LocalFileState inFile, FileProbeContainer fpc, List<FileState> newFiles) throws Exception { if (command == null) { return extractJava(inFile, fpc, newFiles); } else { return extractExternal(inFile, fpc, newFiles); } } COM: <s> extract files from the zip file </s>
funcom_train/9480711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEntityReferenceSetTextContent() throws TransformerException { document = builder.newDocument(); Element root = document.createElement("menu"); document.appendChild(root); EntityReference entityReference = document.createEntityReference("sp"); root.appendChild(entityReference); try { entityReference.setTextContent("Lite Syrup"); fail(); } catch (DOMException e) { } } COM: <s> tests set text content on entity references </s>
funcom_train/19656449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAll(Collection<Subtitle> items){ if(items.size() != 0){ int firstRow = subs.size(); subs.addAll(items); // for(Subtitle subtitle:items){ // subtitle.addPropertyChangeListener(this); // } this.fireTableRowsInserted(firstRow, firstRow+items.size()-1); } } COM: <s> adds all movies </s>
funcom_train/1775916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateWater(double precipitation, double saturationPrcp, double et){ double _pore = 1; if(waterLevel < this.bottomElevation) _pore = 0.3; double _waterLevel = 0; if(precipitation > saturationPrcp){ _waterLevel = 0.01 * precipitation / _pore * (this.getArea() / 100000) - et * 0.001; } else{ _waterLevel = 0.01 * precipitation / _pore - et * 0.001; } this.waterLevel = waterLevel + _waterLevel; } COM: <s> generate water in the catchment </s>
funcom_train/5374932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean forward() { checkWidget(); if (!forward) return false; /* int[] rgdispid = auto.getIDsOfNames(new String[] { "GoForward" }); //$NON-NLS-1$ Variant pVarResult = auto.invoke(rgdispid[0]); return pVarResult != null && pVarResult.getType() == OLE.VT_EMPTY; */ if (browserHandle != null && browserHandle.contentWindow != null) { try { browserHandle.contentWindow.history.forward(); return true; } catch (Error e) { return false; } } return false; } COM: <s> navigate to the next session history item </s>
funcom_train/23636071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPeriodStartPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Period_periodStart_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Period_periodStart_feature", "_UI_Period_type"), CescsmodelPackage.Literals.PERIOD__PERIOD_START, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the period start feature </s>
funcom_train/19036225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { this.titleLabel.setText(TITLE_PREFIX); this.summaryLabel.setText(SUMMARY_PREFIX); this.createDateLabel.setText(CREATE_DATE_PREFIX); this.memberNameLabel.setText(MEMBER_PREFIX); this.webLinkLabel.setText(WEB_LINK_PREFIX); this.postTextArea.setText(""); } COM: <s> clears out all the data from the current post </s>
funcom_train/40443722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean epsilonEquals(GMatrix m1, double epsilon) { int i, j; double diff; if (nRow != m1.nRow || nCol != m1.nCol) return false; for (i = 0; i < nRow; i++) { for (j = 0; j < nCol; j++) { diff = values[i][j] - m1.values[i][j]; if ((diff < 0 ? -diff : diff) > epsilon) return false; } } return true; } COM: <s> returns true if the l infinite distance between this matrix and matrix m1 </s>
funcom_train/32870452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connectionTest() { if (moJabberComm.sendRawXML(" ") != Constants.SEND_SUCCEEDED) { System.out.println("sendRawXML for connectionTest() failed"); testConnect.testing(false); logOff(); logonUser( jidMe.getUsername(), txtPassword ); } } COM: <s> test connection with jabber server </s>
funcom_train/14598659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() throws Exception { in = new BufferedReader(new InputStreamReader(System.in)); String line; System.err.print(">"); while ((line = in.readLine()) != null) { if (processCommand(line)) { break; } System.err.print(">"); } } COM: <s> starts the command reader </s>
funcom_train/18513383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(TreeSelectionEvent e) { // gets the path where the selection changed TreePath path = e.getPath(); // gets the corresponding treenode XmlTreeNode treeNode = (XmlTreeNode) path.getLastPathComponent(); // gets the corresponding node TreeElement node = treeNode.getNode(); // updates the editorpane editorPane.displayNode(node); } COM: <s> called when the selection changes </s>
funcom_train/18965668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(BitSet other) { int idx = Math.min(myNumWords, other.getNumWords()); long[] thisArr = myBits; long[] otherArr = other.getBits(); while (--idx >= 0) { thisArr[idx] &= ~otherArr[idx]; } } COM: <s> remove all elements set in other </s>
funcom_train/49464065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dropTempIndexes() throws Exception{ Db db = getDb(); try { db.enter(); _logger.info("Dropping indexes of temporary table"); for (String index : tempIndex) { if ( ! opsIndex("DROP INDEX IF EXISTS "+index)) _logger.warn("Failed to drop temporary index ("+index+")"); } _logger.debug("Indexes removed"); } finally { db.exit(); } } COM: <s> drops the temporaty indexes </s>
funcom_train/21612533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testContentHTML() throws InterpreterException { String program = " Get('http://www.bbc.co.uk/', List() ), Content($);"; Value result = interpreter.process( program ); System.out.println("Result: " + result); checkResult("HTML", result); } COM: <s> tests i content i operation </s>
funcom_train/4479740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visit(FieldDeclaration n, A argu) { n.f0.accept(this, argu); n.f1.accept(this, argu); n.f2.accept(this, argu); n.f3.accept(this, argu); n.f4.accept(this, argu); } COM: <s> f0 public protected private static final transient volatile </s>
funcom_train/4358520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSessionLastAccessedCol(String sessionLastAccessedCol) { String oldSessionLastAccessedCol = this.sessionLastAccessedCol; this.sessionLastAccessedCol = sessionLastAccessedCol; support.firePropertyChange("sessionLastAccessedCol", oldSessionLastAccessedCol, this.sessionLastAccessedCol); } COM: <s> set the last accessed column for the table </s>
funcom_train/21719690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getItem(int id, String itemType) { Transaction tx = null; List items = null; Session session = HibernateSessionFactory.getSession(); try { tx = session.beginTransaction(); items = session.createQuery( "from vr." + itemType + " as item where item.id='" + id + "'").list(); session.flush(); tx.commit(); } catch (HibernateException e) { e.printStackTrace(); if (tx != null && tx.isActive()) tx.rollback(); } if (items.size() != 1) return null; return items.get(0); } COM: <s> returns an object of type item type with given id </s>
funcom_train/51337927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_shutdown() throws InterruptedException, ExecutionException { final NonBlockingLockManager<String> service = new NonBlockingLockManager<String>( 10/* maxConcurrency */, true/* predeclareLocks */, new MockExecutor(null/*delegate*/)); try { assertTrue(service.isOpen()); } finally { assertFalse(service.isShutdown()); service.shutdown(); assertTrue(service.isShutdown()); } } COM: <s> test startup and normal shutdown </s>
funcom_train/17287164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String translatePI(XProcessingInstruction p) { if(this.pathInfo.size() == 0) return null; // We know that we will never match. String k = p.getData(); if( k == null) return null; k = k.trim(); String d = null; if(REQ_PATH_PI_TARGET.equals(p.getTarget()) && this.pathInfo.containsKey(k)) { d = this.pathInfo.get(k); if("".equals(d)) return null; } return d; } COM: <s> replace processor instructions </s>
funcom_train/25333113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetConfiguration() throws Exception { Class clazz = Class.forName("uk.ac.roslin.ensembl.dao.database.DBBaseDAO"); Field f = clazz.getDeclaredField("configuration"); assertNull(f.get(inst)); inst.setConfiguration(prop); Object o = f.get(inst); assertNotNull(o); assertEquals(o, prop); } COM: <s> test of set configuration method of class dbbase dao </s>
funcom_train/18741773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final protected ListPanel getErrorPanel() { if (this.errorPanel == null) { this.errorPanel = new ErrorListPanel(String.format("Errors in %s", getResourceKind().getDescription())); this.errorPanel.addSelectionListener(createErrorListener()); } return this.errorPanel; } COM: <s> lazily creates and returns the error panel </s>
funcom_train/19296450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModelType(ModelTypes newModelType) { modelType = newModelType; TitledBorder title = new TitledBorder(new BevelBorder( BevelBorder.LOWERED), modelType + " Forecast Error Variance Decomposition", TitledBorder.RIGHT, TitledBorder.TOP); getChoicePanel().setBorder(title); } COM: <s> gets the type of model in which this component is used </s>
funcom_train/31662482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPeaks(Vector peaks) { this.peaks = null; if (peaks != null) { this.peaks = new Peak1D[peaks.size()]; for (int i = 0; i < peaks.size(); i++) { this.peaks[i] = (Peak1D) ((Peak1D) peaks.elementAt(i)).clone(); } } } COM: <s> sets peaks by copying from a vector of peaks </s>
funcom_train/24000483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSetType() { OclType result = OclTypeRegistry.getSetType(OclTypeRegistry.OclBooleanType); assertTrue(result.isCollectionType()); assertEquals(OclTypeRegistry.OclBooleanType,((OclCollectionBase)result).getCollectionType()); assertEquals("Set< Boolean >",result.getPathName()); } COM: <s> test of get set type method of class ocl type registry </s>
funcom_train/23294284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getLoginPage(String apiKey, String authToken) throws URIException, IOException { GetLoginPageMethod get = new GetLoginPageMethod(apiKey, authToken); try { log.debug("Getting login page"); int response = client.executeMethod(get); if (response != HttpStatus.SC_OK) { throw new HttpException("Bad response: " + response); } } finally { get.releaseConnection(); } } COM: <s> get login form to set initial facebook session cookie </s>
funcom_train/44488693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void println(Object obj) { print(obj); /* Note that newlines are not printed automatically, they are only * scheduled. This is because changes made to the indentation level * should have effect, even if they are applied after a newline has been * scheduled but before anothing more has been printed. This might * sound illogical but trust me, it is very much in keeping with the * principle of least surprise. */ newline = true; } COM: <s> print an object followed by a newline </s>
funcom_train/49339978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updatePlot(int[] data, int interval, int set) { System.out.println("updating plot "+set); PlotArea Plot; if (set == 0) Plot = Plot0; else Plot = Plot1; Plot.update(data); Graphics g = canvas.getGraphics(); Plot.clip(g); canvas.paint(g); g.dispose(); } COM: <s> update plot takes an int with data and an interval in </s>
funcom_train/9389680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateTestProject() { ProjectCreator creator = new ProjectCreator(mOsSdkFolder, mSdkCommandLine.isVerbose() ? OutputLevel.VERBOSE : mSdkCommandLine.isSilent() ? OutputLevel.SILENT : OutputLevel.NORMAL, mSdkLog); String projectDir = getProjectLocation(mSdkCommandLine.getParamLocationPath()); creator.updateTestProject(projectDir, mSdkCommandLine.getParamTestProjectMain()); } COM: <s> updates an existing test project with a new path to the main project </s>
funcom_train/44798258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConstraints(final int borderCol1,final int borderRow1, final int borderCol2, final int borderRow2) { this.col1 = borderCol1; this.col2 = borderCol2; this.row1 = borderRow1; this.row2 = borderRow2; setBounds(col1, row1, col2 - col1, row2 - row1); } COM: <s> set this borders constraints at once </s>
funcom_train/26338981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addTeammates(Vector<Player> vector, Player player) { Vector<Player> vPlayers = game.getPlayersVector(); for (int j = 0; j < vPlayers.size(); j++) { Player p = vPlayers.elementAt(j); if (!player.isEnemyOf(p) && !vector.contains(p)) { vector.addElement(p); } } } COM: <s> adds teammates of a player to the vector </s>
funcom_train/29311880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RegionList calculateAllRegions(Collection objects) { synchronized (vertices) { RegionList result = new RegionList(); result.add(new Region(new HashSet(), new HashSet())); calculateRegions(result, new HashSet(0), vertices.size() - 1, vertices, false, vertices.size(), objects); return result; } } COM: <s> this method calculates all regions of this graph </s>
funcom_train/37648528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDuplicateRegisterDefault() { RuleSet ruleSet = new RuleSet(); this.ruleSetManager.registerDefaultRuleSet(ruleSet); this.ruleSetManager.registerDefaultRuleSet(ruleSet); assertEquals("Only one rule set should have been registered", 1, this.ruleSetManager.getDefaultRuleSets().size()); } COM: <s> registering twice the same default rule set results in no addition </s>
funcom_train/21405397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long insertPlacemark(long rutaId, double lat, double lon, double h) { ContentValues initialValues = new ContentValues(); initialValues.put(ROUTE_ID, rutaId); initialValues.put(PLACE_LAT, lat); initialValues.put(PLACE_LON, lon); initialValues.put(PLACE_H, h); return db.insert(TABLE_PLACEMARKS, null, initialValues); } COM: <s> inserts a new placemark in the table </s>
funcom_train/37062272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawDot( Graphics g ) { // background g.setColor( bgColor ); g.fillRect( 0, 0, DOT_WIDTH, DIGIT_HEIGHT ); // dot g.setColor( fgColor ); g.fillRect( 0, 17*DY, 2*DX, 2*DY); } COM: <s> draws the dot background and rectangle </s>
funcom_train/33071796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doSave(IProgressMonitor monitor) { int page = getActivePage(); // if(page==INDEX_NAVIGATION_EDITOR || page==INDEX_MANAGED_BEAN_EDITOR){ // syncEditors(INDEX_SOURCE_EDITOR); // } else if(page==INDEX_SOURCE_EDITOR){ syncEditors(INDEX_NAVIGATION_EDITOR); syncEditors(INDEX_MANAGED_BEAN_EDITOR); } sourceEditor.doSave(monitor); if(managedBeanEditor!=null){ managedBeanEditor.doSave(monitor); } if(navigationEditor!=null){ navigationEditor.doSave(); // TODO flushCommandStack() doesn't work well... navigationEditor.flushCommandStack(); } if(outlinePage!=null){ outlinePage.update(); } } COM: <s> saves by following sequence </s>
funcom_train/18193236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireActionPerformed(ActionEvent evt) { Object [] listeners = listenerList.getListenerList(); for (int i = 0; i < listeners.length; i += 2){ if (listeners[i] == ActionListener.class){ ActionListener listener = (ActionListener)listeners[i+1]; listener.actionPerformed(evt); } } } COM: <s> fires an action event to all interested listeners </s>
funcom_train/785616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(Predicate[] p) { removeChildListeners(); m_clauses.clear(); for ( int i=0; i<p.length; ++i ) { if ( !m_clauses.contains(p) ) m_clauses.add(p[i]); } if ( hasListeners() ) addChildListeners(); fireExpressionChange(); } COM: <s> set the given predicates to be the clauses of thie composite </s>
funcom_train/25425082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateProbabilities() { double sigmaQ = 0; for (int i = 0; i < k; i++) { sigmaQ += q[i]; } deltaP = 0; for (int i = 0; i < k; i++) { double p1 = q[i] / sigmaQ; deltaP += MathUtil.diffSq(probabilities.getProbability(i), p1); probabilities.setProbability(i, p1); } } COM: <s> update the probabilities from the propensities </s>
funcom_train/39168792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addPermissibleValue(Object obj) { if(obj == null) return false; if(!obj.getClass().getName().equals(featureValueClass.getName())) return false; if(featurePermissibleValuesSet == null) featurePermissibleValuesSet = new HashSet(); return featurePermissibleValuesSet.add(obj); }// addPermissibleValue() COM: <s> adds a value to the enumeration of permissible value for a feature </s>
funcom_train/18065177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getUpwardRadioButton() { if (upwardRadioButton == null) { upwardRadioButton = new JRadioButton(); upwardRadioButton.setText("UPWARD COLLAPSE: "); upwardRadioButton.setActionCommand("upward"); upwardRadioButton.addActionListener(this); type.add(upwardRadioButton); if (oldCollapseType == 1) upwardRadioButton.setSelected(true); } return upwardRadioButton; } COM: <s> this method initializes upward radio button </s>
funcom_train/15609511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getWorkspaceOids() { HashSet returnSet = new HashSet(); Set oidSet = oidToChangeTrace.keySet(); OID anOid; for (Iterator itr = oidSet.iterator(); itr.hasNext();) { anOid = (OID) itr.next(); if (anOid.isScratchOID()) { returnSet.add(anOid); } } return returnSet; } COM: <s> get the set of workspace oids that have been loaded into the workspace </s>
funcom_train/31878254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleQUIT(Message m) { // Who send the QUIT-Message? Address source = m.getHeader().getSourceAddress(); Enumeration e = interfaces.elements(); while (e.hasMoreElements()) { AddressInterface ai = (AddressInterface) e.nextElement(); Address a = ai.getAddress(); if (a.equals(source) || ai.getConnectionControlListener() != null) { ai.getConnectionControlListener().quitReceived(a); return; } } } COM: <s> another entity ordered us to quit </s>
funcom_train/2863090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BerString makeMarcBerString(String marcString) { if (marcString == null) return null; if (marcString.length() > 0) { marcbytes = new byte[marcString.length()]; marcString.getBytes(0, marcString.length(), marcbytes, 0); } return new BerString(marcbytes); } COM: <s> creates a ber string object containing a marc representation </s>
funcom_train/17915112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getSRepeat(SRepeat[] srepeats, int index) { if(index > 0) { for(int i = 0; i < srepeats.length; i++) { SRepeat srepeat = srepeats[i]; int position = index + 1; int mod = position % srepeat.frequency; if(mod == 1 || srepeat.frequency == 1) { return srepeat.getSRepeat(); } } } return null; } COM: <s> get the srepeat for the specified index </s>
funcom_train/32242591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CtClass getType() throws NotFoundException { ConstPool cp = getConstPool(); int pos = currentPos; int index = iterator.u16bitAt(pos + 1); String name = cp.getClassInfo(index); return Descriptor.toCtClass(name, thisClass.getClassPool()); } COM: <s> returns the code ct class code object representing </s>
funcom_train/12084327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createDIR(File parentDIR) { File rf=new File(parentDIR.getPath()+"/"+runningDIR); if(!rf.exists()) { rf.mkdir(); } File jf=new File(parentDIR.getPath()+"/"+jobDIR); if(!jf.exists()) { jf.mkdir(); } File ff=new File(parentDIR.getPath()+"/"+finishDIR); if(!ff.exists()) { ff.mkdir(); } } COM: <s> create running job finish dircotories </s>
funcom_train/26379317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void init() { int numTraps = AppProperties.getIntProperty("TrapTypeCount", DEFAULT_TRAP_NUM); _trapType = new String[numTraps]; for (int index = 0; index < numTraps; index++) { _trapType[index] = AppProperties.getStringProperty("TrapType" + index, DEFAULT_TRAP_NAME); } } COM: <s> convert the information found within the cfg file into an index of strings </s>
funcom_train/4927069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printDialog() { if (pJob.printDialog()) { pJob.setPrintable(this, pFormat); try { pJob.print(); } catch (PrinterException printerException) { pageStartY = 0; pageEndY = 0; currentPage = -1; System.out.println("Error Printing Document"); } } } COM: <s> a protected method print dialog displays the print dialog and initiates </s>
funcom_train/49703359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String convertOwnerToEmail(String owner) { if (owner.startsWith(http)) { int lastSlash = owner.lastIndexOf('/'); if (lastSlash < 0) { throw new IllegalArgumentException("Could not convert owner to URI"); } return owner.substring(lastSlash + 1); } // Otherwise owner is already the email. return owner; } COM: <s> converts an owner string to an email address </s>
funcom_train/39399144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createQueries() { TroothSQLQueryGenerator queryGenerator = new TroothSQLQueryGenerator(queryData,COUNT_FIELD_NAME,CHECK_VOTERS_POSTFIX_HIGHER,CHECK_VOTERS_POSTFIX_LOWER,CHECK_VOTERS_WRAPPED_POSTFIX,CHECK_VOTERS_INTRO_POSTFIX,CHECK_VOTERS_OUTRO_POSTFIX,config.getMaxUserListLength()); createReportQueries(queryGenerator); createRevokeQueries(queryGenerator); createCheckQueries(queryGenerator); } COM: <s> creates all necessary sql queries that will be used in trooth processor </s>
funcom_train/13393904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop(boolean force) { try { stopMonitor(); execute(parameters.getProperty(SHUTDOWN_CMD_KEY)); } catch (IOException e) { logger.log(Level.WARNING, e.getMessage(), e.getCause()); e.printStackTrace(); } super.stop(true); } COM: <s> the stop method overrides its parent by just stopping tomcat not unexporting </s>
funcom_train/51204494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void imagePanelKeyPressed(java.awt.event.KeyEvent evt)//GEN-FIRST:event_imagePanelKeyPressed {//GEN-HEADEREND:event_imagePanelKeyPressed evt.consume(); if(display != null) session.sendKeyboardInput(KeyInputType.KEY_PRESSED, evt.getKeyCode()); }//GEN-LAST:event_imagePanelKeyPressed COM: <s> p called when a key is pressed </s>
funcom_train/44686083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getSlope() { if (!Double.isNaN(dz)) { if (length2d > 0) return dz/length2d; else if (dz > 0) return Double.POSITIVE_INFINITY; else if (dz < 0) return Double.NEGATIVE_INFINITY; else return 0.0; } else return Double.NaN; } COM: <s> return the signed slope of the sublinestring dz length2d or na n if </s>
funcom_train/28355424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setFontForAll(Font fnt) { scanController.setFontForAll(fnt); messageTextLocal.setFont(fnt); pvsSelector.setAllFonts(fnt); pvsTreePanelScan.setAllFonts(fnt); pvsTreePanelAnalysis.setAllFonts(fnt); parameterPV_Controller.setFontsForAll(fnt); parameterPV_Button.setFont(fnt); globalFont = fnt; fontSize_PrefPanel_Spinner.setValue(new Integer(globalFont.getSize())); predefinedConfController.setFontsForAll(fnt); makeSnapshotButton.setFont(fnt); clearSnapshotButton.setFont(fnt); snapshotIdLabel.setFont(fnt); } COM: <s> sets the font for all attribute of the scan document1 d object </s>
funcom_train/41458870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int readPacket(byte[] packet, int offset, int psize) throws IOException { int length = 0; try { while (length < psize) { int len = stream.read(packet, offset + length, psize - length); if (len == -1) { return length; } length += len; } return length; } catch (Exception e) { e.printStackTrace(); } return length; } COM: <s> reads packet from currently opened stream </s>
funcom_train/7272609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean shouldInform(LocalClientInfo info) { long now = System.currentTimeMillis(); // If we aren't allowed to report a bug, exit. if( now < _nextAllowedTime ) return false; Long allowed = BUG_TIMES.get(info.getParsedBug()); return allowed == null || now >= allowed.longValue(); } COM: <s> determines if the bug has already been reported enough </s>
funcom_train/18869838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void selectionChanged() { if (getSelectionProvider() == null) return; Object element = null; // TODO NYI #469 // ISourceReference element= computeHighlightRangeSourceReference(); // if (getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE)) synchronizeOutlinePage(element); // setSelection(element, false); if (!fSelectionChangedViaGotoAnnotation) updateStatusLine(); fSelectionChangedViaGotoAnnotation= false; } COM: <s> react to changed selection </s>
funcom_train/459955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSessionIndex(Assertion assertion) { String retVal = null; if (assertion != null && assertion.getAuthnStatements() != null) { if (assertion.getAuthnStatements().size() > 0) { // We only look into the first AuthnStatement AuthnStatement authnStatement = assertion.getAuthnStatements().get(0); retVal = authnStatement.getSessionIndex(); } } return retVal; } COM: <s> return the value of the authn statement </s>
funcom_train/5380782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isCommandActive() { IAction actionToCheck = getAction(); if (actionToCheck != null) { String commandId = actionToCheck.getActionDefinitionId(); ExternalActionManager.ICallback callback = ExternalActionManager .getInstance().getCallback(); if (callback != null) return callback.isActive(commandId); } return true; } COM: <s> returns whether the command corresponding to this action </s>
funcom_train/7675858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HDF getChild(String hdfpath) { if (hdfptr == 0) { throw new NullPointerException("HDF is closed."); } long obj_ptr = _getChild(hdfptr, hdfpath); if ( obj_ptr == 0 ) { return null; } return new HDF(obj_ptr, this); } COM: <s> retrieves the hdf for the first child of the root of the subtree </s>
funcom_train/18047480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open(int nMilliseconds) { if (image_ == null) return; Timer timer = new Timer(Integer.MAX_VALUE, new ActionListener() { public void actionPerformed(ActionEvent event) { ((Timer) event.getSource()).stop(); close(); } }); timer.setInitialDelay(nMilliseconds); timer.start(); setBounds(x_, y_, width_, height_); setVisible(true); } COM: <s> open the splash screen and keep it open for the specified duration or </s>
funcom_train/29837694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unDisplayAsMarked(GraphElementComponent comp) { if (comp instanceof NodeComponentInterface) { unDisplayAsMarked((NodeComponentInterface) comp); } else { unDisplayAsMarked((EdgeComponentInterface) comp); } if (comp != null) { GraphElement ge = comp.getGraphElement(); if (ge != null) { List<AttributeComponent> acc = getAttributeCompsForElem(ge); if (acc != null) for (AttributeComponent ac : acc) { ac.highlight(false, null); } } } } COM: <s> remove anything that specifies a graph element component as being </s>
funcom_train/4300744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void clear(int count) { int margin = threshold >> 8; if (margin < 64) { margin = 64; } int accessBase = getAccessCountCeiling(count, margin); int maxlookup = hashIndex.newNodePointer; for (int lookup = 0; lookup < maxlookup; lookup++) { Object o = objectKeyTable[lookup]; if (o != null && accessTable[lookup] < accessBase) { removeObject(o); } } accessMin = accessBase; } COM: <s> clear approximately count elements from the map starting with </s>
funcom_train/38880891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void add(IASTFunctionDefinition funcDef, Set<ExternalReference> externalElements){ List<IASTNode> NodeNotManaged = new ArrayList<IASTNode>(); IASTStatement body = funcDef.getBody(); StackDeclaration Declaration = new StackDeclaration(); addParameter(funcDef.getDeclarator(), Declaration); ListStatementRule StatementRules = new ListStatementRule(); for (IASTNode node: body.getChildren()){ StatementRules.Apply(node, Declaration, externalElements, NodeNotManaged); } } COM: <s> add the external reference contained in the function arguments included </s>