__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/33789744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCancelButton() { if (cancelButton == null) { cancelButton = new JButton(); cancelButton.setBounds(new Rectangle(155, 80, 100, 30)); cancelButton.setText("Annulla"); cancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setVisible(false); } }); } return cancelButton; } COM: <s> this method initializes cancel food button </s>
funcom_train/326443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void addMenuItem(AbstractButton newItem) { if (menuItemList == null) { menuItemList = new Vector<AbstractButton>(); } newItem.setSelected(currentSelected); newItem.setEnabled(currentEnabled); menuItemList.add(newItem); // System.out.println(String.format("% d items now in menuenabler %s", menuItemList.size(), newItem.getText())); } COM: <s> add a menu item to a menu item enabler </s>
funcom_train/28262038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() { // Change DX to 0x0000 if AH < 0x80, or 0xFFFF if AH >= 0x80 cpu.dx[CPU.REGISTER_GENERAL_HIGH] = cpu.dx[CPU.REGISTER_GENERAL_LOW] = cpu.ax[CPU.REGISTER_GENERAL_HIGH] >= 0 ? (byte) 0x00 : (byte) 0xFF; } COM: <s> copy the sign bit 15 in ax into every bit of dx register </s>
funcom_train/26219506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void forceClientOnConnect() { _alpha.loadThread(this, this.msgQueue); _beta.loadThread(this, this.msgQueue); _beta.setProducer(_alpha); _alpha.setConsumer(_beta); _alpha.setPriority(Thread.MIN_PRIORITY + 1); _beta.setPriority(Thread.MIN_PRIORITY + 1); _alpha.start(); _beta.start(); loadThreadFlag = true; _alpha.launchInitTask(); } // end of the method ... COM: <s> in client mode certain aspects of the system may be turned off </s>
funcom_train/32076587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void destroy () { if (printer != 0) OS.g_object_unref (printer); if (settings != 0) OS.g_object_unref (settings); if (pageSetup != 0) OS.g_object_unref (pageSetup); if (cairo != 0) Cairo.cairo_destroy (cairo); if (printJob != 0) OS.g_object_unref (printJob); printer = settings = pageSetup = cairo = printJob = 0; } COM: <s> destroys the printer handle </s>
funcom_train/35150582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void mockFields(Class<?> clazz, Object test) throws Exception { List<Object> _mocks = new ArrayList<Object>(); for (Field field : clazz.getDeclaredFields()) { if (field.getAnnotation(Mock.class) != null) { try { field.setAccessible(true); Object o = createMock(field.getType()); field.set(test, o); _mocks.add(o); } catch (IllegalArgumentException e) { throw new Exception(e.getMessage(),e); } } } mocks = _mocks.toArray(); } COM: <s> reflect itself get annotate fields that dynamic assigned to mock objects </s>
funcom_train/42711175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getJButtonPrintInvoice() { if (jButtonPrintInvoice == null) { jButtonPrintInvoice = new JButton(); jButtonPrintInvoice.setBounds(new Rectangle(400, 450, 121, 21)); jButtonPrintInvoice.setText("Print"); jButtonPrintInvoice.setActionCommand("DeleteInvoice"); } return jButtonPrintInvoice; } COM: <s> this method initializes j button print invoice </s>
funcom_train/18350940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getList() { List list = new ArrayList(); for (int i = 0; i < tableModel.getRowCount(); i++) { // Do not include null values Object value = tableModel.getValueAt(i, 0); if (value != null) { list.add(value); } } return list; } COM: <s> returns the content list </s>
funcom_train/5406212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { notTerminated = false; try { ServerSocket sSock = serverSocket; serverSocket = null; if (sSock != null) { sSock.close(); } } catch (IOException e) { // we don't care, no matter what, the socket should be dead } } COM: <s> unblock the thread and force it to terminate </s>
funcom_train/4123137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void add(JPanel panel, int internalPanelTop, int internalPanelHeight) { panel.setVisible(false); panel.setLocation((getWidth() - panel.getWidth()) / 2, internalPanelTop + (internalPanelHeight - panel.getHeight()) / 2); add(panel); } COM: <s> adds a panel to show information </s>
funcom_train/15609646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void noteAlignedToAxis(Alignment alignment) { if (DEBUG_CLASS) { System.out.println("Workspace noteAlignedToAxis of Entity:" + alignment.getEntity().getOid() + " to Axis:" + alignment.getAxis().getOid()); } Workspace.this.loadObsoletedSubStructureFromFacade( (CuratedFeature) alignment.getEntity(), alignment.getAxis()); } COM: <s> watch for alignments so we can trigger a load of obsoleted sub structure </s>
funcom_train/32944213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePermission(Permission aPermission) { this.permissions.remove(aPermission); // Disassociate permissions and urls. Iterator<UrlPattern> it = aPermission.getUrls().iterator(); UrlPattern up = null; while(it.hasNext()) { up = it.next(); up.getPermissions().remove(aPermission); it.remove(); } removedPermissions.add(aPermission); } COM: <s> remove a permission from the site </s>
funcom_train/34283754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getbits(int aofs, int acount, String r) { int result = 0; /* ACount = 0 for '1' */ for(int i = 0; i < acount; i++ ) { int pb = ((aofs + i) / 8); if (((byte)r.charAt(pb) & (1 << ((i + aofs) & 7))) != 0) { result = result | (1 << i); } } return result; } COM: <s> get value in specified bits starting with aofs </s>
funcom_train/12912287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void showOptionalParameters(ActionEvent evt) { // System.out.println("action performed"); // TODO: this action clears the values of any attributes that have already been entered showOptionalParameters = true; String plugInName = (String) ((JComponent)evt.getSource()).getClientProperty("plugInName"); addParameters(plugInName); mainPanel.validate(); } COM: <s> show optional parameters check box checked </s>
funcom_train/21996608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getRec(int index) { if (log.isDebugEnabled()) log.debug("getRec: index=" + index + " m_recs.size=" + (m_recs != null ? m_recs.size() : -1)); return((m_recs != null && index < m_recs.size()) ? m_recs.get(index) : null); } COM: <s> get a particular rec from the list of m recs based on index </s>
funcom_train/46190998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map retrieveAll() throws CannotRetrieveException { try { Properties prop = new Properties(); FileInputStream fis = new FileInputStream(file); prop.load(fis); fis.close(); return filterLoadedValues(prop); } catch (IOException e) { throw new CannotRetrieveException(e, "Unable to load from file: " + file.getAbsolutePath()); } } COM: <s> gives back the map in last known state </s>
funcom_train/10522512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testXmlText() throws Exception { DataHandler dataHandler = client.getXmlText(); assertNotNull(dataHandler); assertEquals("text/xml", dataHandler.getContentType()); String content = (String) dataHandler.getContent(); assertEquals("<user><name>Fred</name></user>", content); } COM: <s> test for datahandler which contains xml text </s>
funcom_train/47307881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHealth(int health) { this.health = health; // Leave logic of "what happens when we // reach health of below zero" and "is this // a new maximum health" to the two other // functions, so we don't duplicate // code increaseHealth(0); decreaseHealth(0); } COM: <s> sets ships health to a exact amount </s>
funcom_train/14063931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeTab(Tab tab) { if (tab != null && tab.getTabbedPanel() == this) { if (getSelectedTab() != tab) { tab.setTabbedPanel(null); } else { removingSelected = true; } draggableComponentBox.removeDraggableComponent(tab.getDraggableComponent()); } checkIfOnlyOneTab(false); } COM: <s> removes a tab </s>
funcom_train/31887138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateToString(int semitones) { int splitPos = (semitones % 12) * 3; splitPos = splitPos < 0 ? splitPos + 36 : splitPos; String shiftedString = mKeyString.substring(splitPos); shiftedString += mKeyString.substring(0, splitPos); toKeyField.setText(shiftedString); } COM: <s> rotate the string that represents the transposed keys </s>
funcom_train/40613855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prepareExpression(Session session) { if (defaultExpression != null) { computeTableFilter = new TableFilter(session, table, null, false, null); defaultExpression.mapColumns(computeTableFilter, 0); defaultExpression = defaultExpression.optimize(session); } } COM: <s> prepare all expressions of this column </s>
funcom_train/7341835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrentDataSourceName(String currentDataSourceName) { if (dataSourceMap.containsKey(currentDataSourceName)) { this.currentDataSourceName = currentDataSourceName; } else { throw new SqlMapException("Could not set current DataSource. Invalid name '" + currentDataSourceName + "'. "); } } COM: <s> setter for the current data source </s>
funcom_train/46608842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setPropertiesFromAttributes(AttributeSet attr) { if (attr != null) { Font newFont = (Font)attr.getAttribute(Constants.ATTRIBUTE_FONT); if (newFont != null) { setFont(newFont); }else { //the font is the most important for us throw new IllegalStateException("Font can not be null !"); } setForeground((Color)attr.getAttribute(Constants.ATTRIBUTE_FOREGROUND)); setFontVariant((String) attr.getAttribute(Constants.ATTRIBUTE_FONT_VARIANT)); setTextDecoration((List<TextDecoration>) attr.getAttribute(Constants.ATTRIBUTE_TEXT_DECORATION)); } } COM: <s> sets the properties from the attributes </s>
funcom_train/42271598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsKey(Object key) { HashtableEntry tab[] = table; int hash = key.hashCode(); int index = (hash & 0x7FFFFFFF) % tab.length; for (HashtableEntry e = tab[index] ; e != null ; e = e.next) { if ((e.hash == hash) && e.key.equals(key)) { return true; } } return false; } COM: <s> tests if the specified object is a key in this hashtable </s>
funcom_train/21018273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean hasBehindLastElementIndex() { boolean result = false; boolean nextHasElements = false; boolean hasElements = (getControlledElementCount() > 0); if (_nextArea != null) { if (_nextArea.getControlledElementCount() > 0) { nextHasElements = true; } } if ((_previousArea == null) && !nextHasElements) { result = true; } if (hasElements && !nextHasElements) { result = true; } return result; } COM: <s> tests whether this text area has the extra index behind the last element </s>
funcom_train/31539172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void boot() throws Exception { System.setProperty("program.name", "JavaArena"); this.log.info( "JavaArena ver: " + userOptions.getProperty("buildversion") ); String homeDir = new File(Main.class.getProtectionDomain().getCodeSource().getLocation().getFile()).getParentFile().getAbsolutePath(); userOptions.setProperty("homedir", homeDir); startJavaArenaGame(); } COM: <s> starting the java arena engine </s>
funcom_train/24150765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(PortletConfig config) throws PortletException { super.init(config); log.debug("Entering init"); try { accountService = (AccountRequestService) createPortletService(AccountRequestService.class); } catch (PortletServiceException e) { throw new PortletException("Unable to initialize Service: " + e.getMessage()); } DEFAULT_VIEW_PAGE = NEW_REQUEST_PAGE; log.debug("Exit init"); } COM: <s> initializes services to be used in portlet </s>
funcom_train/34580570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getLgLoadCommand () { if (lgLoadCommand == null) {//GEN-END:|89-getter|0|89-preInit // write pre-init user code here lgLoadCommand = new Command (lang.getProperty("command.load"), Command.OK, 0);//GEN-LINE:|89-getter|1|89-postInit // write post-init user code here }//GEN-BEGIN:|89-getter|2| return lgLoadCommand; } COM: <s> returns an initiliazed instance of lg load command component </s>
funcom_train/17997775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FolderEntry loadFolderEntry(Long parentFolderId, Long entryId, Long zoneId) throws DataAccessException,NoFolderEntryByTheIdException { long begin = System.nanoTime(); try { return loadEntry(parentFolderId, entryId, zoneId); } finally { end(begin, "loadFolderEntry(Long,Long,Long)"); } } COM: <s> load 1 folder entry </s>
funcom_train/34558126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addImageOverlay(final String id, final String imageURL, final int opacity, final double west, final double south, final double east, final double north) { if (!mapRendered) { addListener(MAP_RENDERED_EVENT, new Function() { public void execute() { doAddImageOverlay(id, imageURL, opacity, west, south, east, north); } }); } else { doAddImageOverlay(id, imageURL, opacity, west, south, east, north); } } COM: <s> layers an georeferenced image over the map </s>
funcom_train/8012858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteRowBean(int row) throws DataStoreException { try { Object bean = getBean(row); if (bean != null) { Method remove = bean.getClass().getMethod("remove", null); remove.invoke(bean, null); } } catch (Exception e) { throw new DataStoreException(getCause(e).getMessage()); } if (!deleteRow(row)) throw new DataStoreException( "Row was deleted on database but the presentation row could not be deleted."); } COM: <s> delete a row and its associated bean </s>
funcom_train/4306581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawRect(int x, int y, int w, int h) { fillRect(x, y, w, 1); fillRect(x, y + h - 1, w, 1); fillRect(x, y, 1, h); fillRect(x + w - 1, y, 1, h); } COM: <s> draws a rectangle using the current color </s>
funcom_train/51358558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void autoSet(int x, int y, int dx, int dy, byte[] array) { if (valid(x + dx, y + dy)) { //Find the first empty spot in the array for (int i = 0; i < 8; i++) { if (array[i] == -1) { array[i] = convert(x + dx, y + dy) ; return; } } } } COM: <s> autosets a square to the byte array if it is a valid square </s>
funcom_train/18272148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Order nextOrder() { Order order = new Order(); try { double pref = this.productPreference.draw(); int preference = (int) Math.round(pref * (this.productTypeNames.length-1)); String productTypeName = this.productTypeNames[preference]; ProductType productType = World.world.getProductTypes().get( productTypeName); order.setProductType(productType); } catch (Exception exception) { exception.printStackTrace(); System.exit(1); } // We assume only whole numbers for now: int quantity = (int) this.quantityPreference.draw(); order.setQuantity(quantity); return order; } COM: <s> generates the next order </s>
funcom_train/8053415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { AbstractButton abstractButton = (AbstractButton) e.getSource(); boolean selected = abstractButton.getModel().isSelected(); if (abstractButton.getActionCommand() == "toilet") { this.poiFactory.setToiletsVisible(selected); this.updatePois(); } else if (abstractButton.getActionCommand() == "restaurant") { this.poiFactory.setRestaurantsVisible(selected); this.updatePois(); } } COM: <s> responds to the togglebuttons in the legendview </s>
funcom_train/777481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNullExpectedMessage() { try { new UnitTestBehaviour( jademxAgent, null, aclMessage, duration, properties); fail("failed to catch null expected message passed to UnitTestBehaviour constructor"); } catch ( IllegalArgumentException iae ) { assertTrue(true); } } COM: <s> test for expected exception when passing null expected message to constructor </s>
funcom_train/37075436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector findLeafFeatures(Vector features) { Vector sets = new Vector(); for (int i=0; i < features.size() ;i++) { SeqFeatureI sf = (SeqFeatureI) features.elementAt(i); addLeafFeats (sf, sets); } return sets; } COM: <s> creates vector of all leaf descendants of feats in features </s>
funcom_train/47184079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean undeclareHCP(long pid, long hcpID) throws DBException { Connection conn = null; PreparedStatement ps = null; try { conn = factory.getConnection(); ps = conn.prepareStatement("DELETE FROM DeclaredHCP WHERE PatientID=? AND HCPID=?"); ps.setLong(1, pid); ps.setLong(2, hcpID); return 1 == ps.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } COM: <s> undeclare an hcp for a given patient </s>
funcom_train/26276739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _removeCellButton_actionPerformed(ActionEvent e) { int selectedRow = this.directoryMappingsTable.getSelectedRow(); if (selectedRow != -1) { ftraq.settings.LgDirectoryMap selectedMap = this._lgSettings.getAllDirectoryMappings()[selectedRow]; this._lgSettings.removeDirectoryMapping(selectedMap); this._updateValuesFromLgSettings(); } } COM: <s> called when the remove mapping button is clicked </s>
funcom_train/22159829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getGroupMembershipInterval() { // Section 8.4. of RFC3376 defines the Group Membership Interval as // ((the Robustness Variable) times (the Query Interval)) plus (one Query Response Interval) // Default value is 2 x 125 + 10 -> 260 sec. return robustnessVariable * (queryInterval * 1000) + (config.getQueryResponseInterval() * 100); } COM: <s> returns the current group membership interval </s>
funcom_train/12782519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAll(BitVectorVariable other) { if (other == null) { throw new IllegalArgumentException("null other"); } if (V == null) { copyState(other); } else { if (other.V != null) { V.addAll(other.V); } } } COM: <s> add all the bits from other to this bit vector </s>
funcom_train/18899423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { //copy the answer too Answer answerClone = (Answer)this.answer.clone(); //reset the original Answer try { answerClone.beforeFirst(); return new AnswerWrapperRemoteAnswerSerialised(answerClone); } catch (TuplesException tuplesException) { throw new RuntimeException(tuplesException); } catch (RemoteException remoteException) { throw new RuntimeException(remoteException); } } COM: <s> returns a copy of this object </s>
funcom_train/25056673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void spinOffInternalEntityImport() { if (dmaArgs.doInternalEntityImport()) { internalEntityImporterThread = new DmaThreads("Internal Sequence Import", InternalSequenceSQLImporter.class.getName(), this, false, false); internalEntityImporterThread.execute(); } } COM: <s> spin off import of internal entities from internal entity scratch table </s>
funcom_train/45452431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnconstrainedConstructorAccessors() throws Exception { String unconstrainedAnswer = "Test answer"; AnswerValue testAnswerValue = new AnswerValue(unconstrainedAnswer); assertNotNull("Unable to create unconstrained answer value", unconstrainedAnswer); assertEquals("Unconstrained answer value inconsistent", unconstrainedAnswer, testAnswerValue .getUnconstrainedValue()); } COM: <s> test creating an unconstrained answer value and using its accessors </s>
funcom_train/28662865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Path path) { currentPath = path; Display display = Display.getDefault(); // Object object = new Object(); // object.toString(); display.asyncExec(new Runnable() { public void run() { solution1.setText(ViterbiComposite.this.currentPath.getPlain1()); solution2.setText(ViterbiComposite.this.currentPath.getPlain2()); } }); } COM: <s> receives the current best viterbi path and shows it in the text fields </s>
funcom_train/31147147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int dequeue(List list, int maxElements) { if (numRegistered() == 0) return 0; if ((ready_size == 0) || (ready_offset == ready_size)) { doPoll(0); } if (ready_size == 0) return 0; int numtoret = Math.min(ready_size - ready_offset, maxElements); for (int i = 0; i < numtoret; i++) { list.add(new NIOSelectorQueueElement(ready[ready_offset++])); } return numtoret; } COM: <s> dequeues at most tt max elements tt elements which are ready from the </s>
funcom_train/40797059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(BundleContext bc) { this.bc = bc; // Get config Hashtable p = new Hashtable(); p.put(Constants.SERVICE_PID, getClass().getName()); bc.registerService(ManagedService.class.getName(), this, p); } COM: <s> called by the framework when this bundle is started </s>
funcom_train/35442848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEnroqueLargo() { System.out.println("enroqueLargo"); Partida partida = null; Fide instance = new Fide(); int[] expResult = null; int[] result = instance.enroqueLargo(partida); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of enroque largo method of class controller </s>
funcom_train/5079368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsPoint(int x, int y) { if (isOpaque()) return super.containsPoint(x, y); Point pt = Point.SINGLETON; pt.setLocation(x, y); translateFromParent(pt); for (int i = 0; i < getChildren().size(); i++) { IFigure child = (IFigure)getChildren().get(i); if (child.containsPoint(pt.x, pt.y)) return true; } return false; } COM: <s> overridden to implement transparent behavior </s>
funcom_train/23731152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchAllRoutes(){ Cursor mCursor = mDb.query(true, DATABASE_TABLE, new String[] { KEY_ROWID, KEY_SHEEPID, KEY_LAT, KEY_LON, KEY_TIMESTAMP, KEY_ROUTE_ID, KEY_ROUTE_DESC }, null , null, KEY_ROUTE_ID, null, null, null); if (mCursor != null) { mCursor.moveToFirst(); } return mCursor; } COM: <s> return a cursor over the list of all routes in the database </s>
funcom_train/3652602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDefaultWindowTitle() { int numUntitled = 0; for (int ii = 0; ii < openWins.size(); ii++) { // TODO internationalize this string Window win = (Window)openWins.get(ii); if (win.getTitle().startsWith("Untitled-")) { numUntitled++; } } return "Untitled-" + (numUntitled + 1); } COM: <s> gets the default title to use if a window component does </s>
funcom_train/1553890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initGeoTables() { geoTable.clear(); geoCasCellTable = null; localVariableTable = null; // add axes labels both in English and current language geoTable.put("xAxis", xAxis); geoTable.put("yAxis", yAxis); if (xAxisLocalName != null) { geoTable.put(xAxisLocalName, xAxis); geoTable.put(yAxisLocalName, yAxis); } } COM: <s> make geo table contain only x axis and y axis </s>
funcom_train/48497559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void switchFirstLineSupport (int product_id, boolean switchOnOff) { // First switch on/off the first line support team SupportTeamDAO dao = new SupportTeamDAO (); dao.switchSupportTeam(switchOnOff, product_id, 1); // Then switch off the second line support if (!switchOnOff) dao.switchSupportTeam(switchOnOff, product_id, 2); } COM: <s> switch on off the first line support team of a product </s>
funcom_train/13803267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Coordinates midpoint(Coordinates other) { double midX = (this.getX() + other.getX()) / 2.0; double midY = (this.getY() + other.getY()) / 2.0; double midZ = (this.getZ() + other.getZ()) / 2.0; Coordinates midpoint = new Coordinates(midX, midY, midZ); return midpoint; } COM: <s> returns a point halfway between this point and another point </s>
funcom_train/13490849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propagateSupportedSolutions() { if (supportedSolutions != null && parent != null) { for (int i = 0; i < supportedSolutions.length(); i++) { if (supportedSolutions.get(i)) { parent.setSupported(i); if (LOG_IE_STEP.isDebugEnabled()) LOG_IE_STEP.debug("propagate supported result index " + i + " in " + this); } } parent.propagateSupportedSolutions(); } } COM: <s> propagate supported solutions to the parent node </s>
funcom_train/49196844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTemplatePathPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TemplateFile_templatePath_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TemplateFile_templatePath_feature", "_UI_TemplateFile_type"), GenmodelPackage.Literals.TEMPLATE_FILE__TEMPLATE_PATH, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the template path feature </s>
funcom_train/16676585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void show() { shell.open( ); shell.forceFocus( ); logClass.info(Constants.LINE_SEPARATOR + I18n.getString("Application.log.xirpStarted", Constants.NON_UNICODE_APP_NAME) + Constants.LINE_SEPARATOR); //$NON-NLS-1$ if (Variables.NO_PROFILES_LOADED) { ApplicationManager.showNewProfileDialog( ); shell.close( ); } ApplicationManager.contentChanged( ); } COM: <s> opens the application and tries to get the focus </s>
funcom_train/26382459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void write(int ch) { //System.out.println("Write: " + ch); buffer.append((char) ch); /* byte[] ba = buffer.toString().getBytes(); for (int i = 0; i < ba.length; i++) { System.out.print((int) ba[i]); System.out.print(" "); } System.out.println(""); */ } COM: <s> buffer up a single byte to send </s>
funcom_train/42268874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendInfo() { List<Long> newTagsIdList = view.getSelectedTagsId(); //add the rpc result in currentPage if(newTagsIdList != null) this.currentPage.setTagsId(newTagsIdList); //send info this.eventBus.sendInfo(this.currentPage); //hide all help field this.view.hideAllHelpField(); //set title view.setTitle(this.currentPage.getUrlName()); } COM: <s> this methods was called in save dependent tags </s>
funcom_train/12568493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate(Object command, Errors errors) { IBooking booking = (IBooking)command; checkRequiredString(booking.getBeginDate(), "beginDate", errors); checkRequiredString(booking.getFinishDate(), "finishDate", errors); isEndGreatBegin(booking, errors); isBeginBeforeToday(booking , errors); } COM: <s> this method validates required fields for booking such as begin date </s>
funcom_train/35036305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createAndExportRemoteListener() { try { // Get the session manager instance if (this.remoteListener == null) { this.remoteListener = new JNZBRemoteAgentListener(this); } // Create the RMI directory createRMIDirectory(); // Bind the session manager into the directory. bindSessionManager(); } catch (RemoteException rex) { rex.printStackTrace(); } catch (MalformedURLException e) { e.printStackTrace(); } } COM: <s> obtains the remote session manager object and exports it ready for remote </s>
funcom_train/21961739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean processDrop(DropTargetEvent event) { newResources = new Vector(); boolean handled = false; if(ClipboardHandler.TRANSFER.isSupportedType(event.currentDataType)){ if(canHandleObject(event.data)){ handleResource((Resource)event.data); handled = true; } } if(handled); // do nothing else if(TextTransfer.getInstance().isSupportedType(event.currentDataType)){ handleString((String)event.data); } else if(FileTransfer.getInstance().isSupportedType(event.currentDataType)){ handleFiles((String [])event.data); } else return false; openResources(); return true; } COM: <s> this method checks the kind of object being dropped in the pliny environment </s>
funcom_train/42897216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPermission(String label, String accountId, String action) throws SQSException { Map<String, String> params = new HashMap<String, String>(); params.put("Label", label); params.put("AWSAccountId", accountId); params.put("ActionName", action); HttpGet method = new HttpGet(); AddPermissionResponse response = makeRequestInt(method, "AddPermission", params, AddPermissionResponse.class); } COM: <s> adds a permission to this message queue </s>
funcom_train/7959785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void installSplitContainerSettings(){ UIManager.put("DockingSplitPaneUI", "com.vlsolutions.swing.docking.ui.DockingSplitPaneUI"); UIManager.put("SplitContainer.dividerSize", new Integer(4)); UIManager.put("SplitContainer.isResizingEnabled", Boolean.TRUE); //2007/08/11 } COM: <s> installs the splitpanes related properties </s>
funcom_train/300593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void consume() { // remove the source object super.setSource(null); // ask AWTEvent to consume this event super.consume(); // if the consumed flag is not set, set it now. // !! don't know if this is wise !! if ( !super.consumed ) super.consumed = true; } COM: <s> allows listeners to consume this event </s>
funcom_train/12663172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IFrameworkResource getChild(final String name) { if(childCouldBeLoaded(name)) { IFrameworkResource o = loadChild(name); if(null!=o){ return o; } } throw new NoSuchResourceException("Framework resource not found: '" + name +"'" + ". basedir: " + getBaseDir().getAbsolutePath(), this); } COM: <s> gets requested child framework resource </s>
funcom_train/15914537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParseTextHtml() throws Exception { List mrl = MediaRange.parse("text/html"); //System.out.println("mrl: "+MediaRange.toString(mrl)); assertEquals("<media-range><type>text</type><subtype>html</subtype></media-range>",MediaRange.toString(mrl)); } COM: <s> test parsing text html </s>
funcom_train/35724067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tearDown() throws Exception { servletContext = null; config = null; request = null; response = null; locale = null; timeZone = null; ServletContextLocator.set(prevServletContext); RequestLocator.set(prevRequest); ResponseLocator.set(prevResponse); LocaleLocator.set(prevLocale); TimeZoneLocator.set(prevTimeZone); super.tearDown(); } COM: <s> tears down after the test method </s>
funcom_train/1662377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPut() { System.out.println("put"); String uri = "CHK@"; String id = "mytestput"; byte[] data = "I'm but a wee snippet.".getBytes(); instance.put(uri, id, data); myWait(); } COM: <s> test of put method of class org </s>
funcom_train/39385759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EnvObject takeFromMe (EnvObject thisObject ) { if(thisObject == null){ if(getRange() > -1 && getSize() == Globals.Size.Small){ return this; } else{ return null; } } else if( getProvides().contains(thisObject) ){ getProvides().remove(thisObject); return thisObject; } else{ return null; } } COM: <s> returns either null if you cannot take the object from this env object </s>
funcom_train/1923676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void build(ExcelBuilderArgs args) { //sort the worksheets Collections.sort(getWorksheets()); for (Worksheet worksheet : getWorksheets()) { //create a worksheet WritableSheet sheet = args.getWorkbook().createSheet(worksheet.getName(), worksheet.getOrder()); //add it to args as the current sheet args.setWorksheet(sheet); //build a worksheets worksheet.build(args); } } COM: <s> builds an excel workbook based on the given stream rendering args </s>
funcom_train/49405389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeWorst(Probability factor){ if (entries.size() < 2){ return; } Set<Probable<T>> toBeRemoved = new HashSet<Probable<T>>(); double limit = getBest() * factor.getDouble(); for (Probable<T> current : entries) { if (current.getProbability().getDouble() < limit){ toBeRemoved.add(current); } } entries.removeAll(toBeRemoved); } COM: <s> removes all entries that have less than half probability than best </s>
funcom_train/2956153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void changeGoal(AbstractIntBranching branching) { branching.setSolver(this); if (slave) currentCtx = null; traceStack = new IntBranchingTrace[solver.getNbBooleanVars() + solver.getNbIntVars() + solver.getNbSetVars()]; currentTraceIndex = -1; mainGoal = branching; nextMove = INIT_SEARCH; } COM: <s> change the goal of the search solver called when one want to solve </s>
funcom_train/49825208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getBirthday() { if (this.birthday.isEmpty() || this.birthday.equals("") || this.birthday == null || this.birthday.equals("0000-00-00")) { Debug.print("Birthday in DB is Empty, returning default"); return "1970-01-01"; } else { return this.birthday; } } COM: <s> gets the persons birthday </s>
funcom_train/34068210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setValueReflection(Object value) { try { Field field = targetObject.getClass().getField(targetField); if (value instanceof Integer) { field.setInt(targetObject, (Integer) value); } else { if (value instanceof Boolean) { field.setBoolean(targetObject, (Boolean) value); } else { field.set(targetObject, value); } } } catch (NoSuchFieldException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } } COM: <s> sets the value of the bound property to the specified value </s>
funcom_train/3124225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void callDirectoryChooser(String initDir){ String returnDir = new String(initDir); localFileChooser = new JFileChooser(currentThemeCollection.getThemeDir()); localFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); localFileChooser.addActionListener(this); localFileChooser.setControlButtonsAreShown(true); localFileChooser.showDialog(null, "Select"); } COM: <s> lets the user choose the proper start directory </s>
funcom_train/26610982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String processTemplate () { String output = ""; List input = getInputNodes (); // Only instantiate VelocityRunner if _foundVelocity is true. // This makes it possible to run VelocityProcessor without // Velocity, and not throw a ClassNotFoundException to the // client code. VelocityRunner runner = new VelocityRunner(); output = runner.processTemplate (_template, input); return output; COM: <s> have enough input data so process template </s>
funcom_train/17850872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setSearchText(final String text) { mWasChanged = !mListEntry.getSearchText().equals(text) || mListEntry.isCaseSensitive() != mNewCaseSensitve; mNewSearchText = text; if(mWasChanged) { mLastMatchedDate = null; } else { mLastMatchedDate = mListEntry.getLastMatchedDate(); } } COM: <s> sets the new search text </s>
funcom_train/9990598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean has(String name) { for (int i = scopeIndex; i >= 0; i--) { Scope scope = scopes[i]; if (scope.contains(name)) { return true; } } if (Scope.BUILTIN.contains(name)) { return true; } return typeOf(name) != null; } COM: <s> return true if argument is defined </s>
funcom_train/7523104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean iWouldBeCoordinator(Vector new_mbrs) { Membership tmp_mbrs=gms.members.copy(); tmp_mbrs.merge(new_mbrs, null); tmp_mbrs.sort(); return !(tmp_mbrs.size() <= 0 || gms.local_addr == null) && gms.local_addr.equals(tmp_mbrs.elementAt(0)); } COM: <s> returns potential coordinator based on lexicographic ordering of member addresses </s>
funcom_train/37780205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GridModel getRolesGridWM() { GridModel w_rolesGrid = (GridModel) getWidgetCache().getModel("rolesGrid"); if (w_rolesGrid == null) { w_rolesGrid = initRolesGrid(); getWidgetCache().addModel("rolesGrid", w_rolesGrid); } return w_rolesGrid; } COM: <s> getter for property user id </s>
funcom_train/41450710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clean() { this.sipApplicationSessionAttributeListeners.clear(); this.sipApplicationSessionBindingListeners.clear(); this.sipApplicationSessionActivationListeners.clear(); this.sipApplicationSessionListeners.clear(); this.sipSessionActivationListeners.clear(); this.sipSessionAttributeListeners.clear(); this.sipSessionBindingListeners.clear(); this.sipSessionListeners.clear(); this.sipServletsListeners.clear(); this.sipErrorListeners.clear(); this.servletContextListeners.clear(); this.sipConnectorListeners.clear(); this.proxyBranchListeners.clear(); this.listenerServlets.clear(); this.timerListener = null; } COM: <s> empty vectors to allow garbage collection </s>
funcom_train/32740879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Responder getResponder(String code) { String suffix = getSuffixes(code)[0]; String parentSuffix = getSuffixes(code)[1]; if (suffix != "") { code = code.substring(0, code.indexOf(suffix)); } return cacheManager.getResponder(code, suffix, parentSuffix); } COM: <s> returns a responder based on its code </s>
funcom_train/22403075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GamePoint XYtoRowColumn(int x, int y) { int nRows = getPloyBoard().getRowCount(); int nCols = getPloyBoard().getColumnCount(); for (int r = 1; r <= nRows; r++) { for (int c = 1; c <= nCols; c++) { if (gamePointToRectangle(c, r).contains(x, y)) { return new GamePoint(c, r); } } } return null; } COM: <s> convert a position in coordinates to the row column </s>
funcom_train/19381076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getWindowsOptions() { String options = sound + samples + samplefreq + volume + resamplefilter + autoframeskip + frameskip + window + throttle + scanlines + effect + gamma + brightness + artwork + backdrop + overlay + bezel + artworkresolution + crop + rotate + autoror + autorol + ror + rol + flipx + flipy + joystick + steadykey + keyboardleds + mouse + ctrlr + beam + flicker + intensity + antialias + translucency + cheat; return options; } COM: <s> this method returns windows options </s>
funcom_train/41163578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoParagraphCheckList3 entity) { EntityManagerHelper.log("deleting CoParagraphCheckList3 instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoParagraphCheckList3.class, entity.getCheckListId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co paragraph check list3 entity </s>
funcom_train/23271315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setXAxisGridlinesVisible(boolean visible) { XYPlot plot = (XYPlot) this.chart.getPlot(); if (plot != null) { boolean old = plot.isDomainGridlinesVisible(); plot.setDomainGridlinesVisible(visible); firePropertyChange("xAxisGridlinesVisible", old, visible); } } COM: <s> sets a flag that controls whether or not the x axis gridlines are </s>
funcom_train/50892477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStringFieldPlainValue() throws Exception { String testValue = "Hello \\'Master\\', whassup"; StringField field = new StringField(testValue); String result = field.getValue(); String CORRECT = "Hello 'Master', whassup"; assertEquals("String must not have escape chars.", CORRECT, result); } COM: <s> test if the value is always returned without </s>
funcom_train/12155531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMoveOriginatorAETitle() { logger.debug("Entering getMoveOriginatorAETitle()."); String moveOriginatorAETitle = moveOriginatorAETitleTextField.getText(); if (logger.isDebugEnabled()) { logger.debug("Exiting getMoveOriginatorAETitle(); RV = " + (moveOriginatorAETitle != null ? "\"" + moveOriginatorAETitle + "\"" : null) + "."); } return moveOriginatorAETitle; } COM: <s> gets the quot move originator enabled quot text field value in </s>
funcom_train/33233002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* public void MoveCard(Card crd,int fromDeck,int toDeck) { ((Deck)Decks.get(fromDeck)).removeCard(crd); crd.setDeckID(toDeck); ((Deck)Decks.get(toDeck)).addCard(crd); changed(); } COM: <s> use this method to move a card from one deck to another </s>
funcom_train/6202574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateTagValidationPreferences() { UIThreadsUtil.mustBeSwingThread(); parent.commitAndDeactivate(); //nothing special to do: tags/placeholders are determined by segment builder and info is passed as argument to getattributeSet. if (Core.getProject().isProjectLoaded()) { parent.loadDocument(); parent.activateEntry(); } } COM: <s> repaint segments in editor according to new view tag validation options </s>
funcom_train/46457446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void refresh() { CheckTreeSelectionModel checkModel = checkManager.getSelectionModel(); selectionPaths = checkModel.getSelectionPaths(); okButton.setEnabled(!checkModel.isSelectionEmpty()); undoButton.setEnabled(undoManager.canUndo()); redoButton.setEnabled(undoManager.canRedo()); } COM: <s> refreshes the buttonbar </s>
funcom_train/47450303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parser(Model model, File file) throws SAXException, IOException { Model parsedModel = parser.parse(file); // TODO Doing the update the easy way (for now) model.setProfiles(parsedModel.getProfiles()); model.setPackages(parsedModel.getPackages()); model.setApplications(parsedModel.getApplications()); model.setValidationExceptions( parsedModel.getValidationExceptions() ); } COM: <s> parse a xmi file and fill a model </s>
funcom_train/894973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getRemoveButton() { if (removeButton == null) { removeButton = new JButton(); removeButton.setText("-"); removeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { // TODO: multiselect int selected = ClassEditor.this.interfaceList.getSelectedIndex(); ClassEditor.this.interfaceModel.remove(selected); } }); } return removeButton; } COM: <s> this method initializes remove button </s>
funcom_train/9557254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeContact(long cId) throws InvalidContactException{ // System.out.println("RemoveContact"); /*znajdz kontakt w uptodate lub edited * przenies do deleted*/ if (!contactExists(cId)) throw new InvalidContactException(); Contact tmp = (Contact) contactsUpToDate.get(new Long(cId)); contactsToDelete.add(tmp); contactsUpToDate.remove(new Long(cId)); } COM: <s> removes contact from address book and also from all groups it was in </s>
funcom_train/20603891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUID() throws Exception { String strUID = null; // method used to initialize the system params initParams(); //Ticket ticket = getHome(CONTEXT_FACTORY, PROVIDER_URL).create(); strUID = (new UID()).toString();//ticket.getUdiString(APPLICATION_NAME, "", SCHEMA_NAME, YEAR); if (strUID.startsWith("ERR_")) { throw new Exception ("Error generating the UID: " + strUID); } return strUID; } COM: <s> make a request to get an uid from the bean </s>
funcom_train/47434338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init(Object value, String type, Class typeClass) { if (value != null) { this.value = value; this.type = type; this.typeClass = typeClass; } else { this.value = null; this.type = T_null; this.typeClass = null; } this.textModelMapping = createTextModelMapping(); this.textTemplateElementMapping = createTextTemplateElementMapping(); } COM: <s> updates value type and class </s>
funcom_train/44170634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNation(Nation newNation) { Nation oldNation = getNation(); nationID = newNation.getId(); getGame().getNationOptions().getNations().put(newNation, NationState.NOT_AVAILABLE); getGame().getNationOptions().getNations().put(oldNation, NationState.AVAILABLE); } COM: <s> sets the nation for this player </s>
funcom_train/32056825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testActionPerformed() { System.out.println("testActionPerformed"); ActionEvent e = new ActionEvent(new Object(),ActionEvent.ACTION_PERFORMED,"command"); GPGraphpad gp = new GPGraphpad(); FileOpen fo = new FileOpen(gp); fo.actionPerformed(e); } COM: <s> tests action performed method of class file open </s>
funcom_train/45249726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void layoutCenter() { if (centerComposite != null) { // The center is the 'inner' bounding box of the other trim areas Rectangle areaBounds = new Rectangle( leftTrimArea.areaBounds.x + leftTrimArea.areaBounds.width, topMax, clientRect.width - (leftTrimArea.areaBounds.width + rightTrimArea.areaBounds.width), clientRect.height - (topMax + bottomTrimArea.areaBounds.height)); centerComposite.setBounds(areaBounds); } } COM: <s> lays out the center composite once the outer trim areas have all been </s>