__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/41486438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean start() { try { configureLogging(); log.info("Main application starting up"); orderTransformer = new OrderTransformer(); config = ConfigurationHelper.getConfiguration(); affinity = config.getInt("system.affinity[@amount]"); simulation = Simulation.getInstance(); simulation.initializeWorkForce(); stillActive = true; return true; } catch (Exception ex) { log.fatal("Start up failed, shutting down", ex); stillActive = false; return false; } } COM: <s> starts up the system </s>
funcom_train/39423644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTitle() { if(unappliedMods.isSetTitle() && unappliedMods.getTitle().isSetValue()){ return unappliedMods.getTitle().getValue(); }else if(personElement.isSetTitle() && personElement.getTitle().isSetValue()){ return personElement.getTitle().getValue(); } return ""; } COM: <s> get the value of title </s>
funcom_train/32769959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMenuItemRectangle() { if (menuItemRectangle == null) { menuItemRectangle = new JMenuItem(); menuItemRectangle.setText(OpenJCADLanguage.getString("_rectangle_")); // Generated menuItemLine.addActionListener(new OpenJCADDraw2DRectangleAction(this.tabbedPane)); } return menuItemRectangle; } COM: <s> this method initializes menu item rectangle </s>
funcom_train/13847850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { logger.finest("JoinManager --> DiscardProxyTask started"); if( (proxyReg != null) && (proxyReg.serviceLease != null) ) { try { proxyReg.serviceLease.cancel(); } catch (Exception e) { /*ignore*/ } }//endif logger.finest("JoinManager - DiscardProxyTask completed"); }//end run COM: <s> requests the cancellation of the lease on the </s>
funcom_train/8410653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String midString(int index, int length) { if (index < 0) { index = 0; } if (length <= 0 || index >= size) { return ""; } if (size <= index + length) { return new String(buffer, index, size - index); } else { return new String(buffer, index, length); } } COM: <s> extracts some characters from the middle of the string builder without </s>
funcom_train/47109692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void abortRequest(ActionEvent ae) { FacesContext facesContext = FacesContext.getCurrentInstance(); ExternalContext externalContext = facesContext.getExternalContext(); try { PrettyContext prettyContext = PrettyContext.getCurrentInstance(); PrettyConfig prettyConfig = prettyContext.getConfig(); PrettyUrlMapping mapping = prettyConfig.getMappingById("login"); facesContext.responseComplete(); externalContext .redirect(externalContext.getRequestContextPath() + mapping.getPattern()); } catch (Exception e) { FacesUtils.redirectError(e); } } COM: <s> abort and redirect to the login page </s>
funcom_train/26401168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commitTransaction(Connection con) throws I18NException { if (con != null) { try { con.commit(); } catch (SQLException e) { Object[] args = {e.getMessage()}; Message message = new Message("exception.failed.database.error", args); throw new I18NException(message); } } } COM: <s> commit the current transaction </s>
funcom_train/28999553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean authorized(User u) { boolean result = false; // Only going to check that the user is logged in if(u != null) { Portal portal = u.getPortal(); if(portal != null) { // check to see if this is the public user // if so, authorization fails. result = !UserMediator.isPublicUser(u, portal); } } return result; } COM: <s> determine whether the user has the authority to use this servlet </s>
funcom_train/4917056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGovernance_Disregard() throws Throwable { // Record disregarding the governance GovernanceContainer<?, ?> governanceContainer = this .recordGovernance(new Duty<I, F, Governances>() { @Override public void doDuty(DutyContext<I, F, Governances> context) throws Throwable { GovernanceManager manager = context .getGovernance(Governances.GOVERNANCE); manager.disregardGovernance(); } }); governanceContainer.disregardGovernance(this.containerContext); // Test this.doTest(); } COM: <s> ensure able to disregard </s>
funcom_train/2901996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getLayouts() { try { Session hSession = HibernateSession.openSession(); List layouts = hSession.find("from Layout as l"); HibernateSession.closeSession(hSession); return layouts; } catch (HibernateException e) { log.error("Unable to get layouts!", e); } return Collections.EMPTY_LIST; } COM: <s> return a list of a layout instances saved in database </s>
funcom_train/51715198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int sl_open() { try { Parent.setin(getInputStream()); Parent.setout(getOutputStream()); } catch (IOException e) { Parent.CXerror("TALC : Couldn't get the connection to the 'in/out' stream."); return -1; } setVisible(true); return 0; } COM: <s> open the slave br </s>
funcom_train/45108743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int copyScenario(String newScenarioName) throws Exception { jemmyOperation.pushButtonAndWaitForDialog(mainFrame, jmap.getCopyScenarioButton(), jmap.getScenarioCopyWin()); JFileChooserOperator fileChosser = new JFileChooserOperator(); fileChosser.chooseFile(newScenarioName); new JButtonOperator(fileChosser, new TipNameButtonFinder(jmap.getScenarioCopyButton())).clickMouse(); return 0; } COM: <s> does gui save as operation on the scenario </s>
funcom_train/10482728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadHeaders(InputStream in) throws MessagingException { try { headerSize = in.available(); // just load and replace the haders headers = new InternetHeaders(in); headerSize -= in.available(); } catch (IOException e) { // reading from a ByteArrayInputStream...this should never happen. } } COM: <s> unconditionally load the headers from an inputstream </s>
funcom_train/3990025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addZlecone_badaniaPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SkierowanieLaboratorium_zlecone_badania_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SkierowanieLaboratorium_zlecone_badania_feature", "_UI_SkierowanieLaboratorium_type"), PrzychodniaPackage.Literals.SKIEROWANIE_LABORATORIUM__ZLECONE_BADANIA, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the zlecone badania feature </s>
funcom_train/19779982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj instanceof FactAuditProdCatPk) { FactAuditProdCatPk pk2 = (FactAuditProdCatPk) obj; return (this.companyCode != null && this.companyCode.equals(pk2.companyCode) && this.auditNo != null && this.auditNo.equals(pk2.auditNo) && this.catLineNo != null && this.catLineNo.equals(pk2.catLineNo)); } return false; } COM: <s> properly evaluate the equality of two primary keys </s>
funcom_train/4509972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void broadcastNodeEvent(Message message, boolean includeAll) { Collection<JID> jids = new ArrayList<JID>(); for (NodeSubscription subscription : subscriptionsByID.values()) { if (includeAll || subscription.canSendNodeEvents()) { jids.add(subscription.getJID()); } } // Broadcast packet to subscribers service.broadcast(this, message, jids); } COM: <s> broadcasts a node event to subscribers of the node </s>
funcom_train/35110287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addLostMessage(ExecutionOccurrence execution) { if (execution instanceof ThreadActivation) { return; } ContourID lifeline = determineLifeline(execution); assert lifeline != null; assert execution.isTerminated(); MessageSend terminator = execution.terminator(); if (terminator != null) { if (!lifelineTargetConnections.containsKey(lifeline)) { lifelineTargetConnections.put(lifeline, new ArrayList<Message>()); } Message message = terminator.message(); lifelineTargetConnections.get(lifeline).add(message); } } COM: <s> adds the terminator of the supplied execution to the list of target </s>
funcom_train/16615050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearTable(String tableName) throws AdaptorException { Connection conn = null; Statement s = null; try { conn = getConnection(); s = conn.createStatement(); s.execute("delete from " + tableName); } catch (SQLException e) { throw new AdaptorException("Problem deleting table: " + tableName, e); } finally { close(s); close(conn); } } COM: <s> sql this might not work with all database servers tested with my sql </s>
funcom_train/51336611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_read_correctRejection_zeroLength() { final IRawStore store = getStore(); try { final int nbytes = 0; final int offset = 10; store.read( store.toAddr(nbytes, offset) ); fail("Expecting: "+IllegalArgumentException.class); } catch(IllegalArgumentException ex) { System.err.println("Ignoring expected exception: "+ex); } finally { store.destroy(); } } COM: <s> a delete with an address encoding a zero length component is an error </s>
funcom_train/3643496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createPrototype(NodeDiscover nd) { NDC.push("createProxy"); try { logger.debug("Raw response: " + nd); XBeeDeviceContainer proxy = new XBeeDeviceContainer(this, nd.getNodeAddress64()); synchronized (address2dcGlobal) { address2dcGlobal.add(proxy); } } finally { NDC.pop(); } } COM: <s> create a generic prototype for the device found </s>
funcom_train/43345767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Thread getWorkingThread(Runnable runnable, String name) { Thread thread = null; if (agentsThreadPool != null) { try { thread = agentsThreadPool.runIt(runnable); // TODO: Why not setting up a nice name? //thread.setName(name); } catch (Throwable t) { logger.error("Error while aquire thread from pool. Fallback to new thread.", t); } } if (thread == null) { thread = new Thread(runnable, name); thread.setDaemon(true); thread.start(); } return thread; } COM: <s> gets a thread for the specified runnable and starts it </s>
funcom_train/17463897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void indirectAccess() throws Throwable { Product product = new Product(); product.setName("Alcohol x 500 ml"); product.setDescription("Alcohol x 500 ml for medical purposes."); product.setPrice(5); KernelBus kernelBus = kernel.getBus(); kernelBus.invoke(STOCK_SERVICE, "addNewProduct", new Object[] { product, 25}, new String[] {Product.class.getName(), "int"}); } COM: <s> example of indirect access to bean </s>
funcom_train/21263789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Usuarios entity) { EntityManagerHelper.log("saving Usuarios 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 usuarios entity </s>
funcom_train/3122109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GraphPath search(Graph g, String strFrom, String strTo) { GraphPath p = new GraphPath(); this.g = g; //// 1. Ensure that the start and ending nodes are in the Graph if (g.nodeExists(strFrom) && g.nodeExists(strTo)) { p = breadthFirstSearchHelper(strFrom, strTo); } return(p); } // of method COM: <s> perform a breadth first search on the graph with the specified start </s>
funcom_train/43580418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getOk() { if (ok == null) { ok = new JButton(); ok.setText("OK"); ok.setSize(new Dimension(78, 20)); ok.setLocation(new Point(391, 128)); ok.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { hideMe(); } }); } return ok; } COM: <s> this method initializes ok </s>
funcom_train/31414483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getFieldValue(Object vo, String javaFieldName) { Object o = null; try { o = PropertyUtils.getProperty(vo, javaFieldName); } catch(NoSuchMethodException ex) { // Do nothing } catch(IllegalAccessException ex) { // Do nothing } catch(InvocationTargetException ex) { // Do nothing } return o; } COM: <s> retrieves the value from the value object encapsulates all the error trapping and </s>
funcom_train/37821978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createNewPartition() { if (!(table.getSelecetedEvents().isEmpty())) { Partition p = new Partition(table.getSelecetedEvents()); String name = showNameDialog(Messages.getString("em", "PartitionPanel.DefaultPartitionName") + "" + (observations.size() + 1)); if (name != null) { p.setName(name); observations.add(p); ((PartitionListModel) partitionList.getModel()) .setElements(observations); bRemove.setEnabled(true); } else { p.remove(); } table.clearSelection(); } } COM: <s> creates a new code partition code object out of the selected table </s>
funcom_train/4467005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetDate() { DropdownContainerModule module = createInstance(); module.onModuleLoad(); final DropdownContainer timer = module.getDropdownContainer(); final Date firstDate = timer.getDate(); timer.addChangeListener(new ChangeListener() { public void onChange(Widget sender) { assertNotSame(firstDate, timer.getDate()); } }); timer.setDate(new Date()); } COM: <s> tests the set date and get date methods </s>
funcom_train/3159633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getAsDate() { Calendar calendar = createCalendar(); calendar.add(Calendar.DATE, getDaysFraction()); calendar.add(Calendar.SECOND, (int) getSecondsFraction()); calendar.add(Calendar.MILLISECOND, (int) Math.round(getMicroSecondsFraction() / 1000.0)); return calendar.getTime(); } COM: <s> returns this utc date time value as a date </s>
funcom_train/2480355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CallRepository getActiveCallRepository(String callerId){ log.debug("Searching for an active call for caller:" + callerId); for(CallRepository cr:this.activeCalls){ log.debug("Comparing activeCall:" + cr.getCallerSipId() + " with: " + callerId); if(cr.getCallerSipId().equals(callerId)) return cr; } return null; } COM: <s> returns the call repository identified by the given caller id </s>
funcom_train/18582106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setPatientFocusPanels() { patientCentricFocusPanels = new FocusPanel[2]; // focus tab panels patientCentricFocusPanels[0] = new PatientFocusFunction(); patientCentricFocusPanels[1] = new AllergiesFocusFunction(); mainFrame.getCurrentTab().setPatientCentricFocusPanels( patientCentricFocusPanels); } COM: <s> adds the patient focuspanels to the patient tab </s>
funcom_train/26572090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processActionKey(KeyStroke keyStroke) { processKeyEvent(new KeyEvent(this, KeyEvent.KEY_PRESSED, System.currentTimeMillis(), keyStroke.getModifiers(), keyStroke.getKeyCode(), KeyEvent.CHAR_UNDEFINED)); } COM: <s> sends a key event for the given key stroke to the grid table </s>
funcom_train/14585648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanUp() { try { // close all streams to free their resources if (input != null) input.stop(); // sysIn.close(); // if try to close() instead, readLine() keeps waiting until // receiving up to several lines of input sysIn = null; // non-null netOut signals successfull network setup if (networking && netOut != null) { netOut.close(); netIn.close(); client.close(); server.close(); } // close the database db.closeDB(); } catch(IOException e) { ioBugHandler(e); } } COM: <s> cleans up system resources before exiting </s>
funcom_train/18032314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMenuFileExportJava() { if (m_menuFileExportJava == null) { m_menuFileExportJava = new JMenuItem(); m_menuFileExportJava.setText(Messages.getString("FBMenu.16")); //$NON-NLS-1$ m_menuFileExportJava.setMnemonic(Messages.getString("FBMenu.17").charAt(0)); //$NON-NLS-1$ } return m_menuFileExportJava; } COM: <s> returns the file export java item </s>
funcom_train/43244835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReleaseOldConnections() throws Exception { System.out.println("releaseOldConnections"); EOServerStatusImpl instance = new EOServerStatusImpl(); instance.releaseOldConnections(); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of release old connections method of class org </s>
funcom_train/33622785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeArray(Object value) throws IOException { write(BencodingUtils.LIST); int length = Array.getLength(value); for (int i = 0; i < length; i++) { writeObject(Array.get(value, i)); } write(BencodingUtils.EOF); } COM: <s> writes an array </s>
funcom_train/28158898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getTile(final int x, final int y) { try { return images[y * tilesX + x]; } catch (final ArrayIndexOutOfBoundsException ex) { throw new GameRuntimeException( String.format("The tile asked for (%d,%d) is outside the tileset bounds", x, y) ); } } COM: <s> get the tile at the specified position </s>
funcom_train/46731941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accessDefaultTableAction(final TableAction tableAction) throws Exception { if (tableAction.hasSelectedRows()) { BaseAction action = new BaseAction(tableAction.getActionReference()); action.setBaseModel(tableAction.getSelectedModel()); action.setBaseModels(tableAction.getSelectedModels()); action.setContextRefId(tableAction.getContextRefId()); ISApplicationMediator.getInstance().receive(ISEvent.EXECUTEACTION, action); return true; } return false; } COM: <s> change the action from a </s>
funcom_train/44496027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void commit(TransactionID transactionID) { if (transactionID == null) { throw new IllegalArgumentException("TransactionID is null"); } if (writer != null && writer.equals(transactionID)) { writer = null; this.removeOrder = 0; } readers.remove(transactionID); } COM: <s> commits this code cache entry code by the given code transaction id code </s>
funcom_train/38861705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getImagenPanel() { if (imagenPanel == null) { labelImagen = new JLabel(); labelImagen.setText(""); labelImagen.setBackground(Color.white); labelImagen.setIcon(new ImageIcon(getClass().getResource("/beso2.jpg"))); imagenPanel = new JPanel(); imagenPanel.setLayout(new GridBagLayout()); imagenPanel.setBackground(Color.white); imagenPanel.add(labelImagen, new GridBagConstraints()); } return imagenPanel; } COM: <s> this method initializes imagen panel </s>
funcom_train/3422794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean weakerProcessContents(XSWildcardDecl superWildcard) { return fProcessContents == XSWildcardDecl.PC_LAX && superWildcard.fProcessContents == XSWildcardDecl.PC_STRICT || fProcessContents == XSWildcardDecl.PC_SKIP && superWildcard.fProcessContents != XSWildcardDecl.PC_SKIP; } COM: <s> check whether this wildcard has a weaker process contents than the super </s>
funcom_train/23019718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(final Cookie cookie, final String path) throws MalformedCookieException { if (cookie == null) { throw new IllegalArgumentException("Cookie may not be null"); } if (path == null) { throw new MalformedCookieException("Missing value for path attribute"); } if (path.trim().equals("")) { throw new MalformedCookieException("Blank value for path attribute"); } cookie.setPath(path); cookie.setPathAttributeSpecified(true); } COM: <s> parse cookie path attribute </s>
funcom_train/3619408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTgtReleasePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Requirement_tgtRelease_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Requirement_tgtRelease_feature", "_UI_Requirement_type"), EclipsesrsPackage.Literals.REQUIREMENT__TGT_RELEASE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the tgt release feature </s>
funcom_train/41874521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean removeIncomingEdge(GraphEdge edge) { if (null == edge) { throw new NullPointerException(); } boolean b = incomingEdges.remove(edge); if (b) { GraphNode s = edge.getSourceNode(); if (null != s) { sourceNodes.remove(s); s.destinationNodes.remove(this); edge.destinationNode = null; } } return b; } COM: <s> remove an incoming edge from this node </s>
funcom_train/13313469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String registerUser(String userName, String password) { return sendCommand(Message.REGISTER, "<" + Message.USERNAME + ">" + userName + "</" + Message.USERNAME + "><" + Message.PASSWORD + ">" + password + "</" + Message.PASSWORD + ">"); } COM: <s> send a register request to the server </s>
funcom_train/32634949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Expression combine(CombineableOperator comb) { Operator combOp = (Operator) comb; if (comb.lvalueMatches(this)) { /* We already checked in canCombine that subExpressions match */ comb.makeNonVoid(); combOp.parent = parent; return combOp; } for (int i=0; i < subExpressions.length; i++) { Expression combined = subExpressions[i].combine(comb); if (combined != null) { subExpressions[i] = combined; updateType(); return this; } } return null; } COM: <s> combines the given expression which should be a store instruction </s>
funcom_train/8716403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndexSize(int loc) { // System.out.println("Getting size of index at "+loc); int hold= pos; pos= loc; int count= readInt(2); if (count==0) { return 2; } int encsz= readByte(); // pos is now at the first offset. last offset is at count*encsz pos+= count*encsz; int end= readInt(encsz); pos= hold; return 2+(count+1)*encsz+end; } COM: <s> get the size of the dictionary located within the stream at </s>
funcom_train/1373823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void read(ByteBuffer buff) { eventType = buff.getInt(); playerId = NIOUtils.getStr(buff); sessionId = NIOUtils.getStr(buff); gameId = buff.getInt(); gameName = NIOUtils.getStr(buff); numRecipients = buff.getInt(); recipients = new String[numRecipients]; for (int i=0;i<numRecipients;i++) recipients[i] = NIOUtils.getStr(buff); message = NIOUtils.getStr(buff); } COM: <s> read the event from the given byte buffer </s>
funcom_train/48909211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getComboUnidades1() { if (comboUnidades == null) { String unidades[] = {"m. cubicos", "otro"}; comboUnidades = new JComboBox(unidades); comboUnidades.setBounds(new Rectangle(325, 9, 106, 22)); comboUnidades.addKeyListener(new KeyAdapter(){ public void keyPressed(KeyEvent e) { if(e.getKeyCode()==KeyEvent.VK_ENTER) jrbSi.grabFocus(); } }); } return comboUnidades; } COM: <s> this method initializes combo unidades1 </s>
funcom_train/47575997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BPDPattern_name_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BPDPattern_name_feature", "_UI_BPDPattern_type"), ArtifactsPackage.Literals.BPD_PATTERN__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the name feature </s>
funcom_train/48406392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NamedElement_name_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_name_feature", "_UI_NamedElement_type"), SpemxtcompletePackage.eINSTANCE.getNamedElement_Name(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the name feature </s>
funcom_train/45715102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireImageChangedEvent(int operation) { if (OJ.isValidData()) { ImageChangedEventOJ evt = new ImageChangedEventOJ(operation); for (int i = 0; i < imageChangedListeners.size(); i++) { ((ImageChangedListener2OJ) imageChangedListeners.get(i)).imageChanged(evt); } } } COM: <s> creates a new image changed event oj and executes all listeners image changed </s>
funcom_train/25049554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void startNextStep(Step<D> step, D flowData, Map<String, ?> actionData) { //Pass data to the next step step.initStep(flowData, actionData); //Add the next step to the stack stepsStack.add(step); } COM: <s> starts the step </s>
funcom_train/44450374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SrcMLElement lookup(String f_name) { if (!m_table.containsKey(f_name)) { return null; } SymbolTableIdentifier ident = (SymbolTableIdentifier)m_table.get(f_name); SymbolTableEntry entry = ident.getEntry(); if (entry == null) { return null; } return entry.getElement(); } COM: <s> look up an identifier under the current depth and return its defining </s>
funcom_train/26458703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getAllActionConfigs() { Map retMap = new HashMap(); if (!parents.isEmpty()) { for (Iterator iterator = parents.iterator(); iterator.hasNext();) { PackageConfig parentContext = (PackageConfig) iterator.next(); retMap.putAll(parentContext.getAllActionConfigs()); } } retMap.putAll(getActionConfigs()); return retMap; } COM: <s> returns the map of all the action configs available in the current package </s>
funcom_train/50077194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MouseEvent eventForUnder(MouseEvent e){ if(elementUnder==null) return e; int mouseX = getX()+e.getX(); int mouseY = getY()+e.getY(); return new MouseEvent( elementUnder, e.getID()+1, e.getWhen(), e.getModifiers(), mouseX-elementUnder.getX(), mouseY-elementUnder.getY(), e.getClickCount(), e.isPopupTrigger() ); } COM: <s> creates a new mouse event for under element </s>
funcom_train/29699683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int heatSinks() { int sinks = 0; for (Mounted mounted : getMisc()) { EquipmentType etype= mounted.getType(); if (etype.hasFlag(MiscType.F_HEAT_SINK) || etype.hasFlag(MiscType.F_DOUBLE_HEAT_SINK)) { sinks++; } } return sinks; } COM: <s> returns the number of heat sinks functional or not </s>
funcom_train/44457868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reloadProperties() throws IOException, NoSuchFunctionException, AccessDeniedException { Map<String, Object> backpack = new HashMap<String, Object>(); backpack.put(BackpackConstants.IP, _ip); FunctionRequest reloadPropertiesRequest = new FunctionRequest("_ReloadProperties", Collections.EMPTY_MAP, null, backpack); _api.handleCall(reloadPropertiesRequest, null); } COM: <s> reloads the runtime properties if the file has changed </s>
funcom_train/18786843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int displayMessage(String message, String parameter) { String text = MessageFormat.format(message, new Object[] { parameter }); return JOptionPane.showConfirmDialog(getExplorer().getFrame(), text, Messages.titleActionConfirmation, JOptionPane.YES_NO_CANCEL_OPTION); } COM: <s> displays a confirmation message for a document with a defined persistent </s>
funcom_train/50982645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReleaseResource_ReleaseTwice() { final ResourceManager resourceManager = new ResourceManager( getName() ); final ProxyResourceFactory factory = new ProxyResourceFactory(); final ManagedResource resource = factory.getResource( resourceManager ); factory.releaseResource( resourceManager, resource ); try { factory.releaseResource( resourceManager, resource ); fail( "Expected exception" ); } catch( final ResourceException e ) { // Expected path } } COM: <s> try releasing the same resource twice in a row </s>
funcom_train/3412531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColorModel(ColorModel model) { if (canFilterIndexColorModel && (model instanceof IndexColorModel)) { ColorModel newcm = filterIndexColorModel((IndexColorModel)model); substituteColorModel(model, newcm); consumer.setColorModel(newcm); } else { consumer.setColorModel(ColorModel.getRGBdefault()); } } COM: <s> if the color model is an index color model and the subclass has </s>
funcom_train/24607062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _generateAUniv(int index) { writer_.startSection(CS_C_UNIV, _getId(CS_C_UNIV, index)); writer_.addProperty(CS_P_NAME, _getRelativeName(CS_C_UNIV, index), false); writer_.endSection(CS_C_UNIV); } COM: <s> generates a university instance </s>
funcom_train/10498146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unregisterAll() { for(Map.Entry<ZKMBeanInfo,String> e: mapBean2Path.entrySet()) { try { unregister(e.getValue(), e.getKey()); } catch (JMException e1) { LOG.warn("Error during unregister", e1); } } mapBean2Path.clear(); mapName2Bean.clear(); } COM: <s> unregister all currently registered mbeans </s>
funcom_train/11653004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Box createGraphInfoPanel() { Box graphInfoPanel = Box.createHorizontalBox(); this.noteField = new JTextField(); graphInfoPanel.add(this.createInfoLabel("distribution_note1", this.noteField)); // $NON-NLS-1$ return graphInfoPanel; } COM: <s> creates the information panel at the bottom </s>
funcom_train/31224062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addLandZone(int newID, String newAbbreviation, String newName, short newIPC, Nation newNation, int cx, int cy) { zones.put(newID, new Zone(newID, newAbbreviation, newName, newNation, newIPC, Zone.TYPE_LAND, cx, cy)); setChanged(); notifyObservers(); } COM: <s> used by the board loader to add a land zone to the board </s>
funcom_train/22050490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasSubTableChanged(int iSubTable) { String strOld = (String) (subTableContentsCopy.elementAt(iSubTable)); String strNew = getStringForSubTable(iSubTable); return strOld.compareTo(strNew) != 0; // Return false if strings are the same } COM: <s> check whether a subtable has changed </s>
funcom_train/268754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ping() throws Exception { if (this.useFastPing) { this.io.sendCommand(MysqlDefs.PING, null, null); } else { this.io.sqlQuery(PING_COMMAND, MysqlDefs.MAX_ROWS, this.encoding, this, java.sql.ResultSet.CONCUR_READ_ONLY, false, this.database); } } COM: <s> detect if the connection is still good </s>
funcom_train/47184116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long add(PrescriptionBean pres) throws DBException { Connection conn = null; PreparedStatement ps = null; try { conn = factory.getConnection(); ps = conn .prepareStatement("INSERT INTO OVMedication (VisitID,NDCode,StartDate,EndDate,Dosage,Instructions) VALUES (?,?,?,?,?,?)"); loader.loadParameters(ps, pres); ps.executeUpdate(); return DBUtil.getLastInsert(conn); } catch (SQLException e) { e.printStackTrace(); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } COM: <s> adds a prescription bean to the database </s>
funcom_train/8461966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void renderDebugBoundingBoxOuter(Graphics2D context) { java.awt.Color previousColor = context.getColor(); context.setColor(java.awt.Color.RED); Rectangle2D bb = getBoundingBox(); bb.setRect(bb.getX()-1, bb.getY()-1, bb.getWidth()+2, bb.getHeight()+2); context.draw(bb); context.setColor(previousColor); } COM: <s> for debugging purpose draw the outer of bounding box of </s>
funcom_train/3276031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public byte rankToNum (char c) { byte p = ChessBoard.NULL_RANK; p = mapSetToNum(Character.toLowerCase(c), rankSet); if (p == ChessBoard.NULL_RANK) { if (c == '-' || c == ' ') return p; if (Log.debug) Log.debug(DEBUG, "unknown file: <" + c + ">"); throw new ArrayIndexOutOfBoundsException( "rank out of range: " + c); } return p; } COM: <s> returns the byte representation of the rank </s>
funcom_train/45122214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected EObject createInitialModel() { EClass eClass = ExtendedMetaData.INSTANCE.getDocumentRoot(dictionaryPackage); EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(initialObjectCreationPage.getInitialObjectName()); EObject rootObject = dictionaryFactory.create(eClass); rootObject.eSet(eStructuralFeature, EcoreUtil.create((EClass)eStructuralFeature.getEType())); return rootObject; } COM: <s> create a new model </s>
funcom_train/14373415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeRange(int min, int max, AccordionTreeDrawer t) { RangeInTree r = null; Iterator iter = ranges.iterator(); while (iter.hasNext()) { RangeInTree curr = (RangeInTree)iter.next(); if (curr.getMin() == min && curr.getMax() == max && curr.atd == t) { r = curr; break; } } // delete if it it's identical to something previously passed in... if (r != null) ranges.remove(r); } COM: <s> find and remove a given range </s>
funcom_train/5573144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void restoreWidgetValues() { ExportModelsModel model = getModel(); String serviceURL = model.serviceURL; String login = model.login; String password = model.password; String projectName = model.projectName; if (serviceURL != null) this.serviceURL.setText(serviceURL); if (login != null) this.login.setText(login); if (password != null) this.password.setText(password); if (projectName != null) this.projectName.setText(projectName); } COM: <s> restores control settings that were saved in the previous instance of </s>
funcom_train/26206366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getProperty(final String key, float defaultValue) { final Object value = get(key); if (value != null) { if (value instanceof String) { defaultValue = Float.parseFloat((String) value); } else if (value instanceof Float) { defaultValue = ((Float) value).floatValue(); } } return defaultValue; } COM: <s> return the float value for the given code key code </s>
funcom_train/35838344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelected(boolean selected) { boolean wasSelected = isSelected(); try { super.setSelected(selected); } catch (Exception e) { System.out.println("viewframe not selected because "+e.getMessage()); } if (isSelected() && !wasSelected && oViewPane != null) { oViewPane.requestFocus(); // refresh edit-undo and edit-redo button for this Frame refreshUndoRedo(); } } COM: <s> set the current frame selected deselected and if selected focus the uiview pane </s>
funcom_train/31301535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLogLine() { StringBuffer ret = new StringBuffer(); ret.append(_when.toString()); ret.append(","); ret.append(_UID); ret.append(","); ret.append(_device); ret.append(","); ret.append(_data); return ret.toString(); } COM: <s> return a line for logging to a file nicely formatted </s>
funcom_train/16750388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void download() { executer = new Executer(10, 3); if (numberOfTilesToDownload == 0) { logger.debug("nothing to download"); return; } Runnable task = new Runnable() { @Override public void run() { for (int zoom : zoomLevels) { MapWindow mapWindow = new MapWindow(boundingBox, zoom); for (TileOnWindow tow : mapWindow) { if (cancelled){ return; } queue(tow); } } executer.finish(); } }; Thread thread = new Thread(task); thread.start(); } COM: <s> begin download process </s>
funcom_train/5342083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setSearchIconLocation() { int y = MENU_MEDIATOR.getMenuBarHeight() + (height - LOGO_PANEL.getPreferredSize().height) / 2; LOGO_PANEL.setLocation( FRAME.getSize().width - LOGO_PANEL.getSize().width - 12, y); } COM: <s> sets the location of the search status icon </s>
funcom_train/43910977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return new StringBuffer("FormatConfig[type=").append(getType()).append(", enabled=") .append(isEnabled()).append(", abstract=") .append(getAbstract()).append("]").toString(); } COM: <s> implement to string </s>
funcom_train/39398447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handle(PeerConnection connection, int length) { Peer peer = connection.getPeer(); getLogger().fine("<- " + peer.getInetSocketAddress() + " DownloadRequest"); PeerSelectionStrategy.getInstance().addPeer(peer); getDownloadManager().fillUploadSlots(); if (!connection.hasMessagesToSend()) { connection.close("No more messages to send."); } } COM: <s> handles a queue request </s>
funcom_train/7660787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToSeconds() { for (long t = 0; t < 10; ++t) { assertEquals(t, TimeUnit.SECONDS.toSeconds(t)); assertEquals(t, TimeUnit.MILLISECONDS.toSeconds(t * 1000)); assertEquals(t, TimeUnit.MICROSECONDS.toSeconds(t * 1000000)); assertEquals(t, TimeUnit.NANOSECONDS.toSeconds(t * 1000000000)); } } COM: <s> to seconds correctly converts sample values in different units to </s>
funcom_train/34590573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void btnSelectAllActionPerformed(java.awt.event.ActionEvent evt) { generalCheckBox.setSelected(true); this.checkAllGeneralActionPerformed(evt); rationaleCheckBox.setSelected(true); howToCheckBox.setSelected(true); checksCheckBox.setSelected(true); this.checkAllChecksActionPerformed(evt); referencesCheckBox.setSelected(true); this.checkAllReferencesActionPerformed(evt); advancedCheckBox.setSelected(true); this.checkAllAdvancedActionPerformed(evt); } COM: <s> check all buttons </s>
funcom_train/37830107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkEntityIsReachable(final Player player, final Entity entity) { final List<Node> path = Path.searchPath(player, player.getX(), player.getY(), entity.getArea(), 7); if (path.isEmpty() && !entity.nextTo(player)) { // The animal is too far away player.sendPrivateText("That " + entity.getTitle() + " is too far away."); return false; } return true; } COM: <s> checks whether this entity is reachable whether a path exists </s>
funcom_train/3887598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addConferenceTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ConferenceType_conferenceType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ConferenceType_conferenceType_feature", "_UI_ConferenceType_type"), ImsldV1p0Package.Literals.CONFERENCE_TYPE__CONFERENCE_TYPE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the conference type feature </s>
funcom_train/36769470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addModule() { AddValues values = new AddValues(); AddDialog dialog = new AddDialog(parent, "Add Module", "Name:", 20, values); if (!dialog.wasCanceled()) { Controller.getInstance().addModule(nameField.getText(), values.getName().trim()); } } COM: <s> this method is called when the user selects the add module menu item </s>
funcom_train/14399193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processCache() { if (this.iCache.isEmpty()) return; long currentTime = System.currentTimeMillis(); for (int i = this.iCache.size() - 1; i >= 0; i--) { if (this.iCache.getFirst().getDiscardTime() > currentTime) break; this.iCache.removeFirst(); } } COM: <s> processes the sequence identifier cache and removes all entries whose </s>
funcom_train/37390541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close(TokenReference ref) { if (!isUsed) { reportTrouble(new CWarning(stmt.getTokenReference(), TkcMessages.UNUSED_LABEL, stmt.getLabel())); } if (breakContextSummary != null) { if (isReachable()) { merge(breakContextSummary); } else { adopt(breakContextSummary); } } super.close(ref); } COM: <s> verify everything is okay at the end of this context </s>
funcom_train/22763496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void folderRenamed(Folder folder, String newName) { Connection con = folder.getConnection(); TreeNode root = BookmarkModel.getInstance().getConnectionRoot(con); /*BookmarkXMLBuilder builder = new BookmarkXMLBuilder(con); builder.preOrderTraversal(root);*/ BookmarkModel.getInstance().storeBookmarks(con, root); //builder.getResult()); BookmarkModel.getInstance().refreshExplorer(); } COM: <s> whenever a code folder code is renamed the xml representation of the </s>
funcom_train/10802739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setString(String val) { assertChangeable(); String str = unalias(val); try { setInternalString(str); if (originalValue == null && val != null && !isDefault(val)) { originalValue = getString(); } } catch (ParseException pe) { throw pe; } catch (RuntimeException re) { throw new ParseException(prop + ": " + val, re); } } COM: <s> set this value from the given string </s>
funcom_train/32056664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMouseMoved() { System.out.println("testMouseMoved"); Button b = new Button(); MouseEvent e = new MouseEvent(b, 1, 1, 1, 1, 1, 1,false); BasicMarqueeHandler bm = new BasicMarqueeHandler(); bm.mouseMoved(e); } COM: <s> this function tests mouse moved function of vertex view class </s>
funcom_train/14088714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRecipientId(long id) throws IOException { String chunkId = "0FF6"; /* need to remove the previous chunk if this has been called before */ removeEntry(chunkId, PT_BINARY); /** @todo make this work for more than 128 recips */ byte[] bArr = {0x00, 0x00, 0x00, (byte)id}; this.createDocument("__substg1.0_" + chunkId, PT_BINARY, createPtBinary(bArr)); } COM: <s> sets the unique id for this recipient </s>
funcom_train/4598697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isAccountEnabled(HttpServletRequest request, AuthDTO auth) { AccountStatus authStatus = dao.getAccountStatus(auth.getUsername()); if (authStatus != null) { return AccountStatus.ACTIVE == authStatus; } else { // such account doesn't exist... no point to continue audit("auth.noSuchAccount", request, auth); return false; } } COM: <s> check for locked or disabled account </s>
funcom_train/4253546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SessionDescriptor addMedia(MediaField media, Vector attributes) { //printlog("DEBUG: media: "+media,5); //printlog("DEBUG: attribute: "+attributes,5); addMediaDescriptor(new MediaDescriptor(media,null,attributes)); return this; } COM: <s> adds a new media </s>
funcom_train/24288619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setYear(int y) { super.setValue(y, true, false); if (dayChooser != null) { dayChooser.setYear(value); } spinner.setValue(new Integer(value)); firePropertyChange("year", oldYear, value); //$NON-NLS-1$ oldYear = value; } COM: <s> sets the year </s>
funcom_train/40633421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void generateProxyContructor(SourceWriter srcWriter) { srcWriter.println("public " + getProxySimpleName() + "() {"); srcWriter.indent(); srcWriter.println("super(" + getRemoteBasePath() + ","); srcWriter.indent(); srcWriter.println(getRemoteServiceRelativePath() + ", "); srcWriter.println("SERIALIZATION_POLICY, "); srcWriter.println("SERIALIZER);"); srcWriter.outdent(); srcWriter.outdent(); srcWriter.println("}"); } COM: <s> generate the proxy constructor and delegate to the superclass constructor </s>
funcom_train/25060429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private XmlPublicationHelper getHelper() { // Setup the class to grab and convert everything. XmlPublicationHelper helper = new XmlPublicationHelper(); helper.setProjectBaseLocation(_projectBaseLocation); helper.setProjectContents(_projectContents); helper.setProjectDescriptions(_projectDescriptions); helper.setProjectLocationMap(_projectLocationMap); return helper; } COM: <s> populate a helper for subsequent use in conversions </s>
funcom_train/7308577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resize(int newSize) { if (bufferSize >= newSize) return; byte[] newBuffer = new byte[newSize]; System.arraycopy(buffer, 0, newBuffer, 0, buffer.length); buffer = newBuffer; bufferSize = newSize; //signal.notifyAll(); } COM: <s> resize the ring buffer </s>
funcom_train/42711838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JTextField getTfCustomerAdress() { if (tfCustomerAdress == null) { tfCustomerAdress = new JTextField(); tfCustomerAdress.setBounds(new Rectangle(170, 180, 541, 21)); tfCustomerAdress.setEnabled(false); tfCustomerAdress.setFont(new Font("Dialog", Font.BOLD, 12)); tfCustomerAdress.setEditable(false); tfCustomerAdress.setBackground(Color.white); } return tfCustomerAdress; } COM: <s> this method initializes tf customer adress </s>
funcom_train/23878815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open(String path, boolean isRecToHistory) { debugMsg("App::open> " + path); activePath = path; if(isRecToHistory) { addHistoryRecord(activePath); } App.getInstance().select(activeModel, false); // unselect last active model activeModel = style.open(activePath); App.getInstance().select(activeModel, true); // setSelect new active model redraw(); } COM: <s> open directory in path </s>
funcom_train/7534139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setFile(File file) throws Exception { if (isLocked()) { try { tryRelease(); } catch (Exception e) { trace(e); } } f = FileUtil.getDefaultInstance().canonicalFile(file); cpath = f.getPath(); raf = null; locked = false; } COM: <s> initializes this object with the specified code file code </s>