__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/18836011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ResultFindController getRFC(PortletRequest request) { ResultFindController rfc = ResultFindController.getInstance(); if(rfc == null) { // Initialize ResultFindController facade String[] values = request.getPreferences().getValues("ResultFinderClasses", new String[0]); ArrayList classNames = new ArrayList(values.length); for(int i = 0; i < values.length; i++) classNames.add(values[i]); ResultFindController.init(classNames); rfc = ResultFindController.getInstance(); } return rfc; } COM: <s> just to properly initialize result find controller singleton </s>
funcom_train/39062994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addItem() { TreeItem item = new TreeItem(selectedItem, SWT.SINGLE); SectionMarkerNote parent = (SectionMarkerNote)selectedItem.getData(); String nameString = (parent == root) ? "Section " : "Sub section "; SectionMarkerNote note = new SectionMarkerNote(parent); IMarkerNote[] children = parent.getChildren(); note.setName(nameString + children.length); note.setMaxScore(0); item.setText(note.getName()); item.setData(note); } COM: <s> creates and adds a new item to the marking scheme </s>
funcom_train/37637847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cut() { SelectionModel sel = grid.getSelectionModel(); int firstRow = sel.getFirstSelectedRow(); int firstColumn = sel.getFirstSelectedColumn(); int lastRow = sel.getLastSelectedRow(); int lastColumn = sel.getLastSelectedColumn(); cut(firstRow, firstColumn, lastRow, lastColumn); } //end cut COM: <s> cut the selected cells </s>
funcom_train/22014101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkDayValidInMonth(int day, int month, int year) { try { Calendar cl = Calendar.getInstance(); cl.setLenient(false); cl.set(Calendar.DAY_OF_MONTH, day); cl.set(Calendar.MONTH, month); cl.set(Calendar.YEAR, year); cl.getTime(); } catch (IllegalArgumentException e) { return false; } return true; } COM: <s> this says if this month has this day or not basically this problem </s>
funcom_train/18783787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getBirthday() { for (Iterator iter = properties.iterator(); iter.hasNext();) { VCardProperty prop = (VCardProperty) iter.next(); if (prop.getName().equals("BDAY")) { Date bday = DateUtils.parseDate(prop.getValue()); if (bday != null) { return bday; } } } return null; } COM: <s> returns the birthday for this contact </s>
funcom_train/32777723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(E e) { if (e == null) { // check for nullreference sendWarning( "Can not check if the given Entity is contained in QueueListStandardFifo. " + "Command ignored!", "Class: QueueListStandardFifo Method: boolean contains(Entity e).", "The Entity reference given as parameter is a null reference.", "Be sure to only use valid references."); return false; } return queuelist.contains(e); } COM: <s> returns true if the given entity is contained in the list false </s>
funcom_train/51209881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logErrorLn(Object o) { try { String s = (null == o ? "null" : o.toString()); Event<GUIEvent> event = new Event<GUIEvent>(this, GUIEvent.class, GUI_LogMessageError, s); LiveGraph.application().eventManager().raiseEvent(event); } catch (Throwable ex) { logErrorLnModal2(o, ex); } } COM: <s> raises an event to inform listeners that an error message should be displayed </s>
funcom_train/679317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection findAllActiveByEventDefinitionId(StudyBean study, int eventDefinitionId) { if (study.isSite(study.getParentStudyId())) { return findAllActiveByEventDefinitionIdAndSiteIdAndParentStudyId(eventDefinitionId, study.getId(), study.getParentStudyId()); } else { return findAllActiveParentsByEventDefinitionId(eventDefinitionId); } } COM: <s> find all active event definition crfbean for the study bean and the </s>
funcom_train/24513613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void centerDialog(Frame owner) { Dimension dlgSize = getPreferredSize(); Dimension frmSize = owner.getSize(); Point loc = owner.getLocation(); setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y); } COM: <s> center this dialog window relative to its owning code frame code </s>
funcom_train/28982440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkSendEmail () { if (okSendEmail == null) {//GEN-END:|41-getter|0|41-preInit // write pre-init user code here okSendEmail = new Command ("Send", Command.OK, 0);//GEN-LINE:|41-getter|1|41-postInit // write post-init user code here }//GEN-BEGIN:|41-getter|2| return okSendEmail; } COM: <s> returns an initiliazed instance of ok send email component </s>
funcom_train/648435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnRemoveSelected() { if (btnRemoveSelected == null) { btnRemoveSelected = new JButton(); btnRemoveSelected.setText("Remove Selected"); btnRemoveSelected.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { removeFolder(); } }); } return btnRemoveSelected; } COM: <s> this method initializes j button4 </s>
funcom_train/49045276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButtonMenuItem getJRadioButtonMenuButtMethodRigBod() { //if (buttMethodRigBod == null) { buttMethodRigBod = new JRadioButtonMenuItem(); buttMethodRigBod.setText("Rigid Body"); buttMethodRigBod.setToolTipText("rigid body registration"); buttMethodRigBod.addActionListener(this); buttMethodRigBod.setActionCommand("parameter"); //} return buttMethodRigBod; } COM: <s> this method initializes the option method rig bod </s>
funcom_train/18549047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChild(TaskTO tto) { if (this.childTasks==null){ this.childTasks = new HashMap<String, TaskTO>(); } if (childTasks.get(tto.getId())==null) { this.childTasks.put(tto.getId(), tto); } this.isParentTask = new Integer(1); //just in case.. } COM: <s> insert a child task into current parent task </s>
funcom_train/10686205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRequestProperty(String field) { if (connected) { throw new IllegalStateException(Messages.getString("luni.5E")); //$NON-NLS-1$ } List<String> valuesList = requestProperties.get(field); if (valuesList == null) { return null; } return valuesList.get(0); } COM: <s> gets the value of the request header property specified by code field </s>
funcom_train/36911644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void padOutput(int fieldLen, int outputLen) { fieldLen = Math.max(Schema.MIN_WIDTH, fieldLen); for (int j = 0; j < fieldLen - outputLen; j++) { System.out.print(' '); } } // protected void padOutput(int fieldLen, int outputLen) COM: <s> pads the current output to make columns line up </s>
funcom_train/20508344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAsText() { List<String> params = new ArrayList<String>(); addIfNotEmpty(params, getWhere()); if (null != getWhen()) { params.add(getWhen().getAsText()); } addIfNotEmpty(params, getWhat()); addIfNotEmpty(params, getUserTag()); return StringUtils.join(params.toArray(), ", "); } COM: <s> return a comma delimited string that represents the user viewable form settings </s>
funcom_train/46377317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void viewInit (View2D view) { view.addEntityComponent(InputManager.WindowSwingViewMarker.class, new WindowSwingViewMarker()); view.addEntityComponent(WindowSwingViewReference.class, new WindowSwingViewReference(view)); view.addEntityComponent(InputManager.WindowSwingEventConsumer.class, new MyWindowSwingEventConsumer(getApp())); } COM: <s> attach the things we need to the given given view </s>
funcom_train/41015606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String postpone(final MailTO mailTO) { String status = "200 OK"; if (null == mailTO.from || mailTO.from.length() < 1) { mailTO.from = configTO.me; } final Mail mail = save(mailTO, 991); if (null == mail) { status = "400 NOK mail creation failed"; } return status; } COM: <s> store a message for later sending </s>
funcom_train/31824733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { if ((type & COM.VT_BYREF) == COM.VT_BYREF) { return; } switch (type) { case COM.VT_EMPTY : case COM.VT_BOOL : case COM.VT_BSTR : case COM.VT_I2 : case COM.VT_I4 : case COM.VT_I8 : case COM.VT_R4 : case COM.VT_R8 : break; case COM.VT_DISPATCH : dispatchData.Release(); break; case COM.VT_UNKNOWN : unknownData.Release(); break; } } COM: <s> calling dispose will release resources associated with this variant </s>
funcom_train/4111389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTitle(String newTitle) { if (!DataElements.containsKey("title")) { Element e = new Element("title"); e.setContent(newTitle); this.DataElements.put("title", e); } this.DataElements.get("title").setContent(newTitle); } COM: <s> changes the content of the lt title gt element </s>
funcom_train/46745537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLanguageRef(DisplayModel languageRef) { if (Converter.isDifferent(this.languageRef, languageRef)) { DisplayModel oldlanguageRef= new DisplayModel(this); oldlanguageRef.copyAllFrom(this.languageRef); this.languageRef.copyAllFrom(languageRef); setModified("languageRef"); firePropertyChange(String.valueOf(PATIENTS_LANGUAGEREFID), oldlanguageRef, languageRef); } } COM: <s> patients preferred language </s>
funcom_train/7980882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void extract(CrawlURI curi) { this.numberOfCURIsHandled++; // use array copy because discoveriess will add to outlinks Collection<Link> links = curi.getOutLinks(); Link[] sourceLinks = links.toArray(new Link[links.size()]); for (Link wref: sourceLinks) { extractLink(curi,wref); } } COM: <s> perform usual extraction on a crawl uri </s>
funcom_train/42381782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getPosition() throws IOException { long position = 0; if (this.sfWriter != null) { // Call flush on underlying file though probably not needed assuming // above this.out.flush called through to this.fos. position = this.sfWriter.getLength() + accumOffset; } return position; } COM: <s> postion in current physical file </s>
funcom_train/11344760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onInvalidation(IPojoFactory factory) { List instances = (List) m_attached.remove(factory); if (instances != null) { for (int i = 0; i < instances.size(); i++) { ManagedInstance managed = (ManagedInstance) instances.get(i); managed.dispose(); m_idle.add(managed); } } } COM: <s> this method is called when the given factory becomes invalid </s>
funcom_train/33552040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setType(String type) { if (!(type.equals("scan") || type.equals("search") || type.equals("capabilities"))) { throw new IllegalArgumentException(type + " is a wrong parameter for method setType in response object. Use scan, search, or capabilities instead"); } else { this.type = type; } } COM: <s> set the type of request scan search capabilities this response belongs to </s>
funcom_train/37740370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String terminate () throws RemoteException { try { activity().terminate(); } catch (InvalidKeyException e) { logger.debug ("Referenced activity does not exist (ignored):" + e.getMessage()); } catch (InvalidControlOperationException e) { JSFUtil.addMessage (FacesMessage.SEVERITY_ERROR, L10N_MSGS, "cannotChangeState", null, e); } return null; } COM: <s> terminate the activity </s>
funcom_train/44846183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GalleryLinkTool get(final Image image) { if (image == null) setGallery("NO_IMAGE"); else { Gallery gallery = image.getParent(); if (isExportView) { if (OrderableInfo.isFirst(gallery)) { setGallery(PoInfo.getSite(gallery).getIndexPageName()); } else { setGallery(gallery.getName().concat(".") .concat(InitializationManager.getProperty("poormans.export.extention"))); } } else setGalleryForPreview(gallery); } return this; } COM: <s> getting the link tool to the </s>
funcom_train/36013056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleTabChangeEvent() { String description = this.descriptionText.getText(); this.teamDescriptionText.setText(description); String newDescription = createAnnotationDescription(annotationText.getText(), description); this.reworkDescriptionText.setText(newDescription); this.resolutionText.setText(this.resolutionCombo.getText()); } COM: <s> handles the tab change event </s>
funcom_train/44869683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WCMPanelBean getGraphPanel() { if (graphPanel == null) { GridLayout gridLayout = new GridLayout(); gridLayout.setRows(1); gridLayout.setColumns(2); graphPanel = new WCMPanelBean(); graphPanel.setLayout(gridLayout); graphPanel.add(getDC1(), null); graphPanel.add(getDC2(), null); } return graphPanel; } COM: <s> this method initializes graph panel </s>
funcom_train/24060110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write ( byte[] buf, int off, int len ) { this.myPrintlnCalls.inc(); String aString = new String ( buf, off, len ); this.foundInAnyLine.setActual( aString ); this.inLastLine.setActual( aString ); } COM: <s> must override the print stream method because this will be called </s>
funcom_train/32137823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createControl(Composite parent) { table = new Table(parent, SWT.SINGLE); table.setHeaderVisible(true); table.getVerticalBar().setVisible(true); table.setLinesVisible(true); table.addMouseListener(mouseListener); TableColumn column; for(int i = 0; i < titles.length; i++) { column = new TableColumn(table, SWT.NONE); column.setText(titles[i]); } updateColumns(); } COM: <s> creates the table for displaying error messages in </s>
funcom_train/7660998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPoolSize() { ThreadPoolExecutor p1 = new ThreadPoolExecutor(1, 1, LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10)); assertEquals(0, p1.getPoolSize()); p1.execute(new MediumRunnable()); assertEquals(1, p1.getPoolSize()); joinPool(p1); } COM: <s> get pool size increases but doesnt overestimate when threads </s>
funcom_train/19097188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JPanel decorateNavi() { m_Navi.setBorder(BorderFactory.createCompoundBorder( BorderFactory.createMatteBorder(1, 0, 0, 0, SystemColor.controlShadow), BorderFactory.createMatteBorder(1, 0, 0, 0, SystemColor.controlLtHighlight))); return m_Navi; } COM: <s> decorate the navigation panel </s>
funcom_train/2585278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDateConstructor1() { TimeZone zone = TimeZone.getTimeZone("GMT"); Quarter q1 = new Quarter(new Date(1017619199999L), zone); Quarter q2 = new Quarter(new Date(1017619200000L), zone); assertEquals(1, q1.getQuarter()); assertEquals(1017619199999L, q1.getLastMillisecond(zone)); assertEquals(2, q2.getQuarter()); assertEquals(1017619200000L, q2.getFirstMillisecond(zone)); } COM: <s> in gmt the end of q1 2002 is java </s>
funcom_train/44832686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JGEvent addEvent(JGEvent event) throws JGInvalidEventException { if (!isEventValid(event)) { logger.error(event.getName() + " is not valid event"); throw new JGInvalidEventException(event.getName() + " is not valid event"); } event.setComponent(this); onAddEvent(event); events.add(event); return event; } COM: <s> adds an event </s>
funcom_train/37590458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintComponent(Graphics g) { if (g == null) return; // Addresses bug 1651914 if (_antiAliasText && g instanceof Graphics2D) { Graphics2D g2d = (Graphics2D)g; g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); } super.paintComponent(g); } COM: <s> enable anti aliased text by overriding paint component </s>
funcom_train/26275132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resolveProcessor(String proc) throws Exception { if ("trax".equals(proc)) { final Class clazz = loadClass(TRAX_LIAISON_CLASS); liaison = (XSLTLiaison) clazz.newInstance(); } else { liaison = (XSLTLiaison) loadClass(proc).newInstance(); } } COM: <s> load processor here instead of in set processor this will be </s>
funcom_train/5462695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void crawlRRuleProperty(Property property, Resource parentNode, RDFContainer rdfContainer) { Resource rruleBlankNode = generateAnonymousNode(rdfContainer); crawlRecur(property.getValue(), rruleBlankNode, rdfContainer); addStatement(rdfContainer, parentNode, NCAL.rrule, rruleBlankNode); } COM: <s> crawls the rrule property </s>
funcom_train/37820392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renameVariable(Variable variable, String newLabel) { try { actionStack.perform(new RenameVariableAction(variable, newLabel)); synDiaSystem.notifyObservers(); } catch (Exception e) { mainController.showErrorDialog( Messages.getString("ebnf", "SynDiaEditor.Error_InternalError") + Messages.getString("ebnf", "SynDiaEditor.Error_Appendix"), false); } } COM: <s> renames a variable </s>
funcom_train/31517114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getIPv4(byte[] buffer, int index) { String ipAddr = (int) (buffer[index] & 0xff) + "." + (int) (buffer[index+1] & 0xff) + "." + (int) (buffer[index+2] & 0xff) + "." + (int) (buffer[index+3] & 0xff); return (ipAddr); } COM: <s> build an ipv4 address string from the buffered data </s>
funcom_train/51699688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getResult(String resultId) { if (strictAccessCheck) { if (results == null) throw new IllegalStateException("Results are not defined"); if (!results.containsKey(resultId)) throw new IllegalStateException("Result '" + resultId + "' is not defined"); } return (results == null) ? null : results.get(resultId); } COM: <s> get a result object from the result map </s>
funcom_train/5024589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupTestHarness() { TestHarness.name(createDefaultUserRadioButton, TestHarness.SELECTUSERDIALOG_DEFAULT_BUTTON); TestHarness.name(useExistingUserRadioButton, TestHarness.SELECTUSERDIALOG_EXISTING_BUTTON); TestHarness.name(existingUsersList, TestHarness.SELECTUSERDIALOG_EXISTING_LIST); } COM: <s> setting up the wizard page for abbot </s>
funcom_train/14604483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadFromLdif(Reader reader){ try { LdifParser parser = new LdifParser(); LdifEnumeration enumeration = parser.parse(reader); if(enumeration.hasNext(null)) { LdifContainer container = enumeration.next(null); if(container instanceof LdifContentRecord) { LdifContentRecord schemaRecord = (LdifContentRecord)container; this.parseSchemaRecord(schemaRecord); } } } catch(Exception e) { System.out.println("Schema#loadFromLdif: " + e.toString()); } } COM: <s> loads all schema elements from the given reader </s>
funcom_train/2879767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getChildCount(Object parent) { if (parent instanceof BrowseEntry) { BrowseEntry auxEntry = (BrowseEntry)parent; //System.out.println("getChildCount():"+auxEntry.getChildrenCount()); return auxEntry.getChildrenCount(); } else { return 0; } } COM: <s> gets the child count attribute of the browse tree model object </s>
funcom_train/10254091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { if (hashCode == 0) { int h = method.hashCode(); if (args != null) { for (int i = args.length - 1; i >= 0; i--) { if (args[i] != null) { h = 31 * h + args[i].hashCode(); } } } hashCode = h; } return hashCode; } COM: <s> returns the hash code value for this object </s>
funcom_train/2676755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void killGhostConnections() { Iterator<IConnection> iter = getConnectionsIter(); while (iter.hasNext()) { IConnection conn = iter.next(); // Ping client conn.ping(); // Time to live exceeded, disconnect if( conn.getLastPingTime() > clientTTL * 1000 ){ disconnect( conn, scope ); } } } COM: <s> cleans up ghost connections </s>
funcom_train/31804846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIntegrity(String integrity) { if (integrity.equalsIgnoreCase(NOINTEGRITY) || integrity == null || integrity.equals("")) { _integrity = NOINTEGRITY; } else if (integrity.equalsIgnoreCase(NORMALINTEGRITY)) { _integrity = NORMALINTEGRITY; } else if (integrity.equalsIgnoreCase(STRONGINTEGRITY)) { _integrity = STRONGINTEGRITY; } else { // no changes } } COM: <s> sets the switch to warrant the integrity of communication </s>
funcom_train/3520367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeChild(String childClass, String elementId, String childId, int childDepth) throws RDBException, DocumentException, OutputException { if (childClass.equalsIgnoreCase("FRAG")) { //call writeElement recursively writeFragmentSlice(elementId,childId,childDepth); } else { super.writeChild(childClass, elementId, childId, childDepth); } } COM: <s> dispatch an element child </s>
funcom_train/11051976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addObservation(final double[] x,final double y) throws ModelSpecificationException{ if( x == null || x.length == 0 ){ throw new ModelSpecificationException(LocalizedFormats.INVALID_REGRESSION_OBSERVATION,x!=null?x.length:0, 1); } addData( x[0], y ); return; } COM: <s> adds one observation to the regression model </s>
funcom_train/21287503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double accelerationDueToLimit() { Road myR = this.route.get(0); double speedLimit = myR.getLimit(); double mySpeed= this.getSpeed(); double accel = Double.POSITIVE_INFINITY; if (getAccel() < this.max_acceleration() && mySpeed<speedLimit){ //for now accelerate to half the max acceleration accel = (this.max_acceleration()-getAccel())/2; }else{ accel = (getAccel()-this.max_acceleration())/2; } return accel; } COM: <s> find the acceleration due to the speed limit of the current </s>
funcom_train/2385682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getXAlarm() { int startpos = cal.indexOf("ALARM:"); if (startpos < 0) { return null; } try { int endpos = cal.indexOf(';', startpos + 6); return (endpos < 0) ? cal.substring(startpos + 6).trim() : cal.substring(startpos + 6, endpos).trim(); } catch (Exception e) { return null; } } COM: <s> returns the value of the x alarm property considering cal a v cal </s>
funcom_train/46837274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelAvailableModule() { if (jPanelAvailableModule == null) { jPanelAvailableModule = new JPanel(); jPanelAvailableModule.setLayout(null); jPanelAvailableModule.setBorder(BorderFactory.createLineBorder(Color.black, 1)); jPanelAvailableModule.setBackground(Color.white); jPanelAvailableModule.add(getJPopupInstaller(),null); } return jPanelAvailableModule; } COM: <s> this method initializes j panel available module </s>
funcom_train/13994624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelected(boolean selected) throws PropertyVetoException { if (getDesktopPane() != null) { // must be done before super call or new state will be ignored if (selected) { setIcon(false); } super.setSelected(selected); if (isSelected() && !isClosed()) { activateFrame(); } } } COM: <s> overwritten to provide correct selection behavior </s>
funcom_train/42930280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JdbcParams jdbcParamsForSelect(Object dimensionValue) { String sql = String.format("select %s from %s where %s", getKeyColName(), getTableName(), getWhereClauseForSelect()); Object[] params = getSelectParams(dimensionValue); return new JdbcParams(sql, params); } COM: <s> generates the sql and parameters required to locate the given dimension </s>
funcom_train/17432527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyFileToStream(File f, OutputStream ostream) throws IOException { FileInputStream fis = new FileInputStream(f); byte [] buffer = new byte[BUFFER_SZ]; try { while (true) { int bytesReceived = fis.read(buffer); if (bytesReceived < 1) { break; } ostream.write(buffer, 0, bytesReceived); } } finally { fis.close(); } } COM: <s> utility method to copy a </s>
funcom_train/776897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getTimeSinceLastCommand() { //log.debug("Time since last command (" + getName() + "): " + ((System.currentTimeMillis() - timeOfLastCommand) / 1000) + " (" + getLastCommandIssued() + ")"); return (System.currentTimeMillis() - timeOfLastCommand) / 1000; } COM: <s> checks the clients idletime </s>
funcom_train/13687040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void translateBlockRule(ASTNode rule, int tabLevel) throws TranslationException { tabAndAppend(tabLevel,"{\n"); ASTNode subRule = rule.getFirst(); while (subRule != null) { translateRuleRecursively(subRule,tabLevel+1); subRule = subRule.getNext(); } tabAndAppend(tabLevel,"}\n"); } COM: <s> translate block rule translates a core asm block rule into a promela </s>
funcom_train/14461487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public byte getByteAt(int off) { if(this.data!=null) { return data[off]; } if((this.rkd !=null) && (off < rkd.length)){ return rkd[off]; } if(this.databuf==null) throw new InvalidRecordException("XLSRecord has no data buffer." + this.getCellAddress()); return this.databuf.get(this, off); } COM: <s> gets the byte from the specified position in the </s>
funcom_train/37830250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matchesWithCondition(final ConversationStates state, final Expression trigger, final PreTransitionCondition condition) { if (matches(state, trigger)) { if (this.condition == condition) { return true; } else if ((this.condition != null) && this.condition.equals(condition)) { return true; } } // no match return false; } COM: <s> checks for match with the given state trigger condition combination </s>
funcom_train/38326355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void retractFacts(Index inx, Rete engine, WorkingMemory mem) { Map tmem = (Map) mem.getTerminalMemory(this); LinkedActivation act = (LinkedActivation) tmem.remove(inx); if (act != null) { engine.getAgenda().removeActivation(act); } } COM: <s> the implementation tries to remove the activation and doesnt check </s>
funcom_train/16395698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ActionForward cloud(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) { BlogManager blogMgr = new BlogManager(locale, session); Group group = getGroupParam(req); req.setAttribute("labelCloud", blogMgr.getLabelCloud(null, webUser, group, Integer.MAX_VALUE)); // get all labels return mapping.findForward("cloud"); } COM: <s> view tag cloud for all blogs </s>
funcom_train/40797775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefaultValue(String[] value) { String s = validate(toString(value)); if(s != null && !"".equals(s)) { throw new IllegalArgumentException("Bad default value '" + toString(value) + "' " + ", id=" + id + ", class=" + getClass(type) + ", err=" + s); } defValue = value; } COM: <s> set the default value </s>
funcom_train/28977696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setProperties(final Properties properties) { if (this.properties == null) { this.properties = new Properties(); } for (final Object s : properties.keySet()) { logger.info("setting property: " + s + " - " + properties.getProperty(s.toString())); this.properties.put(s, properties.getProperty(s.toString())); } } COM: <s> set the needed properties is internal done by the xml configurator </s>
funcom_train/20743210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void onPageRenamed(String from, String to) { HistoryRecord historyRecord = new HistoryRecord(); historyRecord.setScope(HistoryRecord.SCOPE_WIKI); historyRecord.setMessage("HISTORY_PAGE_RENAMED"); historyRecord.setAuthor(securityService.getCurrentUser() != null ? securityService.getCurrentUser().getUsername() : ""); historyRecord.setRecordDate(new Date()); historyRecord.setPageName(to); historyRecord.setOldPageName(from); historyRecord.setAttachment(false); historyRecordDao.save(historyRecord); } COM: <s> create history record on wiki page renaming </s>
funcom_train/39024164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddNestedCriterion() { System.out.println("addNestedCriterion"); ISearchCriteria criteria = null; BasicSearchCriteria instance = new BasicSearchCriteria(); ISearchCriteria expResult = instance; ISearchCriteria result = instance.addNestedCriterion(criteria); assertEquals(expResult, result); } COM: <s> test of add nested criterion method of class basic search criteria </s>
funcom_train/130420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getWaypoints () { try { sendHeader (PLAYER_MSGTYPE_REQ, 1); /* 1 byte payload */ os.writeByte (PLAYER_PLANNER_GET_WAYPOINTS_REQ); os.flush (); } catch (Exception e) { System.err.println ("[Planner] : Couldn't send PLAYER_PLANNER_GET_WAYPOINTS_REQ " + "command: " + e.toString ()); } } COM: <s> configuration request get waypoints </s>
funcom_train/10618880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose(){ String tempDirName; if (pFont != 0){ LinuxNativeFont.pFontFree(pFont, display); pFont = 0; if (isCreatedFromStream()) { File fontFile = new File(getTempFontFileName()); tempDirName = fontFile.getParent(); fontFile.delete(); LinuxNativeFont.RemoveFontResource(tempDirName); } } } COM: <s> disposes native font handle </s>
funcom_train/9869761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAutor(Boolean newVal) { if ((newVal != null && this.autor != null && newVal.equals(this.autor)) || (newVal == null && this.autor == null && autor_is_initialized)) { return; } this.autor = newVal; autor_is_modified = true; autor_is_initialized = true; } COM: <s> setter method for autor </s>
funcom_train/23872857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object visit(PropertyCallExp host, Object data) { String result = ""; // Enumeration Property prop = host.getReferredProperty(); if (prop instanceof EnumLiteral) { result = (String) ((EnumLiteral) prop).accept(this,data); // Usual property } else { result += (String)host.getSource().accept(this, data)+"."; result += host.getReferredProperty().getName(); } return result; } COM: <s> visit class property call exp </s>
funcom_train/26528772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int find(double value) { int left = 0; int right = size() - 1; int mid; double mval; while (left < right) { mid = (left + right) / 2; mval = contents[mid]; if (value == mval) return mid; else if (value < contents[mid]) right = mid - 1; else left = mid + 1; } return left; } COM: <s> search for a value in the list </s>
funcom_train/31478190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public class MailRequest implements Request { private String recipient, subject, message; public MailRequest(String recipient, String subject, String message) { this.recipient = recipient; this.subject = subject; this.message = message; } public void send() throws IOException, ProtocolException { out.writeByte(COMMAND_SEND_MAIL); out.writeUTF(recipient); out.writeUTF(subject); out.writeUTF(message); checkOk(); } } COM: <s> a request for sending a mail </s>
funcom_train/37230404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkStore() { if(pd == null) { log(Level.ERROR, "Missing Probe description"); return false; } if(monitoredHost == null) { log(Level.ERROR, "Missing host"); return false; } //Name can be set by other means if(name == null) name = parseTemplate(getPd().getProbeName()); finished = checkStoreFile(); return finished; } COM: <s> check the final status of the probe </s>
funcom_train/45547717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Segment s1, Segment s2) { final long diff = s1.getBaseId() - s2.getBaseId(); if (diff > 0) return 1; if (diff < 0) return -1; final long sizeDiff = s1.getEntryCount() - s2.getEntryCount(); return sizeDiff > 0 ? -1 : (sizeDiff == 0 ? 0 : 1); } COM: <s> compares the two given segments firstly by their base ids secondly </s>
funcom_train/20080038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert(ListItem item, int index) { if (fireEvent(Events.BeforeAdd, this, item, index)) { item.list = this; if (check) { item.markup = Markup.ITEM_CHECK; } items.add(index, item); if (rendered) { renderItem(item, index); } register(item); fireEvent(Events.Add, this, item); } } COM: <s> inserts an item into the list at the given index </s>
funcom_train/49828794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("TestWebServices".equals(portName)) { setTestWebServicesEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/12836986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AgentNamingService getAgentNamingService() throws ServiceException { AgentNamingService s = (AgentNamingService) SERVICES .get(AgentNamingService.SERVICE_TYPE); if (s == null) { try { s = new BasicAgentNamingService(); SERVICES.put(AgentNamingService.SERVICE_TYPE, s); } catch (Exception e) { throw new ServiceException("Cannot export remotely this AgentNamingService.", e); } } return s; } COM: <s> returns the agent naming service local to this platform </s>
funcom_train/16927775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isFullyConnected() { /* * boolean fullyConnected = true; * * Collection<GraphLink> set2 = getOutgoingLinks(); // check all links * of startNode of current link for (GraphLink gl : set2) { if * (gl.getEndNode() == null || !gl.getEndNode().isFullyConnected()) { * fullyConnected = false; break; } } return fullyConnected; */ return fullyConnected; } COM: <s> checks whether node is fully connected </s>
funcom_train/2740002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void visitLtlSpecs(List<LtlSpec> ltlSpecs) { ltlList = new ArrayList<String>(); ltlListNames = new ArrayList<String>(); String name; if (ltlSpecs != null) { for (LtlSpec ltlSpec: ltlSpecs) { ltlList.add(tp.visit(ltlSpec.getBody())); name = ltlSpec.getName(); if(name != null) { ltlListNames.add(name); } else { ltlListNames.add(""); } } } } COM: <s> it visits the ltl specifications </s>
funcom_train/51572106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean removeHostedStorageDirectory(boolean force) { boolean deleted = false; if (host != null) { File hostDir = getSignatureDirectory(); if (hostDir != null && (force || checkEmpty(hostDir))) { rmDashR(hostDir); deleted = true; } } return deleted; } COM: <s> remove this signatures storage directory on the hosting signature if </s>
funcom_train/5203663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTopBorderPos(int pos) { //System.out.println("[LMFrame.setTopBorderPos] set y to "+pos+" for "+this); myGdeNode.setY(pos); if (myBackgroundLayouter != null) { myBackgroundLayouter.setY(pos); } } COM: <s> untied frame neednt layout inner frames </s>
funcom_train/37136494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsModifiedByAppendOnly2() throws InvalidRegionException { final FlexRegion<String> r = new FlexRegion<String>(false, false, 10, "L0"); // 1 - // 10 r.insert(9, 5, "L2"); r.remove(11, 2); Assert.assertTrue(r.isModified()); Assert.assertFalse(r.isModifiedByAppendOnly()); r.remove(5, 2); Assert.assertFalse(r.isModifiedByAppendOnly()); } COM: <s> example appended region 1 insert and 1 remove </s>
funcom_train/33404531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newSimulationInvokationApi(int stepNumber, Vector<HostAction> actions){ for ( HostAction action : actions ){ switch (action.getType()){ case ENABLE_DEVICE_DP_API: (engine.getHostList().getHost(action.getDevice())).getDiscoverySocket().enableDiscoveryMechanism(); break; case DISABLE_DEVICE_DP_API: (engine.getHostList().getHost(action.getDevice())).getDiscoverySocket().disableDiscoveryMechanism(); break; } } ; } COM: <s> used by clock </s>
funcom_train/1996613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setSize(500, 300); this.setJMenuBar(getJMenuBar()); this.setContentPane(getPannelloPrincipale()); Dimension screenSize = Toolkit.getDefaultToolkit ().getScreenSize (); Dimension frameSize = this.getSize (); this.setLocation ((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } COM: <s> this method initializes this </s>
funcom_train/38967871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double calculateGausian(double x, double sigma) { if (sigma == 0) { return 0; } else { return (1 / (sigma * Math.sqrt(2 * Math.PI))) * Math.pow(Math.E, (-x * x / (2 * sigma * sigma))); } } COM: <s> calculates the gausian function for given point x and sigma value </s>
funcom_train/18895361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createModel(long model, URI modelTypeUri) throws ResolverException { if (logger.isDebugEnabled()) { logger.debug("Create type model " + model); } if (!this.modelTypeURI.equals(modelTypeUri)) { throw new ResolverException("Wrong model type provided as a Prefix model"); } } COM: <s> create a model for node types </s>
funcom_train/24536616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List getSortedTopEdges() { if (sortedTopEdges == null) { sortedTopEdges = new ArrayList(getChildrenXYBounds().size()); for (int i = 0; i < getChildrenXYBounds().size(); i++) { Rectangle rect = (Rectangle) getChildrenXYBounds().get(i); sortedTopEdges.add(new Integer(rect.y)); } Collections.sort(sortedTopEdges); } return sortedTopEdges; } COM: <s> return a sorted collection of ints representing the top edges of all components </s>
funcom_train/18600179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateOperation(Operation operation) throws GaapServiceException { try { Operation dbOperation = operationDao.findOperationByName(operation.getName()); if (dbOperation != null) { operation.setHibernateId(dbOperation.getHibernateId()); operationDao.mergeOperation(operation); } else { throw new GaapServiceException("Operation doesn't exists"); } } catch (Exception x) { throw new GaapServiceException(x); } } COM: <s> updates an operation </s>
funcom_train/784954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Shape triangle_down(float x, float y, float height) { m_path.reset(); m_path.moveTo(x,y); m_path.lineTo(x+height, y); m_path.lineTo(x+height/2, (y+height)); m_path.closePath(); return m_path; } COM: <s> returns a down pointing triangle of the given dimenisions </s>
funcom_train/17892267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setTitle() { final JPanel panel = (JPanel)panels.elementAt(cardShowing - 1); String newTitle = title; final String panelTitle = panel.getName(); if (panelTitle != null || panelTitle.equals("")) { newTitle += " - "; newTitle += panelTitle; } super.setTitle(newTitle); } COM: <s> sets the title of the dialog with the name of the current panel </s>
funcom_train/19399659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void closeTx(long startTime, long commitTime, boolean aborted) { if(INFO) log.info("tx=" + startTime + ", commitTime=" + commitTime + ", aborted=" + aborted + ", elapsed=" + (commitTime - startTime)); } COM: <s> report completion of a transaction </s>
funcom_train/2799324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private URL getFile() { JFileChooser chooser = new JFileChooser(); chooser.setMultiSelectionEnabled(false); int returnVal = chooser.showOpenDialog(null); if(returnVal == JFileChooser.APPROVE_OPTION) { try { //getSelectedFiles() return chooser.getSelectedFile().toURL(); } catch(Exception e ) { Logger.log("Error choosing file ",e); } } return null; } COM: <s> internal helper method to load a file </s>
funcom_train/45873952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected StringBuilder documentFunctionParameters(IASTParameterDeclaration[] decls) { StringBuilder result = new StringBuilder(); for (int i = 0; i < decls.length; i++) { if (!isVoidParameter(decls[i])) { result.append(PARAM + getParameterName(decls[i]) + "\n"); //$NON-NLS-1$ } } return result; } COM: <s> returns the comment content to add to the documentation comment </s>
funcom_train/37076825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SeqFeatureI featureIn(Range range, boolean exact, Level level) { RangeHash view = viewAt(level); int index = view.getIntervalIndex(range.getLow(), range.getHigh(), exact); FeatureWrapper fw = ((FeatureWrapper) view.getItemAtIndex(index)); return fw.getFeature(); } COM: <s> gets the first feature within a given range inclusive </s>
funcom_train/30254267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleFailedPing() { Log.warn("Failed to ping WIC servlet"); Log.error("It seems connection with session is lost." + "Starting relogin proccess..."); reset(); entryPoint(); blockGUI(Constants.CONNECTION_LOST_TRY_RECONNECT); /* Util.makeRPC().login(currentUserInfo.getUserOrg(), currentUserInfo.getUserName(), currentUserInfo.getPassword(), new LoginCallback(currentUserInfo.getUserName())); */ } COM: <s> handles failed ping attempt </s>
funcom_train/11102688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Lifecycle lifecycle() { if (lifecycle == null) { String lifecycleId = servletContext.getInitParameter("javax.faces.LIFECYCLE_ID"); if (lifecycleId == null) { lifecycleId = LifecycleFactory.DEFAULT_LIFECYCLE; } lifecycle = ((LifecycleFactory) FactoryFinder. getFactory(FactoryFinder.LIFECYCLE_FACTORY)).getLifecycle(lifecycleId); } return lifecycle; } COM: <s> p return the code lifecycle code for this application </s>
funcom_train/32649000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createMainComposite() { GridData gridData1 = new GridData(); gridData1.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; gridData1.grabExcessHorizontalSpace = true; gridData1.grabExcessVerticalSpace = true; gridData1.verticalAlignment = org.eclipse.swt.layout.GridData.FILL; mainComposite = new Composite(this, SWT.NONE); mainComposite.setLayout(new FillLayout()); createStackComposite(); mainComposite.setLayoutData(gridData1); } COM: <s> this method initializes main composite </s>
funcom_train/11101103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toNMS(NormalizedMessage normalizedMessage, Packet packet) throws MessagingException { addNmsProperties(normalizedMessage, packet); if (packet instanceof Message) { Message message = (Message) packet; Source source = sourceMarshaler.asSource(message.getBody()); normalizedMessage.setContent(source); } // lets add the packet to the NMS normalizedMessage.setProperty("org.apache.servicemix.jabber.packet", packet); } COM: <s> marshals the jabber message into an nms message </s>
funcom_train/14333419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean arrayContainsObject(Object obj, Object[] container) { if (obj == null) { return true; } if (container == null) { return false; } for (int i = 0; i < container.length; i++) { if (container[i].equals(obj)) { return true; } } return false; } COM: <s> check if all object of object array can be found in obeject container </s>
funcom_train/138728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeBed (PrintWriter out){ String chrom = sliceInfo.getChromosome(); String strand = sliceInfo.getStrand(); for (int i=0; i< sortedPositions.length; i++){ //chrom start stop name score strand out.println(chrom+"\t"+sortedPositions[i].position+"\t"+(sortedPositions[i].position + 1)+"\t"+".\t0\t"+strand); } } COM: <s> writes six column xxx </s>
funcom_train/51046673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected BrowserTransaction createTransaction(String type) { Constructor ctor = (Constructor) txnCtors.get(type); if (ctor == null) { throw new IllegalStateException("Unregistered transaction type: " + type); } try { Object[] params = new Object[] { new Integer(getNextTransactionId()), type, context }; return (BrowserTransaction) ctor.newInstance(params); } catch (Exception e) { throw new RuntimeException("Exception creating transaction for type " + type, e); } } COM: <s> creates a new transaction for this listener and the browser </s>