__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/36987444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GraphPoint mapCursorPosition(int x, int y) { double[] coordinates = new double[] {(double) x, (double) y, 0, 0}; try { _transformation.inverseTransform(coordinates, 0, coordinates, 2, 1); } catch (NoninvertibleTransformException e) {} return new GraphPoint(coordinates[2], coordinates[3]); } COM: <s> maps the cursor position onto a point in device independent coordinates </s>
funcom_train/50157174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private InputField getFinalStatusFlagField() { String finalStatusLabelPath = "/collectionConfigRecord/statusFlags/@finalStatusLabel"; for (Iterator i = im.getInputFields().iterator(); i.hasNext(); ) { InputField field = (InputField) i.next(); // prtln (field.toString()); if (field.getXPath().equals(finalStatusLabelPath)) { return field; } } return null; } COM: <s> gets the final status flag input field from the input manager </s>
funcom_train/46849588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getHeight() { int maxHeight = 0; NodeList childNodes = this.getChildNodes(); for (int i = 0; i < childNodes.getLength(); i++) { int currHeight = ((INode) childNodes.item(i)).getHeight(); if (currHeight > maxHeight) maxHeight = currHeight; } return maxHeight + 1; } COM: <s> returns the maximum height of the subtree rooted at this node </s>
funcom_train/21955651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintSubComponents(double maxY) { if (cancelButton != null) { int buttonWidth = 80; Rectangle cancelButtonBoundedRectangle = new Rectangle((progressPanel.getComponent().getWidth() / 2 - buttonWidth / 2), (int)maxY + 10, 80, 21); cancelButton.setBounds(cancelButtonBoundedRectangle); } } COM: <s> called by the cancelable adaptee progress panel when it is finished painting itself </s>
funcom_train/9878205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void shadeLoci(int x, int y) { if(x > X_ORIGIN && x < columnSpacing*numberOfSamples+this.wingWidth+this.arrowWidth/2) { highlightedIndex = this.findNearestArrowMidPoint(y); if( highlightedIndex != -1) { setStatusText(highlightedIndex); highlightStart = coordStarts[highlightedIndex]; highlightEnd = coordEnds[highlightedIndex]; highlighted = true; repaint(); } else { //on lem but off locus setStatusText(-1); highlighted = false; repaint(); } } else { setStatusText(-1); highlighted = false; repaint(); } } COM: <s> checks location and shades the locus highlights if appropriate </s>
funcom_train/27722534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveProperties() { //TODO: move to where it makes more sense //SDMControllerProperties props = new SDMControllerProperties(); //props.setSecureDataFilename(props.getSecureDataFilename()); //props.setNewTemplateFilename(props.getNewTemplateFilename()); setConfiguration(props); SecureDataManager.appPreferences.save(); } COM: <s> save the user preferences for the next time the application is started </s>
funcom_train/15588365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJScrollPane() { if (jScrollPane == null) { jScrollPane = new JScrollPane(); jScrollPane.setViewportBorder(BorderFactory.createLineBorder(Color.gray, 1)); jScrollPane.setPreferredSize(new Dimension(100, 100)); jScrollPane.setSize(new Dimension(600, 200)); jScrollPane.setViewportView(getJTable1()); } return jScrollPane; } COM: <s> this method initializes j scroll pane </s>
funcom_train/37594546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean _supportsJSR14v2_4() { try { Class.forName("com.sun.tools.javac.main.Main$14"); return true; } catch (Exception e) { try { Class.forName("com.sun.tools.javac.main.Main+1"); return true; } catch (Exception e2) { return false; } } } COM: <s> check if were using jsr14v2 </s>
funcom_train/13360646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteAttachments(List<String> attachmentIDs, List<String> accessList) throws AttachmentException { if ((attachmentIDs == null) || (attachmentIDs.isEmpty())) { return; // nothing to be done. } String filter = createFilter(attachmentIDs, accessList); // don't include deleted assets in fetch List<Attachment> attachments = retrieveAttachments(filter, true); deleteAttachments(attachments); } COM: <s> method to delete attachments from the system based </s>
funcom_train/10927599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CmisBinding createCmisLocalBinding(Map<String, String> sessionParameters) { checkSessionParameters(sessionParameters, false); sessionParameters.put(SessionParameter.BINDING_SPI_CLASS, BINDING_SPI_LOCAL); addDefaultParameters(sessionParameters); check(sessionParameters, SessionParameter.LOCAL_FACTORY); return new CmisBindingImpl(sessionParameters); } COM: <s> creates a default cmis local binding instance </s>
funcom_train/9147234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public E next() { if (mMembersReturned == 0) { ++mMembersReturned; E result1 = mMember1; mMember1 = null; return result1; } if (mMembersReturned == 1) { ++mMembersReturned; E result2 = mMember2; mMember2 = null; return result2; } throw new NoSuchElementException(); } COM: <s> returns the next object in this pair iterator </s>
funcom_train/31874315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseDown(final DrawingView aView, final MouseEvent e, int x, int y) { if (e.getButton()== MouseEvent.BUTTON3) { aView.editor().toolDone(); } else { aView.editor().setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR)); fAnchorPoint = new Point(x,y); fCreatedFigure = createFigure(); fCreatedFigure.connectorVisibility(true); fCreatedFigure.displayBox(fAnchorPoint, fAnchorPoint); aView.add(fCreatedFigure); } } COM: <s> creates a new figure by cloning the prototype </s>
funcom_train/10521551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEmployeeInsert() throws Exception { Employee e = new Employee(); e.setFirstName("John"); e.setLastName("Doe"); e.setAddress("1121 Some Lane"); e.setCity("Boulder"); e.setState("CO"); e.setZip("80301"); _employeeJdbc.setConnection(_con); _employeeJdbc.addEmployee(e); } COM: <s> test adding an employee record to the database </s>
funcom_train/10191249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processRequestToRemoteUA(Message msg) { printLog("inside processRequestToRemoteUA(msg)", LogLevel.MEDIUM); // stateless-response (in order to avoid DoS attacks) if (!msg.isAck()) { m_sipProvider.sendMessage(MessageFactory.createResponse(msg, 404, SipResponses.reasonOf(404), null)); } else { printLog("message discarded", LogLevel.HIGH); } } COM: <s> when a new request message is received for a remote ua </s>
funcom_train/18042952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel1() { if (jPanel1 == null) { jPanel1 = new JPanel(); jPanel1.setName(Messages.getString("ChannelPropertyPanel.19")); //$NON-NLS-1$ jPanel1.add(getJButton(), null); } return jPanel1; } COM: <s> this method initializes j panel1 </s>
funcom_train/51518190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void compile(Vector classFiles_return) throws CompileException { for (int i = 0; i < classOrInterfaceDeclarations.size(); ++i) { ClassOrInterfaceDeclaration cid = (ClassOrInterfaceDeclaration) classOrInterfaceDeclarations.elementAt(i); cid.compile(classFiles_return); } } COM: <s> compiles this object and returns a set of </s>
funcom_train/28751224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProfileid(Long newVal) { if ((newVal != null && this.profileid != null && (newVal.compareTo(this.profileid) == 0)) || (newVal == null && this.profileid == null && profileid_is_initialized)) { return; } this.profileid = newVal; profileid_is_modified = true; profileid_is_initialized = true; } COM: <s> setter method for profileid </s>
funcom_train/34132581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void setNames( Vector names, String current, boolean element) { // boolean xmlns = false; // boolean cdata = false; // prefix = current; // // if ( element) { // if ( current.startsWith( "/")) { // current = current.substring( 1, current.length()); // } else { // cdata = true; // } // } else { // xmlns = true; // } // // setListModel( new NamesListModel( names, current, cdata, xmlns)); // } COM: <s> sets the list of names and the current selected name </s>
funcom_train/44775458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(final Object obj) { if (obj == null || (!(obj instanceof Position))) { return false; } else { Position pos = (Position) obj; return (pos.getFile().equals(getFile()) && (pos.getRank() == getRank())); } } COM: <s> whether two objects are equal </s>
funcom_train/46458413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTime(double millis) { millis = Math.abs(millis); for (int i = 0; i < startTimes.length; i++) { int t = startTimes[i]; if (millis < t) { // find first frame with later start time setFrameNumber(i - 1); break; } } } COM: <s> sets the video time in milliseconds </s>
funcom_train/33601079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void leave() { ReconfigureReply r = null; Reconfiguration rec = new Reconfiguration(id); do { //System.out.println("while 1"); rec.removeServer(id); r = rec.execute(); } while (r.getView().isMember(id)); rec.close(); this.cs.updateServersConnections(); } COM: <s> this method makes the replica leave the group </s>
funcom_train/14329534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTableTypesOrder() throws Exception { DatabaseMetaData dmd = con.getMetaData(); ResultSet rs = dmd.getTableTypes(); String previousType = ""; while (rs.next()) { String type = rs.getString(1); assertTrue(type.compareTo(previousType) >= 0); previousType = type; } rs.close(); } COM: <s> test for bug 974036 bug in 0 </s>
funcom_train/6290847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isDeleted( byte[] grpprl) { SprmIterator iterator = new SprmIterator( grpprl, 0); while (iterator.hasNext()) { SprmOperation op = iterator.next(); // 0 is the operation that signals a FDelRMark operation if (op.getOperation() == 0 && op.getOperand() != 0) { return true; } } return false; } COM: <s> used to determine if a run of text has been deleted </s>
funcom_train/13720132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Exponentiation getChannel1Exponentiation() throws InterruptedException, IOException { isActive(true); try{ byte[] response = getSetting(Exponentiation.CH1COMMANDCODE); int val; Exponentiation exp = Exponentiation.getExponentiation(val = MathUtilities .hex2int(response)); if(exp == null) logger.log(Level.SEVERE, "Unable to getChannel1Exponentiation - Bad Response: " + val); return exp; }catch(InterruptedException e){ logger.log(Level.SEVERE, "Unable to getChannel1Exponentiation", e); throw e; }catch(IOException e){ logger.log(Level.SEVERE, "Unable to getChannel1Exponentiation", e); throw e; } } COM: <s> this command requests the current channel 1 exponentiation setting from the </s>
funcom_train/36508313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doStartTag() { try { JspWriter out = pageContext.getOut(); out.println("<p>Copyright &#169; "+ HelpDate.getJJJJ()+" Uwe Dalies</p>"); return EVAL_PAGE; }catch(Exception e) { return SKIP_PAGE;//End of Processing }//catch }//doStartTag COM: <s> content of footer </s>
funcom_train/39540532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Action createExecuteButtonAction() { Action action = new AbstractAction() { public void actionPerformed(ActionEvent e) { click(getFocusedCell()); } @Override public boolean isEnabled() { if (component == null || !component.isEnabled() || !component.hasFocus()) return false; return isClickable(getFocusedCell()); } }; return action; } COM: <s> creates and returns the click action to install in the </s>
funcom_train/20774219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getInnerRadiusPixels() { return Math.min(Math.min(Math.abs(location.x - minX), Math.abs(location.x - maxX)), Math.min(Math.abs(location.y - minY), Math.abs(location.y - maxY))); } COM: <s> returns the inner radius of the group </s>
funcom_train/11042672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void CompareOMElemntSerializations(Object o, String xmlToSet) throws Exception { OMElement element = getOMElement(o); ByteArrayOutputStream baos = new ByteArrayOutputStream(); XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(baos); element.serialize(writer); writer.flush(); assertXMLEqual(baos.toString(),xmlToSet); } COM: <s> compares serializations may be overridden </s>
funcom_train/28116984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean containsTest(Test test, String regexp) { Pattern pattern = null; try { Perl5Compiler compiler = new Perl5Compiler(); pattern = compiler.compile(regexp); } catch (MalformedPatternException exception) { log.error("Invalid test case pattern: " + exception.getMessage()); } return (pattern != null) ? containsTest(test, pattern) : false; } COM: <s> determines if a test is included by a regular expression matching </s>
funcom_train/47184050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PatientBean getPatient(long mid) throws DBException { Connection conn = null; PreparedStatement ps = null; try { conn = factory.getConnection(); ps = conn.prepareStatement("SELECT * FROM Patients WHERE MID = ?"); ps.setLong(1, mid); ResultSet rs = ps.executeQuery(); if (rs.next()) { return patientLoader.loadSingle(rs); } else return null; } catch (SQLException e) { e.printStackTrace(); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } COM: <s> returns the patients information for a given id </s>
funcom_train/44843325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DataItem _getCachedDataItem(byte[] data) { synchronized (_mruCache) { Iterator iter = _mruCache.iterator(); while (iter.hasNext()) { DataItem dataItem = (DataItem)iter.next(); if (Arrays.equals(data, dataItem.data)) { // Cache hit, move hit to most-recent position iter.remove(); _mruCache.addFirst(dataItem); // Return the matching DataItem return dataItem; } } } return null; } COM: <s> fetches the data item for the specified data from the cache </s>
funcom_train/42634034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean _askQuestion(char x) { //indicateNotStarted(); setFinishedAsking(false); if (messageDone(x)) return false; correctAnswer = false; currentCharacter = mp.getCharacter(x); // this check handles bad characters & spaces if (currentCharacter == null) { state = WORD_PAUSE; updateAskedAndTimesUp(mp.millisBetweenWords()); setFinishedAsking(false); return true; } currentCharacter.asked(); mp.asked(); if (!presentQuestion(x)) return false; updateAskedAndTimesUp(mp.millisBetweenCharacters()); // FIXME: revisit this.... setFinishedAsking(false); // getting the wait at this point has proven problemmatic return true; } COM: <s> code shared by ask question and re ask question </s>
funcom_train/25707047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyThreadStarted(final BoardUpdateThread thread) { this.startTimeMillis = System.currentTimeMillis(); // notify listeners final Iterator<BoardUpdateThreadListener> i = registeredListeners.iterator(); while( i.hasNext() ) { i.next().boardUpdateThreadStarted(thread); } } COM: <s> called from thread to notify all listeners that thread is started now </s>
funcom_train/3675585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Direction rotateLeft() { switch (this.direction) { case DIR_UP: return getLeft(); case DIR_DOWN: return getRight(); case DIR_LEFT: return getDown(); case DIR_RIGHT: return getUp(); default: logger.warning("Switch (direction) in rotateLeft() had an impossible value."); return null; } } COM: <s> returns the code direction code that is equivalent to rotating the current </s>
funcom_train/45250482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Collection busyListenersForJob(Job job) { if (job.isSystem()) { return Collections.EMPTY_LIST; } synchronized (familyKey) { if (familyListeners.isEmpty()) { return Collections.EMPTY_LIST; } Iterator families = familyListeners.keySet().iterator(); Collection returnValue = new ArrayList(); while (families.hasNext()) { Object next = families.next(); if (job.belongsTo(next)) { Collection currentListeners = (Collection) familyListeners .get(next); returnValue.addAll(currentListeners); } } return returnValue; } } COM: <s> return the listeners for the job </s>
funcom_train/19177817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openConnection() throws dbException { if(this.getConnection()==null) { Object obj = conn_pool.pop(); if (obj!=null) { setConnection((Connection)obj); } else { throw new dbException("Unable to get connection", null); } } } COM: <s> open connection to database </s>
funcom_train/5790334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasMarkup(String pcdata) { return (pcdata.indexOf("<") != -1 || pcdata.indexOf("&") != -1 || pcdata.indexOf("\"") != -1 || pcdata.indexOf(">") != -1 || pcdata.indexOf("\'") != -1); } COM: <s> this method checks the string to see if it has </s>
funcom_train/25418570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void onRecordUpdated(Schema schema, PublicationRecord record) { if (!isActive()) return; try { if (!schemaKeys.containsString(schema.getKey())) return; publish(schema,record.getSourceXml()); } catch (Exception e) { LOGGER.log(Level.SEVERE,"Publication to remote service failed.",e); } } COM: <s> informs the remote repository of record publications </s>
funcom_train/38415320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIntegerProperty( String key ) { String val = getProperty(key); if(val==null) return -1; try { int i_val = Integer.parseInt(val); if(i_val<0) return -1; return i_val; }catch(Exception e) { Debug.signal(Debug.ERROR, this, ""+key+" doesn't have a valid integer format."); return -1; } } COM: <s> returns an integer value from a property that is supposed to be a </s>
funcom_train/27781417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMainFrame(MainFrame aMainFrame) { mMainFrame = aMainFrame; if (mPanelSearch != null) { mPanelSearch.setMainFrame(getMainFrame()); } if (mPanelResultLister != null) { mPanelResultLister.setMainFrame(getMainFrame()); } } COM: <s> sets the main frame attribute of the panel main left object </s>
funcom_train/29617223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getBool(String name){ if(containsKey(name)){ if(get(name).equals("true")) return true; else if (get(name).equals("false")) return false; else { System.err.println(get(name)+ " for key \"" + name + "\" is not a Boolean"); } } else { System.err.println(name + " key does not exist"); } return false; } COM: <s> returns a boolean value of the property </s>
funcom_train/37010329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getXmlString(InputStream xmlInput) { // first copy input stream into memory byte[] xml; try { xml = FileCopyUtils.copyToByteArray(xmlInput); } catch (IOException e) { throw new RuntimeException(e); } // now parse into DOM getDocument(new ByteArrayInputStream(xml)); // if we get here, we know the XML was at least well-formed, // so return String return new String(xml); } COM: <s> get xml data as a string </s>
funcom_train/986885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem6() { if (stringItem6 == null) {//GEN-END:|116-getter|0|116-preInit // write pre-init user code here stringItem6 = new StringItem("Producto:", "Tiquete bus");//GEN-LINE:|116-getter|1|116-postInit // write post-init user code here }//GEN-BEGIN:|116-getter|2| return stringItem6; } COM: <s> returns an initiliazed instance of string item6 component </s>
funcom_train/20271109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void blacklistVarReferencesInTree(Node root, final Scope scope) { NodeUtil.visitPreOrder(root, new NodeUtil.Visitor() { @Override public void visit(Node node) { if (node.getType() == Token.NAME) { staleVars.add(scope.getVar(node.getString())); } } }, NodeUtil.MATCH_NOT_FUNCTION); } COM: <s> if there are any variable references in the given node tree </s>
funcom_train/29719366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { setExpanded(true); /*Locale locale = FacesContext.getCurrentInstance().getViewRoot().getLocale(); // assign a default locale if the faces context has none, shouldn't happen if (locale == null) { locale = Locale.ENGLISH; }*/ /* messages = ResourceBundle.getBundle( "wilos.resources.messages", LocaleBean.getLocale());*/ } COM: <s> initialize the locale of the application depending on the server locale </s>
funcom_train/33609561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumCols(){ switch(layoutType.getValue()){ case LAYOUT_HLINE: return elements.size(); case LAYOUT_VLINE: return 1; case LAYOUT_BOX: default: int nCols=(int)((getWidth()-2*padding+spacing)/(buttonSize+spacing)); return (nCols<1)?1:nCols; } } COM: <s> returns number of columns </s>
funcom_train/26453740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(HotIP ip) { ipList.remove(ip); for (int i=0; i<observers.size(); i++) { HotIPListObserver observer = (HotIPListObserver)observers.get(i); if (observer != null) { observer.ipRemoved(ip); } } } COM: <s> removes the specified </s>
funcom_train/9143478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRelation(Relation relation) { if (this.relations.get(relation.getType()) == null){ Set<Relation> allRelations = new HashSet<Relation>(); allRelations.add(relation); this.relations.put(relation.getType(), allRelations); } else { Set<Relation> allRelations = this.relations.get(relation.getType()); if (!this.containsRelation(relation)) { allRelations.add(relation); this.relations.put(relation.getType(), allRelations); } } } COM: <s> adds a relation for this entity </s>
funcom_train/51809746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(BusinessObjectProperties props) { if (props!=null) { String key = null; for (Enumeration e = props.keys(); e.hasMoreElements();) { key = (String) e.nextElement(); this.put(key, props.get(key)); } } } COM: <s> adds specified properties to this list of properties </s>
funcom_train/27844721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRegisterBinding() throws Exception { MockBinding binding = new MockBinding(); _activemodelwrapper.registerBinding(binding); assertEquals(1, _activemodelwrapper.getBindings().size()); // try to register again the same binding _activemodelwrapper.registerBinding(binding); assertEquals(1, _activemodelwrapper.getBindings().size()); } COM: <s> method test register binding is testing register binding </s>
funcom_train/29985574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeDir (File dir) { String files[] = dir.list (); for (int i = 0; i < files.length; i++) { File f = new File (dir, files[i]); if (f.isFile ()) f.delete (); else if (f.isDirectory ()) { removeDir (f); } } dir.delete (); } COM: <s> remove a directory including all of its files </s>
funcom_train/13630113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSwigKeyboardEvent(SDL_KeyboardEvent argSwigKeyboardEvent) { this.swigKeyboardEvent = argSwigKeyboardEvent; // unwrap the keysym for quick access SDL_keysym keysym = swigKeyboardEvent.getKeysym(); cachedScancode = keysym.getScancode(); cachedSym = keysym.getSym(); cachedMod = SDLMod.get(keysym.getMod()); cachedUnicode = keysym.getUnicode(); } COM: <s> sets the value of swig keyboard event </s>
funcom_train/42480745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMenuItem getMiHelpAbout() { if (miHelpAbout == null) { miHelpAbout = new JMenuItem(); miHelpAbout.setText(Msg.getString("label.about")); //$NON-NLS-1$ miHelpAbout.setToolTipText(Msg.getString("label.about.tooltip")); //$NON-NLS-1$ } return miHelpAbout; } COM: <s> this method initializes mi help about </s>
funcom_train/44137935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectionnable(boolean state) { for(int i = 0;i < m_LineList.size();i++) { OSMSlideBodyLine line = (OSMSlideBodyLine)m_LineList.elementAt(i); line.setSelectionnable(state); } super.setSelectionnable(state); } COM: <s> to sets selectionnable or not applied on osmslide body line sons too </s>
funcom_train/47192310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String salinity() { String sali=null; if (ce < 0.7) { sali = "Sin Problema"; } else if (ce >= 0.7 && ce <= 3) { sali = "Problema Creciente"; } else if (ce >= 3) { sali = "Problema Grave"; } return sali; } COM: <s> calculating water salinity </s>
funcom_train/24471072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String computeIdentifier() { final StringBuffer sb = new StringBuffer(); sb.append(this.tree.getAnnotation(HeightAnnotator.class, "depth")); sb.append('|'); sb.append(this.tree.getAnnotation(HeightAnnotator.class, "nodes")); sb.append('|'); sb.append(tree.getChildCount()); // sb.append('|'); // sb.append(tree.getType()); // sb.append('|'); // sb.append(tree.getText()); return sb.toString(); } COM: <s> computes an identifier composed of depth class name nodes amount etc </s>
funcom_train/28275988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractTask getTaskByKey(String repositoryUrl, String taskKey) { for (AbstractTask task : tasks.values()) { String currentTaskKey = task.getTaskKey(); if (currentTaskKey != null && currentTaskKey.equals(taskKey) && task.getRepositoryUrl().equals(repositoryUrl)) { return task; } } return null; } COM: <s> searches for a task whose key matches </s>
funcom_train/10947851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLimitToCurrent() { List results = new TestFileFinder(null, 0).find(current); assertEquals("Result Size", 1, results.size()); assertTrue("Current Dir", results.contains(new File("."))); } COM: <s> test limiting to current directory </s>
funcom_train/22260494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean runCancelOperation() { IRunnableWithProgress op = new WorkspaceModifyDelegatingOperation(new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException { try { doCancel(monitor); } catch (Exception e) { CorePlugin.log(e); } finally { monitor.done(); } return; } }); try { getContainer().run(false, false, op); } catch (InvocationTargetException e) { HaxeLog.logError("", e); return false; } catch (InterruptedException e) { HaxeLog.logError("", e); return false; } return true; } COM: <s> run do cancel with progress </s>
funcom_train/14096366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void extend(int incrementSize) { double[] newSupport = new double[support.length + incrementSize]; double[] newMembership = new double[membership.length + incrementSize]; System.arraycopy(support, 0, newSupport, 0, support.length); System.arraycopy(membership, 0, newMembership, 0, membership.length); support = newSupport; membership = newMembership; } COM: <s> extend the array by passed value </s>
funcom_train/50388302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getResourcePropertyDocument() throws BaseFault,ResourceUnknownFault,ResourceUnavailableFault,ClientException{ GetResourcePropertyDocumentResponseDocument resp=GetResourcePropertyDocument(); if(resp==null){ throw new ClientException("Server <"+getEPR().getAddress().getStringValue()+"> returned <null>"); } return String.valueOf(resp); } COM: <s> get a string containing all resourceproperties </s>
funcom_train/8326091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private NamedSet lookupNamedSet(String name) { for (Formula formula : formulas) { if (!formula.isMember() && formula.getElement() != null && formula.getName().equals(name)) { return (NamedSet) formula.getElement(); } } return null; } COM: <s> looks up a named set </s>
funcom_train/1834108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isStringTokenMatched(final AnalyzedToken token) { final String testToken = getTestToken(token); if (stringRegExp) { if (m == null) { m = p.matcher(testToken); } else { m.reset(testToken); } return m.matches(); } if (caseSensitive) { return stringToken.equals(testToken); } return stringToken.equalsIgnoreCase(testToken); } COM: <s> tests whether the string token element matches a given token </s>
funcom_train/20119835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restrict(String queryMethod, String queryFilter, String addQuery, String encoding) throws XPathExpressionException, BadQueryException { if (RESET.equals(queryMethod)) { clear(); } else { if (queryFilter != null && queryFilter.length() > 0) { filter(queryFilter); } } if (addQuery != null && addQuery.length() > 0) { addQueryString(addQuery, encoding); } } COM: <s> applay restrictions to query </s>
funcom_train/3391770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printAllClasses(boolean wantFrames) { for (int i = 0; i < indexbuilder.elements().length; i++) { Character unicode = (Character)((indexbuilder.elements())[i]); generateContents(indexbuilder.getMemberList(unicode), wantFrames); } } COM: <s> use the sorted index of all the classes and print all the classes </s>
funcom_train/11671971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endConditional(Augmentations augs) throws XNIException { fIndent--; printIndent(); fOut.print("endConditional("); if (augs != null) { fOut.print(','); printAugmentations(augs); } fOut.println(')'); fOut.flush(); } // endConditional() COM: <s> end conditional section </s>
funcom_train/35724964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void feed(PApplet pA) { pA.perspective(fov, aspect, nearClip, farClip); pA.camera(cameraX, cameraY, cameraZ, targetX, targetY, targetZ, upX, upY, upZ); } COM: <s> send what this camera sees to the view port </s>
funcom_train/20085458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runFile(String path) throws ScriptException, FileNotFoundException, IOException { ScriptEngine _scriptEngine = getScriptEngineByExtension(path); if (!getEngine().getFactory().getEngineName().equals(_scriptEngine.getFactory().getEngineName())) { setEngine(_scriptEngine); } loadBindings(); runFile(getEngine(), path); } COM: <s> run script file </s>
funcom_train/50421355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element findElement(Element parent, String name) { Element foundElement = null; Element thisElement = null; int count = parent.getElementCount(); for (int i = 0; i < count && foundElement == null; i++) { thisElement = parent.getElement(i); if (thisElement.getName().equalsIgnoreCase(name)) { foundElement = thisElement; } else { foundElement = findElement(thisElement, name); } } return foundElement; } COM: <s> find the first occurrence of an code element code in the </s>
funcom_train/33492399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { Card c = (Card) o; int value = 0; if(suite < c.suite) { value = -1; } else if(suite > c.suite) { value = 1; } if(value == 0) { if(rank < c.rank) { value = -1; } else if(rank > c.rank) { value = 1; } } return value; } COM: <s> command to compare the given card with this card </s>
funcom_train/20364575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(int newValue) { if (newValue < minimum) { throw new IllegalArgumentException( "New value cannot be less than 0."); } if (newValue > maximum) { throw new IllegalArgumentException( "New value exceeds selectable maximum of _"+(getButtonCount()-1)+"."); } this.value = newValue; SwingUtilities.invokeLater(new Runnable() { public void run() { setLabelIcons(); } }); fireAllChangeListeners(); } COM: <s> change the selected value </s>
funcom_train/28629382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Result getResult(String ident) { File identFile = new File(ident); if (!identFile.isAbsolute()) identFile = new File(rootDir, ident); Result result; try { identFile.getParentFile().mkdirs(); result = new StreamResult(new BufferedOutputStream(new FileOutputStream(identFile))); } catch (IOException ioe) { throw new BeanDocException("Unable to create stream for file [" + identFile + "]", ioe); } return result; } COM: <s> the result returned uses a file name specified in the ident parameter </s>
funcom_train/44431522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleaningFinished(ChannelIF channel) { final int size = observers.size(); for (int i = 0; i < size; i++) { final CleanerObserverIF observer = (CleanerObserverIF) observers.get(i); try { observer.cleaningFinished(channel); } catch (Exception e) { // Do not care about exceptions from sub-observers. } } } COM: <s> invoked by cleanup engine when cleaning of the channel has finished </s>
funcom_train/46787020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Processor_name_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_Processor_name_feature", "_UI_Processor_type"), EZRealtimePackage.Literals.PROCESSOR__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the name feature </s>
funcom_train/3703996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fixMessageEntry() { Dimension dim = textMessageEntry.getSize(); int newHeight = textMessageEntryPreferredHeight; int newWidth = (int) dim.getWidth(); dim.setSize(newWidth, newHeight); textMessageEntry.setPreferredSize(dim); textMessageEntry.setSize(dim); textMessageEntry.invalidate(); LemmingMessageWindow.this.validate(); LemmingMessageWindow.this.repaint(); } // of method COM: <s> fix the message entry area not to resize </s>
funcom_train/17733726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { try { RowsVector v = (RowsVector) super.clone(); v.elementData = new Row[size]; System.arraycopy(elementData, 0, v.elementData, 0, size); v.modCount = 0; return v; } catch (CloneNotSupportedException e) { // this shouldn't happen, since we are Cloneable throw new InternalError(); } } COM: <s> returns a shallow copy of this tt array list tt instance </s>
funcom_train/12619625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scanForPlants(){ Plant p; for (int i=0; i<plants.size(); i++){ p = plants.get(i); if (spritesOverlap(this.getPositionX(), this.getPositionY(), p.getPositionX(), p.getPositionY(), 0, 0)) this.eat(p); } } COM: <s> find all plants touching the animal and eat them </s>
funcom_train/178048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long countOrders() throws Exception{ Function function = ds.getFunctionForType("orders", Function.COUNT_QUERY); function.addSelectableField("ID"); Object result = ds.function(function); assertEquals("count result should be a Long object", Long.class, result.getClass()); return ((Long)result).longValue(); } COM: <s> function to count orders and test that functions are working correctly </s>
funcom_train/20380671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prepare() { if (getRequest().getMethod().equalsIgnoreCase("get")) { // prevent failures on new id= getRequest().getParameter("device.deviceId"); if (!"".equals(id) && id!=null) { device = (Device)deviceManager.get(Long.parseLong(id)); } } } COM: <s> grab the entity from the database before populating with request parameters </s>
funcom_train/9676030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeCache(TimeIndex idx) { CacheEntry entry = (CacheEntry) assocCache.remove(idx); if (entry.negativeId == null) { MessageAssociation assoc = entry.assoc; idMap.remove(assoc.getAssocId(0)); idMap.remove(assoc.getAssocId(1)); } else { idMap.remove(entry.negativeId); } } COM: <s> removes cache entry from cache </s>
funcom_train/18756615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getComponentIndex(Component c) { int retVal = -1; Component[] components = getComponents(); retVal = super.getComponentIndex(c); if (retVal >= 0) { ; // Nothing to do - already found the item } else { // Account for more Menu; int moreLocation = moreMenu.getComponentIndex(c); if (moreLocation != -1) { // Account for the more menu item - hence the '-1' retVal = (components.length-1) + moreMenu.getComponentIndex(c); } } return retVal; } COM: <s> override the jpopup menu functionality </s>
funcom_train/46763250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResourceAppointmentModel getResourceAppointment(final long resourceAppointmentId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return SchedulingData.getResourceAppointment(resourceAppointmentId, chain, call); }}; return (ResourceAppointmentModel) call(method, call); } COM: <s> same transaction return the single resource appointment model for the primary key </s>
funcom_train/18495666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() throws CloneNotSupportedException { CreditAssetVO result = (CreditAssetVO) super.clone(); result.setBankInformationVO( this.getBankInformationVO() != null ? (com.fimasys.finance.profinance.front.ejb.bdo.bank.BankInformationVO)this.getBankInformationVO().clone() : null); return result; } COM: <s> clone an object not by a shallow copy but by a deep copy </s>
funcom_train/28756824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHeaderlogo(String newVal) { if ((newVal != null && this.headerlogo != null && (newVal.compareTo(this.headerlogo) == 0)) || (newVal == null && this.headerlogo == null && headerlogo_is_initialized)) { return; } this.headerlogo = newVal; headerlogo_is_modified = true; headerlogo_is_initialized = true; } COM: <s> setter method for headerlogo </s>
funcom_train/5668890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setBackEnd() { try { String path = getVal(backEndPathCommand); if (path != null) backEnd = new File(path); if (path == null || !backEnd.exists()) findBackEnd(); } catch (IOException ieo) { GUI.errorMsg("There is a problem with the preferences file."); if (backEnd == null || !backEnd.exists()) { GUI.errorMsg("This program cannot operate without a backend."); System.exit(1); } } } COM: <s> sets the back end file reference to </s>
funcom_train/44822218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IViewFactory getViewFactory() { if (viewFactory == null) { try { TabbedPanelDef pDef = (TabbedPanelDef) getMetaObject(); if (pDef != null) { viewFactory = (IViewFactory) pDef.getContext().get( IViewFactory.class); } } catch (Throwable t) { logger.error("Failed to get View Factory.", t); } } return viewFactory; } COM: <s> get the view factory </s>
funcom_train/9834856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Wire addsub(Wire a, Wire b, Wire add) { Wire s = wire(a.getWidth(), name("sum")); return addsub_o(a, b, not(add), add, s, (String) null); } COM: <s> constructs a new adder subtractor with no carry in or carry out </s>
funcom_train/18569422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initBitmapGraphics(Graphics2D setG2d) { if (outputType == SCREEN) { } else if (outputType == PRINTER) { g2d = setG2d; } else if (outputType == BITMAP_FILE) { } else if (outputType == SVG_FILE) { //!! g2d = SVGHelper.createG2DforSVG(); } else { if (Debug.enabled) assert false : "outputType is undefined"; } } COM: <s> method init bitmap graphics </s>
funcom_train/40451673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addProperty(SensorData data, String key, String value) { if (data.getProperties() == null) { data.setProperties(new Properties()); } Properties properties = data.getProperties(); Property property = new Property(); property.setKey(key); property.setValue(value); properties.getProperty().add(property); } COM: <s> updates the sensor data instance with the new property </s>
funcom_train/19831407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Action clone () throws CloneNotSupportedException{ Action copy = (Action)super.clone(); if(this.actionBase != null) copy.actionBase = this.actionBase.clone(); if(this.actionType != null) copy.actionType = new String(this.actionType); if(this.activeActionType != null) copy.activeActionType = new String(this.activeActionType); copy.deepCopy(); return copy; } COM: <s> shallow copy method </s>
funcom_train/777483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNullInjectMessage() { try { new UnitTestBehaviour( jademxAgent, aclMessage, null, duration, properties); fail("failed to catch null inject message passed to UnitTestBehaviour constructor"); } catch ( IllegalArgumentException iae ) { assertTrue(true); } } COM: <s> test for expected exception when passing null inject message to constructor </s>
funcom_train/43259462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNormalBehavior() throws IOException { ByteBuffer b = ByteBuffer.allocate(100); for(int i = 0; i < 2; i++) { b.clear(); String fullString = HALF1+HALF2+i; helper.putString(b, fullString); helper.doneFillingBuffer(b); ByteBuffer outgoing = unpacketizer.processOutgoing(b); //contract is a rewound buffer that it can read to begin with. unpacketizer.incomingData(outgoing); CalledMethod method = listener.expect(PACKET_METHOD); verifyBuffer(method, fullString, 11); } } COM: <s> test normal behavior by running 2 full normal packets through </s>
funcom_train/43069201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendNotifications() { for (QuorumServer server : self.quorumPeers.values()) { long sid = server.id; ToSend notmsg = new ToSend(ToSend.mType.notification, proposedLeader, proposedZxid, logicalclock, QuorumPeer.ServerState.LOOKING, sid); sendqueue.offer(notmsg); } } COM: <s> send notifications to all peers upon a change in our vote </s>
funcom_train/9537278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNullProgramId() { try { String nullParam = null; new Dispatch(nullParam); fail("the dispatch failed to protect itself from null program ids"); } catch (IllegalArgumentException iae) { System.out .println("the dispatch protected itself from null program ids"); } try { String nullParam = ""; new Dispatch(nullParam); fail("the dispatch failed to protect itself from empty string program ids"); } catch (IllegalArgumentException iae) { System.out .println("the dispatch protected itself from empty string program ids"); } } COM: <s> verify that dispatch constructors are protected from null program ids </s>
funcom_train/10802670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLoadKey(String key) { if (this.loadKey != null && key != null && !this.loadKey.equals(key)) throw new ParseException(s_loc.get("multiple-load-key", loadKey, key)); loadKey = key; } COM: <s> sets key under which this value was loaded </s>
funcom_train/47320921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void comp_decisao(LexicToken structureId, boolean isMethod) throws SyntaxException, IOException, InvalidLexicTokenException, SemanticException { switch (lexiconAnalyzer.getCurrentToken().getType()) { case DELIMITER_BLOCK_CLOSE: // "}" match(LexicTokenType.DELIMITER_BLOCK_CLOSE); // "}" COM: <s> this method implements the comp decisao rule that we have at the grammar </s>
funcom_train/31679113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { final FastComparator comp = this.getValueComparator(); int h = 1; for (Node n = _head, end = _tail; (n = n._next) != end;) { checkCanceled(); h = 31 * h + comp.hashCodeOf(n._value); } return h; } COM: <s> returns the hash code value for this list </s>
funcom_train/29419332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public Icon getIcon(DotPalette pal) { int i=0; for(Object choice: DotPalette.values()) { if (i>=icons.size()) break; if (pal==choice) return icons.get(i); i++; } return icons.get(0); } COM: <s> returns the icon to use based on the given palette </s>
funcom_train/13415915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image loadImage(String filename) { if (sourceImage != null && !sourceImage.isDisposed()) { sourceImage.dispose(); sourceImage = null; } sourceImage = new Image(getDisplay(), filename); // chenge the image to gray scale if its not already. //sourceImage = new Image(getDisplay(), sourceImage, SWT.IMAGE_GRAY); showOriginal(); return sourceImage; } COM: <s> reload image from a file </s>
funcom_train/7757383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator getHeader(String name) { Iterator eachHeader = getHeaders(); List matchingHeaders = new ArrayList(); while(eachHeader.hasNext()) { Header aHeader = (Header) eachHeader.next(); if(name.equals(aHeader.getName())) matchingHeaders.add(aHeader); } return matchingHeaders.iterator(); } COM: <s> gets all of the headers matching the specified name </s>