__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/23309416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRowIndex(Comparable rowKey) { int result = -1; int count = this.data.size(); for (int i = 0; i < count; i++) { SchedSeries s = (SchedSeries) this.data.get(i); if (s.getKey().equals(rowKey)) { result = i; break; } } return result; } COM: <s> returns the row index for the given row key </s>
funcom_train/6266634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setRemoteParty(SIPMessage sipMessage) { if (!isServer()) { this.remoteParty = sipMessage.getTo().getAddress(); } else { this.remoteParty = sipMessage.getFrom().getAddress(); } if (sipStack.getLogWriter().isLoggingEnabled()) { sipStack.getLogWriter().logDebug( "settingRemoteParty " + this.remoteParty); } } COM: <s> set the remote party for this dialog </s>
funcom_train/22791673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getProjectsFile() { File result = Parameters.P_PROJECTS_FILE_PATH.of(getParameters()); if (result==Parameters.P_PROJECTS_FILE_PATH.getDefault()) { result = new File(getConfigDir(), PROJECTS_DATA); } return result; } COM: <s> shared projects data file </s>
funcom_train/11659271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void error(SAXParseException exception) throws SAXException { log.error( "Parse Error at line " + exception.getLineNumber() + " column " + exception.getColumnNumber() + ": " + exception.getMessage(), exception); if (errorHandler != null) { errorHandler.error(exception); } else { throw exception; } } COM: <s> forward notification of a parsing error to the application supplied </s>
funcom_train/593370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeCloseTag(JspWriter writer, String tag) throws JspException { try { writer.print("</"); writer.print(tag); writer.print(">"); } catch (IOException ioe) { JspException jspe = new JspException("IOException encountered while writing close tag </" + tag + "> to the JspWriter.", ioe); log.warn(jspe); throw jspe; } } COM: <s> writes out a close tag using the tag name supplied </s>
funcom_train/30005803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeExtension(String name) { boolean result = false; Iterator<Extension> i = this.getExtensions().iterator(); Extension e; while (i.hasNext()) { e = i.next(); if (e.getName().equals(name)) { i.remove(); result = true; } } return result; } COM: <s> removes an extension specified by its name </s>
funcom_train/20747972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ISIMetaData next() { if (modified==true) throw new RuntimeException("The underlying collection was modified"); if (hits==null) throw new RuntimeException("Read past end of list"); ISIMetaData answer = get(nextItemIndex, false); findItemsIndex(true); return answer; } COM: <s> return the next item in the iterator </s>
funcom_train/2800988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkConstructor(Class pJavaBean) throws IntrospectionException { try { pJavaBean.getConstructor((Class[]) null); return true; } catch (NoSuchMethodException e) { return false; } catch (SecurityException e) { throw new IntrospectionException("Security exception occurred whilst checking class constructor", e); } } COM: <s> checks if this class has a default constructor </s>
funcom_train/31660820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getAngle() { debug(1, "getAngle DSViewSplitter "); for (Enumeration Enumeration1 = ViewList.keys(); Enumeration1.hasMoreElements(); ) { Shape Shape1 = (Shape)Enumeration1.nextElement(); if (Shape1.contains(new Point(0, 0))) { DSView DSView1 = (DSView)ViewList.get(Shape1); return DSView1.getAngle(); } } return 0; } // getAngle() COM: <s> gets the angle attribute of the dsview splitter object </s>
funcom_train/14274289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(SmtpMail obj) { if (obj instanceof SmtpMail && this.getHost().equalsIgnoreCase(obj.getHost()) && this.getPort() == obj.getPort() && this.getUserid().equals(obj.getUserid()) && this.getPwd().equals(obj.getPwd())) return true; return false; } // end-method COM: <s> compare to another smtp mail object </s>
funcom_train/31416743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { //broadcastAll("NolServer will shutdown in 5 seconds."); try { Thread.sleep(5000); } catch (InterruptedException e) { } //broadcastAll("NolServer will shutdown NOW!"); //goodbyeAll(); closeAll(); database.save(databaseFilename); running = false; try { Thread.sleep(5000); } catch (InterruptedException e) { } System.exit(0); } COM: <s> causes the nol server to shutdown and save its database to disk </s>
funcom_train/38813653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private KeyStatus determineStatus(String key) { boolean wehave = prop.containsAsKey(key); boolean upstream = parent == null || parent.containsAsKey(key); if (upstream == true) { if (wehave == true) { return KeyStatus.Everywhere; } else { return KeyStatus.OnlyInParent; } } else { if (wehave == true) { return KeyStatus.OnlyHere; } else { return KeyStatus.AlreadyDeleted; } } } COM: <s> internal function determines the status of a key used for the renderer </s>
funcom_train/22285701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g, int cx, int cy, int cw, int ch) { if (hasFocus() && !editable) { textColor = getSelForeground(); super.paint(g, cx, cy, cw, ch); textColor = foreground; } else { super.paint(g, cx, cy, cw, ch); } } COM: <s> paint the text in the correct foreground color </s>
funcom_train/7660353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddAll2() { CopyOnWriteArraySet full = populatedSet(3); Vector v = new Vector(); v.add(three); v.add(four); v.add(one); // will not add this element full.addAll(v); assertEquals(5, full.size()); } COM: <s> add all adds each element from the given collection that did not </s>
funcom_train/72007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSub() { assertEquals("Subtraction failed", DataHolderFactory.holder(4), DataHolderFactory.holder(20).sub(DataHolderFactory.holder(16))); assertEquals("Subtraction failed", DataHolderFactory.holder(4), DataHolderFactory.holder(20.0).sub(DataHolderFactory.holder(16.0))); } COM: <s> test of the sub method </s>
funcom_train/45829064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add (RectangleValues rect) { int left = x < rect.x ? x : rect.x; int top = y < rect.y ? y : rect.y; int lhs = x + width; int rhs = rect.x + rect.width; int right = lhs > rhs ? lhs : rhs; lhs = y + height; rhs = rect.y + rect.height; int bottom = lhs > rhs ? lhs : rhs; x = left; y = top; width = right - left; height = bottom - top; } COM: <s> destructively replaces the x y width and height values </s>
funcom_train/4490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBox(String box){ //check params if(box == null){ throw new IllegalArgumentException("Box location of a flag set to a null value."); } //make sure a valid value was given if(!box.equals(FlagFeature.c_GOAL_BOX) && !box.equals(FlagFeature.c_PENALTY_BOX) ){ throw new IllegalArgumentException("Box location of a flag set to an invalid value: " + box); } this.m_box = box; } COM: <s> sets the box the flag is on </s>
funcom_train/9860271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringRep format() { StringRep r = StringRep.createRep(aType.getName()); r = r.appendCombine(aType.getValueType().format(aValue)); r = r.appendCombine(" = "); //$NON-NLS-1$ return r; } COM: <s> return a formatted representation of this parameter </s>
funcom_train/20533608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addResourceAttributes(Resource resource, Connection conn) { PreparedStatement stmt = null; ResultSet rs = null; try { stmt = conn.prepareStatement("SELECT * FROM resource_attributes WHERE RESOURCE_ID=?"); stmt.setLong(1, resource.getResourceId()); rs = stmt.executeQuery(); while (rs.next()) { resource.addResourceAttribute(createResourceAttribute(rs)); } } catch (SQLException e) { throw new RuntimeException(e); } finally { JdbcUtils.closeResultSet(rs); JdbcUtils.closeStatement(stmt); } } COM: <s> adds the attribute values to the given resource </s>
funcom_train/5345408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int enterAtom(int atomType, DataInputStream in) throws IOException { boolean extended = false; int size = in.readInt(); if (size >= _maxLength) throw new IOException ("invalid size field read"); int type = in.readInt(); if (type!=atomType) throw new IOException ("atom type mismatch, expected " +atomType+ " got "+ type); if (size == 1) { extended = true; size = (int)in.readLong(); } size-= extended ? 16 : 8; return size; } COM: <s> reads the atom headers and positions the stream at the beginning </s>
funcom_train/22909102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showInGoogleEarth() { // make sure there is a thumbnail - this won't create the // thumbnail again, if it already exists. ThumbnailWorker worker = new ThumbnailWorker(currentImage) { @Override protected void done() { GoogleEarthLauncher.launch(currentImage); } }; TaskExecutor.execute(worker); } COM: <s> launch google earth to show the location </s>
funcom_train/31056429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int findFreeIndex() { // unfortunately this is a linear search :( sigh O(n) int foundSpace = -1; if( numberNodes == this.adjacencyMatrixValues.length ) { increaseMatrixSize(); return numberNodes; } for( int count = 0;count != this.adjacencyMatrixValues.length;count++ ) if( this.adjacencyMatrixValues[count] == null ) { foundSpace = count; break; } return foundSpace; // return the index for our new matrix } COM: <s> find a free index inside our adjacency table </s>
funcom_train/5395490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEncodeFloat() { System.out.println("encodeFloat"); float value = 0.0F; byte[] expResult = null; byte[] result = DecodeEncodePrimitives.encodeFloat(value); 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 encode float method of class org </s>
funcom_train/199376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getExperimentQueueObject(String id) { //return this.idLookupTable.get(id); for (int i=0; i<this.experimentStatusQueue.size(); i++) { if (((ExperimentQueueObject) this.experimentStatusQueue.get(i)).getId().equals(id)) { return this.experimentStatusQueue.get(i); } } return null; } COM: <s> get experiment queue object returns the queue object associated with a </s>
funcom_train/682304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumberByStatusOfNotes(List<DiscrepancyNoteBean> discrepancyNoteBeans, int typeId, int resolutionStatus) { int tempCount = 0; for (DiscrepancyNoteBean dBean : discrepancyNoteBeans) { if (dBean.getDiscrepancyNoteTypeId() == typeId && dBean.getResolutionStatusId() == resolutionStatus) { tempCount++; } } return tempCount; } COM: <s> get the number of discrepancy note beans of a particular resolution status </s>
funcom_train/15493007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isTls() throws RemoteException, HsqlDBEngineException { try { return server.isTls(); } catch (Exception ex) { throw new HsqlDBEngineException("Failed to retrieve the value of " + "the TLs flag : " + ex.getMessage(),ex); } } COM: <s> retrieves whether the use of secure sockets was requested in the </s>
funcom_train/42273321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEdge(String from, String to, EveMessage msg) { int fromVertex = m_vertex_names.get(from); int toVertex = m_vertex_names.get(to); addEdge(fromVertex, toVertex, m_edgeCount++, msg); } COM: <s> add an edge via names </s>
funcom_train/4545043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSubButton(String name, int width) { if (!name.equals("")) { JMenuItem button = createButton(name); subButtons.add(button); buttonHolder.add(button); validate(); } else { JLabel space = createSpace(width, buttonHolder.getHeight()); buttonHolder.add(space); validate(); } } COM: <s> constructs and adds a button to the sub button bar </s>
funcom_train/23891211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAllUsersFromList() { if(userHandler != null) { users = userHandler.getUsers(); if(users != null) { for(int i=0; i<users.length ; i++) { Object[] newRow = new Object[1]; newRow[0] = users[i].getUserName()+"{"+users[i].getClientID()+"}"; model.addRow(newRow); } } } } COM: <s> adds all user which are in the intern list of all users </s>
funcom_train/5017389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateDownloadState() { if (downloadGenerateCheck.isSelected()) { downloadCommandArea.setEditable(false); downloadAllRadio.setEnabled(true); downloadNewRadio.setEnabled(true); downloadRangeRadio.setEnabled(true); downloadRangeField.setEnabled(true); downloadForceCheck.setEnabled(true); } else { downloadCommandArea.setEditable(true); downloadCommandArea.grabFocus(); downloadAllRadio.setEnabled(false); downloadNewRadio.setEnabled(false); downloadRangeRadio.setEnabled(false); downloadRangeField.setEnabled(false); downloadForceCheck.setEnabled(false); } } COM: <s> set enabled disabled state for download components according to generate checkbox </s>
funcom_train/20487049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double scoreCluster(Cluster cluster) { int numNodes = 0; double density = 0.0, score = 0.0; numNodes = cluster.getGPCluster().getNodeCount(); density = calcDensity(cluster.getGPCluster(), true); score = density * numNodes; return (score); } COM: <s> score a cluster </s>
funcom_train/37448851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HashSet getValueByKey(String key) throws KeyNotFoundException { //todo: search for * if (_key2HashSet.containsKey(key)) return ((HashSet) _key2HashSet.get(key)); else throw new KeyNotFoundException("error: key \"" + key + "\" was not found"); } COM: <s> allows to get the related hash set by the unique key </s>
funcom_train/28343161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix buildTransferMatrix() { Matrix Phi = new Matrix(7,7, 0.0); /* Quadrupole quad = (Quadrupole)(m_node); MagnetBucket mpb = null; double field; try { field = theQuad.getDesignField(); double l = theQuad.getEffLength(); } catch (Exception e) { System.out.println("Electric Field on " + theQuad.getId() + " not set, for stability sake," + "returning identity matrix"); return Matrix.identity(6,6); } } COM: <s> re build the transfer matrix for an element object using current data or </s>
funcom_train/7621988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hide() { if (mAnchor == null) return; if (mShowing) { try { mHandler.removeMessages(SHOW_PROGRESS); mWindowManager.removeView(mDecor); } catch (IllegalArgumentException ex) { Log.w("MediaController", "already removed"); } mShowing = false; } } COM: <s> remove the controller from the screen </s>
funcom_train/51378821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDataContext(String newDBName) { if (StringUtil.notNull(newDBName).equals("")) { log.error("Must specify db/context"); dbName = "default"; } else { dbName = newDBName; } } /* setDBName(String) */ COM: <s> sets the job handlers data context </s>
funcom_train/39378424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void renderChildren(HtmlStringBuffer buffer) { if (hasControls()) { for (int i = 0; i < getControls().size(); i++) { Control control = (Control) getControls().get(i); int before = buffer.length(); control.render(buffer); int after = buffer.length(); if (before != after) { buffer.append("\n"); } } } } COM: <s> render this container children to the specified buffer </s>
funcom_train/40312328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTableName_InvalidColumn2() { try { ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry); resMetaData.getTableName(0); fail("SQLException is expected."); } catch(SQLException e) { //ensure the SQLException is thrown by getTableName method. assertEquals("The sqlstate mismatches", "22003", e.getSQLState()); } } COM: <s> tests get table name with column index equals to 0 </s>
funcom_train/47297151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroy() { // shut down the dbcp log.info("Shutting down the DataSource connection pool."); DataSource dbConnMgr = (DataSource) sc.getAttribute("twistspr"); dbConnMgr = null; sc.removeAttribute("twistspr"); // final message log.info("TWIST SPR has shutdown."); } COM: <s> releases resources at application shutdown </s>
funcom_train/44481168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File file) { if (file != null) { // Show file if it is a directory: if (file.isDirectory()) return true; // Determine extension of the file: String filename = file.getName(); String extension = ""; int index = filename.lastIndexOf('.'); if ((index > 0) && (index < (filename.length() - 1))) extension = filename.substring(index + 1).toLowerCase(); for (String s : ALLOWED_EXTENSIONS) if (extension.equals(s)) return true; } return false; } COM: <s> determines whether the given file is accepted by the filter </s>
funcom_train/10799720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isBackingFieldOfAnotherProperty(String name, Code code) { String methName = code.getMethod().getName(); return !"<init>".equals(methName) && _backingFields != null && !name.equals(_backingFields.get(methName)) && _backingFields.containsValue(name); } COM: <s> return true if the given instruction accesses a field that is a backing </s>
funcom_train/1905094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWorkingDirectory() { String[] dir = new java.io.File(".").list(); // Get files in current dir java.util.Arrays.sort(dir); // Sort the directory listing for (int i=0; i<dir.length; i++) System.out.println(dir[i]); // Print the list } COM: <s> prints the files in the current working directory </s>
funcom_train/50221717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GraphObject getElementFromSignature(ElementSignature signature) { for (Iterator e = getGraphWrapper().elements(); e.hasNext(); ) { GraphObject go = (GraphObject) e.next(); if (signature.equals(getGraphWrapper().getSignatureFromElement(go))) return go; } MosesAssert.error("Did not find an element with the required signature: " + signature); return null; } COM: <s> given a signature find the element that has the same signature </s>
funcom_train/28349823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fitData(java.awt.event.ActionEvent event) { if(correlatorRunning) stopCorrelator(); theData.doFit(); // JCChartLabel eq = new JCChartLabel(xyData.plf.Equation()); JLabel foot = new JLabel(theData.fitLabel); graph.setFooter((JComponent) foot); // replot with fit: dataView = graph.getDataView(0); dataView.setDataSource(theData); } COM: <s> start the fitting of the x and y data </s>
funcom_train/49103442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onMsgEvent(IpssMessage msg) { if (msg instanceof SimuMessage) { if (msg.getType() == SimuMessage.TYPE_LFLAB_MSG) { IpssLogger.getLogger().info(msg.getMsgString()); msgOutTextArea.append(msg.getMsgString() + "\n"); } } } COM: <s> implementation of the on msg event method </s>
funcom_train/50497337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Filter getFilterValue() { Filter filter = new Filter(); filter.setEnabled(enabled); Iterator iter = filterComponents.iterator(); while (iter.hasNext()) { String component = (String) iter.next(); if (component.endsWith("*")) { filter.addPrefixMatchComponent( component.substring(0, component.length() - 1)); } else { filter.addExactMatchComponent(component); } } return filter; } COM: <s> get the filter value from the dialog </s>
funcom_train/21913429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addControlKindPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_UIMField_controlKind_feature"), getString("_UI_PropertyDescriptor_description", "_UI_UIMField_controlKind_feature", "_UI_UIMField_type"), UIMPackage.Literals.UIM_FIELD__CONTROL_KIND, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the control kind feature </s>
funcom_train/33850739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BasicBlock getBlock(BasicBlock subBlock) { BasicBlock resultBlock = blockMap.get(subBlock); if (resultBlock == null) { resultBlock = result.allocate(); blockMap.put(subBlock, resultBlock); workList.add(subBlock); } return resultBlock; } COM: <s> get the block in the result cfg corresponding to the given subroutine </s>
funcom_train/32383278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void configureBeans(final Collection<HierarchicalConfiguration> configurations) throws BeanPotException { boolean ok = true; for (final HierarchicalConfiguration configuration : configurations) { try { getMap().configureBean(configuration); } catch (final Exception e) { ok = false; BeanPot.getBeanPotLogger().error("configuration error", e); //$NON-NLS-1$ } } if (!ok) BeanUtilities.squawk("configuration failed (see previous messages)"); //$NON-NLS-1$ } COM: <s> configure the beans in the bean map according to the configurations </s>
funcom_train/22225853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLayerSQL(String _layerSQL) { if ( MetadataTool.isEmpty(_layerSQL) || ( ! _layerSQL.equalsIgnoreCase(this.layerSQL) ) ) { if (this.pStatement != null) { // close previous statement try { this.pStatement.close(); } catch (Exception _e) { } this.pStatement = null; } this.layerSQL = _layerSQL; } } COM: <s> if sql change invalidate prepared statement </s>
funcom_train/7630511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void waitForAudioHandlerCreation() { synchronized(this) { while (mAudioHandler == null) { try { // Wait for mAudioHandler to be set by the other thread wait(); } catch (InterruptedException e) { Log.e(TAG, "Interrupted while waiting on volume handler."); } } } } COM: <s> waits for the volume handler to be created by the other thread </s>
funcom_train/31630826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g){ Dimension dim = getContentPane().getSize(); splitPane.setBounds(0, 0, dim.width - Cfg.FRM_EDGE_PAD(), dim.height - Cfg.FRM_EDGE_PAD()); splitPane.updateUI(); super.paint(g); } COM: <s> resize split pane window to appropriate size and call paint </s>
funcom_train/8231859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand7() { if (okCommand7 == null) {//GEN-END:|79-getter|0|79-preInit // write pre-init user code here okCommand7 = new Command("Acerca de WhereIsit", Command.OK, 0);//GEN-LINE:|79-getter|1|79-postInit // write post-init user code here }//GEN-BEGIN:|79-getter|2| return okCommand7; } COM: <s> returns an initiliazed instance of ok command7 component </s>
funcom_train/28875205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isInside(int x, int y, double sx, double sy, double dx, double dy) { // test x position if (x<sx || x>sx+dx) return false; // test y position if (y<sy || y>sy+dy) return false; this.sy=sy; this.sx=sx; this.dx=dx; this.dy=dy; return true; } COM: <s> give true if the position is inside </s>
funcom_train/16520683
/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 instanceof MemoryExclusionVertex) { return (this.source.equals(((MemoryExclusionVertex) o).source) && this.sink .equals(((MemoryExclusionVertex) o).sink) && this.explodeImplode .equals(((MemoryExclusionVertex) o).explodeImplode)); } else { return false; } } COM: <s> test equality of two vertices </s>
funcom_train/41575859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readName(StringBuffer line) throws IOException { line.setLength(0); while (c != ':' && c != ' ' && c != '\t' && c != -1) { if (c == '\n') { System.out.println("Missing separator ':' in key name " + line.toString()); return; } line.append((char) c); readNextChar(); } skipSpace(); } COM: <s> reads a name into line string ending before the separator </s>
funcom_train/32040422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRoleRefPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ModeratorType_roleRef_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ModeratorType_roleRef_feature", "_UI_ModeratorType_type"), ImsldPackage.eINSTANCE.getModeratorType_RoleRef(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the role ref feature </s>
funcom_train/21087371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(IPath path) throws IOException { // TODO: Nothing is done of the path if the resource already exist... // Not really what we would expect, but ok for the SNI application. // A second save() method with no argument should be added. getResource(path); Map options = new HashMap(); options.put(XMLResource.OPTION_DECLARE_XML, Boolean.TRUE); resource.save(options); } COM: <s> saves the content of the model to the file </s>
funcom_train/50688756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void count( List result ) throws ModelException { Iterator ix = result.iterator(); while( ix.hasNext()) { Detail detail = (Detail) ix.next(); Model submodel = model.find( null, RDF.type, detail.type); detail.count = submodel.size(); } } COM: <s> compute the instance count for each class in a list </s>
funcom_train/35842165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CompartmentFigText unhighlight() { Fig fc; // Search all feature compartments for a text fig to unhighlight for (int i = 1; i < getFigs().size(); i++) { fc = getFigAt(i); if (fc instanceof FigEditableCompartment) { CompartmentFigText ft = unhighlight((FigEditableCompartment) fc); if (ft != null) { return ft; } } } return null; } COM: <s> remove the highlight from the currently highlit fig text </s>
funcom_train/31625520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getDecisionNode() throws DBException { String decisionResult = getField(FLD_DECISIONRESULT); if (decisionResult == null || decisionResult.length() == 0) { return null; } Node n = new Node(); n.setField(Node.NODE_ID, getField(FLD_DECISIONRESULT)); n.retrieve(); return n; } COM: <s> retrieves the node associated with this decision set </s>
funcom_train/3561690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer getMaxSessionID(Integer volumeID) throws DbException { NVPair[] parms; parms = new NVPair[1]; parms[0] = new NVPair("volumeID", volumeID.toString()); return (Integer) simpleResponse(GET_MAX_VOLUME_ID_PAGE, parms); } COM: <s> returns the max session id for a given volume </s>
funcom_train/26402087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object cloneValue(Object value) { Date clone = null; //Before creating a clone, make sure the original is not null. if(! (null == value) ) { //Cast the value to a Date. Date original = (Date)value; //create anew instance of Date. clone = new Date(original.getTime()); } return clone; } COM: <s> creates and returns a deep copy clone of the value encapsulated </s>
funcom_train/3340841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setView(Component child_) { if ((child_ instanceof Scrollable) == false && (child_ instanceof TableHeader) == false) { throw new IllegalArgumentException( "JViewport's view must be a Scrollable or a TableHeader"); } if (_child != null) super.remove(_child); // only allow one child. super.add(child_); _child = child_; } COM: <s> set the jviewports one child </s>
funcom_train/13524208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRelationsSufferedBy(){ //act1 doesn't suffer assertEquals(0,org.getRelationsSufferedBy(act1).size()); //act2 suffers in relation 1 assertEquals(1,org.getRelationsSufferedBy(act2).size()); //act3 suffers in relations 1&2 assertEquals(2,org.getRelationsSufferedBy(act3).size()); Iterator<Relation> relIt; relIt = org.getRelationsSufferedBy(act2).iterator(); assertEquals(rel1,relIt.next()); relIt = org.getRelationsSufferedBy(act3).iterator(); assertEquals(rel1,relIt.next()); assertEquals(rel2,relIt.next()); } COM: <s> test get relations suffered by actor </s>
funcom_train/20400408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object parse(String arg) throws ParseException { Integer result = null; try { result = Integer.decode(arg); } catch (NumberFormatException nfe) { throw ( new ParseException( "Unable to convert '" + arg + "' to an Integer.", nfe)); } return (result); } COM: <s> parses the specified argument into an integer </s>
funcom_train/46189774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIndexUnpublishedBlogEntry() throws Exception { BlogEntry blogEntry = new BlogEntry(blog); blogEntry.setAuthor("sbrown"); blogEntry.setPublished(false); index.index(blogEntry); assertFalse(index.getAuthors().contains("sbrown")); assertEquals(0, index.getRecentBlogEntries("sbrown").size()); } COM: <s> tests that a single unpublished blog entry isnt indexed </s>
funcom_train/3733983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printString(String s, Writer out) throws IOException { s = escapeElementEntities(s); // patch by Brad Morgan to strip interior whitespace // ([email protected]) if (trimText) { StringTokenizer tokenizer = new StringTokenizer(s); while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); out.write(token); if (tokenizer.hasMoreTokens()) { out.write(" "); } } } else { out.write(s); } } COM: <s> print a string </s>
funcom_train/46357726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConnection() { String userid = "****"; String domain = "****"; String first_name = "****"; String middle_i = "****"; String last_name = "****"; String password = "****"; String community_code = "****"; String language_code = "****"; String email = "****"; String adminid = "****"; String client_id = "****"; String client_secret = "*****"; this.createUser(client_id, client_secret, userid, domain, first_name, middle_i, last_name, password, community_code, language_code, email, adminid); } COM: <s> only for testing </s>
funcom_train/22470709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Playlist getPlaylist() { if (_playlist == null) { if (getPlaylistId() != null) { _playlist = getDao().getPlaylistById(getPlaylistId(), getUser()); } if (getKeywordId() != null) { _playlist = getDao().songsByKeyword(getKeywordId()); } } return _playlist; } COM: <s> used when rendering the page </s>
funcom_train/17291080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void openCtlFiles() { for (int i = 0; i < anchor.n_CtlFiles; i++) { ctlFiles[i] = storageFactory.open(anchor.ctlFiles[i].toString()); } anchor = readLogAnchor(ctlFiles[0]); anchor.maxLsn = anchor.durableLsn; anchor.currentLsn = anchor.durableCurrentLsn; } COM: <s> opens all the control files </s>
funcom_train/23379513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeBottomPane() { okPane = new JPanel(); okButton = new JButton("OK"); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { setValues(); setVisible(false); dispose(); } }); okPane.add(okButton); getContentPane().add(okPane, BorderLayout.SOUTH); getRootPane().setDefaultButton(okButton); } COM: <s> public void initialize bottom pane </s>
funcom_train/25921032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putRegionToUpdate(WidgetUpdate updateInfo) throws InterruptedException { SDLRect region = updateInfo.getWidgetRegion(); updateListener.putRegionToUpdate(new WidgetUpdate(this,new SDLRect(region.x + getX(), region.y + getY(), region.width, region.height))); } COM: <s> passes request for an update to the higher container </s>
funcom_train/1387284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_RouteSearchBox_Num2() throws Throwable { MainPage mp = (MainPage) getActivity(); final EditText routeSearchBox = (EditText) mp.findViewById(com.busstopalarm.R.id.RouteSearchBox); runTestOnUiThread(new Runnable() { public void run() { routeSearchBox.performClick(); } }); sendKeys("7 2"); assertEquals("72", routeSearchBox.getText().toString()); } COM: <s> tests if the route search box accepts number input of two </s>
funcom_train/43244815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetGateway() { System.out.println("getGateway"); VistAConnection instance = new VistAConnection(); TCPGateway expResult = null; TCPGateway result = instance.getGateway(); 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 gateway method of class org </s>
funcom_train/51615346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator groupBy(Sort sort) { LinkedList groups = new LinkedList(); Iterator i = getAttributeSet(sort.getAttributeName()).iterator(); while (i.hasNext()) groups.add(constrain(sort.getAttributeName(), EQUAL, i.next())); return groups.iterator(); } COM: <s> group data by a given attribute </s>
funcom_train/26433106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setStatusText(String text) { Util.debug("MainView, setStatusText: " + text); // setComponentLabel(statusText, text); if( text == null ) { statusText.setText( "" ); statusText.setVisible( false ); } else { statusText.setText( text ); statusText.setVisible( true ); } } COM: <s> refreshes the status text when running a group </s>
funcom_train/4979590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkModifyAllowed(Operation o) { String modifyTarget = o.getTargetId(); try { // try to find modifytarget in nodemap Node modifyNode = getNodeForId(modifyTarget); if (modifyNode != null) { return true; } else { return false; } } catch (NodeNotFoundException e) { // Warning, debug output log.log(Level.WARNING, "parent not found of modify target of operation: " + o); } return false; } COM: <s> checks if the target of the given update operation exists within the </s>
funcom_train/5783381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QoSContractNode addQoSContract(String identifier, QosContractRepository.QosContractType contractType) { QosContractRepository.QosContract qosContract = repository.addQoSContract(identifier, contractType); QoSContractNode someNode = null; if (qosContract != null) { someNode = new QoSContractNode(qosContract, repository); add(someNode); nodeStructureChanged(this); } return someNode; } COM: <s> add qo scontract to the repository </s>
funcom_train/33312188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File f) { if (f.isFile()) { String sName = f.getName(); // Check name (Case Sensitive) if (sName.startsWith("lbPG") && sName.endsWith(".pdb")) { return true; } // Check name (Case InSensitive) sName = sName.toUpperCase(); return sName.startsWith("LBPG") && sName.endsWith(".PDB"); } // Always show directories return true; } COM: <s> checks for match </s>
funcom_train/43897750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Geometry getLeftGeometry(Object feature) { org.opengis.filter.expression.Expression leftGeometry = getExpression1(); if (leftGeometry != null) { Object obj = leftGeometry.evaluate(feature, Geometry.class); //LOGGER.finer("leftGeom = " + o.toString()); return (Geometry) obj; } else if (feature instanceof Feature) { return ((Feature) feature).getDefaultGeometry(); } return null; } COM: <s> subclass convenience method for returning left expression as a </s>
funcom_train/18369608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void inspectNgs(NamedGraphSet ngs, Triple pattern, int step) { synchronized (ngs) { Iterator iter = ngs.findQuads(Node.ANY, pattern.getSubject(), pattern.getPredicate(), pattern.getObject()); while (iter.hasNext()) { Quad q = (Quad) iter.next(); Triple t = q.getTriple(); inspectTriple(ngs, t, step); } } } COM: <s> checks the given named graph set ngs for uris </s>
funcom_train/13994176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void subscribeChange(Object sourceID, ChangeSubscriber subscriber) { Set idSubscribers = (Set) changeSubscribers.get(sourceID); if (idSubscribers == null) { idSubscribers = new HashSet(); changeSubscribers.put(sourceID, idSubscribers); } idSubscribers.add(new WeakReference(subscriber)); } COM: <s> subscribes code subscriber code to the object with </s>
funcom_train/8697570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIgnoreDuplicatesInNamespaces(String namespaces) { mdefnamespaces = new HashSet(); StringTokenizer st = new StringTokenizer(namespaces, ","); while (st.hasMoreTokens()) { String namespace = st.nextToken().trim(); mdefnamespaces.add(namespace); } } COM: <s> one or more namespaces in which duplicate definitions are to be ignored </s>
funcom_train/47562862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(ArrayList<Line> lines){ for(Line line:lines){ graphics.drawLine((int)(line.getStartP().x), (int)(line.getStartP().y), (int)(line.getEndP().x), (int)(line.getEndP().y)); } } COM: <s> legacy code for previous method of drawing the map </s>
funcom_train/2898116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExpandedState(TreePath path, boolean isExpanded) { if (path != null) { if (isExpanded) ensurePathIsExpanded(path, true); else { TreeStateNode node = getNodeForPath(path, false, true); if (node != null) { node.makeVisible(); node.collapse(); } } } } COM: <s> marks the path code path code expanded state to </s>
funcom_train/551047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRootName(java.lang.String name) { //String t=(String)top.getUserObject(); t=name; //top.setUserObject(name); ((DomainNode)top).setName(name); System.out.println("fr.esrf.tangoatk.core.Tree.setRootName("+name+"): top.toString()="+top.toString()); } COM: <s> it allows to modify the root node name </s>
funcom_train/27811639
/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 (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final Version version = (Version) o; if (beta != version.beta) return false; if (bugfix != version.bugfix) return false; if (major != version.major) return false; return minor == version.minor; } COM: <s> return whether this object is equal to another </s>
funcom_train/28750473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStatus(String newVal) { if ((newVal != null && this.status != null && (newVal.compareTo(this.status) == 0)) || (newVal == null && this.status == null && status_is_initialized)) { return; } this.status = newVal; status_is_modified = true; status_is_initialized = true; } COM: <s> setter method for status </s>
funcom_train/17177128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doSearch(CharSequence str) { if (str.length() == 0) { return; } cancelDelayedSearch(); if (!AsyncTasks.isRunning(mAsyncTask)) { mAsyncTask = new FindTask(); mAsyncTask.execute(str.toString()); } } COM: <s> called when you should perform the search </s>
funcom_train/10981573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String edit() { if (log.isDebugEnabled()) { log.debug("edit()"); } FacesContext context = FacesContext.getCurrentInstance(); StringBuffer sb = registration(context); sb.append("?action=Edit"); forward(context, sb.toString()); return (null); } COM: <s> p forward to the em edit registration em action </s>
funcom_train/32763100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setSignalFilter( final PatternListFilter filter ) { if ( _signalFilter != null ) { _signalFilter.removeListFilterListener( _signalFilterHandler ); } synchronized( DATA_LOCK ) { if ( _signals != null ) { _signalFilter = new PatternListFilter( _signals, _patternPoster ); _signalFilter.addListFilterListener( _signalFilterHandler ); } } } COM: <s> set the list filter used for filtering the list of signals for display </s>
funcom_train/40942903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Customer buildCustomer(Map<String, Object> attributes) { Customer customer = new Customer(); for (Map.Entry<String, Object> attr : attributes.entrySet()) customer.set(attr.getKey(), attr.getValue()); if (attributes.get("gender") != null) { Integer gender = new Integer((String) attributes.get("gender")); customer.setGender((gender.equals(new Integer(1)) ? Gender.MALE : Gender.FEMALE)); } return customer; } COM: <s> create a object customer from the attributes map </s>
funcom_train/15810917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SIPHeader parse() throws ParseException { RouteList routeList = new RouteList(); if (debug) dbg_enter("parse"); try { this.lexer.match(TokenTypes.ROUTE); this.lexer.SPorHT(); this.lexer.match(':'); this.lexer.SPorHT(); while (true) { Route route = new Route(); super.parse(route); routeList.add(route); this.lexer.SPorHT(); char la = lexer.lookAhead(0); if (la == ',') { this.lexer.match(','); this.lexer.SPorHT(); } else if (la == '\n') break; else throw createParseException("unexpected char"); } return routeList; } finally { if (debug) dbg_leave("parse"); } } COM: <s> parse the string message and generate the route list object </s>
funcom_train/2914979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPreferredLanguage(HttpServletRequest request, String serverVariants, String defaultVariant) { this.request = request; // decode accept languages String sAcceptLanguage = getStringForHeaders("Accept-Language"); acceptLanguage = convertAcceptToArray(sAcceptLanguage, DEL_LANGUAGE); return getPreferredLanguage(serverVariants, defaultVariant); } COM: <s> provides the preferred language from accept language br </s>
funcom_train/25099183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBaseEnumerationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EnumerationValueType_baseEnumeration_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EnumerationValueType_baseEnumeration_feature", "_UI_EnumerationValueType_type"), DatatypesPackage.Literals.ENUMERATION_VALUE_TYPE__BASE_ENUMERATION, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the base enumeration feature </s>
funcom_train/32057480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClonePoints() { List list = new ArrayList(); list.add(new Point(0, 0)); PortView items = new PortView(new Object(), new JGraph( new DefaultGraphModel()), new GraphContext(new JGraph( new DefaultGraphModel()), new Object[] { "str" })); list.add(items); assertNotNull(GraphConstants.clonePoints(list)); } COM: <s> this function tests clone points function of the graph constants class </s>
funcom_train/40613546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeIndex(Index index) { ArrayList<Index> indexes = getIndexes(); if (indexes != null) { remove(indexes, index); if (index.getIndexType().isPrimaryKey()) { for (Column col : index.getColumns()) { col.setPrimaryKey(false); } } } } COM: <s> remove the given index from the list </s>
funcom_train/28974645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Authentificator getService(String applicationServer) throws NamingException, AuthentificationException { System.setProperty("java.naming.provider.url", applicationServer + ":1099"); System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); System.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); return BinBaseServices.getCentralAuthentification(); } COM: <s> returns the actual service </s>
funcom_train/40617336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertSingleValue(Statement stat, String sql, int expected) throws SQLException { ResultSet rs = stat.executeQuery(sql); assertTrue(rs.next()); assertEquals(expected, rs.getInt(1)); assertFalse(rs.next()); } COM: <s> check that the result set of a query is exactly this value </s>
funcom_train/13913548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName() { String ret=null; org.eclipse.jdt.core.dom.Expression expr=null; if (getNameAnnotationType() != null) { expr = getAnnotationValue(getNameAnnotationType(), "name"); } if (expr instanceof StringLiteral) { ret = ((StringLiteral)expr).getLiteralValue(); } else if (expr instanceof Name) { ret = org.pi4j.common.ast.ClassUtil.getStaticFieldValue(getTypeDeclaration(), (Name)expr); } return(ret); } COM: <s> this method returns the optional name associated with the </s>