__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/2431550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ManagedProject createManagedProject(IntegrationProject project, File projectFolder) throws InterchangeSavingException { ProjectFile jip = ProjectFile.createForNewProject(project, projectFolder); ManagedProjectImpl mp = new ManagedProjectImpl(this, project, jip, projectFolder); project.refreshItemLookup(); mp.buildDataStore(); mp.buildDependencies(); mp.saveToDisk(); return mp; } COM: <s> creates a code managed project code wrapper for an code integration project code </s>
funcom_train/5343408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connect() { TorrentLocation ep = getTorrentLocation(); if (ep == null) { if (LOG.isDebugEnabled()) LOG.debug("no hosts to connect to"); return; } try { NIOSocket sock = (NIOSocket) Sockets.connect(ep.getAddress(), ep.getPort(), Constants.TIMEOUT); initializeOutgoing(sock); } catch (IOException ioe) { if (LOG.isDebugEnabled()) LOG.debug("Connection failed: " + ep); ep.strike(); if (!ep.isOut()) addEndpoint(ep); else _badPeers.add(ep); } } COM: <s> this method tries to establish one more connection </s>
funcom_train/42711664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getJButtonModifyCustomerPhone() { if (jButtonModifyCustomerPhone == null) { jButtonModifyCustomerPhone = new JButton(); jButtonModifyCustomerPhone.setBounds(new Rectangle(720, 210, 101, 21)); jButtonModifyCustomerPhone.setText("Modify"); jButtonModifyCustomerPhone.setActionCommand("DeleteCustomer"); } return jButtonModifyCustomerPhone; } COM: <s> this method initializes j button modify customer phone </s>
funcom_train/22563279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String deleteEntities() { try { Iterator<IRowItem<T>> iterator = getRowItems().iterator(); while (iterator.hasNext()) { IRowItem<T> rowItem = iterator.next(); if (rowItem.getChecked()) { IDatabaseEntity entity = rowItem.getEntity(); entity.setStatus(StatusType.DEL); entity.save(); editor.entityDeleted(entity); iterator.remove(); } } } catch (Exception e) { PortletUtils.handleError(LOG, e); } return null; } COM: <s> delete the selected competences </s>
funcom_train/31740707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WaitObject executeAsync(List tasks) { WaitObject waitObject = new WaitObject(tasks.size()); for (int i = 0; i < tasks.size(); i++) { getWorkerThread().setTask((Runnable)tasks.get(i), waitObject); } return waitObject; } COM: <s> executes a list of tasks asynchronous </s>
funcom_train/2622168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { this.dateFormatters = new DateTimeFormatter[this.datePatterns.length]; for ( int i = 0; i < this.dateFormatters.length; i++ ) { this.dateFormatters[i] = DateTimeFormat.forPattern(datePatterns[i]); if ( timeZone != null ) { this.dateFormatters[i] = dateFormatters[i].withZone( DateTimeZone.forTimeZone(timeZone)); } } } COM: <s> initialize after properties set </s>
funcom_train/494955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LegendSelectionListener getLegendSelectionListener() { if (legendSelectionListener == null) { legendSelectionListener = new LegendSelectionListener() { public void selected(Object selection) { if (selection != null) { if (selection instanceof SubEntity) { SubEntity selectedSubEntity = (SubEntity)selection; setSelectionForSubHit(selectedSubEntity); } } } }; } return legendSelectionListener; } COM: <s> returns a listener for use in allowing external selection setting </s>
funcom_train/20219257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHandleProperty() throws Exception{ PropertyHandler propertyHandler = new WeekOfYearHandler(); Calendar calendar = Calendar.getInstance(); Date dt = new Date(); calendar.setTime(dt); calendar.set(Calendar.YEAR, 2008); calendar.set(Calendar.MONTH, Calendar.MARCH); calendar.set(Calendar.DAY_OF_MONTH, 8); assertEquals(new Integer(10), propertyHandler.doProperty(calendar.getTime())); } COM: <s> week of year handler </s>
funcom_train/4540979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rollback() { if (isClosed) { return; } synchronized (database) { if (transactionList.size() != 0) { try { database.logger.writeToLog(this, Token.T_ROLLBACK); } catch (HsqlException e) {} } database.txManager.rollback(this); clearIndexRoots(); } } COM: <s> rolls back any uncommited transaction this session may have open </s>
funcom_train/8284212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List parseItems(Element rssRoot) { Collection eItems = getItems(rssRoot); List items = new ArrayList(); for (Iterator i=eItems.iterator();i.hasNext();) { Element eItem = (Element) i.next(); items.add(parseItem(rssRoot,eItem)); } return items; } COM: <s> parses the root element of an rss document looking for all items information </s>
funcom_train/43244839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetPoolSize() throws Exception { System.out.println("setPoolSize"); int poolSize = 0; EOServerStatusImpl instance = new EOServerStatusImpl(); instance.setPoolSize(poolSize); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set pool size method of class org </s>
funcom_train/16910952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(final Graphics g) { g.drawImage(image, 0, 0, this); synchronized (this) { // Notify method splash that the window // has been painted. // Note: To improve performance we do not enter // the synchronized block unless we have to. if (!paintCalled) { paintCalled = true; notifyAll(); } } } COM: <s> paints the image on the window </s>
funcom_train/42135547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBufferTime(long time) { this.currentBufferTime = time; for (int i = 0; i < managers.size(); i++) { RTPManager manager = (RTPManager) managers.get(i); BufferControl buffer = (BufferControl) manager.getControl(BUFFER_CONTROL_CLASS); if (buffer != null) { buffer.setMinimumThreshold(time); } } } COM: <s> sets the buffering of the receiver </s>
funcom_train/11005361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Record removeChild(Record ch) { Record rm = null; ArrayList<Record> lst = new ArrayList<Record>(); for(Record r : _children) { if(r != ch) lst.add(r); else rm = r; } _children = lst.toArray(new Record[lst.size()]); return rm; } COM: <s> remove a child record from this record container </s>
funcom_train/21017547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSize(double width, double height) { requireTrue(width >= 0, "@require (width >= 0)"); requireTrue(height >= 0, "@require (height >= 0)"); if ((width != getWidth()) || (height != getHeight())) { _height = height; _width = width; setVerticalPosition(_verticalPosition); setHorizontalPosition(_horizontalPosition); setChangeLevel(CHANGE_MAJOR); } } COM: <s> sets the size of the decorator and replaces the shown section if </s>
funcom_train/31457968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Identification addTask(Task task) throws RemoteException { Identification id = new Identification(task.getTaskType()); if (Log.DEBUG_DEVELOPMENT) Log.event(Log.DEBUG_INFO, "Checking element presence"); // check if task is not already present if (taskLibrary.isTaskAlreadyPresent(id)) { Log.event(Log.WARNING, "Task already exists in TaskLibrary"); return null; } taskLibrary.addTask(task); return id; } COM: <s> adds task implementation even over rmi </s>
funcom_train/22468937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawItem(Graphics g, int index, int dx, int dy) { //Vm. debug(this+" index: "+index+", items.size: "+items.size()+", // dx,dy = "+dx+","+dy); if (0 <= index && index < itemCount) g.drawText(items.items[index].toString(), dx, dy); } COM: <s> you can extend list box and overide this method to draw the items </s>
funcom_train/3807347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "P" + getYears() + "Y" + getMonths() + "M" + getDays() + "DT" + getHours() + "H" + getMinutes() + "M" + NumberFormat.getInstance().format(getSeconds()) + "S"; } COM: <s> p returns a string representation of this duration </s>
funcom_train/32056955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsConstrainedMoveEvent() { System.out.println("testIsConstrainedMoveEvent"); Object obj = null; JGraph jgraph = new JGraph(); CellMapper cellmapper = null; EdgeView edge = new EdgeView(obj, jgraph, cellmapper); MouseEvent event = null; assertEquals(edge.isConstrainedMoveEvent(event),false); } COM: <s> this function tests is constrained move event function of edge view class </s>
funcom_train/31889954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while (true) { BeeMessage msg = commQueue.get(); if (msg != null) try { processMessage(msg); } catch (Exception e) { log.severe("Unhandled exception! Continue working at your own risk! Call admin! " + e); e.printStackTrace(); } else break; } } COM: <s> periodically polls messages from comms queue and calls </s>
funcom_train/41506871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ISVNSession KEEP_ALIVE = new ISVNSession() { public boolean keepConnection(SVNRepository repository) { return true; } public void saveCommitMessage(SVNRepository repository, long revision, String message) { } public String getCommitMessage(SVNRepository repository, long revision) { return null; } public boolean hasCommitMessage(SVNRepository repository, long revision) { return false; } }; COM: <s> a session options implementation that simply allows to keep </s>
funcom_train/5266159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void computeNeuronsDelta() { List<Neuron> neurons = getNeurons(); for (int i = 0, n = getNNeurons(); i < n; i++) { PerceptronNeuron neuron = (PerceptronNeuron)neurons.get(i); /** algorithm for hidden neurons */ neuron.getLearner().computeDeltaAsHiddenNeuron(); } } COM: <s> algorithm for hidden layer </s>
funcom_train/14652588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Channel join(@NotNull final String rawChannelName) { final String channelName = rawChannelName.toLowerCase(); final PrintWriter out = this.out; assert out != null; out.println("JOIN " + channelName); out.flush(); return getOrCreateChannel(channelName); } COM: <s> joins an irc channel </s>
funcom_train/40004697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(long elapsedTime) { // if no state, pause a short time if (currentState == null) { try { Thread.sleep(100); } catch (InterruptedException ex) { } } else { String nextState = currentState.checkForStateChange(); if (nextState != null) { setState(nextState); } else { currentState.update(elapsedTime); } } } COM: <s> updates world handles input </s>
funcom_train/7751731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeColumn(String rowKey, String colFamily, Column column) { ColumnOrSuperColumn cosc = new ColumnOrSuperColumn(); cosc.setColumn(column); Mutation mutation = new Mutation(); mutation.setColumn_or_supercolumn(cosc); getMutationList(rowKey, colFamily).add(mutation); } COM: <s> write a column value </s>
funcom_train/25843354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCountSuch(Tester t){ t.checkExpect(algo.countSuch(blist, redBalloon), 2); t.checkExpect(algo.countSuch(blist, smallBalloon), 2); t.checkExpect(algo.countSuch(arrblist, redBalloon), 2); t.checkExpect(algo.countSuch(arrblist, smallBalloon), 2); } COM: <s> algorithms methods tests count such </s>
funcom_train/20896080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddUser() { System.out.println("addUser"); User user = null; UsersList instance = new UsersList(); instance.addUser(user); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of add user method of class it </s>
funcom_train/37797090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getCategory() { String category = SymbolTable.getValue( "${ant." + CATEGORY_PROPERTY + "}"); if (category == null) { category = SymbolTable.getValue( "${" + CATEGORY_PROPERTY + "}"); } if (category == null) { category = System.getProperty(CATEGORY_PROPERTY); } return category; } COM: <s> get the category specified for the test from ant properties the </s>
funcom_train/21611002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExpandParameters() { String result = Utils.expandsString("this %S a very %S test %S", new String[]{"is", "complex", "string"} ); assertEquals("Unespected expansion.", "this is a very complex test string", result); } COM: <s> tests many parameters as markers </s>
funcom_train/22815261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(File file) { try { RandomAccessFile rfile = new RandomAccessFile(file, "r"); byte[] data = new byte[(int) file.length()]; rfile.readFully(data); this.value = new String(Base64.encodeBase64(data)); String name = file.getName(); String[] spname = name.split("\\."); if (spname.length > 1) { this.format = "." + spname[1]; } else { this.format = ""; } this.size = file.length(); } catch (IOException e) { throw new RuntimeException(e); } } COM: <s> set the data to be transferred using a given file as input </s>
funcom_train/36632081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String makeObject(String o) { if (o.contains("[]")) { return o; } else { o = o.replace("boolean", "java.lang.Boolean"); o = o.replace("long", "java.lang.Long"); o = o.replace("int", "java.lang.Integer"); o = o.replace("float", "java.lang.Float"); o = o.replace("double", "java.lang.Double"); } return o; } COM: <s> converts a string representing a java primitive data type to a wrapper </s>
funcom_train/15625674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void beginTransaction() { if (transactionDepth == 0) { transactionThread = Thread.currentThread(); beginRecChange(); } else { // == is okay for threads. //noinspection ObjectEquality if (transactionThread != Thread.currentThread()) { throw new IllegalStateException("A transaction must only be used by one thread."); } } transactionDepth++; } COM: <s> starts a new transaction </s>
funcom_train/19399185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public KeyBuilder append(double d) { // performance tweak. if (len + 8 > buf.length) ensureCapacity(len+8); // ensureFree(8); long v = Double.doubleToLongBits(d); // convert to twos-complement long. if (v < 0) { v = 0x8000000000000000L - v; } // delegate to append(long) return append( v ); } COM: <s> appends a double precision floating point value by first converting it </s>
funcom_train/34641741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createAst() { IFile editorFile = (IFile) fEditor.getEditorInput().getAdapter( IFile.class); ASTParser parser = ASTParser.newParser(AST.JLS3); parser.setSource(javaFile.toString().toCharArray()); parser.setProject(JavaCore.create(editorFile.getProject())); parser.setUnitName("Parser.java"); parser.setResolveBindings(true); ast = (CompilationUnit) parser.createAST(null); } COM: <s> parses the abstract syntax tree from the actual java file </s>
funcom_train/20876464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { iNrLargeExams = 0; for (Exam exam : variables()) { if (getLargeSize() >= 0 && exam.getSize() >= getLargeSize()) iNrLargeExams++; for (ExamRoomPlacement room : exam.getRoomPlacements()) { room.getRoom().addVariable(exam); } } iLimits = null; iMaxDistributionPenalty = null; } COM: <s> initialization of the model </s>
funcom_train/9559713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getCellForCoordinates(int x, int y) { Point cell = new Point(0, 0); cell.y = getRowForY(y); int width = 0; for (int i = 0; width < x; i++) { if (i >= m_Model.getColumnCount()) return new Point(-1, -1); width += getColumnWidth(i); if (x < width) cell.x = i; } cell.x = (cell.x + m_LeftColumn); return getValidCell(cell.x, cell.y); } COM: <s> this is the same method than ktable but with cell </s>
funcom_train/14437830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getLastFile() { if (prefs.get("LastFile","").equals("")) //$NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ return null; else return new File(prefs.get("LastFile","")); //$NON-NLS-1$ //$NON-NLS-2$ } COM: <s> getting last used file </s>
funcom_train/50083857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point2d get2DCenter() { double xOfCenter = 0; double yOfCenter = 0; for (IAtom atom : atoms) { xOfCenter += atom.getPoint2d().x; yOfCenter += atom.getPoint2d().y; } return new Point2d(xOfCenter / ((double) getAtomCount()), yOfCenter / ((double) getAtomCount())); } COM: <s> returns the geometric 2 d center of the bond </s>
funcom_train/40942913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void delete(Integer id, String sku) throws ServiceException { Boolean success = false; try { if (id != null) { success = (Boolean) soapClient.call(ResourcePath.ProductDelete, id); } else if (sku != null) { success = (Boolean) soapClient.call(ResourcePath.ProductDelete, sku); } } catch (AxisFault e) { if (debug) e.printStackTrace(); throw new ServiceException(e.getMessage()); } if (!success) throw new ServiceException("Not success deleting product."); } COM: <s> delete a product by your id prefered or your sku </s>
funcom_train/8716304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readThing() { // skip whitespace while (PDFFile.isWhiteSpace(data[loc])) { loc++; } // read thing int start= loc; while (!PDFFile.isWhiteSpace(data[loc])) { loc++; } String s= new String(data, start, loc-start); // System.out.println("Read: "+s); return s; } COM: <s> get the next postscript word </s>
funcom_train/44559812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Region getRegion(String code) { IServer server = getDefaultServer(); if (server != null && server.getRegions() != null) { for (Region region : server.getRegions()) { if (region.getCode().equals(code)) return region; } } return null; } COM: <s> retrieves the region for the given code </s>
funcom_train/18377886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireRowConstructionEvent(Control newControl) { // if (rows.size() < 1) { // return; // } for (Iterator rowConstructionListenersIter = parent.rowConstructionListeners.iterator(); rowConstructionListenersIter.hasNext();) { IRowConstructionListener listener = (IRowConstructionListener) rowConstructionListenersIter.next(); listener.rowConstructed(newControl); } } COM: <s> fire the row construction event </s>
funcom_train/45599477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createExecutedScriptsTable() { // If version table is invalid, drop and re-create try { defaultDatabase.dropTable(defaultDatabase.getDefaultSchemaName(), executedScriptsTableName); } catch (DbMaintainException e) { // ignored } // Create db version table sqlHandler.executeUpdateAndCommit(getCreateExecutedScriptTableStatement(), defaultDatabase.getDataSource()); } COM: <s> creates the version table and inserts a version record </s>
funcom_train/1659078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Person growNetworkRandom() { // System.err.println("TS SIZE: " + ts.size()); if (ts.isEmpty()) return null; int k = re.nextInt(ts.size()); int i = 0; for (Iterator<Person> it = ts.iterator(); it.hasNext(); i++) { Person p = it.next(); if (i==k) { ts.remove(p); return p; } } throw new RuntimeException("growNetworkRandom(): sample error"); } COM: <s> chooses the next person uniformly at random rather than weighted </s>
funcom_train/10482034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Writer out) throws IOException { // we have an empty list if (ranges.size() == 0) { return; } Range range = (Range) ranges.get(0); range.save(out); for (int i = 1; i < ranges.size(); i++) { out.write(","); range = (Range) ranges.get(i); range.save(out); } } COM: <s> save this list of ranges out to a </s>
funcom_train/42638968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Number calcParameter(Vector Xn, int iterationNumber, LinAEProblem problem) { Vector r = getDiscrepancy(problem, Xn); //A*r_n Vector R = problem.getMatrix().cloneMatrix().product(r); //(A*r_n,r_n) Number A = R.cloneVector().dotProduct(r); //If the exact solution is obtained. if (A.equals(Number.zero())) return A; //(A*r_n,A*r_n) Number B = R.cloneVector().dotProduct(R); return A.divide(B); } COM: <s> minimal discrepancies method parameter calculation </s>
funcom_train/34661051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocation(String v) { if (Word_Type.featOkTst && ((Word_Type)jcasType).casFeat_location == null) this.jcasType.jcas.throwFeatMissing("location", "uima.types.Word"); jcasType.ll_cas.ll_setStringValue(addr, ((Word_Type)jcasType).casFeatCode_location, v);} COM: <s> setter for location sets </s>
funcom_train/40793404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCancelCommand2() { if (cancelCommand2 == null) {//GEN-END:|116-getter|0|116-preInit // write pre-init user code here cancelCommand2 = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|116-getter|1|116-postInit // write post-init user code here }//GEN-BEGIN:|116-getter|2| return cancelCommand2; } COM: <s> returns an initiliazed instance of cancel command2 component </s>
funcom_train/29711829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean allowTrim(String expression) { for (int i = 0, size = expression.length(); i < size; i++) { char ch = expression.charAt(i); if (!Character.isLetterOrDigit(ch) && (ch != '.') && (ch != '_')) { return false; } } return true; } COM: <s> the method is used to judge whether the value binding and method binding </s>
funcom_train/23245396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getPoint(final EastNorth aPoint) { double x = (aPoint.east() - center.east()) / scale + getWidth() / 2.0d; double y = (center.north() - aPoint.north()) / scale + getHeight() / 2.0d; return new Point((int) x, (int) y); } COM: <s> return the point on the screen where this coordinate would be </s>
funcom_train/2331258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void containsBox(int column, int row, int width, int height) { if (column < 0 || column + width > columns || row < 0 || row + height > rows) throw new IndexOutOfBoundsException("column:" + column + ", row:" + row + " ,width:" + width + ", height:" + height); } COM: <s> checks whether the receiver contains the given box </s>
funcom_train/5075475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finalizeRecord(boolean eof) throws IOException { if (!fileComplete && !recordComplete) { int descriptor = DESC_CODE_EOR; if (eof) { descriptor |= DESC_CODE_EOF; fileComplete = true; } writeBlock(descriptor, idx); recordComplete = true; idx = 0; } } COM: <s> flushes the last dataset </s>
funcom_train/19249999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { filterDataProvider.init(); dataVisible.clear(); Map data = filterDataProvider.getFirstData(); if (data ==null) return; List serialNumbers = filterDataProvider.getSerialNumbers(); for (Iterator it = serialNumbers.iterator(); it.hasNext();) { Integer serialNumber = (Integer)it.next(); dataVisible.put( serialNumber, Boolean.FALSE); } filterDataProvider.getFirstData(); } COM: <s> reset the current index of filter data provider to 0 </s>
funcom_train/9159580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(long value) { elements[size] = value; size++; if (size == capacity) { capacity = capacity * 2; long[] newElements = new long[capacity]; for (int i=0; i<size; i++) { newElements[i] = elements[i]; } elements = newElements; } } COM: <s> adds a new long value to the end of the list </s>
funcom_train/22045448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getExpression(){ /* first create an array of HTML characters */ java.util.Vector<String> c = getStringVector( list.size() ); StringBuilder s = new StringBuilder(); for( int i = 0; i < c.size(); ++i ) s.append( c.elementAt( i ) ); return s.toString(); } COM: <s> convert expression to a string </s>
funcom_train/37078896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void showSyntenyFineView() { // if (selectedFeaturePairLink == null) return; // // (fp,species1,spc2) or (fp,cur1,cur2) or (fp,linkCS) // syntenyPanel.showFineViewForFeaturePair(selectedFeaturePairLink,links); // } COM: <s> bring up the synteny fine view for the currently selected link </s>
funcom_train/34999157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Pagination forUsers(int totalUsers) { this.recordsPerPage = this.config.getInt(ConfigKeys.USERS_PER_PAGE); this.totalRecords = totalUsers; this.totalPages = this.calculeTotalPages(); this.thisPage = this.calculeThisPage(this.start); this.start = this.calculeStart(this.start, this.recordsPerPage); this.baseUrl = String.format("/%s/%s", Domain.USERS_ADMIN, Actions.LIST); this.id = 0; return this; } COM: <s> create pagination for user listing </s>
funcom_train/20288523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValid() { if (email == null || "".equals(email.trim())) { return false; } if (firstName == null || "".equals(firstName.trim())) { return false; } if (lastName == null || "".equals(lastName.trim())) { return false; } return true; } COM: <s> gets the valid attribute of the invitation object </s>
funcom_train/16268896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMockMethod(MockMethod mockMethod) { String classAndMethod = generateMethodKey(mockMethod.getOriginatingClass().getName(), mockMethod.getMethod().getName()); logger.debug("ContestJMockService::addMockMethod adding mock for key: " + classAndMethod); mockMethodReferences.put(classAndMethod, mockMethod); } COM: <s> adds a mock method to the internal map intended to be </s>
funcom_train/17202412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ValueGraphVertex findOrCreateVertex(Register r) { ValueGraphVertex v = getVertex(r); if (v == null) { v = new ValueGraphVertex(r); v.setLabel(r, 0); graph.addGraphNode(v); nameMap.put(r, v); } return v; } COM: <s> find or create an value graph vertex corresponding to a </s>
funcom_train/41164717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoSingleTextTeacher entity) { EntityManagerHelper.log("saving CoSingleTextTeacher instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved co single text teacher </s>
funcom_train/4209541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMessage(Message message) throws XMPPException { // Force the recipient, message type, and thread ID since the user elected // to send the message through this chat object. message.setTo(participant); message.setType(Message.Type.chat); message.setThread(threadID); chatManager.sendMessage(this, message); } COM: <s> sends a message to the other chat participant </s>
funcom_train/18582400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPatientTab(ClinicalDocument clinicalDocument) { mainFrame.addTab(clinicalDocument.getRecordTarget().getPatientRole(). getPatient().getName().getFamilyName(), new TapearPanel(true), "This is the voice of your conscience speaking. This patient needs your help. Have a nice day."); mainFrame.getCurrentTab().setClinicalDocument(clinicalDocument); } COM: <s> adds and initialises a patient tab in the workspace </s>
funcom_train/33722728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startObservation() { this.observation = new PathObservation(presentationModel, this.path); this.observation.addPropertyChangeListener("target", this); if (this.observation.getTarget() != null) { listener.modelGained(new ModelProviderEvent(ModelProvider.this, ModelProvider.this.presentationModel, path)); } } COM: <s> starts the observation of the presentation model along the path </s>
funcom_train/22285217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printView(int[] view) { if (view.length < 4) { System.err.println("\nERROR:printView got a view with less than 4 elements!!!"); } System.out.print("["+view[0]+","+view[1]+","+view[2]+","+view[3]+"]"); } COM: <s> print the given view to system </s>
funcom_train/43701171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendEmail(String email, String aSubject, String aBody) { try { InternetAddress to = new InternetAddress(email); sendEmail(to, aSubject, aBody); } catch (MessagingException ex) { log.error("Cannot send email. ", ex); } } COM: <s> send an email through our server </s>
funcom_train/11005472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeOut(OutputStream out) throws IOException { // Write out our children, and stuff them into the Escher layer // Grab the children's data ByteArrayOutputStream baos = new ByteArrayOutputStream(); for(int i=0; i<_children.length; i++) { _children[i].writeOut(baos); } byte[] data = baos.toByteArray(); // Save in the escher layer _escherRecord.setData(data); } COM: <s> stores the data for the child records back into the escher layer </s>
funcom_train/22947674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showSelectedColumns() { Collection<Column> c = Facade.getInstance().getAllSelectedColumnsIWS(); if (c.isEmpty()) System.out.println("INFO: There are no selected columns in internal structure!"); for (Column cc : c) { System.out.println(cc); } } COM: <s> shows selected columns </s>
funcom_train/22791801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int get(int itemType) { switch(itemType) { case TYPE_YEAR : return yearMonthDay / 100 / 100 ; case TYPE_MONTH: return (yearMonthDay / 100) % 100 ; case TYPE_DAY : return yearMonthDay % 100 ; default: throw new IllegalArgumentException(String.valueOf(itemType)); } } COM: <s> see constants type for more information </s>
funcom_train/2609986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addRemoteCandidate(TransportCandidate rc) { // Add the candidate to the list if (rc != null) { if (acceptableTransportCandidate(rc, offeredCandidates)) { synchronized (remoteCandidates) { remoteCandidates.add(rc); } // Check if the new candidate can be used. checkRemoteCandidate(rc); } } } COM: <s> add a remote candidate to the list </s>
funcom_train/3903965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEndTimeLimitPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LimitConditionsType_endTimeLimit_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LimitConditionsType_endTimeLimit_feature", "_UI_LimitConditionsType_type"), ImsssPackage.Literals.LIMIT_CONDITIONS_TYPE__END_TIME_LIMIT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the end time limit feature </s>
funcom_train/35778807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showAllDocuments() throws IOException, ServiceException { DocumentListFeed feed = service.getFeed( new URL(documentListFeedUrl.toString() + DOCUMENT_CATEGORY), DocumentListFeed.class); out.println("List of all word documents:"); for (DocumentListEntry entry : feed.getEntries()) { printDocumentEntry(entry); } } COM: <s> shows all word processing documents that are in the documents list </s>
funcom_train/27859005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NTEdge addEdge(NTNode tail, NTNode head){ return addEdge(tail, head, ProjectColors.INTRA_COLOR_DEFAULT, null); // if (tail.getMatrix() == head.getMatrix()){ // return addIntraEdge(tail, head); // } // else { // return addExtraEdge(tail, head); // } } COM: <s> method is used if inputfile is passed directly to zvtm ontotrix </s>
funcom_train/18846935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createStringPropertyNotFoundException(String tscToken, String propertyID) { PropertyMap propertyMap = new PropertyMap(); DiagnosticsListCreator edg; edg = new DiagnosticsListCreator(); String severityType = DiagnosticsCodes.getErrorDiagnosticsCode(); String exceptionID = "80406"; propertyMap.addPropertyValuePair("propertyID", propertyID); String serExMsg = edg.constructErrorDocOneItemParam(tscToken, componentID, severityType, subSystemCode, exceptionID, propertyMap); return serExMsg; } COM: <s> construct string property not found exception message </s>
funcom_train/31155230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RelativeModifier getRelativeModifier(double param) { RelativeModifier m = new RelativeModifier(param); RelativeModifier hm = (RelativeModifier) this.modifiers.get(new Integer(m.hashCode())); if (m.equals(hm)) { return hm; } else { this.modifiers.put(new Integer(m.hashCode()), m); return m; } } COM: <s> return a relative modifier </s>
funcom_train/46575603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endCONSTRAINTS(NamedNodeMap nnm) { FormToken parentctx = ctx.parentctx; Control ctrl = ((Control)parentctx.control); if (ctrl != null) { ctrl.setLayoutData(ctx.constraints); // for debugging purposes: // ctrl.setToolTipText(parentctx.control.getClass().getName()+":"+(String) ctx.constraints); } else { log.warning(parentctx.node.getLocalName()); } } COM: <s> p sets the constraints of the parent control p </s>
funcom_train/10950851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void afterActivity(ContextEvent event) { WebContext context = (WebContext) event.getContext(); HttpSession session = context.getHttpSession(); StringBuffer sb = new StringBuffer("{"); sb.append(session.getId()); sb.append("} afterActivity"); servlet.log(sb.toString()); } COM: <s> invoked immediately after execution of the related activity has </s>
funcom_train/4936789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runInsertBefore() { System.out.println("\nDroolsAPITest.runInsertBefore()"); final KnowledgeBuilder builder = KnowledgeBuilderFactory .newKnowledgeBuilder(); loadDroolsSource( builder, droolsSource ); final KnowledgeBase kbase = createKnowledgeBase(); final StatefulKnowledgeSession session = kbase.newStatefulKnowledgeSession(); session.insert(new Triple("<urn:tune>", "<urn:genre>", "\"Blues\"") ); kbase.addKnowledgePackages(builder.getKnowledgePackages()); int ret = session.fireAllRules(); System.out.println( "number of rules fired " + ret ); printAllResults( session ); session.dispose(); } COM: <s> add rules after inserting facts </s>
funcom_train/28505838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mySqlConnect(String connString, String user, String password)throws Exception, SQLException{ Class.forName("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/containingdb", "root", "Aladinn33+"); } COM: <s> my sql connect </s>
funcom_train/18744118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAll(Collection<? extends T> c) { Set<T> addedElements = new HashSet<T>(); boolean result = false; for (T element : c) { if (this.set.add(element)) { addedElements.add(element); result = true; } } if (result) { setChanged(); notifyObservers(new AddUpdate<T>(addedElements)); } return result; } COM: <s> adds the elements to the underlying set then notifies the observers for </s>
funcom_train/50621771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getQualifiedName() { String qname = getName(); ModelPackage pkg = null; for(pkg = getPackage(); pkg != null; pkg = pkg.getPackage()) if (pkg.hasStereotype(ModelStereotype.BUSINESS_COMPONENT)) break; // if model element belongs to package, qualify name if (pkg != null) qname = pkg.getName() + ":" + qname; return qname; } COM: <s> return the class type name qualified with the business component it belongs to </s>
funcom_train/22172477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isConnected(){ boolean b = false; if(!occupied) return b; try{ outStream.write(oCprotocol.getDiscard().generatePacket()); occupied=b=true; }catch(java.net.SocketException e){ occupied=b=false; }catch(IOException e){ occupied=b=false; e.printStackTrace(); } return b; } COM: <s> sends a dummy packet to the assigned socket </s>
funcom_train/14246662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printHashTable(Hashtable ht){ System.out.println("HASHTABLE: "); Set s = ht.entrySet(); Object[] a = s.toArray(); for (int i =0; i<a.length;i++){ System.out.println("|"+a[i]+"|"); } } COM: <s> its only a little helper method to print a hashtable </s>
funcom_train/20290167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isValid() { if (projectId == -1) { errors.put("actionError", "Project ID not specified"); } if (!StringUtils.hasText(subject)) { errors.put("subjectError", "Required field"); } return !hasErrors(); } COM: <s> gets the valid attribute of the issue category object </s>
funcom_train/8526404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { try { final StringWriter writer = new StringWriter(); writer.write(getSelectString()); getAliases().appendAliasListTo(writer); writer.write(getWhereString()); return writer.toString(); } catch (IOException ex) { throw new RuntimeException(ex.toString()); } } COM: <s> answer the receivers string representation i </s>
funcom_train/44162737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean suitableForNativeSettlement(Tile tile) { if (!tile.getType().canSettle()) return false; int good = 0, n = 0; for (Tile t : tile.getSurroundingTiles(1)) { if (t.getType().canSettle()) good++; n++; } return good >= n / 2; } COM: <s> is a tile suitable for a native settlement </s>
funcom_train/49469511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PageCounter getCountersForListVrtMeeting() throws Exception, RaciException { Db db = dbRO(); try { _logger.info("VRT : getCountersForListVrtMeeting"); DbPerso.checkUserCanAccessModule(db, getCurrentUser()); return DbMeetingInfoLine.getCountersForListVrtMeeting(db); } catch (Exception e) { store(e); throw e; } finally { db.safeClose(); } } COM: <s> get page counters for vrt meetings </s>
funcom_train/445642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRelationDef() throws Exception{ String test = getOntHeader() + " relation a/3 \n" + "relation a(ofType b) "; TopEntity te = parser.parse(new StringBuffer(test))[0]; WsmlValidator w = Factory.createWsmlValidator(null); boolean b = w.isValid(te, errors, warnings); // printWarning(warnings); // printError(errors); assertFalse(b); } COM: <s> tests a relation with only some of the parameters defined </s>
funcom_train/28763382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIsAccepted(java.lang.Boolean value) throws com.intersys.objects.CacheException { com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value); mInternal.setProperty(ii_IsAccepted, jj_IsAccepted,kk_IsAccepted, com.intersys.objects.Database.RET_PRIM, "IsAccepted", dh); return; } COM: <s> sets new value for code is accepted code </s>
funcom_train/5607415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PyObject getList(int pos) { int kws_start = this.args.length - this.kws.length; if (pos < kws_start) { PyObject[] ret = new PyObject[kws_start - pos]; System.arraycopy(this.args, pos, ret, 0, kws_start - pos); return new PyTuple(ret); } return Py.EmptyTuple; } COM: <s> return the remaining arguments as a tuple </s>
funcom_train/44716405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getGuruMeditationCode() { // This had better be unique... if (m_guruMeditationCode == null) { m_guruMeditationCode = getHostname() + ":" + Integer.toHexString(Thread.currentThread().hashCode()) + ":" + Long.toHexString(System.currentTimeMillis()); } return m_guruMeditationCode; } COM: <s> returns the globally unique error code for this </s>
funcom_train/43260899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand1() { if (okCommand1 == null) {//GEN-END:|100-getter|0|100-preInit // write pre-init user code here okCommand1 = new Command("L\u00E4het\u00E4", Command.OK, 0);//GEN-LINE:|100-getter|1|100-postInit // write post-init user code here }//GEN-BEGIN:|100-getter|2| return okCommand1; } COM: <s> returns an initiliazed instance of ok command1 component </s>
funcom_train/44589328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void search(IWorkspace workspace, ISearchPattern searchPattern, IJavaSearchScope scope, IJavaSearchResultCollector resultCollector) throws JavaModelException { try { search( ((SearchPatternAdapter)searchPattern).pattern, new SearchParticipant[] {getDefaultSearchParticipant()}, scope, new ResultCollectorAdapter(resultCollector), resultCollector.getProgressMonitor()); } catch (CoreException e) { if (e instanceof JavaModelException) throw (JavaModelException) e; throw new JavaModelException(e); } } COM: <s> searches for matches of a given search pattern </s>
funcom_train/14034492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String generateErrorMessage(ArrayList<String> messages) { StringBuffer result = new StringBuffer(); if (messages.size() == 1) { result .append("<span class=\"emphasis\">An error occurred while processing your request:</span>\n"); } else { result .append("<span class=\"emphasis\">The following errors occurred while processing your request:</span>\n"); } result.append("<ul>\n"); for (String message : messages) { result.append("<li> "); result.append(message); result.append("</li>\n"); } result.append("</ul>\n"); return result.toString(); } COM: <s> generate an error message from a collection of errors </s>
funcom_train/14607698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Map getDebugStringProperties() { Map properties = new LinkedHashMap(); properties.put("time", new Date(time)); if (!converterFactory.getConverters().isEmpty()) properties.put("extra convertible types", converterFactory.toString()); return properties; } COM: <s> gather debugging information about this control object </s>
funcom_train/25189108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsReadonly() { System.out.println("isReadonly"); JSchema instance = new JSchema(); assertFalse(instance.isReadonly()); instance.setReadonly(true); assertTrue(instance.isReadonly()); instance.setReadonly(null); assertFalse(instance.isReadonly()); instance.setReadonly(false); assertFalse(instance.isReadonly()); } COM: <s> test of is readonly method of class jschema </s>
funcom_train/23267827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDniBeneficiario() { System.out.println("getDniBeneficiario"); Giros instance = new Giros(); String expResult = ""; String result = instance.getDniBeneficiario(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get dni beneficiario method of class capa negocios </s>
funcom_train/17818309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupPanels() { if (logger.isDebugEnabled()) { logger.debug("setupPanels() - start"); } prefPanels = new PreferencePanel[1]; prefPanels[0] = new StartupPreferences(props); //prefPanels[1] = new GeneralPreferences(props); if (logger.isDebugEnabled()) { logger.debug("setupPanels() - end"); } } COM: <s> sets up the individual preferences panels </s>
funcom_train/26239764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DefaultMutableTreeNode getQuestionsNodeByType(Class nodeClass) { Class curClass = nodeClass; while (curClass != null) { if (nodes.containsKey(curClass)) { return (DefaultMutableTreeNode) nodes.get(curClass); } curClass = curClass.getSuperclass(); } throw new IllegalArgumentException("Argument items contains illegal object: "+nodeClass.getName()); //$NON-NLS-1$ } COM: <s> get the node of the questions by type </s>
funcom_train/15473602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireEntitySelectionEvent(Object entity) { Vector vtemp = (Vector) selectionListeners.clone(); for (int x = 0; x < vtemp.size(); x++) { CaTIES_EntitySelectionListener target = (CaTIES_EntitySelectionListener) vtemp .elementAt(x); target.entitySelected(new CaTIES_EntityEvent(this, entity)); } } COM: <s> fire entity selection event </s>