__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/34586433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJSummaryButton() { if (jSummaryButton == null) { jSummaryButton = new JButton(); jSummaryButton.setText("Summary"); jSummaryButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent e) { getSummary();// TODO Auto-generated Event stub mouseClicked() } }); } return jSummaryButton; } COM: <s> this method initializes j summary button </s>
funcom_train/13994673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeMenuItems(InternalFrame frame) { menuBar.remove(frame.getSystemMenu()); Component[] menuBarItems = frame.getMaxItems(); for (int i = 0; i < menuBarItems.length; i++) { menuBar.remove(menuBarItems[i]); } menuBar.validate(); } COM: <s> removes the system menu and the buttons for code frame code from the </s>
funcom_train/38467489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeConnection(Connection connection) { try { logger.entering("closeConnection()", "ConnectionResource"); logger.fine("close connection called"); if (connection != null) { connection.close(); } } catch (SQLException sqle) { logger.info(sqle.getMessage()); } logger.exiting("closeConnection()", "ConnectionResource"); } COM: <s> method close connection closes the specified database connection </s>
funcom_train/8420648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Book getSuggestedBible() { CurrentPageManager currentPageManager = ControlFactory.getInstance().getCurrentPageControl(); Book currentBible = currentPageManager.getCurrentBible().getCurrentDocument(); Key requiredVerse = getRequiredVerseForSuggestions(); return getSuggestedBook(SwordDocumentFacade.getInstance().getBibles(), currentBible, requiredVerse, currentPageManager.isBibleShown()); } COM: <s> suggest an alternative bible to view or return null </s>
funcom_train/26416046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getInputStreamExpiration() { long actualReqExp = -1; if (requestor != null) { actualReqExp = requestor.getExpires(this); } if (actualReqExp == -1) { if (requestExpires == -1) { actualReqExp = 0; } else { actualReqExp = requestExpires; } } return actualReqExp; } COM: <s> returns the date the code input stream code expires </s>
funcom_train/49608972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getGuests() throws Throwable { EntityManager em = null; try { ListCommand lc = ExtUtils.getListCommand(Person.class,this); em = EntityManagerProvider.getInstance().getEntityManager(); ListResponse res = BusinessObjectsFacade.getInstance().getGuestsBO().getGuests(username, em, lc); ExtUtils.sendListResponse(res,this); } catch (Throwable ex) { ExtUtils.sendErrorResponse(ex.getMessage(), response); throw ex; } finally { if (em!=null) EntityManagerProvider.getInstance().releaseEntityManager(em); } } COM: <s> return a list of person objects encoded in json format related to guests </s>
funcom_train/4014319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseDate() { if (getText() == null || getText().trim().length() == 0) { selectedDate = null; } else { try { Date parsedDate = dateFormatter.parse(getText()); if (canBeSelected(parsedDate)) selectedDate = parsedDate; } catch (IllegalArgumentException e) { // Do something ? } } synchronizeFromDate(); } COM: <s> parse the date entered in the date picker </s>
funcom_train/2380439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setupRefreshTimer() { _timer = new Runnable() { public void run() { if(!getTree().isDisposed()) { // this is important! refresh(); Display.getDefault().timerExec(TIMERDELAY, this); // run again } } }; Display.getDefault().timerExec(TIMERDELAY, _timer); } COM: <s> set up the refresh timer </s>
funcom_train/32941382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ModelAndView processPauseQueue(HttpServletRequest aReq, HttpServletResponse aResp, ManageHarvestAgentCommand aCmd, BindException aErrors) throws Exception { harvestCoordinator.pauseQueue(); ModelAndView mav = new ModelAndView(); mav.addObject(ManageHarvestAgentCommand.MDL_HARVEST_AGENTS, harvestCoordinator.getHarvestAgents()); mav.setViewName(Constants.VIEW_MNG_AGENTS); return mav; } COM: <s> process the halt scheduled and queued harvests action </s>
funcom_train/27721402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setSelectedType(ButtonGroup buttonGroup, String typeName) { JRadioButtonType radioButton; Enumeration eTypes = buttonGroup.getElements(); while (eTypes.hasMoreElements()) { radioButton = (JRadioButtonType)eTypes.nextElement(); if (typeName.equalsIgnoreCase(radioButton.getName())) { radioButton.setSelected(true); break; } } } COM: <s> ser the selected type </s>
funcom_train/27751988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Set getRunningHTTPReceivers() throws XException { TreeSet returnSet = new TreeSet(); for (Iterator it = getAllHTTPReceivers().iterator(); it.hasNext();) { Object stoppedHTTPReceiver = it.next(); if (!mStoppedHTTPReceivers.contains(stoppedHTTPReceiver)) { returnSet.add(stoppedHTTPReceiver); } } return returnSet; } COM: <s> returns a set with the names of all running httpreceivers </s>
funcom_train/39896469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node matchingSon(Item item) { if (item == null) throw new IllegalArgumentException("Invalid 'null' argument"); DecisionTree tree = tree(); if (tree == null) throw new CannotCallMethodException("The node is not attached to " + "a tree"); return matchingSon(item.valueOf(tree.getAttributeSet(), test.attribute)); } COM: <s> returns the son matching an item given this nodes test </s>
funcom_train/22428573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getText(Element element) { if (element == null) { return ""; } for (int i=0; i<element.getChildNodes().getLength(); i++) { Node node = element.getChildNodes().item(i); if (node.getNodeType() == Node.TEXT_NODE) { return node.getNodeValue(); } } return ""; } COM: <s> get the text in text node from the element </s>
funcom_train/21437652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Document read(byte[] data) { try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); return builder.parse(new ByteArrayInputStream(data)); } catch(Exception e) { LogUtils.report(e); return null; } } COM: <s> read a dom document from an array of bytes in xml format </s>
funcom_train/19149356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed(MouseEvent e) { int x = ((e.getX()+(myGrid>>1))/myGrid)*myGrid; int y = ((e.getY()+(myGrid>>1))/myGrid)*myGrid; //System.out.println("P: "+x+"/"+y); startX = x; startY = y; } COM: <s> used to draw a new net segment interactive </s>
funcom_train/45251307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveWidgetValues() { IStructuredSelection sel = (IStructuredSelection) viewer.getSelection(); if (sel.size() > 0) { WorkbenchWizardElement selectedWizard = (WorkbenchWizardElement) sel .getFirstElement(); getDialogSettings().put(STORE_SELECTED_WIZARD_ID, selectedWizard.getId()); } } COM: <s> since finish was pressed write widget values to the dialog store so </s>
funcom_train/49200635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addGenFolderPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GenerableItem_genFolder_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GenerableItem_genFolder_feature", "_UI_GenerableItem_type"), TransformedPackage.Literals.GENERABLE_ITEM__GEN_FOLDER, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the gen folder feature </s>
funcom_train/19271023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected NlsTemplate parseTemplate(String internationalizedMessage) { Matcher matcher = TEMPLATE_PATTERN.matcher(internationalizedMessage); if (matcher.matches()) { String name = matcher.group(2); if (name == null) { name = this.bundleName; } String key = matcher.group(3); return new NlsTemplateImpl(name, key); } return null; } COM: <s> this method parses the given code internationalized message code as </s>
funcom_train/38388680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createTreeViewer(Composite parent, boolean useHeightHint) { Tree tree = new Tree(parent, /*SWT.CHECK |*/ SWT.BORDER); GridData data = new GridData(GridData.FILL_BOTH); if (useHeightHint) data.heightHint = PREFERRED_HEIGHT; tree.setLayoutData(data); tree.setFont(parent.getFont()); treeViewer = new CheckboxTreeViewer(tree); treeViewer.setContentProvider(treeContentProvider); treeViewer.setLabelProvider(treeLabelProvider); //treeViewer.set } COM: <s> create this groups tree viewer </s>
funcom_train/810732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_UserParamType_type_feature"), getString("_UI_PropertyDescriptor_description", "_UI_UserParamType_type_feature", "_UI_UserParamType_type"), MzmlPackage.Literals.USER_PARAM_TYPE__TYPE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the type feature </s>
funcom_train/44163535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void abortMission(String why) { if (mission != null) { if (!mission.isOneTime()) { logger.fine("Mission-ABORT " + mission + " (" + why + "): " + getUnit()); } mission.dispose(); this.mission = null; } } COM: <s> aborts a mission </s>
funcom_train/36756466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEquals() { System.out.println("equals"); Object obj = null; Degree instance = null; boolean expResult = true; boolean result = instance.equals(obj); 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 equals method of class csis543 tfinal project </s>
funcom_train/32758891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isReadbackWithinTolerance( final double tolerance ) { final DataTypeAdaptor dataTypeAdaptor = getDataTypeAdaptor(); final Object readback = getLiveReadbackValue(); return ( _setPointChannel == null || dataTypeAdaptor.isWithinTolerance( readback, getLiveSetPointValue(), tolerance ) ) && dataTypeAdaptor.isWithinTolerance( readback, getSavedReadbackValue(), tolerance ); } COM: <s> determine whether the readback live versus saved and setpoint is within tolerance </s>
funcom_train/29801992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteCollection(rKiveCollection c) { // update the library's version rKiveFriend mainuser = rKive.getMainUser(); if(c.getOwner().equals(mainuser.getIdentifier())) updateLibraryVersion(); // call the delete collections function deleteCollections(Integer.parseInt(c.getIdentifier())); commit(); } COM: <s> deletes a collection from the database </s>
funcom_train/16463890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertEquals(String message, Object[] expected, Object[] actual) { assertEquals(message + " (different lengths)", expected.length, actual.length); for (int i = 0; i < actual.length; i++) { assertEquals(message + "(error found at position " + i + ")", expected[i], actual[i]); } } COM: <s> compare the contents of 2 code object code </s>
funcom_train/27758694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumns(int columns) { Insets insets = getInsets(); FontMetrics metrics = getFontMetrics(getFont()); int columnWidth = metrics.charWidth('m'); this.setPreferredSize(new Dimension(columnWidth * columns + insets.left + insets.right, getHeight())); this.columns = columns; } COM: <s> set the number of columns in the text areas </s>
funcom_train/6328845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOptions(boolean add, boolean grp, boolean rvu, boolean rvg) { //enable/disable popup menus this.itemAssignUser.setVisible(add); this.itemCreateGroup.setVisible(grp); this.itemRemoveGroup.setVisible(rvg); this.itemUnassignUser.setVisible(rvu); } COM: <s> this method enables disables the toolbar buttons and popup menus </s>
funcom_train/18022354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int add(double d) { int index = indexOf(d); if (index < 0) { index = ~index; } if (isFull()) { resizeArray(); } if (index != gapStart) { moveGap(index); } array[gapStart] = d; gapStart++; return index; } COM: <s> inserts the double into the list </s>
funcom_train/3117778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateSourceFromModel() { final Control control = (Control)getModel(); final VoiceLayer layer = (VoiceLayer)getLayer(); if (layer == null) { return; } final VoiceControl voiceControl = (VoiceControl)layer.getView(control.getVoiceResponseSource()); setSource((ResponseSource)voiceControl); } COM: <s> updates the source of this response based on the model </s>
funcom_train/9576000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSystemgroupToSystemgroup(java.lang.Integer parentId, com.cs.clinic.ejb.value.SystemgroupData data) { try { SystemgroupLocal parent = SystemgroupUtil.getLocalHome().findByPrimaryKey(parentId); SystemgroupLocal child = SystemgroupUtil.getLocalHome().findByPrimaryKey(data.getId()); parent.getSystemgroups().add(child); child.setSystemgroup(parent); } catch (EJBException e) { LOG.error(e); throw e; } catch (Exception e) { LOG.error(e); throw new EJBException(e); } } COM: <s> adds an systemgroup to an systemgroup </s>
funcom_train/32305011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Tree getRootElement() { // Ensures that the root is a SEQ, and the first instruction is // a SEGMENT. Tree first = (SEQ)this.tree; while(first.kind()==TreeKind.SEQ) first = ((SEQ)first).getLeft(); assert first.kind()==TreeKind.SEGMENT; return this.tree; } COM: <s> returns the root of the tree </s>
funcom_train/28697702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _shake(int width_variance, int height_variance, long duration) { long time = System.currentTimeMillis(); long endTime = time + duration; Random r = new Random(time); while (System.currentTimeMillis() < endTime) { xOffset = r.nextInt(width_variance) - width_variance / 2; yOffset = r.nextInt(height_variance) - height_variance / 2; repaint(); try { Thread.sleep(50); } catch (InterruptedException ie) { return; } } xOffset = 0; yOffset = 0; repaint(); } COM: <s> shakes the panel </s>
funcom_train/3417057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getSimpleBinaryName() { Class<?> enclosingClass = getEnclosingClass(); if (enclosingClass == null) // top level class return null; // Otherwise, strip the enclosing class' name try { return getName().substring(enclosingClass.getName().length()); } catch (IndexOutOfBoundsException ex) { throw new InternalError("Malformed class name"); } } COM: <s> returns the simple binary name of the underlying class i </s>
funcom_train/31414235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractTreeType addChild(AbstractTreeType child) { AbstractTreeType res; if(!getChildren().contains(child)) { getChildren().add(0, child); res = child; addedANode(); } else { int index = getChildren().lastIndexOf(child); res = getChildren().get(index); } return res; } COM: <s> adds a new child tree type </s>
funcom_train/34529970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkPredicates(String[] row, ArrayList<Predicate> predicates) throws DataSourceException { Map<String,String> columns = new HashMap<String, String>(); for (String columnName : allColumnNames) { int idx = dataSetsIdxsAll.get(columnName); columns.put(columnName, row[idx]); String colS = "[" + (idx+1) + "]"; columns.put(colS, row[idx]); } for (Predicate predicate : predicates) { if (!predicate.evaluate(columns)) return false; } return true; } COM: <s> checks whether the spreadsheet row satisfies the predicates </s>
funcom_train/20885299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testComplexFieldCSV() { check(CSV, "valid;;foo", ComplexElementTestDTO.class, VALID); check(CSV, ";valid;foo", ComplexElementTestDTO.class, VALID); check(CSV, ";;foo", ComplexElementTestDTO.class, INVALID); check(CSV, ";;foo", ComplexElementTestDTO.class, VALIDATION_OFF); } COM: <s> tests validation for a complex field value csv </s>
funcom_train/8812403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleApiLoadFailure() { apiLoadFailed = true; if (this.getItemCount() == 0) { add(new Html(I18N.CONSTANTS.cannotLoadMap())); add(new Button(I18N.CONSTANTS.retry(), new SelectionListener<ButtonEvent>() { @Override public void componentSelected(ButtonEvent ce) { createMapIfNeededAndUpdateMapContent(); } })); layout(); } } COM: <s> handles the failure of the google maps api to load </s>
funcom_train/31907254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream openStreamRaw(String [] mimeTypes) throws IOException { List mt = new ArrayList(mimeTypes.length); for (int i=0; i<mimeTypes.length; i++) mt.add(mimeTypes[i]); return data.openStreamRaw(userAgent, mt.iterator()); } COM: <s> attempt to open the stream does no checking for comression </s>
funcom_train/1303993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SegmentSequence split(PatternFinder patternFinder, String text) { SegmentSequence result = null; final NormalizedString nText = patternFinder.normalize(text); final int[] patternPos = patternFinder.findPatternPos(nText, PatternFinder.FULL_WORD); if (patternPos != null) { result = doSplit(patternFinder, nText, patternPos); } return result; } COM: <s> split the text on found patterns and consecutive text around found patterns </s>
funcom_train/39137785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registryDidShutdown() { try { sLog.debug("shutdown scheduler..."); shutdown(); sLog.debug("shutdown done"); } catch (SchedulerException xEx) { sLog.debug("scheduler shutdown failed: " + xEx.getMessage(), xEx); sLog.warn("scheduler shutdown failed: " + xEx.getMessage()); } } COM: <s> notified by hivemind that the registry is being shutdown </s>
funcom_train/4744485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTagsString (int applID){ RunningApplication app = this.runningApplicationsMap.get(applID); String tagsString = ""; if (app.getApplication() != null) { for (Tag tag: app.getApplication().getTags()) { tagsString = tagsString + tag.getTagText() + "; "; } } return tagsString; } COM: <s> extracts the tags fields from an application and orders them to </s>
funcom_train/13938163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double distanceFromVerticiesToRegion(Region2D regionB){ double distance = Double.MAX_VALUE; if(regionB == null){ System.out.println("** BAD NEWS! Null region passed to 'distanceFromVerticiesToRegion' **"); } for(Point2D pt : this.prim2DCycle.getPointList()){ double d = regionB.prim2DCycle.getClosestDistanceToPoint(pt); if(d < distance){ distance = d; } } return distance; } COM: <s> find the closest distance from the vertices of this region2 d </s>
funcom_train/36117365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addNewTenant(TenantBean newTenant) { synchronized (tenantList) { if (!tenantList.contains(newTenant)) { if (tenantList.add(newTenant)) { return true; } else { return false; } } else { System.out.println("The tenant with id :" + newTenant.getTenantId() + "already exist!"); log.error("The tenant with id :" + newTenant.getTenantId() + "already exist!"); return false; } } } COM: <s> add new tenant into tenantlist called when tenant create message received from trm </s>
funcom_train/21487697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WaitScreen getWaitScreen() { if (waitScreen == null) { // write pre-init user code here waitScreen = new WaitScreen(getDisplay()); waitScreen.setTitle("waitScreen"); waitScreen.setCommandListener(this); waitScreen.setTask(getTask()); // write post-init user code here } return waitScreen; } COM: <s> returns an initiliazed instance of wait screen component </s>
funcom_train/4114495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Pattern getMatchingPattern(String requestUri){ for(int i=urlPatterns.size()-1; i>=0; i--){ Matcher matcher = urlPatterns.get(i).matcher(requestUri); if(matcher.find()){ return urlPatterns.get(i); } } return null; } COM: <s> matches an incoming url against the available patterns in the </s>
funcom_train/36552907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* private void displayHand() { System.out.print("You Hold: "); for (int i=0; i<myHand.size(); i++) { int cardNum = myHand.get(i).getNumber(); int cardSuit = myHand.get(i).getSuit(); System.out.print(cardNumbers[cardNum-1]+" of "+cardSuits[cardSuit-1]+ " "); } System.out.println(); }*/ COM: <s> displays hand not being used </s>
funcom_train/39852904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExtendsID(String inExtendsID) { extendsID = inExtendsID; // Deal with the case of this Catalog extending another, if applicable. if (extendsID != null) { // Now get a reference to the base Catalog. Catalog catalog = ChainManager.findCatalog(inExtendsID); chains = catalog.cloneChains(); } } // End setExtendsID(). COM: <s> sets the id of the catalog that this catalog extends </s>
funcom_train/21114708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getBoolean(HashMap data, String key) { try { char c = ((String) data.get(key)).charAt(0); if ((c == 't') || (c == 'T') || (c == '1')) return true; else return false; } catch (Exception e) { return false; } } COM: <s> tries to parse the data as a boolean </s>
funcom_train/18045272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { copyright = new JLabel(); copyright.setText("(c) Alessio Caiazza <nolith@abisso.org>"); jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.add(getBody(), BorderLayout.CENTER); jContentPane.add(copyright, BorderLayout.SOUTH); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/33808703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFBDocument(FBDocument document) { if (document != null) { setTitle(msg.get("frame.title.document", new String[] { document.getBookTitle() })); ((ReaderPane)getContentPane()).setFBDocument(document); } } COM: <s> when fiction book document is set title of a frame is changed and </s>
funcom_train/41759166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getSelect() { if (Select == null) {//GEN-END:|88-getter|0|88-preInit // write pre-init user code here Select = new Command("Ok", Command.OK, 0);//GEN-LINE:|88-getter|1|88-postInit // write post-init user code here }//GEN-BEGIN:|88-getter|2| return Select; } COM: <s> returns an initiliazed instance of select component </s>
funcom_train/890701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void discardChanges() { if (Controler.logger.isLoggable(Level.FINER)) { Controler.logger.entering("Controler", "discardChanges()", "start"); } db.rollback(); if (Controler.logger.isLoggable(Level.FINER)) { Controler.logger.exiting("Controler", "discardChanges()", "end"); } } COM: <s> discard all changes made since the last save </s>
funcom_train/41302460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveStringToEof(String fileName, String string) { try { //#if !applet new DataWriter(fileName, UTF8.encode(string), -2); //#endif } catch (Exception e) { R.getErrorScreen().view(e, "FileSystem.saveStringToEof()", fileName); } } COM: <s> saves string into end of file </s>
funcom_train/26564772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect() { String host = hostField.getText(); int port = Integer.parseInt(portField.getText()); String username = usernameField.getText(); String password = new String(passwordField.getPassword()); if (log.isLoggable(Level.INFO)) log.info("Calling connectable " + connectable); connectable.connect(host, port, username, password); } COM: <s> call the connectable </s>
funcom_train/5823912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void snmpReceivedPdu(SnmpSession sess, int command, SnmpPduPacket pkt) { if (pkt.getCommand() == SnmpPduPacket.RESPONSE) { if (((SnmpPduRequest) pkt).getErrorStatus() == SnmpPduPacket.ErrNoError) { m_response = pkt; } synchronized (this) { notifyAll(); } } } COM: <s> the method that handles a returned packet from the remote agent </s>
funcom_train/29618266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getJSynonymList() { if (jSynonymList == null) { jSynonymList = new JList(); jSynonymList.setFont(MgisLabel.m_font); SynonymListSelectionListener listener = new SynonymListSelectionListener(jSynonymList); jSynonymList.getSelectionModel().addListSelectionListener(listener); jSynonymList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); } return jSynonymList; } COM: <s> this method initializes j synonym list </s>
funcom_train/9492036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void holdArgument(String aVariable) { int i; int nrc = iParameters.size(); for (i = 0; i < nrc; i++) { if (iParameters.get(i).iParameter == aVariable) { iParameters.get(i).iHold = true; } } } COM: <s> put an argument on hold </s>
funcom_train/32758742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fetchScoreSnapshots( String groupName, java.util.Date startTime, java.util.Date endTime) { _snapshots = _scoreStore.fetchScoreSnapshotsInRange( groupName, startTime, endTime ); System.out.println("Found " + _snapshots.size() + " snapshots..."); } COM: <s> fetch the machine snapshots that were taken between the selected times </s>
funcom_train/46847620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (!(o instanceof SuffixMultitreeNodeSet)) return false; SuffixMultitreeNodeSet other = (SuffixMultitreeNodeSet)o; if (this.size() != other.size()) return false; Iterator thisIter = this.iterator(); while (thisIter.hasNext()) { if (!other.contains(thisIter.next())) return false; } return true; } COM: <s> two suffix multitree node sets are considered equal if they </s>
funcom_train/11647875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndex( String qName ) { for ( int i=0; i<attributes.length; i++ ) { if (attributes[i].getQualifiedName() != null && attributes[i].getQualifiedName().equals( qName )) { return i; } } return -1; } COM: <s> gets the index of an attribute by qualified name </s>
funcom_train/18381894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ForumThread createMessage(ForumMessage msg) throws ClientException { ForumThread ft = null; try { ForumDAOFactory.getDAO().createMessage(msg); ft = ForumDAOFactory.getDAO().readForumThread(msg.getParentId()); } catch (DAOException e) { logger.debug("DAOEXception create message method in ForumMessageClient"); throw new ClientException("errors_dao"); } return ft; } COM: <s> create a message </s>
funcom_train/43245603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRace() { System.out.println("getRace"); PatientDataDG3Object instance = new PatientDataDG3Object(); String expResult = ""; String result = instance.getRace(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get race method of class org </s>
funcom_train/19064306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkAlignment(String align) { AttributeSet attr = getParagraphAttr(); Enumeration enumeration = attr.getAttributeNames(); while (enumeration.hasMoreElements()) { Object name = enumeration.nextElement(); if (name.toString().equals("text-align")) { // alignment found if (attr.getAttribute(name).toString().equals(align)) { return true; } } } // not found return false; } COM: <s> private utility to check alignment </s>
funcom_train/6347505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLong() throws IOException { PropertyStorageFactory f = PropertyStorageFactoryCreator.createXMLPropertyStorageFactory(); PropertyStorageExtended store = f.createPropertyStorage(TESTFILE); store.storeLong("longkey", TEST_LONGS[0]); assertEquals(store.getLong("longkey"), TEST_LONGS[0]); } COM: <s> tests storing and loading of long values </s>
funcom_train/12901217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Command getOrphanChildrenCommand(Request aRequest) { // Now get the orphan command for the child. The container policy // will make sure that the visual infos are canceled. Command orphanContributionCmd = containerPolicy.getCommand(aRequest); if (orphanContributionCmd == null || !orphanContributionCmd.canExecute()) return UnexecutableCommand.INSTANCE; // It can't be orphaned else return orphanContributionCmd; } COM: <s> get orphan child command about to remove a child from the model </s>
funcom_train/4695693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() throws Exception { for (InStreamAddRowEventProcessor processor : processors) { processor.stopJob(); } processors = null; sharedData = null; // ---------------------- Logger logger = Registry.getImplFor(LoggerManager.class).getLogger( InStreamAddRowEventManager.class.getName()); logger.log(Level.INFO, "Stopped"); } COM: <s> waits for all the processor threads to stop </s>
funcom_train/4040058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshViewers() { ISelection selection = availableCategoriesViewer.getSelection(); availableCategoriesViewer.refresh(); availableCategoriesViewer.setSelection(selection, true); selection = selectedCategoriesViewer.getSelection(); selectedCategoriesViewer.refresh(); selectedCategoriesViewer.expandAll(); selectedCategoriesViewer.setSelection(selection, true); } COM: <s> refreshes the viewers when the underlying models change </s>
funcom_train/5525134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean match (Position p, int i) { if (i>=V.size()) return false; if (i+1>=V.size()) { Atom a=(Atom)V.elementAt(i); return a.match(p); } else { Atom a=(Atom)V.elementAt(i); if (a.match(p)) { if (match(p,i+1)) return true; else { while (a.nextMatch()) { if (match(p,i+1)) return true; } return false; } } else return false; } } COM: <s> the match is done by crawling through the atoms recursively </s>
funcom_train/28362180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateTripRecords() { final Map<String,List<TripRecord>> tripRecordMap = new HashMap<String,List<TripRecord>>(); for ( final String monitorName : TRIP_MONITOR_NAMES ) { final List<TripRecord> tripRecords = fetchTripRecords( monitorName ); tripRecordMap.put( monitorName, tripRecords ); } synchronized( TRIP_RECORD_MAP ) { TRIP_RECORD_MAP.clear(); TRIP_RECORD_MAP.putAll( tripRecordMap ); } } COM: <s> update the trip records </s>
funcom_train/18551672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getBounds() { if (portIcon != null) { Rectangle bounds = new Rectangle(getLocation(null)); int width = portIcon.getIconWidth(); int height = portIcon.getIconHeight(); bounds.x = bounds.x - width / 2; bounds.y = bounds.y - height / 2; bounds.width = width; bounds.height = height; return bounds; } return super.getBounds(); } COM: <s> returns the bounds for the port view </s>
funcom_train/20307756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRDFSDescription() { ReasonerFactory rf = RDFSFBRuleReasonerFactory.theInstance(); Reasoner r = rf.create(null); assertTrue(r.supportsProperty(RDFS.subClassOf)); assertTrue(r.supportsProperty(RDFS.domain)); assertTrue( ! r.supportsProperty(OWL.allValuesFrom)); } COM: <s> test the capabilities description </s>
funcom_train/3117047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Line2D getVoiceResponseLine(final int condition) { if (condition >= voiceResponseLines.size()) { return null; } final Line2D line = (Line2D)voiceResponseLines.get(new Integer(condition)); if (line == null) { return null; } else { return (Line2D)line.clone(); } } COM: <s> returns the line of the voice response view of this control </s>
funcom_train/19638066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCanonicalEmptyCollectionExists() { if (supportsEmptyCollections() && isTestSerialization() && !skipSerializedCanonicalTests()) { Object object = makeObject(); if (object instanceof Serializable) { String name = getCanonicalEmptyCollectionName(object); assertTrue( "Canonical empty collection (" + name + ") is not in CVS", new File(name).exists()); } } } COM: <s> tests serialization by comparing against a previously stored version in cvs </s>
funcom_train/31464995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void configure() { String s; if(m_pattern != null) { s = m_pattern; } else { if(m_debug) { s = m_defDebugPattern; } else { s = m_defPattern; } } Logger.getRootLogger().removeAllAppenders(); Layout l = new PatternLayout(s); Appender a = new ConsoleAppender(l); BasicConfigurator.configure(a); } COM: <s> remove all appenders and re load the configuration </s>
funcom_train/3150341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Color getHeaderBackground() { Color c = UIManager.getColor("SimpleInternalFrame.activeTitleBackground"); if (c != null) return c; if (LookUtils.IS_LAF_WINDOWS_XP_ENABLED) c = UIManager.getColor("InternalFrame.activeTitleGradient"); return c != null ? c : UIManager.getColor("InternalFrame.activeTitleBackground"); } COM: <s> determines and answers the headers background color </s>
funcom_train/34748224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public KeyedObjectPool createPool() { return new GenericKeyedObjectPool(_factory,_maxActive,_whenExhaustedAction,_maxWait,_maxIdle,_maxTotal,_minIdle,_testOnBorrow,_testOnReturn,_timeBetweenEvictionRunsMillis,_numTestsPerEvictionRun,_minEvictableIdleTimeMillis,_testWhileIdle,_lifo); } COM: <s> create a new generic keyed object pool with the currently configured properties </s>
funcom_train/7660929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAwait_IllegalMonitor() { final Mutex sync = new Mutex(); final AbstractQueuedSynchronizer.ConditionObject c = sync.newCondition(); try { c.await(); shouldThrow(); } catch (IllegalMonitorStateException success) { } catch (Exception ex) { unexpectedException(); } } COM: <s> calling await without holding sync throws illegal monitor state exception </s>
funcom_train/40409447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGenerateServiceStub_allV13() throws ServiceException { AdWordsServiceFactory.generateServiceStub(AdWordsService.V13.ACCOUNT_SERVICE, testUser); AdWordsServiceFactory.generateServiceStub(AdWordsService.V13.REPORT_SERVICE, testUser); AdWordsServiceFactory.generateServiceStub(AdWordsService.V13.TRAFFIC_ESTIMATOR_SERVICE, testUser); } COM: <s> tests that all service can be generated for v13 </s>
funcom_train/41139807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int eliminateFeature(int index) { if (included[index]){ included[index] = false; } else { return -999; } tmpKey = key; if (key != -999) { if (missing[index]) { key = key - index*13; } else { key -= (index*5*(attributes[index] + 1)); } return key; } else { key = getHashCode(); return key; } } COM: <s> updata a hash code </s>
funcom_train/18858694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String skipToMatch(BufferedReader input) throws IOException { String line = input.readLine(); if (null != dataStartMark) { while (null != line && !line.equals(dataStartMark)) { line = input.readLine(); } } while (null != line && !pattern.matcher(line).matches()) { line = input.readLine(); } return line; } COM: <s> this internal function reads lines from a buffered reader until the </s>
funcom_train/1550041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int calculateNewCapacity(int proposedCapacity) { int newCapacity = 1; if (proposedCapacity > MAXIMUM_CAPACITY) { newCapacity = MAXIMUM_CAPACITY; } else { while (newCapacity < proposedCapacity) { newCapacity <<= 1; // multiply by two } if (newCapacity > MAXIMUM_CAPACITY) { newCapacity = MAXIMUM_CAPACITY; } } return newCapacity; } COM: <s> calculates the new capacity of the map </s>
funcom_train/39108189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public boolean delete(final int num) { if (Record.isDefault(num)) { return false; } else { updateAndGetRecord(num,-Math.abs((userData.getRecord(num).getType()))); UserRecordlinkTable urlt = new UserRecordlinkTable(userData); urlt.deleteRecord(userData.getRecord(num)); return true; } } COM: <s> marks the record as deleted recycleable basically changes </s>
funcom_train/18049911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addColumnListener(){ d.out("ENTER addColumnListener()"); MTColumnMoveListerner cml = new MTColumnMoveListerner(tree); TreeColumn[] columns = tree.getColumns(); for (int i = 0; i < columns.length; i++) { columns[i].setWidth(data.getDefaultColumnWidth()); if (i >= 1){ columns[i].setMoveable(true); } else{ columns[i].setMoveable(false); } columns[i].addListener(SWT.Move, cml); } } COM: <s> adds the column listener </s>
funcom_train/3408851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { Method other = (Method) obj; if (getName().equals(other.getName()) && arguments.length == other.arguments.length) { for (int i = 0; i < arguments.length; i++) { if (! arguments[i].equals(other.arguments[i])) { return false; } } return true; } return false; } COM: <s> equality check based on method signature </s>
funcom_train/36231207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getTrace() throws MatrixException { if (checkNull()) throw new MatrixNullPointerException(" getTrace is not poxible"); double t = 0.0; if (this.nCols == this.nRows) { for (int i = 0; i < this.nRows; i++) { t += this.mat[i][i]; } } else throw new MatrixException("Trace: the matrix should be squared"); return t; } COM: <s> get the trace value of this matrix only if its square </s>
funcom_train/17891055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unloadImage() { if ((sourceImage != null) && !sourceImage.isDisposed()) { sourceImage.dispose(); sourceImage = null; } if ((screenImage != null) && !screenImage.isDisposed()) { screenImage.dispose(); screenImage = null; } } COM: <s> this method unloads the image that was loaded </s>
funcom_train/36547485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initVariants() { jsonVariant = new Variant( MediaType.APPLICATION_JSON ); xmlStringVariant = new Variant( MediaType.TEXT_XML ); xmlDocVariant = new Variant( MediaType.APPLICATION_XML ); // This resource supports two kind of representations getVariants().add( xmlStringVariant ); getVariants().add( xmlDocVariant ); getVariants().add( jsonVariant ); } // end method initVariants( ) COM: <s> initialises the variants for this service </s>
funcom_train/4779936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getReadOnlyRadioButton() { if (readOnlyRadioButton == null) { readOnlyRadioButton = new JRadioButton(); readOnlyRadioButton.setText(ResourceUtil.getString("accesslevel.readonly")); readOnlyRadioButton.setFont(GuiConstants.FONT_PLAIN); if (accessRule != null && accessRule.getLevel().equals(SubversionConstants.SVN_ACCESS_LEVEL_READONLY)) { readOnlyRadioButton.setSelected(true); } } return readOnlyRadioButton; } COM: <s> this method initializes read only radio button </s>
funcom_train/29814625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAND() { //assertEquals(0L, BitMaskUtil.NEW_MASK & BitMaskUtil.OID_MASK); assertEquals(0L, BitMaskUtil.GC_EVALUATED_MASK & BitMaskUtil.NO_GC_MASK); assertEquals(0L, BitMaskUtil.GC_REFERENCED_MASK & BitMaskUtil.NO_GC_MASK); assertEquals(0L, BitMaskUtil.GC_REFERENCED_MASK & BitMaskUtil.GC_EVALUATED_MASK); } COM: <s> and combination of masks should be 0 </s>
funcom_train/8060852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showAncestor(boolean b) { Object newRoot = null; TreePath path = getSelectionModel().getSelectionPath(); if (path != null) { newRoot = path.getLastPathComponent(); } ((VipsTreeModel) getModel()).showAncestor(b, newRoot); } COM: <s> get the selected item in the tree and call show ancestor with this </s>
funcom_train/22346608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean writeLocal (String msg) { try { // put local dataOutStream.writeBytes(msg + crlf); } // end-try catch (IOException e) { // write msgOut(TyMsg.getMsg(24) + TyMsg.getText(69) + TyMsg.getText(2) + e.getMessage(), 10); // no good tbl.setValid(false); // error return false; } // end-catch // good return true; } // end-method COM: <s> write to a local facility </s>
funcom_train/41800215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setStandardParameters(final Map<String, String> parameters) { Validate.notNull(parameters); parameters.put("AWSAccessKeyId", security.getAWSAccessId()); parameters.put("SignatureVersion", SIGNATURE_VERSION); parameters.put("SignatureMethod", SIGNATURE_METHOD); parameters.put("Version", VERSION); parameters.put("Timestamp", ISO8601FORMATTER.format(new Date())); } COM: <s> sets the standard parameters </s>
funcom_train/17174995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCommand1() throws Exception { ParsedLineReader plr = new ParsedLineReader(new LogicalLineReader( new MultiFileReader(), '#', '\\')); plr.addFile("src/util/test/command1.txt"); ParsedLine parsedLine = plr.getParsedLine(); assertNotNull(parsedLine); assertEquals(1, parsedLine.numberOfParameters()); Parameter param = parsedLine.getParameter(0); assertNotNull(param); assertNull(param.getName()); assertEquals("a", param.getValue()); parsedLine = plr.getParsedLine(); assertNull(parsedLine); plr.close(); } COM: <s> execute the test command1 </s>
funcom_train/41165746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoExercises2 entity) { EntityManagerHelper.log("deleting CoExercises2 instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoExercises2.class, entity.getExerciseId()); 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 exercises2 entity </s>
funcom_train/1241999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stateChanged( javax.swing.event.ChangeEvent e ){ JTabbedPane tab = (JTabbedPane)e.getSource(); int item = tab.getSelectedIndex(); if (item==1) { // "Monitoring" tab is selected. start(); } else { // "Setting" tab is selected. stop(); } } COM: <s> change listener to handle tab actions </s>
funcom_train/22683504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processToken(String token) throws QueryFormatException { // Careful with this if (isSqlKeyword(token)) token = token.toUpperCase(); if (isClauseKeyword(token)) { endClause(); String upperToken = token.toUpperCase(); mCurrentClause.add(upperToken); } else { mCurrentClause.add(token); } } COM: <s> process the token just parsed </s>
funcom_train/2903114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(Object key){ if(dockTable == null){ return; } FileData fd = null; synchronized(dockTable){ fd = (FileData)dockTable.remove(key); } if((fd!=null) && (fd.file!=null)){ StringBuffer sb = new StringBuffer(256); sb = sb.append(ZLocater.getDockPropertyPath()); sb = sb.append(File.separator).append(fd.file); File f = new File(sb.toString()); fd.dock.setWorkspaceManager(null); if(f.exists() && !f.delete()){ new JXError(getClass(), "Error removing dock, "+fd.file); } } } COM: <s> remove a dock from the manager </s>
funcom_train/45918304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TubeletEntry getTubeletData(String name) throws TubeletContainerProcessingException { final TubeletEntry tubeletEntry = tubeletsMap.get(name); if(tubeletEntry == null) { throw new TubeletContainerProcessingException(String.format("Cannot find tubelet with name '%s'.", name) ); } return tubeletEntry; } COM: <s> returns the entry corresponding to the tubelet name </s>
funcom_train/45237004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBtnConectarCliente() { if (btnConectarCliente == null) {//GEN-END:|31-getter|0|31-preInit // write pre-init user code here btnConectarCliente = new Command("Cliente", Command.SCREEN, 0);//GEN-LINE:|31-getter|1|31-postInit // write post-init user code here }//GEN-BEGIN:|31-getter|2| return btnConectarCliente; } COM: <s> returns an initiliazed instance of btn conectar cliente component </s>
funcom_train/41566764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel2() { if (jPanel2 == null) { GridBagConstraints gridBagConstraints3 = new GridBagConstraints(); gridBagConstraints3.anchor = GridBagConstraints.CENTER; gridBagConstraints3.insets = new Insets(0, 5, 0, 5); jPanel2 = new JPanel(); jPanel2.setLayout(new GridBagLayout()); jPanel2.add(getJButton(), new GridBagConstraints()); jPanel2.add(getJButton1(), gridBagConstraints3); } return jPanel2; } COM: <s> this method initializes j panel2 </s>