__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/3563119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFileType(Integer fileTypeID) throws DbException { NVPair[] parms; parms = new NVPair[1]; parms[0] = new NVPair("fileTypeID", fileTypeID.toString()); simpleRequest(REMOVE_FILE_TYPE_PAGE, "Cannot remove file type", parms); } COM: <s> deletes a file type </s>
funcom_train/49461649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addNewIp(String _ip) throws Exception { if (StringHelper.nullify(_ip) == null) throw new IllegalArgumentException("Null IP"); // be safe String ip = StringHelper.nullify(_ip); Db db = getDb(); return DbIP.addNetIP(db, ip); } COM: <s> safe even if the ip already exists </s>
funcom_train/24927346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void closePrintJobCommand(String uuid, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); String jobId = request.getParameter(ParameterKeys.PRINT_JOB_ID); IRemotePrintJobManager manager = RemotePrintJobManagerFactory.getRemotePrintJobManager(); manager.removeRemotePrintJob(Long.parseLong(jobId)); response.setContentType("text/html"); response.getWriter().print("ok"); } COM: <s> closes the print job </s>
funcom_train/18802711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getStringWidth(final String text, final int start, final int end) { final FontMetrics fm = this.g2.getFontMetrics(); final Rectangle2D bounds = TextUtilities.getTextBounds(text.substring(start, end), this.g2, fm); final float result = (float) bounds.getWidth(); return result; } COM: <s> returns the string width </s>
funcom_train/12782517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAll(BitVector B) { if (B == null) { throw new IllegalArgumentException("null B"); } if (V == null) { V = new MutableSharedBitVectorIntSet(new BitVectorIntSet(B)); return; } else { V.addAll(new BitVectorIntSet(B)); } } COM: <s> add all the bits in b to this bit vector </s>
funcom_train/3720832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTopics(String topics) throws ProfileException { String oldTopics = this.topics; try { vetoableChangeSupport.fireVetoableChange("topics", oldTopics, topics); } catch (Exception e) { throw new ProfileException(null, e); } this.topics = topics; propertyChangeSupport.firePropertyChange("topics", oldTopics, topics); } COM: <s> setter for property topics </s>
funcom_train/18879363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read() throws IOException { try { // if the full buffer is read // read the next line if (p >= buffer.length) { do { if (line <= lines) { IRegion region = document.getLineInformation(line++); buffer = document.get(region.getOffset(), region.getLength()).toCharArray(); p = 0; } else { return -1; } } while (buffer.length == 0); } return buffer[p++]; } catch (BadLocationException e) { throw new IOException(e.getMessage()); } } COM: <s> read the next byte from the content </s>
funcom_train/20645862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCheckable() { if (!tet.canRemapTarif()) return false; Tarif tarif= tet.getSelectedTarif(); if (tarif == null) return false; if (isChecked()) { // unamp return (tarif.canBeRemovedFrom(me, false, false)); } return (tarif.canBeMappedTo(me, false, false)); } COM: <s> if false is returned then the chekbox will be disabled </s>
funcom_train/40673892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (o == this) return true; if (o == null) return false; if (this.getClass() != o.getClass()) return false; Literal l = (Literal)o; return (this.negation == l.isNegative() && this.symbol == l.getSymbol()); } COM: <s> literals are equal if both negation and symbol are equal </s>
funcom_train/40676868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void delete(String fileName) throws IOException { DeleteRequest.Builder deleteRequest = DeleteRequest.newBuilder(); deleteRequest.setFilename(fileName); DeleteResponse.Builder deleteResponse = DeleteResponse.newBuilder(); makeSyncCall("Delete", deleteRequest, deleteResponse); } COM: <s> makes the delete rpc call </s>
funcom_train/3598091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDisjunctiveTypes() { try { List results = engine.search(nom, "($w word|np)"); results.remove(0); // remove list of vars Collections.sort(results, new SearchResultIDComparator()); assertTrue(results.size()==11); NOMElement r1 = (NOMElement)((List)results.get(2)).get(0); assertTrue(r1.getID().equals("np_3")); } catch (Throwable ex) { ex.printStackTrace(); fail("Disjunctive type test failed!"); } } COM: <s> check the correct number of disjunctive typed elements are </s>
funcom_train/32720240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean startsWith(OctetString prefix) { if ((prefix == null) || prefix.length() > length()) { return false; } for (int i=0; i<prefix.length(); i++) { if (prefix.get(i) != value[i]) { return false; } } return true; } COM: <s> tests if this octet string starts with the specified prefix </s>
funcom_train/4852800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getScreenCommand() { if (screenCommand == null) {//GEN-END:|54-getter|0|54-preInit // write pre-init user code here screenCommand = new Command("Tela", Command.SCREEN, 0);//GEN-LINE:|54-getter|1|54-postInit // write post-init user code here }//GEN-BEGIN:|54-getter|2| return screenCommand; } COM: <s> returns an initiliazed instance of screen command component </s>
funcom_train/45471982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnmarshallerCtxObjectArg() throws Exception { Unmarshaller u = new Unmarshaller(_internalContext, new UnmarshalFranz()); UnmarshalFranz f = (UnmarshalFranz)u.unmarshal(_reader); Assert.assertNotNull(f); Assert.assertEquals("Bla Bla Bla", f.getContent()); } COM: <s> creates an unmarshaller instance withcontext and an object instance argument </s>
funcom_train/38817619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectStation(int idx) { if (model_.getStationsCount() > 0) { model_.selectStation(idx); } else { showWarning(locale.getString(Constants.STR_Station_in_playlist) + idx, currDisplayable_); } //updatePlayerUI(); } COM: <s> select next station info in playlist </s>
funcom_train/51057126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException { return AWTUtil.createCursor(width, height, xHotspot, yHotspot, numImages, images, delays); } COM: <s> native cursor handles </s>
funcom_train/38724244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void collectPixelFiles() { //TODO do this recursive maybe? --Armin if (!this.src.exists() || !this.src.isDirectory()) { //TODO show bad input msg return; } this.inputFiles = new Vector<File>(); this.inputFiles.addAll(Arrays.asList(src.listFiles(gifJpgBmpPng))); } COM: <s> collects all readable pixel image files in the currently set source </s>
funcom_train/2273255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDelay(int delay) { int maxIterDelay = SSettings.getInt(FileUtils.writeMaxIterDelay); if (delay > maxIterDelay) { delay = maxIterDelay; } if (delay < 0) { delay = 0; } mainDelay = delay; SSettings.put(FileUtils.writeIterDelay, delay); } COM: <s> set delay for iterations </s>
funcom_train/7981188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Piece pieceFor(int charPos) throws IOException { if (currentPiece.contains(charPos)) { return currentPiece; } // FIXME: Use binary search to find piece index current = 0; currentPiece = null; next(); while (currentPiece != null) { if (currentPiece.contains(charPos)) { return currentPiece; } next(); } return null; } COM: <s> returns the piece containing the given character position </s>
funcom_train/16452340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void presentationDisplayUpdate(String str) { Global.pbs.setMessage(str, englishFont, eng_font_size.getValue(), foreColor, backColor, "", englishFont, eng_font_size.getValue(), foreColor, backColor, false, false, useTemplate.isSelected(), (String) templatebox .getSelectedItem(), true, false, selectedTransition); } COM: <s> presentation display update </s>
funcom_train/15456466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveFails() { EasyMock.expect(mRepo.loadAllCapabilities(mObject)).andReturn( new ArrayList<Capability>()); mRepo.delete(mObject); HibernateException exDelete = new HibernateException("test"); EasyMock.expectLastCall().andThrow( new TalosHibernateException("remove failed", exDelete)); mRepo.rollback(); replay(); try { tested.remove(); fail("should raise TalosHibernateException"); } catch (TalosHibernateException e) { assertSame("cause", exDelete, e.getCause()); } } COM: <s> should work once tal 35 is complete </s>
funcom_train/44849147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Component forwardToTask(Class<? extends IPluggableTask> inTask, boolean inIsForum) throws VException { if (inIsForum) { return TaskManager.INSTANCE.getForumContent(UseCaseHelper.createFullyQualifiedTaskName(inTask)); } return TaskManager.INSTANCE.getAdminContent(UseCaseHelper.createFullyQualifiedTaskName(inTask)); } COM: <s> runs the specified tasks and returns its view </s>
funcom_train/19372126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvalidTitleBlank() { Topic topic = this.topicPopulator.getTopic1Task1(); topic.setTitle(""); try { this.topicManager.update(topic); fail("Title.length() == 0"); } catch (ValidationException ignore) { } catch (Exception e) { fail(e.getMessage()); } } COM: <s> attempt to update a code topic code with a blank code title code </s>
funcom_train/24649712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL getURL(String key) { if (null == getString(key)) { throw new GeneralException("Error, a null value for the url >>" + key + " << was encountered"); } try { return new URL(getString(key)); } catch (MalformedURLException e) { throw new GeneralException("Malformed url", e); } } COM: <s> gets the value as a url </s>
funcom_train/3722866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(TreeSelectionEvent e) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) treeType.getLastSelectedPathComponent(); if (node.isLeaf()) { setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); displayFromType2(node); setCursor(Cursor.getDefaultCursor()); } } COM: <s> implementation of the tree selection listener interface </s>
funcom_train/50140862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IFieldMolder getNmFieldMolder(String fieldName) { for (int i = 0; i < nmCollectionMolders.length; i++) { if (nmCollectionMolders[i].getFieldDescriptor().getName().equals(fieldName)) { return nmCollectionMolders[i]; } } return null; } COM: <s> gets the nm field molder attribute of the persistence object </s>
funcom_train/20947190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File promptForSQLFile(Project project) { String name = project.getName(); String proposedName = new File(name + EXTENSION).getPath(); JFileChooser chooser = ComponentFactory.createFileChooser(proposedName, EXTENSION); File file = null; if (chooser.showSaveDialog(null) == JFileChooser.APPROVE_OPTION) { file = chooser.getSelectedFile(); } return file; } COM: <s> dialog to prompt user for location to save the exported file </s>
funcom_train/17766801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Double getWeightOfPackage(int packageId) { try { aptech.eproject.logictics.db.Package p = em.find(aptech.eproject.logictics.db.Package.class, packageId); return p.getWeight(); } catch (NullPointerException e) { System.err.println("cannot find package information"); return 0.0; } } COM: <s> return weight of specified package </s>
funcom_train/16525721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createConvertLog() { if(convertLogFile == null) { //create the file if it does not already exist convertLogFile = new File(projectFolder, convertLogFileName); } try { BufferedWriter out = new BufferedWriter(new FileWriter(convertLogFile)); //write the convert log text that we have accumulated to the convert log out.write(convertLogStringBuffer.toString()); out.close(); } catch (IOException e) { e.printStackTrace(); } } COM: <s> create the convert log text file and write the convert </s>
funcom_train/25707764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadMessages(final MessageCallback callback) { final boolean showDeletedMessages = Core.frostSettings.getBoolValue("showDeletedMessages"); final boolean showUnreadOnly = Core.frostSettings.getBoolValue(SettingsClass.SHOW_UNREAD_ONLY); MessageStorage.inst().retrieveMessagesForShow( board, daysToRead, false, false, showDeletedMessages, showUnreadOnly, callback); } COM: <s> start to load messages one by one </s>
funcom_train/3526853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { boolean isEqual = false; if (other instanceof ViolatedPrecondition) { ViolatedPrecondition otherViolatedPrecondition = (ViolatedPrecondition)other; isEqual = getPrecondition().equals(otherViolatedPrecondition.getPrecondition()); isEqual &= ( getStatusCode() == otherViolatedPrecondition.getStatusCode() ); } return isEqual; } COM: <s> returns code true code if the code other code object is a </s>
funcom_train/4870835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAtDragArea(Point p) { if(Math.abs((p.getX()/height)*(p.getX()/height)+(p.getY()/width)*(p.getY()/width)-1)<0.3) return true; else return false; } COM: <s> calculates if the point p is at the drawing area of the ellipse </s>
funcom_train/28199799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean enter(int requested, Thread t, boolean block) { boolean log = LOG.isLoggable(Level.FINE); if (log) doLog("Entering {0}, {1}", requested, block); // NOI18N boolean ret = enterImpl(requested, t, block); if (log) doLog("Entering exit: {0}", ret); // NOI18N return ret; } COM: <s> enters this mutex with given mode </s>
funcom_train/19273435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int remove(Term term) { try { IndexWriter writer = getIndexWriter(); int count = writer.getReader().docFreq(term); if (count > 0) { writer.deleteDocuments(term); } return count; } catch (IOException e) { throw new SearchRemoveFailedException(e, term.field(), term.text()); } } COM: <s> this method performs the actual remove by </s>
funcom_train/18660663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAppendToHighresLocation() { PictureInfo pi = new PictureInfo(); pi.setHighresLocation( "file:///dir/picture" ); pi.appendToHighresLocation( ".jpg" ); File f = pi.getHighresFile(); assertEquals( "Testing that the Highres Location was memorised correctly", f.toString(), "/dir/picture.jpg" ); } COM: <s> test of append to highres location method of class picture info </s>
funcom_train/50864866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addTowingButton() { try { Component lastComponent = towingLabelPanel.getComponent(1); if (lastComponent == towingTextLabel) { towingLabelPanel.remove(towingTextLabel); towingLabelPanel.add(towingButton); } } catch (ArrayIndexOutOfBoundsException e) { towingLabelPanel.add(towingButton); } } COM: <s> adds the towing button to the towing label panel </s>
funcom_train/19407930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BagValue flatten() { if (!elemType().isCollection()) throw new RuntimeException("Bag `" + type() + "' cannot be flattened"); CollectionType c2 = (CollectionType) elemType(); BagValue res = new BagValue(c2.elemType()); Iterator it = fElements.iterator(); while (it.hasNext()) { CollectionValue elem = (CollectionValue) it.next(); Iterator it2 = elem.iterator(); while (it2.hasNext()) { Value elem2 = (Value) it2.next(); res.fElements.add(elem2); } } return res; } COM: <s> returns a new flattened bag </s>
funcom_train/20045113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _removeGroup() { requiredMethod("renameGroup()"); executeMethod("renameTemplate()"); boolean res = oObj.removeGroup("XDocumentTemplates"); log.println("Method returned: " + res); res &= getSubContent(content, "XDocumentTemplates") == null; tRes.tested("removeGroup()", res); } COM: <s> test calls the method and checks that content has no deleted group </s>
funcom_train/8964560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enter(WispMap map) { logger.log(Level.INFO, "{0} enters {1}", new Object[] { this, map }); map.addPlayer(this); this.setRoom(map); this.setMapLocation(map.getMapCode()); logger.log(Level.INFO, map.look(this)); } COM: <s> handles a player entering a room </s>
funcom_train/48338430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element nextElement() { if (null == curElement.next) { //No more elements. curElement.freeRead(); curElement = null; return null; } else { //We have another element. Element oldRead; curElement.next.aquireRead(); oldRead = curElement; curElement = curElement.next; oldRead.freeRead(); return curElement; } }; COM: <s> return the next element in the list throwing an exception if none </s>
funcom_train/13720154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public byte getGainPropForPID() throws IOException, InterruptedException { isActive(true); try{ byte[] response = getSetting(GAINPROPPID); // If we got this far, we should have a response return (byte)MathUtilities.hex2int(response); }catch(InterruptedException e){ logger.log(Level.SEVERE, "Unable to getGainIPropForPID", e); throw e; }catch(IOException e){ logger.log(Level.SEVERE, "Unable to getGainIPropForPID", e); throw e; } } COM: <s> this command requests the current gain prop for pid setting from the </s>
funcom_train/45544655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void installSemanticHighlighting() { if (fSemanticManager == null) { fSemanticManager= new SemanticHighlightingManager(); fSemanticManager.install(this, (JSCSourceViewer) getSourceViewer(), JSCPlugin.getDefault().getJSCTextTools().getColorManager(), getPreferenceStore()); } } COM: <s> install semantic highlighting </s>
funcom_train/24243086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getError(Exception ex) { JSONObject j = new JSONObject(); j.put("success", false); j.put("errors", ""); j.put("_msg", ex.getLocalizedMessage()); return j.toString(); } COM: <s> this method allows to treat the current error exception </s>
funcom_train/17302209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calibrateLast() throws JspTagException { /* * the current round is the last one if (a) there are no remaining * elements, or (b) the next one is beyond the 'end'. */ last = !hasNext() || atEnd() || (end != -1 && (begin + index + step > end)); } COM: <s> sets last appropriately </s>
funcom_train/24075989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storeResults(File f) throws IOException { log.log(Level.FINER, "Writing model results xml to file " + f.getAbsolutePath()); BufferedWriter bw = new BufferedWriter(new FileWriter(f)); bw.write(this.xmlDoc.toString()); bw.close(); return; } COM: <s> store the results messages results data parameters etc basically </s>
funcom_train/24216776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsSquare(AbstractSquare as) { assert as.hasPiece(); if(color == AreaColor.WHITE && !as.getPiece().isWhite() || color == AreaColor.BLACK && as.getPiece().isWhite()) return false; else { boolean ret = false; for(SquareArea sa : this) ret |= sa.containsSquare(as, color == AreaColor.SYM && !as.getPiece().isWhite()); return ret; } } COM: <s> tells whether a given abstract squares piece is in this area </s>
funcom_train/43605539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean packageExists(String name) { String fileName = name.replace('.', File.separatorChar); /* Search the source path. */ for (Iterator i = sourcePath.iterator(); i.hasNext(); ) { File directory = (File) i.next(); File f = new File(directory, fileName); if (f.exists() && f.isDirectory()) { return true; } } return false; } COM: <s> check if a directory for a package exists </s>
funcom_train/45598584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getStaticText(String align, String text) { Element field = xml.createElement("field"); field.setAttribute("type", "staticText"); field.setAttribute("align", align.toLowerCase().replace("centre", "center")); field.setAttribute("txt", text); return field; } COM: <s> gets the static text element </s>
funcom_train/18726734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActive(final boolean value) { if (active != value) { active = value; if (active) { theCanvas.addMouseListener(this); theCanvas.addMouseMotionListener(this); } else { cleanup(); theCanvas.removeMouseListener(this); theCanvas.removeMouseMotionListener(this); } } } COM: <s> activate deactivate this zoom </s>
funcom_train/17196109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toReport() { StringBuffer buf = new StringBuffer(); buf.append("* " + getName() + " (" + this.minCardinality + " / " + this.maxCardinality + ") " + " URI " + getMappedTo()); // + ", types: "); buf.append("\n"); for (JClass jc : this.types) { buf.append("** range: " + jc.getName() + ""); buf.append("\n"); } return buf.toString(); } COM: <s> generate a verbose report of this jproperty </s>
funcom_train/44627607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testJMLprecedence6() { helpExpr("a << b <# c == d", JCBinary.class, 12, JmlBinary.class, 7, JCBinary.class, 2, JCIdent.class ,0, JCIdent.class ,5, JCIdent.class ,10, JCIdent.class ,15 ); } COM: <s> test precedence between lock and other operators </s>
funcom_train/23713180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cellLabelChanged(Object cell, Object newValue, boolean autoSize) { model.beginUpdate(); try { getModel().setValue(cell, newValue); if (autoSize) { cellSizeUpdated(cell, false); } } finally { model.endUpdate(); } } COM: <s> sets the new label for a cell </s>
funcom_train/46520982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private void GeneratePopupMenu(Component where, String what, int x, int y, Object[] param){ // JPopupMenu mypm = (JPopupMenu) org.tcpfile.main.Reflection.selectFunctionWithParameters("org.tcpfile.main.GUI", what, param); // if (mypm == null) // return; // mypm.show(where, x, y); // } COM: <s> generates and shows a popup via reflection </s>
funcom_train/25472008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void alert (CaptMsg msg) { if (msg.messageType == CaptMsg.SUCCESS) { Kuix.alert(Kuix.getMessage("SUCCESS"), KuixConstants.ALERT_OK); } else if (msg.messageType == CaptMsg.FAILURE) { Kuix.alert(CaptMsg.failureMessage(msg.code), KuixConstants.ALERT_OK); } else { Kuix.alert(Kuix.getMessage("UNKNOWN_RESPONSE"), KuixConstants.ALERT_OK); } } COM: <s> displays an appropriate popup alert depending on the msg </s>
funcom_train/39169239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFactory() throws Exception { FeatureMap params = Factory.newFeatureMap(); params.put("features", Factory.newFeatureMap()); params.put(Document.DOCUMENT_URL_PARAMETER_NAME, Gate.getUrl("tests/doc0.html") ); Resource res = Factory.createResource("gate.corpora.DocumentImpl", params); } // testFactory COM: <s> test the factory resource creation provisions </s>
funcom_train/32078227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContents(Object[] data, Transfer[] dataTypes, int clipboards) { checkWidget(); if (data == null || dataTypes == null || data.length != dataTypes.length) { DND.error(SWT.ERROR_INVALID_ARGUMENT); } for (int i = 0; i < dataTypes.length; i++) { if (dataTypes[i] instanceof TextTransfer && data[i] instanceof String){ display.setData("TextTransfer", data[i]); //$NON-NLS-1$ return; } } } COM: <s> place data of the specified type on the specified clipboard </s>
funcom_train/8088276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initialize() { super.initialize(); // log file m_LogFile = getLogFile(); // try to remove file try { if ((m_LogFile != null) && m_LogFile.exists()) m_LogFile.delete(); } catch (Exception e) { e.printStackTrace(); } // the line feed m_LineFeed = System.getProperty("line.separator"); } COM: <s> initializes the logger </s>
funcom_train/8288322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cut(int level){ super.cut(level); flagToRelayoutGui=true; //Remove the information about which appearance state is being edited AppearanceType[] appearanceTypeEditing = new AppearanceType[this.getNumLevels()]; for (int i=0;i<appearanceTypeEditing.length;i++){ if (i<level){ appearanceTypeEditing[i]=this.appearanceTypesEditing[i]; } else{ appearanceTypeEditing[i]=this.appearanceTypesEditing[i+1]; } } this.appearanceTypesEditing=appearanceTypeEditing; } COM: <s> cut a level </s>
funcom_train/30139202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String save(){ try { // To Create infoUtils.createObject(super.getContext().getRegService(), this); logger.info("Application object: " + getApplicationName() + " created successfully"); return ServiceConstants.SUCCESS_STATUS; } catch (Exception e) { e.printStackTrace(); String errormessage = new GfacGUIException(e).getMessage(); FacesMessage message = new FacesMessage( FacesMessage.SEVERITY_ERROR, e.getClass().getName(),errormessage); FacesContext.getCurrentInstance().addMessage( null, message); logger.severe(errormessage); return ServiceConstants.ERROR_STATUS; } } COM: <s> to save application to xregistry </s>
funcom_train/48415466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void storageRemoveContent(Snip snip, File snipDir) { File contentFile = new File(snipDir, getContentFileName()); Logger.debug(contentFile+": exists? "+contentFile.exists()); if (contentFile.exists()) { File backup = new File(contentFile.getPath() + ".removed"); contentFile.renameTo(backup); } } COM: <s> remove the content of snip from the storage </s>
funcom_train/36247313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateValidInstanceTypes() { instanceTypeCombo.removeAll(); for (InstanceType instanceType : InstanceType.values()) { // Only display instance types that will work with the selected AMI if ( !instanceType.canLaunch(image) ) continue; instanceTypeCombo.add(instanceType.name); instanceTypeCombo.setData(instanceType.name, instanceType); instanceTypeCombo.select(0); } } COM: <s> updates the ec2 instance type combo box so that only the instance types </s>
funcom_train/5852397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendRequest(ReqT request) throws Exception { assertStarted(); if (!m_requestLocator.trackRequest(request)) return; m_messenger.sendRequest(request); debugf("Scheding timeout for request to %s in %d ms", request, request.getDelay(TimeUnit.MILLISECONDS)); m_timeoutQueue.offer(request); } COM: <s> send a tracked request via the messenger </s>
funcom_train/32040465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addVersionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LearningDesignType_version_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LearningDesignType_version_feature", "_UI_LearningDesignType_type"), ImsldPackage.eINSTANCE.getLearningDesignType_Version(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the version feature </s>
funcom_train/33852500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SupertypeQueryResults getSupertypeQueryResults(ClassDescriptor classDescriptor) { SupertypeQueryResults supertypeQueryResults = supertypeSetMap.get(classDescriptor); if (supertypeQueryResults == null) { supertypeQueryResults = computeSupertypes(classDescriptor); supertypeSetMap.put(classDescriptor, supertypeQueryResults); } return supertypeQueryResults; } COM: <s> look up or compute the supertype query results for class named by given </s>
funcom_train/5436922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void inputChanged(Object input, Object oldInput) { preservingSelection(new Runnable() { public void run() { Control tree = getControl(); tree.setRedraw(false); removeAll(tree); tree.setData(getRoot()); createChildren(tree); Object input = getInput(); if(input != null && input instanceof PacketAnalysisNode) { PacketAnalysisNode root = (PacketAnalysisNode)input; expandNodes(root); } tree.setRedraw(true); } }); } COM: <s> tries to map the existing nodes in the </s>
funcom_train/10616098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEqualsObject_03() { Certificate cert0 = new TestCertUtils.TestCertificate(); Certificate[] certs0 = new Certificate[] { cert0, null }; Certificate[] certs1 = new Certificate[] { null, cert0 }; CodeSource thiz = new CodeSource(urlSite, certs0); CodeSource that = new CodeSource(urlSite, certs1); assertTrue(thiz.equals(that)); } COM: <s> test for equals object br </s>
funcom_train/31625919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Wizard newWizard(final ExpressoRequest request) throws WizardException, ControllerException { Integer id = new Integer(request.getParameter(WIZ_PARAMETER_ID)); WizardRepository repository = ((EmoSchema) getSchemaInstance()).getWizardRepository(request.getDataContext()); Wizard returnValue = repository.find(id); storeWizInSession(request, returnValue, id); return returnValue; } COM: <s> create a new wizard and store it to session </s>
funcom_train/22969905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void resetModule() throws Exception { conversation = new WebConversation(); if (getLocale() != null) { conversation.setHeaderField("Accept-Language", getLocale()); Locale.setDefault(new Locale(getLocale(), "")); } if (isJetspeed2Enabled() && isJetspeed2UserPresent()) { login(getJetspeed2UserName(), getJetspeed2Password()); } else { response = conversation.getResponse(getModuleURL() + allowDuplicateSubmit); resetForm(); } propertyPrefix = null; } COM: <s> like close navigator open again and reexecute the module </s>
funcom_train/7427996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateSWTTransform() { final double[] m = new double[6]; transform.getMatrix(m); swtTransform.setElements((float) m[0], (float) m[1], (float) m[2], (float) m[3], (float) m[4], (float) m[5]); } COM: <s> updates the swt transform instance such that it matches awts counterpart </s>
funcom_train/51299457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isVATPayer(int role_id) { String sql = "SELECT get_role_prop('is_vat_payer', " + role_id + ") AS nds_payer"; ResultSet res = null; try { res = DBAccessor.getInstance().makeSelect(sql); if (res.next()) { return res.getBoolean("nds_payer"); } } catch (Exception e) { e.printStackTrace(); } finally { DBAccessor.getInstance().releaseConnection(res); } return true; } COM: <s> check whether contractor is vat payer or not </s>
funcom_train/14333474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ParamDate getDateParam(String name) throws BatchException { try { ParamDate p = (ParamDate) params.get(name); if (p == null) { throw new BatchException("Parameter " + name + " not found"); } else { return p; } } catch (ClassCastException e) { throw new BatchException("Parameter " + name + " is not of type Date"); } } COM: <s> get a date parameter by name </s>
funcom_train/3867330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OperandToken evaluate(Token[] operands, GlobalValues globals) { // load java plugin globals.getPluginsManager().addPlugin("JavaPlugin"); String result = ((JavaPlugin)globals.getPluginsManager().getPlugin("JavaPlugin")).executeJavaExpression(operands[0].toString()); return new CharToken(result); } COM: <s> executes the function returning the first parameter </s>
funcom_train/23790358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setDirty(Rectangle oldRect) { boolean result = !m_firstCallerSet; m_firstCallerSet = true; if (m_engine != null) { if (((m_oldRect == null) || m_oldRect.isEmpty()) && (oldRect != null)) m_oldRect = (Rectangle)oldRect.clone(); } m_dirty = true; return result; } COM: <s> verifies if we are the first caller </s>
funcom_train/49318297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JMenuItem createViewCutLevelsMenuItem() { JMenuItem menuItem = new JMenuItem(_I18N.getString("cutLevels") + "..."); menuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { _imageDisplay.editCutLevels(); } }); return menuItem; } COM: <s> create the view cut levels menu item </s>
funcom_train/48986856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMail(RUser ruser) { SimpleMailMessage message = new SimpleMailMessage(this.newUserMailMessage); StringBuffer messageText = new StringBuffer(newUserMailMessage.getText()); messageText.append("\n\nuser name: " + ruser.getName()); messageText.append("\nuser email: " + ruser.getEmail()); message.setText(messageText.toString()); mailSender.send(message); } COM: <s> sends the administrator that a new user registered and requested an expert user </s>
funcom_train/19563992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DoubleMatrix1D aggregateColumnwise(cern.colt.function.DoubleDoubleFunction aggr, cern.colt.function.DoubleFunction f) { if (this.size()==0) return null; int cols = this.columns(); DoubleMatrix1D result = new DenseDoubleMatrix1D(cols); for (int i=cols; --i >= 0; ) { result.setQuick(i, this.viewColumn(i).aggregate(aggr, f)); } return result; } COM: <s> applies a function to each cell and aggregates the results columnwise </s>
funcom_train/2369039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getTaskCount() { final ReentrantLock mainLock = this.mainLock; mainLock.lock(); try { long n = completedTaskCount; for (Worker w : workers) { n += w.completedTasks; if (w.isActive()) ++n; } return n + workQueue.size(); } finally { mainLock.unlock(); } } COM: <s> returns the approximate total number of tasks that have ever been </s>
funcom_train/10212401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getStride(int dimension) throws InvalidParameterException { try{ DArray a = (DArray)getVar(0); DArrayDimension d = a.getDimension(dimension); return(d.getStride()); } catch (NoSuchVariableException e){ throw new InvalidParameterException("SDGrid.getStride(): Bad Value for dimension!: " + e.getMessage()); } } COM: <s> gets the b stride b value for the projection of the </s>
funcom_train/50467596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPreferredWidth() { if (cols == null) { return 0; } Iterator it = cols.iterator(); int w = 0; while (it.hasNext()) { Column col = (Column) it.next(); float pw = col.getPreferredWidth(); if (pw < 1) { pw = col.getMinimumWidth(); } w = w + (int) pw; } return w; } COM: <s> returns a rows preferred width by getting the sum of all columns widths </s>
funcom_train/50345980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteLoadName(String load){ if (!_loadList.contains(load)) return false; _loadList.remove(load); log.debug("track (" +getName()+ ") delete car load "+load); setDirtyAndFirePropertyChange (LOADS_CHANGED_PROPERTY, _loadList.size()+1, _loadList.size()); return true; } COM: <s> delete a load name that the track will </s>
funcom_train/44481338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void modifyAttributes(boolean source) { JFSConfig config = JFSConfig.getInstance(); for (JFSDirectoryPair pair : config.getDirectoryList()) { String path; if (source) { path = pair.getSrc(); } else { path = pair.getTgt(); } JFSFileProducerManager pm = JFSFileProducerManager.getInstance(); JFSFileProducer factory = pm.createProducer(path); JFSFile file = factory.getRootJfsFile(); traverse(file); pm.shutDownProducer(path); } } COM: <s> modifies the write protection attribute of source or target files </s>
funcom_train/46382025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void triggerCollision(float height, boolean collision) { if (ClientContext.getRendererType()==RendererType.RENDERER_JME) { CellRenderer rend = getCellRenderer(RendererType.RENDERER_JME); if (rend instanceof AvatarActionTrigger) { ((AvatarActionTrigger)rend).triggerCollision(height, collision); } } } COM: <s> todo is a temporary interface for handling avatar actions need </s>
funcom_train/22799663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deletePhysicalFile(String repositoryPath, String uploadedFileName) { java.io.File delfile = new java.io.File(repositoryPath, uploadedFileName); delfile.renameTo(new java.io.File(repositoryPath, ConfigManager.file.getDeleteFilePrefix() + uploadedFileName)); } COM: <s> instead of deleting the file well rename it </s>
funcom_train/3414724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { boolean periodic = isPeriodic(); if (!canRunInCurrentRunState(periodic)) cancel(false); else if (!periodic) ScheduledFutureTask.super.run(); else if (ScheduledFutureTask.super.runAndReset()) { setNextRunTime(); reExecutePeriodic(outerTask); } } COM: <s> overrides future task version so as to reset requeue if periodic </s>
funcom_train/32740867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setResponderWorkingDir(HttpServletRequest request) { // set the correct working directory for the responders if (makumbaResponderBaseDirectory == null) { Object tempDir = request.getSession().getServletContext().getAttribute("javax.servlet.context.tempdir"); String contextPath = request.getContextPath(); setResponderWorkingDir(tempDir, contextPath); } } COM: <s> sets the responder working directory from the javax </s>
funcom_train/8468931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DoubleVector getDocumentVector(int documentNumber) { if (documentSpace == null) throw new IllegalArgumentException( "The document space has not been retained or generated."); if (documentNumber < 0 || documentNumber >= documentSpace.rows()) { throw new IllegalArgumentException( "Document number is not within the bounds of the number of " + "documents: " + documentNumber); } return documentSpace.getRowVector(documentNumber); } COM: <s> returns the semantics of the document as represented by a numeric vector </s>
funcom_train/35318752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getComponentZOrder(Component comp) { if (comp == null) { return -1; } synchronized(getTreeLock()) { // Quick check - container should be immediate parent of the component if (comp.parent != this) { return -1; } return component.indexOf(comp); } } COM: <s> returns the z order index of the component inside the container </s>
funcom_train/43449208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void rebalance(AVLNode node) { while (node != null) { setHeight(node); if (!isBalanced(node)) { AVLNode xPos = tallerChild(tallerChild(node)); node = restructure(xPos); setHeight(node.getLeftChild()); setHeight(node.getRightChild()); setHeight(node); } node = node.getParent(); } } COM: <s> assures the balance of the tree from node up to the root </s>
funcom_train/25565030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLinkFieldNames(String[] fieldNames) { if(fieldNames==null && sampleLink!=null)fieldNames = sampleLink.getFieldNames(); String linkType = LINK_TYPES[0]; ((AbstractFormFieldsModel)getMultiForm(linkType).getMetaModel()).setFields(initLinkFields(fieldNames, linkType)); } COM: <s> if sample link is not null can be called with null argument </s>
funcom_train/46575599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startCONSTRAINTS(NamedNodeMap nnm) { Vector<String> v = new Vector<String>(); getMigAttr(nnm, v); v.add(getAttribute(nnm, "wrap", "")); String span = getAttribute(nnm, "span", null); if (span != null) { v.add("span "+span); } ctx.constraints = explode(v); } COM: <s> p reads the mig layout constraints p </s>
funcom_train/8528205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFileError(int fileId, String msg) throws SQLException { String sql = "insert into " + Tables.ERRORS + " (message,file_id) values(?, ?)"; PreparedStatement stmt = this.getConnection().prepareStatement(sql); stmt.setString(1, msg); stmt.setInt(2, fileId); stmt.execute(); } COM: <s> sets the file error </s>
funcom_train/45459523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeRadioItem(IRadioItem item) { if (item instanceof CategoryRadioItem) { IRadioItem categoryToRemove = _rootCategory.getChild(item.getName()); if (categoryToRemove != null) { _rootCategory.getChildren().remove(categoryToRemove); } } else if (item instanceof RadioItem) { IRadioItem parentCategory = item.getParent(); parentCategory.getChildren().remove(item); } } COM: <s> remove a radio from the radio list </s>
funcom_train/35669757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addValueDomainPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LNode_valueDomain_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LNode_valueDomain_feature", "_UI_LNode_type"), LCPnetPackage.Literals.LNODE__VALUE_DOMAIN, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the value domain feature </s>
funcom_train/39949273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLongitude(double longitude){ if(Double.isNaN(longitude)) { throw new IllegalArgumentException("Longitude " + longitude + " is not legal"); } if(longitude >= -180D && longitude < 180D) { this._longitude=longitude; } else { throw new IllegalArgumentException("Longitude out of range"); } } COM: <s> sets the geodetic longitude for this point </s>
funcom_train/25202204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeCounters() throws GeneralException { long value; for (int i = 0; i < NUMBER_OF_COUNTERS; i++) { value = documentWriterOptions.getCountOption("count" + i) .getValue(); dviOutputStream.writeNumber(convertToInt(value), BYTES_PER_QUADRUPLE); } } COM: <s> write the state of the counter registers </s>
funcom_train/7266344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SecurityToken readSecurityToken() throws IOException { int length = readUnsignedByte(); if (length == 0) { return null; } byte[] securityToken = new byte[length]; readFully(securityToken, 0, securityToken.length); return new AddressSecurityToken(securityToken, MACCalculatorRepositoryManager); } COM: <s> reads a address security token from the input stream </s>
funcom_train/35051419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton_load() { if (jButton_load == null) { jButton_load = new JButton(); jButton_load.setText("Load"); jButton_load.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { loadAction(); } }); } return jButton_load; } COM: <s> this method initializes j button load </s>
funcom_train/16451076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printBibleDbAge() { Date retiredBibleDbDate=new Date(); System.out.println("[+BIBLE-DB-AGE+]"); Iterator<String> iter=timestampDb.keySet().iterator(); String db2=""; while(iter.hasNext()) { db2=iter.next(); retiredBibleDbDate=timestampDb.get(db2); System.out.println("Bible:"+db2+", Age:"+(new Date().getTime()-retiredBibleDbDate.getTime())+" ms"); } } COM: <s> prints the bible db age </s>
funcom_train/37147137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateAutoFixList() { myAutoFixList.clear(); for (TaskGroup taskGroup : myTaskGroups) { for (Task task: taskGroup.getTasks()) { if (taskGroup.getName().equals("incomplete")) { myAutoFixList.add(new AutoFixCompleted(task)); } } } } COM: <s> create auto fix list for task in filter tree </s>
funcom_train/50164067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getDisabledSets() { if (disabledSets == null) { disabledSets = new ArrayList(); ArrayList setInfos = getSetInfos(); if (setInfos != null) { SetInfo set; for (int i = 0; i < setInfos.size(); i++) { set = (SetInfo) setInfos.get(i); if (!set.isEnabled()) disabledSets.add(set.getSetSpec()); } } } return disabledSets; } COM: <s> gets the configured file sets that are currently disabled in this repository </s>