__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/1383066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PlanningMese getMarzo() { if (marzo == null) { try { marzo = new PlanningMese(PlanningMese.MARZO, dbm, listener, padre); marzo.setPreferredSize(new Dimension(600, 300)); // Generated dbm.addDBStateChange(marzo); } catch (java.lang.Throwable e) { // } } return marzo; } COM: <s> this method initializes marzo </s>
funcom_train/18594414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMouseComponent() { JLabel label = new JLabel(getName()); Frame f = showFrame(label); robot.click(label); robot.waitForIdle(); assertEquals("Wrong mouse component", f, state.getMouseComponent()); assertEquals("Wrong ultimate mouse component", label, state.getUltimateMouseComponent()); } COM: <s> not all components track mouse events </s>
funcom_train/21878913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Model getModuleModel(Collection uris, Model input) throws MbuilderException { Model mod = getLockAccess().readlockModel(); try { for (Iterator i = uris.iterator(); i.hasNext();) { String uri = (String) i.next(); getModuleModel(uri, input); } return input; } finally { getLockAccess().unlockModel(); } } COM: <s> get the model including statements for aall the given modules </s>
funcom_train/8980538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ECEFCoordinates (Double latitude, Double longitude, Double altitude) { //convert to radion latitude = latitude*PI /180.0; longitude = longitude*PI /180.0; Double H = sqrt(1-e2Square*sin(latitude)*sin(latitude)); Double aHplusH = a/H+altitude; setX( aHplusH * cos(latitude)*cos(longitude) ); setY( aHplusH * cos(latitude)*sin(longitude) ); setZ(((a*(1-e2Square))/H+altitude)*sin(latitude) ); } COM: <s> creates new ecef coordinates from lla </s>
funcom_train/14653361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Slot getSlot(String name){ try { for (Slot s: slots){ if (s.getName().equals(name)){ return s; } } throw new RBotMemoryException("Slot is not defined in ChunkType, check slot name: " + name); } catch (RBotMemoryException e){ e.printStackTrace(); } return null; } COM: <s> get slot with name </s>
funcom_train/22947671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showAddedTables() { Collection<Table> c = Facade.getInstance().getAllTablesIWS(); if (c.isEmpty()) System.out.println("INFO: There are no tables in internal structure!"); for (Table cc : c) { System.out.println(cc); } } COM: <s> shows added tables </s>
funcom_train/23267787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetNroPrestamo() { System.out.println("getNroPrestamo"); Prestamos instance = new Prestamos(); int expResult = 0; int result = instance.getNroPrestamo(); 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 nro prestamo method of class capa negocios </s>
funcom_train/28127736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Calendar getFirstVisibleDate() { Calendar c = Calendar.getInstance(); c.set(chosenDate.get(Calendar.YEAR), chosenDate.get(Calendar.MONTH), 1); c.add(Calendar.DATE, -1); while (c.get(Calendar.DAY_OF_WEEK)!=getFirstDayOfWeek()) { c.add(Calendar.DATE, -1); } return c; } COM: <s> returns the first date that is visible in the grid </s>
funcom_train/43187183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pause() { synchronized (resetSync) { for (int i = 0; i < loops.length; i++) { if (tracks[i].isEnabled() && loops[i] != null && !loops[i].resetted) loops[i].pause(); } parser.stop(); } } COM: <s> this is essentially a non blocking version of do stop </s>
funcom_train/47184042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkPersonnelExists(long pid) throws DBException { Connection conn = null; PreparedStatement ps = null; try { conn = factory.getConnection(); ps = conn.prepareStatement("SELECT * FROM Personnel WHERE MID=?"); ps.setLong(1, pid); ResultSet rs = ps.executeQuery(); return rs.next(); } catch (SQLException e) { e.printStackTrace(); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } COM: <s> indicates whether a certain personnel is in the database </s>
funcom_train/47843564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MPSServiceProxy (Object serviceModule, String moduleName) { _lastException = _ConstructorException; if (serviceModule != null) { //*...Check for requisite constructor...*/ setModule (serviceModule); if (isGood ()) _ServiceModules.put (moduleName, serviceModule); } else { _lastException = new NullPointerException ("Illegal serviceModule argument"); } } COM: <s> initializes a new instance whose </s>
funcom_train/17853758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getDaysSince1970(Date date) { Calendar cal = date.getCalendar(); int zoneOffset = cal.get(Calendar.ZONE_OFFSET); int daylight = cal.get(Calendar.DST_OFFSET); java.util.Date utilDate = cal.getTime(); long millis = utilDate.getTime() + zoneOffset + daylight; return (int) (millis / 1000L / 60L / 60L / 24L); } COM: <s> gets the days since 1 </s>
funcom_train/35308957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void die() { int size = edits.size(); for (int i = size-1; i >= 0; i--) { UndoableEdit e = edits.elementAt(i); // System.out.println("CompoundEdit(" + i + "): Discarding " + // e.getUndoPresentationName()); e.die(); } super.die(); } COM: <s> sends code die code to each subedit </s>
funcom_train/48519103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void findViews_settings() { fromSpinner = (Spinner) findViewById(R.id.mph_kph_language); fromSpinner2= (Spinner) findViewById(R.id.taunts_language); usernameText = (EditText) findViewById(R.id.username_field); origText = (EditText) findViewById(R.id.url_field); } COM: <s> get a handle to all user interface elements </s>
funcom_train/44212098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String renderFilter() { try { return WebContextFactory.get().forwardToString( "/WEB-INF/fragments/todos_table_filter.jsp"); } catch (ServletException e) { log.error("ServletException : " + e); return ""; } catch (IOException ioe) { log.error("IOException : " + ioe); return ""; } } COM: <s> render the filtered data </s>
funcom_train/17773269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isInLeftHalfCell(Point p) { int index = patternView.locationToIndex(p); Rectangle cellRectangle = patternView.getCellBounds(index, index); boolean result = false; if (cellRectangle != null) { cellRectangle.width = (int) (0.5 * cellRectangle.width); result = cellRectangle.contains(p); } return result; } COM: <s> gets the in left half cell attribute of the new pattern builder object </s>
funcom_train/9959252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int determineFrameSize(Recording r) { int rv = 0; List<Long> sizes = determineFileSizes(r); if (sizes != null && sizes.size() > 0) { long total = r.getSize(); long frames = sizes.get(0) / 8; rv = (int) (total / frames); } return rv; } COM: <s> calculates an estimated size of a frame </s>
funcom_train/19351215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visit(OWLSubClassAxiom axiom) throws OWLException { if (logger.isDebugEnabled()) { logger.debug("visit(OWLSubClassAxiom axiom = " + axiom + ") - start"); } ConceptPair conceptPair = tells.addNewImpliesc(); ConceptPairRenderingVisitor v = new ConceptPairRenderingVisitor( conceptPair); axiom.getSubClass().accept(v); axiom.getSuperClass().accept(v); if (logger.isDebugEnabled()) { logger.debug("visit(OWLSubClassAxiom) - end"); } } COM: <s> adds an impliesc axiom to code tells code corresponding to </s>
funcom_train/9537282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMultipleInstances() { ComThread.InitMTA(); String mApplicationId = "Word.Application"; ActiveXComponent instance1 = ActiveXComponent .createNewInstance(mApplicationId); ActiveXComponent instance2 = ActiveXComponent .createNewInstance(mApplicationId); try { Thread.sleep(10000); } catch (InterruptedException ie) { } instance1.invoke("Quit", new Variant[] {}); instance2.invoke("Quit", new Variant[] {}); ComThread.Release(); } COM: <s> this test is supposed to verify we get multiple instances when we mean </s>
funcom_train/5692749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeDefaultConstant(String attribute, String value) { if (!this.opts.isReadOnly()) { this.writer.println(" /** The default value for " + attribute + ". */"); this.writer.println(" public static final String DEFAULT_" + attribute + " = \"" + value + "\";"); this.writer.println(); } } COM: <s> writes a default constant </s>
funcom_train/6508679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doPhase(int phase, Bot[] bots) { BoardBot[] b = new BoardBot[bots.length]; for (int i = 0; i < bots.length; i++) { b[i] = (BoardBot) bots[i]; } doPhaseReal(phase, b); } COM: <s> simulates a phase </s>
funcom_train/41171693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateLreWindow(ProfileSummary prfSum, LreWindowSelectionParameters parameters) { if (prfSum.getProfile().getLreWinSize() == 0) {//"Reanalyze" request LreWindowSelector.selectLreWindow(prfSum, parameters); return true;//No significance for this boolean return } else { ProfileInitializer.calcLreParameters(prfSum); return false;//No significance for this boolean return } } COM: <s> updates the profile based on a manual adjustment to the lre window </s>
funcom_train/2294686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setUri() { StringBuffer uri = new StringBuffer(64); uri.append(m_target); if (m_query != null) { uri.append('?'); uri.append(m_query); } if (m_anchor != null) { uri.append('#'); uri.append(m_anchor); } m_uri = uri.toString(); } COM: <s> joins the internal target anchor and query components </s>
funcom_train/25135594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Icon getSizingIcon(AbstractButton b) { // NOTE: this is slightly different than BasicButtonUI, where it // would just use getIcon, but this should be ok. Icon icon = (b.isEnabled()) ? b.getIcon() : b.getDisabledIcon(); if (icon == null) { icon = getDefaultIcon(b); } return icon; } COM: <s> returns the icon used in calculating the pref min max size </s>
funcom_train/2800486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File next() { synchronized (mLock) { File file = (File) mCurrentList.remove(0); File workingFile = new File(mFilePoller.getWorkingFolder(), file.getName()); if (file.renameTo(workingFile)) { return workingFile; } else { return null; } } } COM: <s> pops from the stack the next available file </s>
funcom_train/14266352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Endpoint getConnectedGUESSUltrapeer() { for(Iterator iter=_initializedConnections.iterator(); iter.hasNext();) { ManagedConnection connection = (ManagedConnection)iter.next(); if(connection.isSupernodeConnection() && connection.isGUESSUltrapeer()) { return new Endpoint(connection.getInetAddress().getAddress(), connection.getListeningPort()); } } return null; } COM: <s> returns the tt endpoint tt for an ultrapeer connected via tcp </s>
funcom_train/31436042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent ae) { Object src = ae.getSource(); if (src.equals(jCkRequiresAuth)) { if (jCkRequiresAuth.isSelected()) { usernameTf.setEnabled(true); passwordTf.setEnabled(true); } else { usernameTf.setEnabled(false); passwordTf.setEnabled(false); } } } COM: <s> this allows the panel to control its own actions such </s>
funcom_train/29624565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shiftAllPos(double _x, double _y) { for (int i = 0; i < waypoints.size(); i++) { Waypoint oldWP = waypoints.get(i); Waypoint newWP = new Waypoint(oldWP.time, new Coordinate(oldWP.pos.x + _x, oldWP.pos.y + _y) ); waypoints.setElementAt(newWP, i); } } COM: <s> move all waypoints by a certain offset </s>
funcom_train/19752036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean selfTest() { SHA1 tester = new SHA1(); tester.update(SELFTEST_MESSAGE); tester.finalize(); byte[] digest = tester.getDigest(); tester.clear(); for (int nI = 0; nI < DIGEST_SIZE; nI++) if (digest[nI] != SELFTEST_DIGEST[nI]) return false; // test passed return true; } COM: <s> runs a selftest </s>
funcom_train/365613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonCancel() { if (jButtonCancel == null) { try { jButtonCancel = new JButton(); jButtonCancel.setText("Cancel"); // Generated jButtonCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { MainFrame.mf.logic.loadProperties(); } }); } catch (java.lang.Throwable e) { // TODO: Something } } return jButtonCancel; } COM: <s> this method initializes j button cancel </s>
funcom_train/2369439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rebuildPlayerList() { this.playerLIst.setValueIsAdjusting(true); final Collection<Player> players = this.server.getPlayers(); final DefaultListModel model = (DefaultListModel) this.playerLIst .getModel(); model.removeAllElements(); for (final Player curr : players) { model.addElement(curr); } this.startButton.setEnabled(this.server.getPlayerCount() > 0); this.playerLIst.setValueIsAdjusting(false); this.playerLIst.invalidate(); } COM: <s> this method will refresh </s>
funcom_train/28763323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCsslinkheadscolor(String newVal) { if ((newVal != null && this.csslinkheadscolor != null && (newVal.compareTo(this.csslinkheadscolor) == 0)) || (newVal == null && this.csslinkheadscolor == null && csslinkheadscolor_is_initialized)) { return; } this.csslinkheadscolor = newVal; csslinkheadscolor_is_modified = true; csslinkheadscolor_is_initialized = true; } COM: <s> setter method for csslinkheadscolor </s>
funcom_train/42091107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCommand(Request request) { if (request instanceof ReconnectRequest) { Object view = ((ReconnectRequest) request).getConnectionEditPart() .getModel(); if (view instanceof View) { Integer id = new Integer(C2VisualIDRegistry .getVisualID((View) view)); request.getExtendedData().put(VISUAL_ID_KEY, id); } } return super.getCommand(request); } COM: <s> extended request data key to hold editpart visual id </s>
funcom_train/21888577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelClasses() { if (jPanelClasses == null) { jPanelClasses = new JPanel(new BorderLayout()); jPanelClasses.setBorder(javax.swing.BorderFactory .createEmptyBorder(5, 5, 5, 5)); jPanelClasses.add(getPanelClass(), BorderLayout.NORTH); } return jPanelClasses; } COM: <s> this method initializes j panel classes </s>
funcom_train/1050395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SpeedUnit lastAbsoluteSpeedUnit(SpeedUnit basicSpeedUnit) { for (int i=size()-1; i >= 0; i--) { if (get(i).getType() == Representable.SPEED) { SpeedUnit s = (SpeedUnit) get(i); if (s.isAbsolute()) { return s; } } } return basicSpeedUnit; } COM: <s> this is intended for use on flat sequences with absolute speeds only </s>
funcom_train/36399527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void verifyPIN(byte[] pinData) throws CardServiceException { CommandAPDU c = new CommandAPDU(0, INS_VERIFY, 0, 0, pinData); ResponseAPDU r = service.transmit(c); checkSW(r, "verifyPIN failed: "); } COM: <s> verify the user pin with the card </s>
funcom_train/25662818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getObservationsStartDate() { Date startDate = null; for (final DataOffering off : getDataOfferings()) { if (startDate == null) { startDate = off.getStartDate(); } else if (startDate.after(off.getStartDate())) { startDate = off.getStartDate(); } } return startDate == null ? new Date() : startDate; } COM: <s> returns the earliest date for which observations are available </s>
funcom_train/5725447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof InstituteMember)) { return false; } final InstituteMember that = (InstituteMember) object; if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) { return false; } return true; } COM: <s> returns code true code if the argument is an institute member instance </s>
funcom_train/50880682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireInsert(Record inRecord){ if (myListeners.size() > 0){ DataSourceEvent tempEvent = new DataSourceEvent(inRecord); for (int i=0; i<myListeners.size(); i++){ ((DataSourceListener) myListeners.elementAt(i)).recordInserted(tempEvent); } } } COM: <s> called to notify the listeners that the record has been inserted </s>
funcom_train/2040173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getScreenIndex(int screenId, boolean landscape) { if (currentGroupView != null && currentGroupView.getGroup() != null) { return currentGroupView.getGroup().getScreenIndexByOrientation(XMLEntityDataBase.getScreen(screenId), landscape); } return -1; } COM: <s> gets the screen index in a group with the same landscape </s>
funcom_train/1711851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int countTokens() { int tokenCount=1; /** * count spaces in string, ignoring double spaces and any first and last space */ int count=stringLength-1; for(int i=1;i<count;i++){ if((content[i]==32)&&(content[i-1]!=32)) tokenCount++; } return tokenCount; } COM: <s> count number of tokens using space as deliminator </s>
funcom_train/31929826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OPT_RegisterOperand getTempValidation(int num) { if (DBT.VerifyAssertions) DBT._assert(num == 0); OPT_Register result = validationTemp; if (result == null) { OPT_RegisterOperand regOp = gc.temps.makeTempValidation(); validationTemp = regOp.register; return regOp; } else { return new OPT_RegisterOperand(result, VM_TypeReference.VALIDATION_TYPE); } } COM: <s> get create a temporary validation variable </s>
funcom_train/36959972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getId() { if (isPatternFilter()) { String targetId= getTargetId(); if (targetId == null) return PATTERN_FILTER_ID_PREFIX + getPattern(); else return targetId + PATTERN_FILTER_ID_PREFIX + getPattern(); } else return fElement.getAttribute(ID_ATTRIBUTE); } COM: <s> returns the filters id </s>
funcom_train/1872466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getVar() { double var= (((double)n) / (n-1)) * (sqrsum/n - getAverage()*getAverage()); return (var>=0.0?var:0.0); // XXX note that we have very little possibility to increase numeric // stability if this class is "greedy", ie, if it has no memory // In a more precise implementation we could delay the calculation of // statistics and store the data in some intelligent structure } COM: <s> the empirical variance of the data items </s>
funcom_train/28149853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addProduct(Product product, int quantity) { if (product == null || quantity < 1) { {roops.util.Goals.reached(0);} throw new IllegalArgumentException(); } CartInteger existingQuantity = (CartInteger) productQuantities.get(product); if (existingQuantity == null) { {roops.util.Goals.reached(1);} existingQuantity = new CartInteger(0); } else { {roops.util.Goals.reached(2);} } CartInteger integer_object = new CartInteger(existingQuantity.intValue + quantity); productQuantities.put(product, integer_object); totalWithoutCoupons += product.getPrice() * quantity; } COM: <s> adds the given </s>
funcom_train/20119602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { LinkedList<String> keysToClear = new LinkedList<String>(); for (String key : _query.keySet()) { QueryEntry entry = getEntry(key); if (!entry.isReadonly()) { keysToClear.add(key); } } for (String aKeysToClear : keysToClear) { _query.remove(aKeysToClear); } } COM: <s> removes all key value pairs </s>
funcom_train/14318690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ Set<String> keys=choices.keySet(); String ret=""; for(String key:keys){ Vector<String> v=choices.get(key); ret+=","+v.get(v.size()-1); } if(ret.length()==0)return ""; return ret.substring(1); } COM: <s> the string is in the format of </s>
funcom_train/13712542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createButtons(int numButtons) { int supportedButtons[] = new int[numButtons]; buttons = new LinuxAxis[numButtons]; if(numButtons>0) { getSupportedButtons(supportedButtons); for(int i=0;i<numButtons;i++) { buttons[i] = createButton(i, supportedButtons[i]); //axesArray.add(buttons[i]); } } } COM: <s> create the buttons for the device </s>
funcom_train/20749948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addChild( NodeHandle child, ScribeMessage msg ) { boolean result; result = m_children.add( child ); // Reflect this child in the distinctChildrenTable // maintained by scribe. m_scribe.addChildForTopic(child, this.getTopicId()); m_scribe.childObserver(child, this.getTopicId(), true, msg); return result; } COM: <s> adds a node to the set of children in </s>
funcom_train/12221838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initXPath () { SimpleXPathVariableResolver resolver = new SimpleXPathVariableResolver (); resolver.setVariable ("baseUrl", baseUrl); if (baseCategory == null) { resolver.setVariable ("baseCategory", ""); } else { resolver.setVariable ("baseCategory", baseCategory); } xpath.setXPathVariableResolver (resolver); } COM: <s> initialize the xpath object </s>
funcom_train/25715849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean position(final Map map, final int newX, final int newY) { final Tile tile = map.tileAt(newX, newY); final int type = getType(); if(tile.ents[type] != null) { return false; } tile.ents[type] = this; x = (short) newX; y = (short) newY; return true; } COM: <s> positions entity in the map that is it doesnt already have a position </s>
funcom_train/2920090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void altReferencesRule(String ruleName, GrammarAST refAST, int outerAltNum) { Rule r = getRule(ruleName); if ( r==null ) { return; } r.trackRuleReferenceInAlt(refAST, outerAltNum); antlr.Token refToken = refAST.getToken(); if ( !ruleRefs.contains(refToken) ) { ruleRefs.add(refToken); } } COM: <s> track a rule reference within an outermost alt of a rule </s>
funcom_train/31930308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendMovedText(StringBuffer buffer, int from, int to, int before) { StringBuffer sb = new StringBuffer(); appendLineNumber(sb, from); if (to != from) { sb.append("-"); appendLineNumber(sb, to); } sb.append(" MOVED BEFORE "); appendLineNumber(sb, before); appendWrappedText(buffer, sb.toString()); } COM: <s> construct a standard wrapped string describing moved text and append the </s>
funcom_train/8022201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPassword() { System.out.println("getPassword"); Config instance = new Config(); String expResult = ""; String result = instance.getPassword(); //assertEquals(expResult, result); assertEquals(2, 3); // 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 password method of class vgrabber </s>
funcom_train/22048121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void Update() { updateUI(); m_list.updateUI(); int iIndex = m_list.getSelectedIndex(); if ((iIndex >= 0) && isSingleItemList()) { m_list.setSelectionInterval(iIndex, iIndex); } } COM: <s> update the ui and ensure only one item is selected </s>
funcom_train/9984625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateView() { Display.getDefault().syncExec( new Runnable() { @Override public void run() { if (!viewer.getTable().isDisposed()) { viewer.refresh(); Table table = viewer.getTable(); table.select(table.getItemCount()-1); viewer.setSelection(viewer.getSelection()); } } } ); } COM: <s> this method updates the step history viewer </s>
funcom_train/45186594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addArchiveActions(Menu menu) { openMenuItem = ZXTapeToolSWT.addMenuItem(menu, OPEN, "open.gif", this); saveMenuItem = ZXTapeToolSWT.addMenuItem(menu, "Save as", "save.gif", this); propertiesMenuItem = ZXTapeToolSWT.addMenuItem(menu, "Properties", "properties.gif", this); } COM: <s> adds file actions to menu </s>
funcom_train/28719955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMarker() { IResource resource= getResource(); if (resource == null) return; Map attributes= getInitialAttributes(); if (fAskForLabel) { if (!askForLabel(attributes)) return; } try { MarkerUtilities.createMarker(resource, attributes, fMarkerType); } catch (CoreException x) { handleCoreException(x, "MarkerRulerAction.addMarker"); //$NON-NLS-1$ } } COM: <s> creates a new marker according to the specification of this action and </s>
funcom_train/38992825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSOG evaluate(JSOG jsog) { JSOG result; if (type == Type.root) { return jsog; } if (type == Type.array) { result = jsog.get(index); } else { result = jsog.get(key); } // Recurse into the child if there is one if (child != null) { return child.evaluate(result); } // No child, just return the result return result; } COM: <s> evaluates the path on a jsog </s>
funcom_train/51821643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFolder() { try { JFileChooser jfc = new JFileChooser(parent.getDefaultDir()); jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); int jfcVal = jfc.showOpenDialog(this); if (jfcVal == JFileChooser.CANCEL_OPTION) { return null; } else { return jfc.getSelectedFile().getCanonicalPath(); } } catch (Exception e) { System.err.println(e); } return null; } COM: <s> gets the folder to save a project or other information </s>
funcom_train/21189213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertStderrDoesNotContain(String string) throws CruiseControlException { if (stderr.indexOf(string) > -1) { throw new CruiseControlException( "The command \"" + this.toString() + "\" returned the forbidden string \"" + string + "\". \n" + "Stdout: " + stdout + "Stderr: " + stderr); } } COM: <s> asserts that the stderr of the command does not contain a </s>
funcom_train/22369315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToGenreStructure(ILocalAudioObject audioFile) { String genre = audioFile.getGenre(); IGenre genreObject = repository.getGenre(genre); if (genreObject == null) { genreObject = repository.putGenre(new Genre(genre)); } genreObject.addAudioObject(audioFile); } COM: <s> adds given audio file to genre structure of given repository </s>
funcom_train/21953471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createKeyBindings() { String key; if (message instanceof NewMessageProxy) key = "AttachmentPane.newMsgKeyBindings"; else key = "AttachmentPane.keyBindings"; net.suberic.util.gui.ConfigurableKeyBinding keyBindings = new net.suberic.util.gui.ConfigurableKeyBinding(getTable(), key, Pooka.getResources()); keyBindings.setActive(getActions()); } COM: <s> creates the configurable key bindings for this component </s>
funcom_train/35486599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedItem(Object item) { int size = model.getSize(); for (int i = 0; i < size; i++) { Object current = model.getItemAt(i); if (current == item || (current != null && current.equals(item))) { model.setSelectedIndex(i); break; } } } COM: <s> sets the current selected item in the list </s>
funcom_train/9286002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateIfRequired () throws IOException { if (materialized) return; if (blob.isMaterialized()) { materialized = true; try { stream = blob.getBinaryStream(); } catch (SQLException ex) { throw Util.newIOException(ex); } InputStreamUtil.skipFully(stream, pos); } } COM: <s> checks if this object is using materialized blob </s>
funcom_train/15379379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void filter(int count, int[] follow, String[] track) throws TwitterException { startHandler(new StreamHandlingThread(new Object[]{count, follow, track}) { public StatusStream getStream() throws TwitterException { return getFilterStream((Integer) args[0], (int[]) args[1], (String[]) args[2]); } }); } COM: <s> see birddog above </s>
funcom_train/43161047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteFirstSent() { boolean didDelete = false; synchronized (this.queue) { if (this.queue.size() > 0) { Packet pkt = (Packet) this.queue.elementAt(0); if (pkt.isSent()) { this.queue.removeElementAt(0); didDelete = true; } } } return didDelete; } COM: <s> removes the first packet in the packet queue if it has been sent </s>
funcom_train/2903183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Icon getGiantIconMap(Object key){ if(largeImgTable == null){ largeImgTable = new Hashtable(100); } if(largeImgTable.containsKey(key)){ return (Icon)largeImgTable.get(key); } StringBuffer sb = new StringBuffer(iconPath.toString()).append("128x128").append(File.separator).append(key+".png"); Icon i = ZImageRetriever.getImageIcon(sb.toString()); synchronized(largeImgTable){ largeImgTable.put(key, i); } return i; } COM: <s> get huge image that represents the type </s>
funcom_train/26047271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void add(Document doc) { List<Fieldable> fields = doc.getFields(); for (Fieldable field : fields) { add(field.name(), field.isIndexed(), field.isTermVectorStored(), field.isStorePositionWithTermVector(), field.isStoreOffsetWithTermVector(), field.getOmitNorms(), false, field.getOmitTermFreqAndPositions()); } } COM: <s> adds field info for a document </s>
funcom_train/44284658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel newLeftPanel(Patch patch) { JPanel aPanel = new JPanel(); aPanel.setLayout(new BoxLayout(aPanel, BoxLayout.Y_AXIS)); aPanel.add(newPatchNamePanel(patch)); aPanel.add(newAmpModelPanel(patch)); aPanel.add(newPreampPanel(patch)); return aPanel; } COM: <s> creates the left panel of the editor given the patch </s>
funcom_train/37586920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { final StringBuilder buf = new StringBuilder(); buf.append(this.getClass().toString() + ":\n "); for (int i = 0; i < _numErrors; i++) { buf.append(_errors[i].toString()); buf.append("\n "); } return buf.toString(); } COM: <s> prints out this models errors </s>
funcom_train/20029616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCancelCommand1() { if (cancelCommand1 == null) {//GEN-END:|125-getter|0|125-preInit // write pre-init user code here cancelCommand1 = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|125-getter|1|125-postInit // write post-init user code here }//GEN-BEGIN:|125-getter|2| return cancelCommand1; } COM: <s> returns an initiliazed instance of cancel command1 component </s>
funcom_train/51557703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Builder addHeader(final String key, final String value) { String keyLower = key.toLowerCase(Locale.ENGLISH); String[] values = (String[]) ArrayUtils.add(this.mHeaders.get(keyLower), value); this.mHeaders.put(keyLower, values); return this; } COM: <s> add a header value to this dummy request </s>
funcom_train/12282336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCertificateTrusted(String alias) { try { checkKeyStore(); if (isKeyStoreExists() && !isKeyStoreEmpty()) { return doIsCertificateTrused(alias, keyStore); } } catch (Exception e) { log.error("Could not determine if certificate " + alias + " is trusted.", e); } return false; } COM: <s> determine whether the certificate with the supplied alias is trusted or </s>
funcom_train/51783291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkStdCreationConditions(UmlNode node) { assertNotNull(node.getModelElement()); assertNull(node.getParent()); // check if the diagram was added as a listener node.setParent(diagram); node.setAbsolutePos(1.0, 3.0); assertTrue(notificationCounter >= 1); } COM: <s> these conditions need to be true on package element creation </s>
funcom_train/50976012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUser() { if((mNBUser==null) || (mNBUser.length()==0)) { mNBUser = mApplet.getParameter("nb_user"); if (mNBUser == null) { System.err.println("Could not find nb_user applet parameter!"); } } return mNBUser; } COM: <s> decodes the user and returns it </s>
funcom_train/47985328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Vector findBeaconsImpl(String id) { WLANAccessPoint ap = LocationModelAPI.getAccessPoint(id); //if no beacon is found if(ap == null){ return null; } WiFiBeacon wb = new WiFiBeacon(); wb.setId(ap.getItemId()); TwoDCoordinate cor = new TwoDCoordinate(((Point) ap.getGeometry()).getY(), ((Point) ap.getGeometry()).getX()); wb.setPosition(cor); Vector list = new Vector(); list.add(wb); return list; } COM: <s> gets beacon by given id return null if no beacon can be found </s>
funcom_train/51600474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextPane getJTextPane() { if (jTextPane == null) { jTextPane = new JTextPane(); jTextPane.setEditable(false); jTextPane.setEditorKit(new HTMLEditorKit()); jTextPane.setText(buildMissingExtensionMessage()); } return jTextPane; } COM: <s> this method initializes j text pane </s>
funcom_train/13224702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent event) { if (event.getSource() == okButton) { int index = vmList.getSelectedIndex(); finished = true; if (index != -1) { selected = (JVM)vms.get(index); System.out.println("selected " + selected); dispose(); setVisible(false); } else { System.err.println("no JVM selected!!!"); } } else if (event.getSource() == cancelButton) { finished = true; dispose(); setVisible(false); } } COM: <s> called when the user presses a button </s>
funcom_train/46458950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void revert() { clip.setStartFrameNumber(prevStart); clip.setStepSize(prevSize); clip.setStepCount(prevCount); if (clipControl != null) { clipControl.setRate(prevRate); clipControl.setFrameDuration(prevDt); } Video vid = clip.getVideo(); if (vid != null) vid.setFrameNumber(prevFrame); } COM: <s> reverts to the previous clip settings </s>
funcom_train/5009646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public REXP createRJavaRef(Object o) { if (o == null) return null; String klass = o.getClass().getName(); long l = rniEval( rniLCons( rniInstallSymbol(".jmkref"), rniLCons( rniJavaToXref(o), rniLCons( rniPutString(klass), 0 ) ) ) , 0); if (l == 0) return null; return new REXP(this, l, false); } COM: <s> creates a code jobj ref code reference in r via r java </s>
funcom_train/9043103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String randString(int length, byte[] alphabet) { if (alphabet == null) alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" .getBytes(); byte[] pass = new byte[length]; for (int k = 0; k < length; k++) { int i = (int) Math.floor(drand() * alphabet.length); pass[k] = alphabet[i]; } return new String(pass); } COM: <s> create a random string of length alphanumeric characters </s>
funcom_train/28723557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshConfigQueries() { for (int i = 0; i < FILE_QUERIES.length; i++) { String exqfile = projectFolder + "/"+dataFolder+"/" + FILE_QUERIES[i]; StringBuffer buffer = new StringBuffer(); try { Tools.readFile(exqfile, buffer, getProjectEncoding()); } catch (IOException e) { //e.printStackTrace(); buffer = new StringBuffer(DEFAULT_QUERIES[i]); } QUERIES[i] = buffer.toString(); } } COM: <s> reads the configuration queries </s>
funcom_train/10018026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCompositorOfGroup(int group) { if (group < 0 || m_nodes[group] != GROUP_NODE) { throw new EXISchemaRuntimeException( EXISchemaRuntimeException.NOT_GROUP, new String[] { String.valueOf(group) }); } return _getCompositorOfGroup(group, m_nodes); } COM: <s> returns compositor of a group </s>
funcom_train/4522577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hierarchyLineHit(int x, int y) { if (_orientation == Orientation.HORIZONTAL) { return (_hierarchyWidth > 0 && Math.abs(_hierarchyWidth - x) < _selectionDelta); } else { return (_hierarchyWidth > 0 && Math.abs(_hierarchyWidth - y) < _selectionDelta); } } COM: <s> check whether the hierarchy delimiting line is hit by the given location </s>
funcom_train/2034979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadFromStore(IPreferenceStore store) { colors = new ArrayList<Color>(); for (int i = 0; i < defaults.length; i++) { String confName = CONF_COLOR_PREFIX + i; if (store.contains(confName)) { colors.add(new Color(null, (PreferenceConverter.getColor(store, confName)))); } else { colors.add(ColorUtils.copyColor(defaults[i])); } } } COM: <s> loads the color settings from the specified preference store </s>
funcom_train/4805160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int reverseIndex(int k) { if (reverseIndexMap == null) { reverseIndexMap = new int[attributes.getLength()]; for (int i = 0, len = indexSet.size(); i < len; i++) reverseIndexMap[indexSet.get(i)] = i + 1; } return reverseIndexMap[k] - 1; } COM: <s> gets the index in the filtered set for a given real index </s>
funcom_train/46455956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Rectangle findViewRect() { Rectangle rect = null; Container c = getParent(); while(c!=null) { if(c instanceof JViewport) { rect = ((JViewport) c).getViewRect(); glassPanel.setBounds(rect); glassPanelLayout.checkLayoutRect(glassPanel, rect); break; } c = c.getParent(); } return rect; } COM: <s> finds the clipping rectangle if this panel is within a scroll pane viewport </s>
funcom_train/31342275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getString(String key) throws JSONException { Object object = get(key); if (object instanceof String) { return (String) object; } throw new JSONException(NLS.bind("JSONObject[{0}] not a string.", quote(key))); //$NON-NLS-1$ } COM: <s> get the string associated with a key </s>
funcom_train/10211123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRadius(final double radius) { if(element.getLocation() instanceof CircleLocationModel){ double r = ((CircleLocationModel)getModelElement().getLocation()).getRadius(); basicShape = new Ellipse2D.Double(-r, -r, r * 2, r * 2); }else{ basicShape = new Ellipse2D.Double(-radius, -radius, radius * 2, radius * 2); } invalidateBounds(); } COM: <s> sets the circle radius in scene units </s>
funcom_train/2842869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean intersects(Object o) { Span s = (Span) o; int sstart = s.getStart(); //either s's start is in this or this' start is in s return(this.contains(s) || s.contains(this) || (getStart() <= sstart && sstart < getEnd() || sstart <= getStart() && getStart() < s.getEnd())); } COM: <s> returns true if the specified span intersects with this span </s>
funcom_train/39213059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void begin() { log.log(Level.INFO,"SocksProxy begin"); buffer.clear(); buffer.put(begin); buffer.flip(); try { channel.write(buffer); }catch (IOException e) { log.log(Level.SEVERE,"can't write data to the proxy in connect"); } receive(); } COM: <s> begin to initialize socks proxy </s>
funcom_train/3371361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getMaxNodeWidth() { int maxWidth = 0; int nodeWidth; int counter; TreeStateNode node; for(counter = getRowCount() - 1;counter >= 0;counter--) { node = this.getNode(counter); nodeWidth = node.getPreferredWidth() + node.getXOrigin(); if(nodeWidth > maxWidth) maxWidth = nodeWidth; } return maxWidth; } COM: <s> returns the maximum node width </s>
funcom_train/28366881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void registerView( final Object view, final String tag ) { List<Object> views; if ( viewTable.containsKey( tag ) ) { views = viewTable.get( tag ); } else { views = new ArrayList<Object>(); viewTable.put( tag, views ); } views.add( view ); } COM: <s> register the view with the table </s>
funcom_train/44979613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int serialize(int offset, byte [] data) { LittleEndian.putShort(data, 0 + offset, getIndexToSupBook()); LittleEndian.putShort(data, 2 + offset, getIndexToFirstSupBook()); LittleEndian.putShort(data, 4 + offset, getIndexToLastSupBook()); return getRecordSize(); } COM: <s> called by the class that is responsible for writing this sucker </s>
funcom_train/51786139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void adjustToLeaves(Node dom) { LeafAdjuster la=new LeafAdjuster(this,dom); Node container=la.baseNode; adjustToLeaves(container,la); startXPath=generateXPath(la.firstFoundNode); startOffset=la.firstFoundOffset; endXPath=generateXPath(la.lastFoundNode); endOffset=la.lastFoundOffset; } COM: <s> eventually modify the segment boundaries so that both start and end containers </s>
funcom_train/3028403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator getParentAxisIterator(Object contextNode) { if (isAttribute(contextNode)) { return new SingleObjectIterator(((Attribute) contextNode).getParent()); } else { Node parent = ((Node) contextNode).jjtGetParent(); if (parent != null) { return new SingleObjectIterator(parent); } else { return EMPTY_ITERATOR; } } } COM: <s> get a single member iterator over this nodes parent </s>
funcom_train/18587004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getJaCoastWatcherIsland(int island) { if (island >= 0 && island < japaneseCoastWatchersList.size()) { return (String)((Vector)japaneseCoastWatchersList.elementAt(island)).elementAt(0); } else { Log.error("getJaCoastWatcherIsland called with illegal island "+island); } return "Error"; } COM: <s> returns the name of a japanese coast watcher island </s>
funcom_train/35842043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseClicked(MouseEvent me) { if (me.isConsumed()) return; if (me.getClickCount() >= 2) { Fig f = hitFig(new Rectangle(me.getX() - 2, me.getY() - 2, 4, 4)); if (f instanceof MouseListener) ((MouseListener) f).mouseClicked(me); } me.consume(); } COM: <s> handle mouse click </s>
funcom_train/7612146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void failed(String className, String reason) { ContentValues map = new ContentValues(); map.put("result", "failed"); // The reason is put as the exception. map.put("exception", reason); getDatabase().update("tests", map, "name = '" + className + "'", null); } COM: <s> reports a test case failure </s>