__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/7624041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopManagingCursor(Cursor c) { synchronized (mManagedCursors) { final int N = mManagedCursors.size(); for (int i=0; i<N; i++) { ManagedCursor mc = mManagedCursors.get(i); if (mc.mCursor == c) { mManagedCursors.remove(i); break; } } } } COM: <s> given a cursor that was previously given to </s>
funcom_train/38993597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isNeighbor(TwoDimLocation loc) { int xDiff = Math.abs(loc.getX() - x); int yDiff = Math.abs(loc.getY() - y); return (xDiff != 0 || yDiff != 0) && xDiff <= 1 && yDiff <= 1; } COM: <s> check if another </s>
funcom_train/22358177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Region addNeighbor(Direction dir, Region newNeighbor) { if (neighbors == null) { neighbors = evaluateNeighbours(); } if (getData() != newNeighbor.getData()) { log.warn("neighbor not in same data!"); } return neighbors.put(dir, newNeighbor); } COM: <s> adds a neighbor in the specified direction </s>
funcom_train/49630809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void repeatInvokeWithTimeout() { long invokeTime = systemTime.currentSystemTimeInMS(); boolean repeat = true; do { invokeMethod(); lastElapsedTime = elapsedSince(invokeTime); repeat = notFinished(maxTime - lastElapsedTime, lastCallWasSuccessful); waitIfRequired(repeat, sleepTime); } while (repeat); } COM: <s> invokes the method multiple times either until it returns true or </s>
funcom_train/3380183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getKeyStoreUrl() { try { if (keyStoreUrlString!=null && keyStoreUrlString.length()!=0) { return expand(keyStoreUrlString, true).replace (File.separatorChar, '/'); } } catch (PropertyExpander.ExpandException peee) { if (debug != null) { debug.println(peee.toString()); } return null; } return null; } COM: <s> returns the possibly expanded keystore location or null if the </s>
funcom_train/28686811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clearReader(String readerName) { Object obj = ApplicationContextFactory.getBean(readerName); if (obj != null) { ReadEventDataSource bean = (ReadEventDataSource) obj; bean.stopListening(); if (bean instanceof IpicoReaderStreamSimulator) { ((IpicoReaderStreamSimulator) bean).setCurrentID(0); } } } COM: <s> clear the reader </s>
funcom_train/49608729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteRole(String username,EntityManager em,Role vo) throws Throwable { try { vo.setDeleted(Consts.FLAG_Y); JPAMethods.merge(em, username, DefaultFieldsCallabacks.getInstance(), vo); } catch (Throwable ex) { Logger.error(null, ex.getMessage(), ex); throw ex; } } COM: <s> delete logically a role </s>
funcom_train/47129328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addParameters(Map<String, String> parameterMap) { for (Iterator<String> iterator = parameterMap.keySet().iterator(); iterator.hasNext();) { String parameterName = iterator.next(); ClassOperationParameter cop = new ClassOperationParameter(); cop.setName(parameterName); cop.setType(parameterMap.get(parameterName)); addParameter(cop); } } COM: <s> adds transfer parameters to a class operation </s>
funcom_train/20750275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File resolveConflict(File oldFile, File newFile) throws Exception{ if(readVersion(oldFile) > readVersion(newFile)){ newFile.delete(); return oldFile; } else{ decreaseUsedSpace(oldFile.length()); oldFile.delete(); increaseUsedSpace(newFile.length()); return newFile; } } COM: <s> resolve a conflict between two files that claim to have </s>
funcom_train/41165504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(MaSingleTextCheckList entity) { EntityManagerHelper.log("saving MaSingleTextCheckList instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved ma single text check list </s>
funcom_train/51786618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getRootDirectory() { try { String uri=resolver.resolveURI("").getURI(); File dir = new File(new URI(uri)); return dir; } catch(IOException e) { getLogger().fatalError("getRootDirectory: "+e); return null; } catch(URISyntaxException e) { getLogger().fatalError("getRootDirectory: "+e); return null; } } COM: <s> return the base victor server directory </s>
funcom_train/18050617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getSvCategoryListRemoveMenuItem() { if (svCategoryListRemoveMenuItem == null) { svCategoryListRemoveMenuItem = new JMenuItem(); svCategoryListRemoveMenuItem.setText("Remove"); svCategoryListRemoveMenuItem .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { removeCategoriesAction(); } }); } return svCategoryListRemoveMenuItem; } COM: <s> this method initializes sv category list remove menu item </s>
funcom_train/28743818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SampleInfo getSampleInfoById(Integer id) throws SimsException { //String errMsg = clsName + ".getSampleInfoById(): "; SampleInfo info; try { local = this.getSampleLocalById(id); info = local.getSampleInfo(); } catch (RuntimeException e) { //Propagate. throw e; } return info; } COM: <s> get sample info object by id </s>
funcom_train/19802806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractMessage getMessageClass(MessageTypes messageType){ AbstractMessage retVal = null; if (messageType.equals(Constants.MessageTypes.LOGIN)){ retVal = new LoginMessage(); } else if (messageType.equals(Constants.MessageTypes.REGULAR)){ retVal = new RegularMessage(); } else if (messageType.equals(MessageTypes.LOGOUT)){ retVal = new LogOutMessage(); } else if (messageType.equals(MessageTypes.VOIP_CHAT)){ retVal = new VoiceChatMessage(); } else if (messageType.equals(MessageTypes.USER_DISCOVERED)){ retVal = new UserDiscoveredMessage(); } return retVal; } COM: <s> returns a relevant class that handles the given message type </s>
funcom_train/2911214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getTrashBoards() { try { if (trashBoards == null) { BoardFilter filter = new BoardFilter(); filter.setTopicId (getTopicId()); filter.setTrashBoard (Boolean.TRUE); BoardManager mgr = new BoardManager(WebFactory.getDataSource(request), user); trashBoards = DTO2ModelFactory.getBoardModels( request, mgr.findByFilter(filter).getResult()); } return trashBoards; } catch (Throwable t) { cat.debug("getTrashBoards", t); throw new ModelException(t); } } COM: <s> returns boards in this topic that were marked as trash </s>
funcom_train/2388409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EquationObjectNode findObject(String id) { if (objekte == null) { return null; } for (int i = 0; i < objekte.size(); i++) { if (id.equals(objekte.elementAt(i).getId())) { return objekte.elementAt(i); } } return null; } COM: <s> returns the first activity object node with the id </s>
funcom_train/11663487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Configuration newConfig) throws ReadOnlyException { if (readOnly) { throw new ReadOnlyException(); } Node imported = config.getOwnerDocument().importNode(newConfig.config, true); config.appendChild(imported); newConfig.config = (Element) imported; newConfig.root = this; setDirty(); } COM: <s> add adds an existing configuration node to this configuration node </s>
funcom_train/9083185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IQ createDiscoRequest(String namespace) { IQ request = new IQ(IQ.Type.get); request.setID(mockComponent.generateId()); request.setTo(XmppTestUtil.TEST_LOCAL_JID); request.setFrom(XmppTestUtil.TEST_REMOTE_WAVE_JID); request.setChildElement("query", namespace); return request; } COM: <s> create a disco info or disco items query </s>
funcom_train/36198652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setSmsNotify(int smsNotify) throws Exception { if (driver == null) { throw new Exception("Driver not set"); } if (waitBusy()) { throw new ModemBusyException("Modem is already executing command"); } busy = true; try { return driver.setSmsNotify(this, smsNotify); } finally { busy = false; } } COM: <s> sets asynchronous sms notification setting </s>
funcom_train/4360179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireInstanceEvent(String type, Filter filter) { if (listeners.length == 0) return; InstanceEvent event = new InstanceEvent(wrapper, filter, type); InstanceListener interested[] = listeners; for (int i = 0; i < interested.length; i++) interested[i].instanceEvent(event); } COM: <s> notify all lifecycle event listeners that a particular event has </s>
funcom_train/35745199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ObtenirTree() { Element root; Document doc; String xml; SAXBuilder builder; xml = ((ApiImpl) aserv.getASAI()).getTree(); builder = new SAXBuilder(); try { doc = builder.build(new StringReader(xml)); root = doc.getRootElement(); tree.LlegirXML(root); } catch (JDOMException e) { log.warning("error de JDOM"); e.printStackTrace(); } catch (IOException e) { log.warning("error del String Reader..."); e.printStackTrace(); } } COM: <s> obt larbre de les metadades del fitxer xml guardat a la colla </s>
funcom_train/375315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testScanIpv6File() throws IOException { TextFormatter out = new TextFormatter(OUT); out.setResolveAddresses(false); int i = 0; Ethernet eth = new Ethernet(); for (PcapPacket packet : TestUtils.getIterable("tests/test-ipv6.pcap")) { System.out.println(packet.toDebugString()); if (packet.hasHeader(eth)) { out.format(eth); } out.setFrameIndex(i++); out.format(packet); } } COM: <s> printing to dev null still causes entire packet structure to be decoded and </s>
funcom_train/2582997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Number getValue(Comparable series, Comparable category) { int seriesIndex = getSeriesIndex(series); if (seriesIndex < 0) { throw new UnknownKeyException("Unknown 'series' key."); } int itemIndex = getColumnIndex(category); if (itemIndex < 0) { throw new UnknownKeyException("Unknown 'category' key."); } return getValue(seriesIndex, itemIndex); } COM: <s> returns the data value for one category in a series </s>
funcom_train/17477094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rollbackTransaction() throws HibernateException { try { getSession().getTransaction().rollback(); } catch (HibernateException ex) { log.warn("Hibernate Exception during rollback: " + ex.getMessage() , ex); throw ex; } catch (Exception ex) { log.warn("Exception during rollback: " + ex.getMessage() , ex); throw new HibernateException(ex.getMessage()); } } COM: <s> commit the database transaction </s>
funcom_train/37900200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addUserGroup(User user) throws XMLDBException { try { List params = new ArrayList(3); params.add(user.getName()); String[] gl = user.getGroups(); params.add(gl); if (user.getHome() != null) params.add(user.getHome()); parent.getClient().execute("setUser", params); } catch (XmlRpcException e) { throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage(), e); } } COM: <s> update the specified user without update users password </s>
funcom_train/43096654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetTypeToNull() { Model.getCoreHelper().setType(elem, types[0]); Model.getCoreHelper().setType(elem, null); Model.getPump().flushModelEvents(); assertNotNull(model.getSelectedItem()); } COM: <s> this test does make a huge amount of sense because </s>
funcom_train/8687160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sameDefinition(AntTypeDefinition other, Project project) { return (other != null && other.getClass() == getClass() && parent != null && parent.sameDefinition(((PreSetDefinition) other).parent, project) && element.similar(((PreSetDefinition) other).element)); } COM: <s> equality method for this definition </s>
funcom_train/23940447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setGoalInformations() { this.setInformations(ConstantsKeys.GOAL_RADIUS, "Goal radius", "goal.radius", true); this.setInformations(ConstantsKeys.GOAL_MASS, "Goal mass", "goal.mass", true); this.setInformations(ConstantsKeys.GOAL_CHARGE, "Goal initial charge when scored", "goal.charge", true); this.setInformations(ConstantsKeys.GOAL_HALFLIFE, "Goal charge halflife", "goal.halflife", true); } COM: <s> set informations relative to goals constants </s>
funcom_train/14009002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { Iterator handlerIterator = _listeners.iterator(); while (handlerIterator.hasNext()) { EventHandler eventHandler = (EventHandler) handlerIterator.next(); if (eventHandler._filter.processEvent(_event)) { eventHandler._listener.handleEvent(_event); } } } COM: <s> iterates over the set of </s>
funcom_train/6262906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTestSuite(final TestSuite testSuite) { J2MEUnit.checkNullParam(testSuite, "testSuite"); if (testSuite == this) { throw new IllegalArgumentException("Can't be the same instance."); } synchronized (testSuite.getLock()) { final int size = testSuite.getSize(); for (int i = 0; i < size; i++) { addTest(testSuite.getTest(i)); } } } COM: <s> adds all elements from another code test group code </s>
funcom_train/47398847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canBeMovedUp() { // no data - nothing to move up if( (m_entries == null) || (m_entries.size() == 0) ) { return false; } // no selection or the first row has been selected int selRow = m_table.getSelectedRow(); return (selRow > 0); } COM: <s> can the selected row be moved up </s>
funcom_train/48869078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getOneToOneScaleButton() { if (oneToOneScaleButton == null) { oneToOneScaleButton = new JButton("1:1"); oneToOneScaleButton.setToolTipText("1:1"); oneToOneScaleButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { graph.setScale(1.0); } }); } return oneToOneScaleButton; } COM: <s> this method initializes one to one scale button </s>
funcom_train/22550429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseProxiesHeader(String str) { if (_rfd.getPushAddr()==null || str==null || str.length()<12) return; try { PushEndpoint.overwriteProxies(_rfd.getClientGUID(),str); updatePEAddress(); }catch(IOException tooBad) { // invalid header - ignore it. } } COM: <s> parses the header containing the current set of push proxies for </s>
funcom_train/31907495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkChildType(Node n, boolean replace) { switch (n.getNodeType()) { case ELEMENT_NODE: case PROCESSING_INSTRUCTION_NODE: case COMMENT_NODE: case TEXT_NODE: case CDATA_SECTION_NODE: case ENTITY_REFERENCE_NODE: case DOCUMENT_FRAGMENT_NODE: break; default: throw createDOMException (DOMException.HIERARCHY_REQUEST_ERR, "child.type", new Object[] { new Integer(getNodeType()), getNodeName(), new Integer(n.getNodeType()), n.getNodeName() }); } } COM: <s> checks the validity of a node to be inserted </s>
funcom_train/49666519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getNbLiteral(PreProcessorResult res) { String out = res.getStdout(); Stat stat = res.getCnf().getStat(); int begin = out.indexOf(LITERALS); if (begin == -1) return; begin += LITERALS.length(); Scanner scan = new Scanner(out.substring(begin)); // System.out.println("stdin : "+out+"\n sub : "+out.substring(begin)); stat.setNumLiteral(scan.nextInt()); } COM: <s> set in the </s>
funcom_train/19972661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createTable(SQLiteDatabase db) { Log.i(TAG, "WBD: create table " + sourceName); String create = "CREATE TABLE " + sourceName + " (" + "date INTEGER PRIMARY KEY UNIQUE ON CONFLICT IGNORE"; for (String f : fieldNames) create += "," + f + " REAL"; create += ");"; db.execSQL(create); } COM: <s> create our table in the database </s>
funcom_train/47434070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ENode getBestProperty(ENode current, String key) throws CoreException, IOException { String result = null; while (result == null && key != null && key.length() > 0) { result = script.getProperty(key); if (result == null) { int i = key.lastIndexOf("."); //$NON-NLS-1$ if (i == -1) { key = null; } else { key = key.substring(0, i); } } } return new ENode(result, current); } COM: <s> gets the best value for the key in all the property files </s>
funcom_train/2586029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStringToWeekday() { int weekday = SerialDate.stringToWeekdayCode("Wednesday"); assertEquals(SerialDate.WEDNESDAY, weekday); weekday = SerialDate.stringToWeekdayCode(" Wednesday "); assertEquals(SerialDate.WEDNESDAY, weekday); weekday = SerialDate.stringToWeekdayCode("Wed"); assertEquals(SerialDate.WEDNESDAY, weekday); } COM: <s> test the conversion of a string to a weekday </s>
funcom_train/41254684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Component getFramePanel() { final JPanel framePanel = new JPanel(new BorderLayout()); framePanel.setBackground(FELT); framePanel.setBorder(BorderFactory.createEmptyBorder(MAIN_BORDER_WIDTH, MAIN_BORDER_WIDTH, MAIN_BORDER_WIDTH, MAIN_BORDER_WIDTH)); framePanel.add(getMainPanel(), BorderLayout.CENTER); framePanel.add(getTableLabelPanel(), BorderLayout.WEST); framePanel.add(getPlayerTwoHandPanel(), BorderLayout.SOUTH); return framePanel; } COM: <s> returns the panel that will be this frames only immediate content this </s>
funcom_train/39885316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canExecute() { if (path.isEmpty()) { return false; } SecurityManager security = System.getSecurityManager(); if (security != null) { security.checkExec(path); // Seems bogus, but this is what the RI does. } return canExecuteImpl(absolutePath); } COM: <s> tests whether or not this process is allowed to execute this file </s>
funcom_train/36961114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IBuffer getBufferForMember() { IBuffer buffer = null; try { IOpenable openable = fMember.getOpenable(); if (openable != null && fMember.exists()) { buffer = openable.getBuffer(); } } catch (RubyModelException e) { RubyPlugin.log(e); } return buffer; } COM: <s> returns the ibuffer for the imember represented by this call location </s>
funcom_train/11051968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addData(final double[][] data) { for (int i = 0; i < data.length; i++) { if( data[i].length < 2 ){ throw new ModelSpecificationException(LocalizedFormats.INVALID_REGRESSION_OBSERVATION, data[i].length, 2); } addData(data[i][0], data[i][1]); } return; } COM: <s> adds the observations represented by the elements in </s>
funcom_train/39393352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanel createTcoBarChart() throws Throwable { CategoryDataset categorydataset = createTotalCostDataset(calculator.getCostBlock(null)); JFreeChart jfreechart = createBarChart(categorydataset, ResourceManager.getResource(ChartTool.class, "CTCostTotal"), LauncherView .getInstance().getUtility().getSystemParameter().getDefaultCurrency().getNameString()); ChartPanel chart = new ChartPanel(jfreechart); chart.setPreferredSize(new Dimension(500, 270)); return chart; } COM: <s> create a bar chart of total tco cost over tco duration split in </s>
funcom_train/42049157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createTransformString(Transformation t) { String transformString = ""; if (t == null) { return transformString; } else if (!t.isIdentity()) { transformString = " transform=\"matrix(" + t.toString() + ")\""; } else { transformString = ""; } return transformString; } COM: <s> this method creates transformation string from given transformation </s>
funcom_train/1904393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDBStatus() throws SQLException, PropertyNotFoundException { Connection connection = DBUtil.getConnection(PropertyService .getProperty("database.connectionURI"), PropertyService .getProperty("database.user"), PropertyService .getProperty("database.password")); if (DBUtil.tableExists(connection, "xml_documents")) { return TABLES_EXIST; } return TABLES_DO_NOT_EXIST; } COM: <s> performs a status check on the database </s>
funcom_train/36004194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addContact(Client contact) { if (getEvent(contact.getEventCode()) != null) { Event event = getEvent(contact.getEventCode()); event.addContact(contact); SMSHandler.addWaitingContact(contact); changed(event); } else { SMSHandler.sendSMS(contact, SMSType.NoSuchEvent); } } COM: <s> adds the client to the the event fitting the clients eventcode if one </s>
funcom_train/6489969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void windowRanking() { LogTools.trace(logger, 25, "AnalysisController.windowRanking()"); //DynamicRanking ranking = _analysis.getCycle().getRanking(); //NotificationList criteriaList = _analysis.getCycle().getCriteriaList(); //_rankingEditor.setModel(ranking, ranking.getRoot(), criteriaList); launchWindow(_rankingFrame, _rankingEnabler, _frame); } COM: <s> ranking window command handler </s>
funcom_train/7508169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPathInfo() { String path = getHttpServletRequest().getPathInfo(); if (path == null) return null; String clean = ""; try { clean = ESAPI.validator().getValidInput("HTTP path: " + path, path, "HTTPPath", 150, true); } catch (ValidationException e) { // already logged } return clean; } COM: <s> returns the path info from the http servlet request after canonicalizing </s>
funcom_train/3400125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getNonInterned(String key) { Entry tab[] = table; int hash = key.hashCode(); int index = (hash & 0x7FFFFFFF) % tab.length; for (Entry e = tab[index]; e != null; e = e.next) { if ((e.hash == hash) && e.key.equals(key)) return e.value; } return null; } COM: <s> returns the value to which the specified key is mapped in this </s>
funcom_train/32636245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReallyBigData() { int dataLen = 4194304; byte[] data = new byte[dataLen]; Arrays.fill(data, (byte)1); wu.setData(data); wu.save(); reinitializeHibernate(); wu = WorkUnit.findAll()[0]; byte[] savedData = wu.getData(); assertTrue(savedData.length == dataLen); for (byte datum : savedData) { assertTrue(datum == (byte)1); } } COM: <s> tests saving a 4 mb byte array </s>
funcom_train/23616654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCallback(double startBeat, int callbackID) { Track track = seq.createTrack(); long startTime = (long) (startBeat * resolution); try { MetaMessage mm = new MetaMessage(); mm.setMessage(70, new byte[] { new Integer(callbackID).byteValue() }, 1); track.add(new MidiEvent(mm, startTime)); } catch (javax.sound.midi.InvalidMidiDataException e) { e.printStackTrace(); } } COM: <s> schedules an callback event within the score </s>
funcom_train/17714093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showJASSUpdateAdvertiserForm(AbstractJASSRegularWindow parent) { JASSUpdateAdvertiserForm advertiserScreen = new JASSUpdateAdvertiserForm( parent); try { advertiserScreen.setAdvertiser(getAdvertiser()); advertiserScreen.display(); advertiserScreen.setVisible(true); } catch (Exception ex) { logger.log(Level.SEVERE, null, ex); ex.printStackTrace(); } } COM: <s> this method is to show advertiser main screen </s>
funcom_train/20294977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void exportDone(JComponent c, Transferable data, int action) { if (action != MOVE) { return; } JList list = (JList)c; DefaultListModel model = (DefaultListModel)list.getModel(); int index = list.getSelectedIndex(); model.remove(index); } COM: <s> when the export is complete remove the old list entry if the </s>
funcom_train/25749817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createTabFolder() { tabFolder = new TabFolder(top, SWT.NONE); createComEncode(); createComDecode(); TabItem tabItem = new TabItem(tabFolder, SWT.NONE); tabItem.setText("Encode"); tabItem.setControl(comEncode); TabItem tabItem23 = new TabItem(tabFolder, SWT.NONE); tabItem23.setText("Decode"); tabItem23.setControl(comDecode); } COM: <s> this method initializes tab folder </s>
funcom_train/17477703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prepare() { if (Japex.verbose) { System.out.println(" " + Thread.currentThread().getName() + " prepare()"); } TestCaseImpl tc = _testCase; double millis = Util.currentTimeMillis(); prepare(tc); tc.setDoubleParam(Constants.ACTUAL_PREPARE_TIME, Util.currentTimeMillis() - millis); } COM: <s> execute prepare phase </s>
funcom_train/10520458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int mapValueToNumber() { String choice=getValue(); int value=0; String[] values=getValues(); for(int i=0;i<values.length;i++) { if(values[i].equalsIgnoreCase(choice)) value=i; } return value; } COM: <s> lookup from value to a numeric value </s>
funcom_train/12642148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fill() throws IOException { ensureOpen(); len = in.read(buf, 0, buf.length); if (len == -1) { throw new EOFException("Unexpected end of ZLIB input stream"); } inf.setInput(buf, 0, len); } COM: <s> fills input buffer with more data to decompress </s>
funcom_train/2400302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String findValue (String[] values, String key) { for (String value : values) { String name = StringUtils.substringBefore (value, "="); String val = StringUtils.substringAfter (value, "="); if (name.equalsIgnoreCase (key)) { return val; } } return ""; } COM: <s> returns value from given value pairs set </s>
funcom_train/12900446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ILabelProvider getLabelProvider(EClassifier eClass) { ClassDescriptorDecorator decr = (ClassDescriptorDecorator) findDecorator(eClass, ClassDescriptorDecorator.class, DecoratorsPackage.eINSTANCE.getClassDescriptorDecorator_LabelProviderClassname()); if(decr != null){ ILabelProvider result = decr.getLabelProvider(); if (result instanceof INeedData) ((INeedData) result).setData(editDomain); return result; } return null; } COM: <s> return the label provider itself </s>
funcom_train/25965191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateVisibleIDs(Map result) { Set cache = getSupportedIDs(); Iterator iter = cache.iterator(); while (iter.hasNext()) { String id = (String)iter.next(); if (visible) { result.put(id, this); } else { result.remove(id); } } } COM: <s> override of superclass method </s>
funcom_train/22360758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDifference(int toDir) { if (toDirection(toDir) == INVALID || this == INVALID) return Integer.MAX_VALUE; return (dir - toDir + 3 >= 0 ? 3 - (dir - toDir + 3) % 6 : (toDir - dir + 3) % 6 - 3); } COM: <s> returns the difference to the specified direction </s>
funcom_train/28687219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLRCvalue(String ipx_string) { int lrc; try { lrc = Integer.parseInt(this.getLRC(ipx_string), 16); } catch (NumberFormatException e) { System.out.println("not a pure ipx_string ["+ipx_string+"]"); return -1; } return lrc; } COM: <s> return the lrc int value from the ipx string </s>
funcom_train/3370382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaxWidth(int maxWidth) { int old = this.maxWidth; this.maxWidth = Math.max(minWidth, maxWidth); if (width > this.maxWidth) { setWidth(this.maxWidth); } if (preferredWidth > this.maxWidth) { setPreferredWidth(this.maxWidth); } firePropertyChange("maxWidth", old, this.maxWidth); } COM: <s> sets the code table column code s maximum width to </s>
funcom_train/7237819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void genLookaheadSetForAlt(Alternative alt) { if ( doingLexRules && alt.cache[1].containsEpsilon() ) { println("MATCHES ALL"); return; } int depth = alt.lookaheadDepth; if ( depth == GrammarAnalyzer.NONDETERMINISTIC ) { // if the decision is nondeterministic, do the best we can: LL(k) // any predicates that are around will be generated later. depth = grammar.maxk; } for (int i = 1; i <= depth; i++) { Lookahead lookahead = alt.cache[i]; printSet(depth, i, lookahead); } } COM: <s> generate the lookahead set for an alternate </s>
funcom_train/38224355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadTransformer(String xslURI) throws Exception { if ( transformer != null ) return; try { TransformerFactory factory = TransformerFactory.newInstance(); if ( xslURI != null) { transformer = factory.newTransformer( new StreamSource(xslURI) ); } else { // use blank stylesheet transformer = factory.newTransformer(); } } catch (Exception ex) { throw ex; } } COM: <s> load a transformer for a given xsl stylesheet </s>
funcom_train/18744949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setEnabled(boolean enabled) { String result; // if the new value is true (the default value), remove the key instead if (enabled) { result = (String) remove(ENABLED_KEY); } else { result = (String) super.setProperty(ENABLED_KEY, "" + enabled); } if (result == null) { return true; } else { return Boolean.parseBoolean(result); } } COM: <s> sets a enabled status in this property object </s>
funcom_train/17904921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireDockedTabReleased(DockedDragEvent e) { if (tabDragListeners == null || tabDragListeners.size() == 0) { return; } for (int i = 0, k = tabDragListeners.size(); i < k; i++) { tabDragListeners.get(i).dockedTabReleased(e); } } COM: <s> invoked when a mouse button has been released on a tab </s>
funcom_train/36839387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean validateFile(File file, HttpServletResponse response){ if(file.getData().length < 1){ encodeResponse(response, "File is empty or could not be found."); return false; } else if(file.getData().length > SIZE_MAX_FILE) { encodeResponse(response, "File is too large: limit is " + SIZE_MAX_FILE +" bytes"); return false; } return true; } COM: <s> validate the file </s>
funcom_train/50018909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PrefixNamespaceTree getPrefixNamespaceTree() throws IOException, ConfigurationNotInitializedException { if (null == m_PrefixNamespaceTree) { m_PrefixNamespaceTree = Utility.getPrefixNamespaceTreeForDataSet( edu.utdallas.hadooprdf.conf.Configuration.getInstance().getHadoopConfiguration(), m_PathToPrefixFile); } return m_PrefixNamespaceTree; } COM: <s> returns the prefix namespace tree for the data set </s>
funcom_train/2420975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void display() { if (dialog.isVisible()) { return; } dialog.pack(); dialog.manageLocation(EntityTestResultDetailsDialog.class); dialog.setCloseButtonAsDefault(); dialog.setLocationRelativeTo(dialog.getOwner()); dialog.setVisible(true); } COM: <s> displays this dialog </s>
funcom_train/44890498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setPersistentSetting(String settingName, String value) { Properties settings; try { settings = fetchSettings(); } catch (IOException e) { CorePlugin.log(e); return; } settings.setProperty(settingName, value); try { settings.store(new FileOutputStream(getJythonProjectSettingsFile()), PROJECT_SETTINGS_HEADER); } catch (FileNotFoundException e) { CorePlugin.log(e); return; } catch (IOException e) { CorePlugin.log(e); return; } } COM: <s> persist the setting name and its value in the receivers settings file </s>
funcom_train/18053620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getSvWindowCloseMenuItem() { if (svWindowCloseMenuItem == null) { svWindowCloseMenuItem = new JMenuItem(); svWindowCloseMenuItem.setText("Close"); svWindowCloseMenuItem .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { dispose(); SecureVault.getInstance().removeMe(MainWindow.this); } }); } return svWindowCloseMenuItem; } COM: <s> this method initializes sv window close menu item </s>
funcom_train/48390843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addTabTitleChangedHandler(com.smartgwt.client.widgets.tab.events.TabTitleChangedHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.tab.events.TabTitleChangedEvent.getType()) == 0) setupTabTitleChangedEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.tab.events.TabTitleChangedEvent.getType()); } COM: <s> add a tab title changed handler </s>
funcom_train/19054758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DnDTabbedPane getM_tabbedPane() { if (m_tabbedPane == null) { m_tabbedPane = new DnDTabbedPane(); m_tabbedPane.setUI(new TabbedPaneCloseButtonUI()); m_tabbedPane.setBackground(Color.white); m_tabbedPane.addTab("Start Page", null, getM_startPane(), null); } return m_tabbedPane; } COM: <s> this method initializes m tabbed pane </s>
funcom_train/3473332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propertyChange(PropertyChangeEvent event) { if ("value".equals(event.getPropertyName())) { Number value = (Number) event.getNewValue(); if (value != null) { removeChangeListener(timeTextField); this.setTimeValue(value.longValue()); addChangeListener(timeTextField); } } } COM: <s> called when a new value is entered in the </s>
funcom_train/48660475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MathVector getUnitVector() { float mag = (float) Math.sqrt( (double) (i*i + j*j + k*k)); // MathVector v = new MathVector(Math.round(i/mag), Math.round(j/mag), Math.round(k/mag)); MathVector v = new MathVector(i/mag, j/mag, k/mag); return v; } COM: <s> returns the unit vector of this vector </s>
funcom_train/21794575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPages() { if (isFirst) { /* If wizard is launched for the first time, add welcome page */ welcome = new WelcomePage(); addPage(welcome); } /* Add ECX file path configuration page */ path = new PathPage(); addPage(path); /* Add GMail account configuration page */ gmail = new GMailPage(); addPage(gmail); /* Add Skype account configuration page */ skype = new SkypePage(); addPage(skype); /* Add SMTP server data configuration page */ smtp = new SmtpPage(); addPage(smtp); } COM: <s> pages inclusion in wizard </s>
funcom_train/21267365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addConfigFile(IFile configFile) { // a config file contains one or more synchronizations. Each // synchronization is contained in one {@link FTPConfigEntry} try { FTPConfigModel model = FTPSyncModelUtils.openModel(configFile); configs.put(configFile, model); for (FTPConfigEntry entry : model.getConfigEntries()) { addConfigEntry(entry); } } catch (FTPSyncSetupException e) { ErrorManager.addError(e, configFile); } } COM: <s> this method processes a configuration file and sets up the </s>
funcom_train/48150874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDistributions(Distribution[] d) { int n = d.length; if (n<=0) return; double [] probabilities = new double [n]; for (int i=0; i<n; i++) probabilities[i]=1.0/n; setParameters(d, probabilities); } COM: <s> this method sets the distributions </s>
funcom_train/36601504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PNodeRenderTechniqueObject getRenderTechniqueObject() { Entity en = getEntity(); if (en != null) { RenderComponent rc = en.getComponent(RenderComponent.class); if (rc != null && rc.getRenderTechniqueObject() instanceof PNodeRenderTechniqueObject) return (PNodeRenderTechniqueObject)rc.getRenderTechniqueObject(); } return null; } COM: <s> get the render technique object of this objects entitys render component </s>
funcom_train/36769490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addBuild() { AddValues values = new AddValues(); AddDialog dialog = new AddDialog(parent, "Add Build", "Name:", 20, values); if (!dialog.wasCanceled()) { Controller.getInstance().addBuild(nameField.getText(), values.getName().trim()); } } COM: <s> this method is called when the user selects the add build menu item </s>
funcom_train/35185385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resizePaneImages(int newWidth, int newHeight) { // create new images for storing pane content and backbuffer backBuffer = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_4BYTE_ABGR); BufferedImage newContent = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_4BYTE_ABGR); // draw old content to new content if (content != null) newContent.createGraphics().drawImage(content, null, 0, 0); content = newContent; invalidate(); } COM: <s> resizes all underlying images and data structures in order to fit new </s>
funcom_train/19418652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsFileName(final String fileName) { if (fileName == null) return false; final int size = aoList.size(); for (int i = 0; i < size; i++) { final AttachObj attachObj = (AttachObj)aoList.get(i); if (fileName.equals(attachObj.getFileName())) { return true; } } return false; } COM: <s> determines if there is an attach obj in this list with the </s>
funcom_train/22284986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void focus(TreeNodeWidget node) { int x = node.x; int y = node.y; for (Widget w = node.parent; w != content; w = w.parent) { if (w == null) { return; } x += w.x + w.tx; y += w.y + w.ty; } if (horzmode == NEVER) { x = 0; } focusContent(x, y, 1, 30); } COM: <s> focus on a tree node widget </s>
funcom_train/14009161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object set(Object list, int index, Object value) { if (this.isArray(list)) { return this.setToArray(list, index, value); } if (!this.isList(list)) { return null; } try { ((List) list).set(index, value); return ""; } catch (IndexOutOfBoundsException e) { // The index was wrong. return null; } } COM: <s> sets the specified element of a list array </s>
funcom_train/878527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unAdvertise(Item theItem){ if (this.myShop.resource.hasProperty( RPG.advertisesItem, theItem.getResource())){ logger.debug("removing " + theItem + " from advertisment."); Statement ad = model.createStatement( this.myShop.resource, RPG.advertisesItem, theItem.getResource() ); model.remove(ad); } } COM: <s> remove an item from the advertisments </s>
funcom_train/4962159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object replaceKey (Locator loc, Object key) { AHLocator ahLoc = checkContained(loc); checkKey(key); int index = ahLoc.index(); // replace the key Object returnKey = ahLoc.key(); ahLoc.setKey(key); // restore the heap property (either upheap or downheap will do nothing) upheap(index); downheap(index); keysArray_ = null; return returnKey; } COM: <s> time complexity worst case o log n </s>
funcom_train/44136208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean getElementFatherCollapsed(Node node) { String collapsed = "false"; NamedNodeMap map = node.getAttributes(); if(map.getLength() > 0) { Node n = map.getNamedItem(OSMFile.OSM_ELT_ATT_FATHERCOLLAPSED); if(n != null) collapsed = getStringCleaned(n.getNodeValue()); } return "true".equals(collapsed); } COM: <s> it indicates whether the element father is collapsed </s>
funcom_train/25069209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PrivateKey getPrivateKey(final KeyPair pair){ PrivateKey priKey = null; try { PrivateKey privateKey = pair.getPrivate(); KeyFactory factory = KeyFactory.getInstance(algorithm); priKeySpec = factory.getKeySpec(privateKey, RSAPrivateKeySpec.class); priKey = factory.generatePrivate(priKeySpec); return priKey; } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } catch (InvalidKeySpecException e) { e.printStackTrace(); } return priKey; } COM: <s> extracts a private key from the provided key pair </s>
funcom_train/27779296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void destroy(int at) { try { if (slot[at] == EMPTYSLOT) { return; } manager.destroy(slot[at]); slot[at] = EMPTYSLOT; setDirty(true); } catch (SlotException x) { logger.log(Level.WARNING, "destroy", x); } } COM: <s> destroy the barrel at the given index </s>
funcom_train/20827968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void recenter() { double attrs[] = new double[Alignable.DIMENSIONS]; for (int i = 0; i < Alignable.DIMENSIONS; i++) { attrs[i] = 0; } for (int i = 0; i < personCount(); i++) { for (int j = 0; j < Alignable.DIMENSIONS; j++) { attrs[j] += getPerson(i).getAttr(j + 1); } } setAttrs(attrs); } COM: <s> recenters the group based on the population in the group i </s>
funcom_train/51245763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setSizeAndLocation() { int width = 675; int height = tabPane.getPreferredSize().height; setSize(width, height); int x = mainFrame.getX() + (mainFrame.getWidth() - width) / 2; int y = mainFrame.getY() + (mainFrame.getHeight() - height) / 2; setLocation(x, y); } COM: <s> sets the size and location of the dialog </s>
funcom_train/10472020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void migrate(IJavaMigration[] plugs, ParsedSource source, boolean saveMigrated) throws FatalToolException { boolean isModified = false; CompilationUnit unit = (CompilationUnit) source.getNode(); unit.recordModifications(); for (int i = 0; i < plugs.length; ++i) { isModified = plugs[i].migrate(source.getNode()) || isModified; } if (isModified && saveMigrated) { saveSource(source); } } COM: <s> migrates given source and execute saving if its necessary </s>
funcom_train/9113737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONBuilder array() { if ((this.mode == 'i') || (this.mode == 'o') || (this.mode == 'a')) { this.push('a'); this.append("["); this.comma = false; return this; } throw new JSONException("Misplaced array."); } COM: <s> begin appending a new array </s>
funcom_train/51080418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadDrawing(StorageFormat restoreFormat, String file) { try { Drawing restoredDrawing = restoreFormat.restore(file); if (restoredDrawing != null) { restoredDrawing.setTitle(file); loaded=true; setView(restoredDrawing); figureSelectionChanged(null); loaded=false; System.out.println("Loaded."); } else { showStatus("Unknown file type: could not open file '" + file + "'"); } } catch (IOException e) { showStatus("Error: " + e); } } COM: <s> load a drawing from a file </s>
funcom_train/41576233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCancelSettingsCommand() { if (cancelSettingsCommand == null) {//GEN-END:|104-getter|0|104-preInit // write pre-init user code here cancelSettingsCommand = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|104-getter|1|104-postInit // write post-init user code here }//GEN-BEGIN:|104-getter|2| return cancelSettingsCommand; } COM: <s> returns an initiliazed instance of cancel settings command component </s>
funcom_train/32746729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getGoals(Player p) { MatchEvent me; int goals = 0; Enumeration enum = goals_.elements(); while(enum.hasMoreElements()) { me = (MatchEvent)enum.nextElement(); if(me.getPlayer1() == p) goals++; } return goals; } COM: <s> returns the number of goals by the player </s>
funcom_train/50769217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFilterModule(String name,int lineNumber) { fm = new FilterModule(); fm.setName(name); fm.setParent(cpsc); fm.setDescriptionFileName(filename); fm.setDescriptionLineNumber(lineNumber); cpsc.addFilterModule(fm); this.addToRepository(fm); } COM: <s> adds a filter module object to the repository </s>
funcom_train/8992592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkHavePermission(String permissionTypes) throws ApplicationException { for (int i = 0; i <permissionTypes.length(); i++) { if (WorkflowPermissionManager.ALL_RIGHTS.indexOf(permissionTypes.substring(i, i+1)) >= 0 ) { return true; } else { continue; } } return false; } COM: <s> checks if the current user has the given permission </s>
funcom_train/9700538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGenerationBase(int base,String className) { switch (base) { case DynamicDBGenerationCode.WITHOUT_DB: page.enableInputRadioButton(0,true); // Without DB break; case DynamicDBGenerationCode.WITH_DB_INPUT_FILE: page.enableInputRadioButton(1,true); // With input file break; default: page.enableInputRadioButton(className, true); break; } } COM: <s> set base generation </s>