__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/27959283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object retrieveBookmarkState(int levelOfDetail) { if (this.result == null) return null; try { if (levelOfDetail == Bookmarkable.EXTENSIONAL) return getExtensionalBookmarkState(); return getIntensionalBookmarkState(); } catch (OlapException e) { logger.error(null, e); throw new RuntimeException(e); } } COM: <s> create a memento bean object holding current state </s>
funcom_train/21105250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OkCancelBtnsPanelBean getOkCancelBtnsPanel() { if (okCancelBtnsPanel == null) { okCancelBtnsPanel = new OkCancelBtnsPanelBean(); okCancelBtnsPanel.setPreferredSize(new java.awt.Dimension(200, 30)); okCancelBtnsPanel.addOkCancelPressedListener(new OkCancelBtnsPanelListener()); } return okCancelBtnsPanel; } COM: <s> this method initializes ok cancel btns panel </s>
funcom_train/49318219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JMenuItem createEditPreferencesMenuItem() { JMenuItem menuItem = new JMenuItem(_I18N.getString("preferences")); menuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { DialogUtil.error("Sorry, not implemented..."); //_imageDisplay.editPreferences(); } }); return menuItem; } COM: <s> create the edit preferences menu item </s>
funcom_train/16102946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectDefaultViewDocument() { for (int i = 0; i < cbxViewDocuments.getItemCount(); i++) { DropDownHolder ddh = (DropDownHolder) cbxViewDocuments.getItemAt(i); if (((ViewDocumentValue) ddh.getObject()).isIsVdDefault()) { cbxViewDocuments.setSelectedItem(ddh); break; } } } COM: <s> method selects the default viewdocument for the current site </s>
funcom_train/1492196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModelAndView viewHost(HttpServletRequest request, HttpServletResponse response) throws Exception { ModelAndView mav = new ModelAndView("repat.host"); String host = request.getParameter("host"); Locale locale = RequestContextUtils.getLocale(request); addHostInfo(mav, host, locale); mav.addObject("networkTotal", occurrenceManager.getTotalOccurrenceRecordCount()); mav.addObject("mapServerUrl", mapContentProvider.getMapServerURL()); return mav; } COM: <s> show view breakdown for this host </s>
funcom_train/39803123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractButton getSelectedButton() { final ButtonModel selectedModel = buttonGroup.getSelection(); final AbstractButton children[] = getButtonComponents(); for (int i = 0; i < children.length; i++) { AbstractButton button = children[i]; if (button.getModel() == selectedModel) { return button; } } return null; } COM: <s> gets the currently selected button </s>
funcom_train/8967496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void trunc() { if (!(this.exponent >= 0 && this.mantissa != 0)) return; if (exponent < 0x40000000) { makeZero(sign); return; } int shift = 0x4000003e-exponent; if (shift <= 0) return; mantissa &= ~((1L<<shift)-1); normalize(); } COM: <s> rounds this code real code value to the closest value towards </s>
funcom_train/12550850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeMethodSnap() throws IOException,JDOMException { //Write the snapshot Driver.show.writeSnap(Driver.TITLE, MakeURI.doc_uri(lineNumber, f), MakeURI.make_uri(lineNumber, PseudoCodeDisplay.GREEN, f), Driver.runTimeStack, f.jvmLegend, Driver.heap); } COM: <s> write a snapshot of a bytecode that calls a method </s>
funcom_train/4960858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showPlayBar(Action playAction, Action stopAction, Action nextAction){ this.toolbar = new JToolBar(); this.toolbar.add(playAction); this.toolbar.add(stopAction); this.toolbar.add(nextAction); this.toolbar.addSeparator(); this.menuBar.add( toolbar, BorderLayout.PAGE_START ); this.playPanelShowed = true; this.frameView.validate(); this.frameView.repaint(); } COM: <s> f gt die play toolbar der men bar hinzu </s>
funcom_train/43896604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AttributesImpl createAttributes(String[] nameValuePairs) { AttributesImpl attributes = new AttributesImpl(); for (int i = 0; i < nameValuePairs.length; i += 2) { String name = nameValuePairs[i]; String value = nameValuePairs[i + 1]; attributes.addAttribute("", name, name, "", value); } return attributes; } COM: <s> utility method for creating attributes from an array of name value </s>
funcom_train/29908646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long openKeyHandle(long handle, String[] path, boolean readOnly) { long h = handle; if (path == null) return h; for (int i = 0; i < path.length; i++) { long nh = openKeyHandle(h, path[i], readOnly); if (h != handle) Registry.closeKey(h); h = nh; } return h; } COM: <s> opens up the key for this path </s>
funcom_train/16422955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnDelete() { if (btnDelete == null) { btnDelete = new JButton(); try { btnDelete.setText(resouceBundle.getString("btnDelete")); btnDelete.setIcon(new ImageIcon(getClass().getResource( "/org/uc/gui/swing/icons/buttonBar/btnDelete.png"))); // Generated } catch (MissingResourceException e) { btnDelete.setText("F8 Delete"); } } return btnDelete; } COM: <s> this method initializes btn delete </s>
funcom_train/37587111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void textGotoLine2() throws BadLocationException { final String s = "abcd\n"; _doc.insertString(0, s, null); _doc.gotoLine(2); assertEquals("#0.0", 5, _doc.getCurrentLocation()); } COM: <s> test going to a specific line </s>
funcom_train/13914071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToString() { System.out.println("toString"); ProxymaHttpHeader instance = null; String expResult = "name: value"; //Test null value instance = new ProxymaHttpHeader("name", "value"); assertEquals(expResult, instance.toString()); } COM: <s> test of to string method of class proxyma http header </s>
funcom_train/1522413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onSessionsClick(View v) { // Launch sessions clustered by track final Intent intent = new Intent(Intent.ACTION_VIEW, Tracks.CONTENT_URI); intent.putExtra(Intent.EXTRA_TITLE, getString(R.string.title_session_tracks)); intent.putExtra(TrackDetailActivity.EXTRA_FOCUS_TAG, TrackDetailActivity.TAG_SESSIONS); startActivity(intent); } COM: <s> handle sessions action </s>
funcom_train/29955757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return new StringBuffer().append("PtarURI[uri=").append(_uri.toString()) .append(",file=").append(_file) .append(",url=").append(_url) .append(",systemid=").append(_systemId).append("]").toString(); } COM: <s> obtain the uri represented in string form </s>
funcom_train/31959104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMonitorInformation(String message) { try { TextMessage mmessage = getNewMonitorMessage(); mmessage.setStringProperty("Type", "INFO"); mmessage.setText("[" + getDateFormat() + " INFO] Message: " + message); monitorSender.send(queue, mmessage); } catch (Exception e) { e.printStackTrace(); } } COM: <s> send the given information as a jms message to the monitor queue queue </s>
funcom_train/9987707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFromFolder(String resourceId, String folderResourceId) throws Exception { if (resourceId == null || folderResourceId == null) { throw new DocumentListException("null passed in for required parameters"); } URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + folderResourceId + URL_FOLDERS + "/" + resourceId); service.delete(url, getDocsListEntry(resourceId).getEtag()); } COM: <s> remove an object from a folder </s>
funcom_train/41547153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPartControl(Composite parent) { viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); viewer.setContentProvider(new ViewContentProvider()); viewer.setLabelProvider(new ViewLabelProvider()); viewer.setSorter(new NameSorter()); viewer.setInput(getViewSite()); makeActions(); hookContextMenu(); hookDoubleClickAction(); contributeToActionBars(); // testHsqldb(); } COM: <s> this is a callback that will allow us </s>
funcom_train/51418483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPostIterationTextPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IterationNode_postIterationText_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IterationNode_postIterationText_feature", "_UI_IterationNode_type"), JetsetPackage.Literals.ITERATION_NODE__POST_ITERATION_TEXT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the post iteration text feature </s>
funcom_train/29830429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void errorWM(JID roomJID, String errCode, String errMsg) { JOptionPane.showMessageDialog(docked? ((BSConfWinManager)winMan).mainFrame : frame, "Error " + errCode + ": " + errMsg + "!", "Error", JOptionPane.ERROR_MESSAGE); } COM: <s> code bsconf listener code function called from win man </s>
funcom_train/3720886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReference(String reference) throws ProfileException { String oldReference = this.reference; try { vetoableChangeSupport.fireVetoableChange("reference", oldReference, reference); } catch (Exception e) { throw new ProfileException(null, e); } this.reference = reference; propertyChangeSupport.firePropertyChange("reference", oldReference, reference); } COM: <s> setter for property reference </s>
funcom_train/36184063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFrame getJFrame() { if (jFrame == null) { jFrame = new JFrame(); jFrame.setSize(new Dimension(343, 187)); jFrame.setTitle("Action Simulator GUI"); jFrame.setContentPane(getJContentPane()); } return jFrame; } COM: <s> this method initializes j frame </s>
funcom_train/3771605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getETag(ResourceInfo resourceInfo, boolean strong) { if (strong) return "\"" + getETagValue(resourceInfo, strong) + "\""; else return "W/\"" + getETagValue(resourceInfo, strong) + "\""; } COM: <s> get the etag associated with a file </s>
funcom_train/44871850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getTicksFontPanel() { if (ticksFontPanel == null) { ticksFontLabel = new JLabel(); ticksFontLabel.setText("Font Size "); ticksFontPanel = new JPanel(); ticksFontPanel.setLayout(new BoxLayout(getTicksFontPanel(), BoxLayout.X_AXIS)); ticksFontPanel.add(ticksFontLabel, null); ticksFontPanel.add(getTickFontSizeCB(), null); } return ticksFontPanel; } COM: <s> this method initializes ticks font panel </s>
funcom_train/27811192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TranscodeScheme getTranscodeScheme(Player player) { String username = player.getUsername(); if (username != null) { UserSettings userSettings = settingsService.getUserSettings(username); return player.getTranscodeScheme().strictest(userSettings.getTranscodeScheme()); } return player.getTranscodeScheme(); } COM: <s> returns the strictest transcoding scheme defined for the player and the user </s>
funcom_train/42707813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNewValue() { if (this.combValue == null) { if (txtfValue == null) { return txtaValue.getText(); } return txtfValue.getText(); } else { if (this.combValue.getSelectedIndex() < 0) { //grab whatever was typed return (String)combValue.getSelectedItem(); } else { //grab the appropriate value from the vector return localVals.get(combValue.getSelectedIndex()); } } } COM: <s> this method returns the new string value </s>
funcom_train/8087896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getResultCategorical(double[] incoming) throws Exception { if (m_opType == FieldMetaInfo.Optype.CONTINUOUS) { throw new IllegalArgumentException("[Apply] Can't return result as " + "categorical/ordinal because optype is continuous!"); } double result = getResult(incoming); return m_outputStructure.value((int)result); } COM: <s> get the result of evaluating the expression for continuous </s>
funcom_train/44733613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Dimension getPreferredDimension(ArrayList comps) { int w = 0, h = 0; for (int i = 0; i < comps.size(); i++) { Component c = (Component) (comps.get(i)); Dimension d = c.getPreferredSize(); w = Math.max(w, d.width); h = Math.max(h, d.height); } return new Dimension(w, h); } COM: <s> returns the ideal width for a vertically oriented toolbar </s>
funcom_train/9552947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DirlogEntry quickContains(String directory) { Iterator<DirlogEntry> it = orderedEntries.descendingIterator(); while (it.hasNext()) { DirlogEntry dirlogEntry = it.next(); if (dirlogEntry.getPath().endsWith(directory)) { return dirlogEntry; } } return null; } COM: <s> searches for an explicit directory name </s>
funcom_train/51104120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StringBuffer printAttributes(Attributes atts) { StringBuffer sb = new StringBuffer(); String name, value; for (int i = 0; i < atts.getLength(); i++) { value = atts.getQName(i); name = atts.getValue(i); sb.append("Name: " + name + "\tValue: " + value + "\n"); } return sb; } COM: <s> prints the attributes </s>
funcom_train/18783985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean queryYesNoQuestion(String message) { MessageDialog dialog = new MessageDialog(getContainer().getShell(), PreferencesMessages.Question, (Image) null, message, MessageDialog.NONE, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0); // ensure yes is the default return dialog.open() == 0; } COM: <s> displays a yes no question to the user with the specified message and </s>
funcom_train/40131697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetUsernameInfo() { System.out.println("getUsernameInfo"); LoginInfo instance = new LoginInfo(); instance.setUsernameInfo("TestUser"); String expResult = "TestUser"; String result = instance.getUsernameInfo(); assertEquals(expResult, result); } COM: <s> test of get username info method of class login info </s>
funcom_train/22440596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleFileNotCheckedOut(final IVSSItem item) { try { updateResourceState(_resource, true, getCheckedOutData(item)); VSSPlugin.runAsync(new Runnable() { public void run() { MessageDialog.openError( getShell(), Policy.bind("notCheckedOut.title"), Policy.bind("notCheckedOut.message", _resource.getFullPath())); } }); } catch (COMException e) { VSSPlugin.log(e); } } COM: <s> method handle file not checked out </s>
funcom_train/32600927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Transition findTransition(Tab tab) { // iterate through the transitions Iterator<Transition> it = transitions.iterator(); while (it.hasNext()) { Transition t = it.next(); // if it has the same Tab object we found it if (t.tab == tab) return t; } return null; } COM: <s> find a transition for a given tab </s>
funcom_train/34138383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void useCurrentLocAsDefault() { Locale currentLocale = Locale.getDefault(); prefsEditor.putString(KEY_TTS_DEFAULT_LANG, currentLocale.getISO3Language()); prefsEditor.putString(KEY_TTS_DEFAULT_COUNTRY, currentLocale.getISO3Country()); prefsEditor.putString(KEY_TTS_DEFAULT_VARIANT, currentLocale.getVariant()); prefsEditor.commit(); } COM: <s> helper function for init default lang sets the default language in tts </s>
funcom_train/17269380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMessage() { System.out.println("getMessage"); /* * String key = ""; String expResult = ""; String result = JWP.getMessage(key); 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 message method of class com </s>
funcom_train/50048448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toSimplifiedString() { String h = ""; String m = ""; if (hours < 10) h = "0"; h += Integer.toString(hours); if (minutes < 10) m = "0"; m += Integer.toString(minutes); return h + ":" + m ; } COM: <s> return a string representation of the time without seconds </s>
funcom_train/16965350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toBase32() { StringBuilder buf = new StringBuilder(); long firstFiveBitsMask = 0xf800000000000000l; long bitsCopy = bits; int partialChunks = (int) Math.ceil(((double) significantBits / 5)); for (int i = 0; i < partialChunks; i++) { int pointer = (int) ((bitsCopy & firstFiveBitsMask) >>> 59); buf.append(base32[pointer]); bitsCopy <<= 5; } return buf.toString(); } COM: <s> get the base32 string for this </s>
funcom_train/24503593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JComponent getBoardView(){ if (chessBoard == null || layeredBoard == null){ if (SwingUtilities.isEventDispatchThread()){ makeBoard(); } else { try { SwingUtilities.invokeAndWait(new Runnable(){ @Override public void run() { makeBoard(); } }); } catch (Exception e){ throw new RuntimeException(e); } } } return layeredBoard; } COM: <s> furnishes a jcomponent which represents a chess board </s>
funcom_train/32778362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeEntry(N value, double tolerance) { for (Entry e : _values) { if (e.entryValue.doubleValue() - value.doubleValue() < tolerance) { _totalProbabilities -= e.entryFrequency; _values.remove(e); } } if (_values.isEmpty()) { _isInitialized = false; } } COM: <s> removes all entries of all empirical values close </s>
funcom_train/8066774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteFromModel() { LOG.debug("Deleting from model"); Iterator ps = _ports.iterator(); while (ps.hasNext()) { ((NetPort) ps.next()).deleteFromModel(); } DefaultGraphModel gm = (DefaultGraphModel) Globals.curEditor() .getGraphModel(); gm.removeNode(this); firePropertyChange("disposed", false, true); } COM: <s> remove this node from the underling connected graph model </s>
funcom_train/2288875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setJobName(String jobName) { checkFrozen(); if (CmsStringUtil.isEmpty(jobName) || !jobName.trim().equals(jobName)) { throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_JOB_NAME_1, jobName)); } m_jobName = jobName; } COM: <s> sets the job name </s>
funcom_train/47907325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Double getEuroRun(){ Double euroRun = 0.0; long er = (long) 0.0; if (Double.valueOf(this.getExcerciseCount()) != 0.0){ euroRun = this.getPrice() / Double.valueOf(this.getExcerciseCount()); } else euroRun = this.getPrice(); return this.roundTwoDecimals(euroRun, 2); } COM: <s> calculates the amount of euro paid per run </s>
funcom_train/20515860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteAsync(final File file) { new Thread(new Runnable() { public void run() { try { logger.info("Deleting file " + file); Utils.rm(file); logger.info("Delete completed successfully."); } catch(Exception e) { logger.error(e); } } }, "background-file-delete").start(); } COM: <s> delete the given file in a seperate thread </s>
funcom_train/49659115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String update() { message(null, "QuantitiesUpdated"); // FacesContext context = context(); // ValueBinding vb = // context.getApplication().createValueBinding("#{catalog.totalBooks.value}"); // vb.setValue(context, new Integer(cart().getNumberOfItems())); return (null); } COM: <s> p update the quantities in the shopping cart based on the </s>
funcom_train/4891808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStartDateStr() { if (!this.isStarted()) { return "not started"; } else if (this.startDateStr == null) { this.startDateStr = new SimpleDateFormat("HH:mm:ss.SSS").format(this.getStartDate()); } return this.startDateStr; } COM: <s> get the human readable version of the starting time string </s>
funcom_train/7698754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getColumnType() { if (dd.optimise_TextOnly == true) { fieldType = 2; } String columnType = null; if (databaseType == 1) { columnType = getColumnType_MySql(); } else if (databaseType == 2) { columnType = getColumnType_MsSql(); } return columnType; } COM: <s> get ready to figure out how to alter the column </s>
funcom_train/51413601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFinalMapping() { String result = "argX"; String mapDefS; for(int i=0; i<mapDef.size(); i++) { mapDefS = ((MapDef)mapDef.get(i)).getMapDef(); if(! mapDefS.equals("")) { result += mapDefS; } } return result; } COM: <s> gets the full mapping definition </s>
funcom_train/43894351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { if ((other != null) && other instanceof GeoResource) { GeoResource resource = (GeoResource) other; if ((getIdentifier() != null) && (resource.getIdentifier() != null)) { return getIdentifier().equals(resource.getIdentifier()); } } return false; } COM: <s> this should represent the identifier </s>
funcom_train/18142814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireObjectChanged(RescueObject o, int property, int timestep, Object source) { ObjectChangedEvent event = new ObjectChangedEvent(o,property,timestep,source); synchronized(LOCK) { if (listeners==null) listeners = new HashSet(); for (Iterator it = listeners.iterator();it.hasNext();) { ((MemoryListener)it.next()).objectChanged(event); } } } COM: <s> notify listeners that an object has been changed </s>
funcom_train/37104383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _testFromFile() throws Exception { PubmedFetcher fetcher = new PubmedFetcher(); fetcher.extractMapsFromInputStream (new FileInputStream("data/sample_medline_from_pubmed.txt")); List docs = fetcher.documents(); UniqueArticleCollection uniqueArticles = new UniqueArticleCollection (); uniqueArticles.addAll(docs); uniqueArticles.addAll(docs); uniqueArticles.addAll(docs); assertEquals(docs.size(), uniqueArticles.size()); } COM: <s> this method reads from a file containing pubmed documents in medline format </s>
funcom_train/45349277
/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 (isOpaque()) { g.setColor(getBackground()); g.fillRect(0, 0, getWidth(), getHeight()); } if (backgroundImage != null) { g.drawImage(backgroundImage, 0, 0, this); } } COM: <s> overrides the painting to display a background image </s>
funcom_train/12796191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFreeDiskSpace(String diskVol) throws NSClient4JException { // Returns <free>&<total> String result[] = split(submittRequest(password + "&4&" + diskVol), "&"); double freeSpace = Double.parseDouble(result[0]); return "" + freeSpace; } COM: <s> returns the free disk space for the volume name passed </s>
funcom_train/18880141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonPostChange() { if (jButtonPostChange == null) { jButtonPostChange = new JButton(); jButtonPostChange.setText("Post Changes"); // Generated jButtonPostChange.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { postChanges(); } }); } return jButtonPostChange; } COM: <s> this method initializes j button post change </s>
funcom_train/47209497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector assignActionState(){ changeSystemState(Global.SYS_ASSIGN_ACTION); Vector allPlugins; Global.pluginLayerLock.writeLock().lock(); try{ allPlugins = Global.pluginLayer.getAllPluginRefs(); }finally{ Global.pluginLayerLock.writeLock().unlock(); } return allPlugins; } COM: <s> assign action state </s>
funcom_train/15922979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean typeEquals(Type type1, Type type2) { if (type1 == type2) return true; if (type1 == null || type2 == null) return false; if (type1 instanceof JavaArrayType && type2 instanceof JavaArrayType) { JavaArrayType at1 = (JavaArrayType) type1; JavaArrayType at2 = (JavaArrayType) type2; return typeEquals(at1.base(), at2.base()); } return ts.equals((TypeObject) type1, (TypeObject) type2); } COM: <s> returns true iff type1 and type2 are equivalent </s>
funcom_train/18503669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed(int x, int y, int button) { if (button == MouseEvent.BUTTON1) { //If left mouse button is pressed, not canceled anymore and pass through the press canceled = false; mousePressed(x, y); } else { //If any other button pressed, set to canceled and remove the preview canceled = true; show(null); } } COM: <s> called when the mouse is pressed </s>
funcom_train/19294923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private VECMStageOneSpecDialog getStageOneDialog() { if (stageOneDialog == null) stageOneDialog = new VECMStageOneSpecDialog(TopFrameReference .getTopFrameRef(), true); stageOneDialog .setLocationRelativeTo(TopFrameReference.getTopFrameRef()); return stageOneDialog; } COM: <s> initializer for the dialog for stage one settings </s>
funcom_train/8076284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void alterSyntax() { m_st.resetSyntax(); m_st.wordChars('\u0000', '\u00ff'); m_st.slashStarComments(false); m_st.slashSlashComments(false); m_st.ordinaryChar('\n'); m_st.ordinaryChar('\r'); } COM: <s> this is the alternative syntax for the tokenizer </s>
funcom_train/4780565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Repository findRepository(String repositoryName) throws AppException { Validator.validateRepositoryName(repositoryName); Repository repository = null; boolean found = false; if (repositories != null) { int size = repositories.size(); for (int i = 0; i < size; i++) { repository = repositories.get(i); if (repository.getName().equals(repositoryName)) { found = true; break; } } if (!found) { repository = null; } } return repository; } COM: <s> locates a repository by name </s>
funcom_train/22489667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDataPath (int row) throws IllegalStateException { if (!hasAbsolutePath()) { throw new IllegalStateException( "the column datapath contains no " + ROW_PLACEHOLDER + " placeholder" ); } StringBuffer path= new StringBuffer(_datapath); int pos= _datapath.indexOf(ROW_PLACEHOLDER); path.replace(pos, pos + ROW_PLACEHOLDER.length(), ""); path.insert(pos, row); return path.toString(); } COM: <s> returns the datapath with the row placeholder replaced by the given row </s>
funcom_train/31028856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connectToDB(AccountStore store) { int numAttempts = 0; int maxAttempts = 10; while(!store.isConnected()) { try { Thread.sleep(100); } catch (InterruptedException e) { fail("Interrupt Exception " + e.getMessage()); } if(numAttempts >= maxAttempts) { fail("Cannot connect to database"); } numAttempts++; } } COM: <s> utility method that waits till the database has been connected to </s>
funcom_train/18111925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCountryPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ContactDetails_Country_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ContactDetails_Country_feature", "_UI_ContactDetails_type"), BioDBPackage.Literals.CONTACT_DETAILS__COUNTRY, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the country feature </s>
funcom_train/25705373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getCBrating() { if( CBrating == null ) { CBrating = new JComboBox(); for( int x=0; x < RatingStringProvider.ratingStrings.length; x++ ) { CBrating.addItem(RatingStringProvider.ratingStrings[x]); } } return CBrating; } COM: <s> this method initializes cbrating </s>
funcom_train/13272010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNewWallThickness(float newWallThickness) { if (this.newWallThickness != newWallThickness) { float oldDefaultThickness = this.newWallThickness; this.newWallThickness = newWallThickness; this.propertyChangeSupport.firePropertyChange(Property.NEW_WALL_THICKNESS.name(), oldDefaultThickness, newWallThickness); } } COM: <s> sets default thickness of new walls in home and notifies </s>
funcom_train/9499029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getXMLtags() { StringBuffer sb = new StringBuffer(); sb.append(getLineStyleXML()); sb.append(getXMLvisualTags()); sb.append(getXMLanimationTags()); sb.append(getXMLfixedTag()); sb.append(getAuxiliaryXML()); sb.append(getBreakpointXML()); return sb.toString(); } COM: <s> returns all class specific xml tags for get xml geo gebra file format </s>
funcom_train/44846768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initPlugs() { PluginManager p = PluginManager.getInstance(); DejaVuPlugin[] plugins = p.getPlugins(); for (DejaVuPlugin pz : plugins) { JComponent c = pz.getPluginComponent(); tabViews.addTab(pz.getPluginName(), c); } } COM: <s> initializes any plugins available and add them as tabs to the </s>
funcom_train/3721021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSpecVersion(String specVersion) throws java.beans.PropertyVetoException { String oldSpecVersion = this.specVersion; vetoableChangeSupport.fireVetoableChange("specVersion", oldSpecVersion, specVersion); this.specVersion = specVersion; propertyChangeSupport.firePropertyChange("specVersion", oldSpecVersion, specVersion); } COM: <s> setter for property spec version </s>
funcom_train/1835499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendErrorMessage (String error) throws IOException { String header = "+ERR"; String packet = header + error; _logger.debug("Sending client the error message: {}", error); try { this.out.write(packet.getBytes()); this.out.flush(); } catch (IOException ie) { _logger.error("Couldn't send error message to client"); } finally { this.out.close(); } } // End sendErrorMessage method COM: <s> send an error message to the client </s>
funcom_train/15624577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getText(final int start, final int len, @NotNull final Segment segment) { try { document.getText(start, len, segment); } catch (final BadLocationException bl) { bl.printStackTrace(); segment.offset = 0; segment.count = 0; } } COM: <s> copies the specified substring of the document into a segment </s>
funcom_train/42869252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Frame getFrame(int frameNumber) { if (frameNumber < 1) { return null; } Integer num = new Integer(frameNumber); Frame frame = frames.get(num); if (frame == null) { frame = new Frame(frameNumber, this); frames.put(num, frame); if (frameNumber > frameCount) { frameCount = frameNumber; } } return frame; } COM: <s> get the frame object for the given frame number or create one if </s>
funcom_train/22279049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void describeClassInfo(ClassInfo info) { info.addClass("netscape.application.TextAttachment", 1); info.addField(OWNER_KEY,OBJECT_TYPE); info.addField(WIDTH_KEY,INT_TYPE); info.addField(HEIGHT_KEY,INT_TYPE); } COM: <s> describes the text attachment classs information </s>
funcom_train/13410224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RenderContext switchContext(Object contextKey) { currentContext = contextStore.get(contextKey); if (currentContext == null) { currentContext = new RenderContext(); currentContext.setupRecords(getRenderer()); contextStore.put(contextKey, currentContext); } return currentContext; } COM: <s> switches to another render context identified by the context key or to a </s>
funcom_train/25649345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetProperty() { System.out.println("getProperty"); Settings.setProperty(KEY, VALUE); String result = Settings.getProperty(KEY); assertEquals(VALUE, result); result = Settings.getProperty(""); assertEquals(null, result); result = Settings.getProperty(null); assertEquals(null, result); } COM: <s> test of get property method of class com </s>
funcom_train/31056370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Frame constructFrame( final Object o, Component c, String s ) { final Frame f = new Frame( s ); f.setFont( Global.defaultFont ); f.add( c ); f.pack(); f.show(); f.addWindowListener( new WindowAdapter() { public void windowClosing( WindowEvent event ) { Debug.notice( "closing " + o.getClass().getName() + "'s frame, but not destroying the object" ); f.dispose(); } }); return f; } COM: <s> helper function to create a frame for a specific agent with a </s>
funcom_train/9760078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SourceViewerDecorationSupport getSourceViewerDecorationSupport(ISourceViewer viewer) { if (fSourceViewerDecorationSupport == null) { fSourceViewerDecorationSupport= new SourceViewerDecorationSupport(viewer, getOverviewRuler(), getAnnotationAccess(), getSharedColors()); configureSourceViewerDecorationSupport(fSourceViewerDecorationSupport); } return fSourceViewerDecorationSupport; } COM: <s> returns the source viewer decoration support </s>
funcom_train/19438109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void decodeLapData(Workout workout) { int numberOfLaps = getNumberOfLaps(); int lapSize = calculateLapLength(); workout.setLapList(new Lap[numberOfLaps]); // //process all laps for (int i = 0; i < numberOfLaps; i++) { Lap lap; int lapOffset; decodeLapDataForOneLap(workout, lapSize, i); } } COM: <s> decode lap data </s>
funcom_train/12562618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { SocketConnection sock; while (true) { d("listening on port " + PORT); try { sock = (SocketConnection)serv.acceptAndOpen(); } catch (IOException ioe) { d("accept failed: " + ioe); try { serv.close(); } catch (IOException ignored) { } return; } d("connected"); readSocket(sock); d("disconnected"); } } COM: <s> the socket listener loop </s>
funcom_train/15861465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { byte[] b = null; //System.out.println("Sending message on control channel"); b = constructMessage().toByteArray(); DatagramPacket packet = new DatagramPacket(b, b.length, group, port); try { socket.send(packet); } catch (IOException e) { System.err.println(e); try { System.out.println("Message Size: " + b.length); System.out.println("SendBufferSize: " + socket.getSendBufferSize()); } catch (SocketException se) { System.err.println(se); } } } COM: <s> send a message with the current status of the demo </s>
funcom_train/44869064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WCMRiemannSliceBean getSlice() { if (slice == null) { slice = new WCMRiemannSliceBean(); slice.setShape(WCMRiemannSumRectsBean.POLAR); slice.setSliceWidth(5.0F); slice.setMethod(WCMRiemannSumRectsBean.MIDPOINT); slice.setCoordinate(getThInput()); slice.setXMin(getAInput()); slice.setXMax(getBInput()); slice.setUpperFunction(getFInput()); if (presentation) { slice.setSliceWidth(10.0f); } } return slice; } COM: <s> this method initializes slice </s>
funcom_train/49751598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { History.newItem("start"); tabs.add(HomeTabWidget.getInstance(), MY_CONSTANTS.homeTab()); tabs.add(GiftTabWidget.getInstance(), MY_CONSTANTS.giftTab()); tabs.add(VolunteerTabWidget.getInstance(), MY_CONSTANTS.volunteersTab()); tabs.add(ThankyouTabWidget.getInstance(), "Thank You"); tabs.selectTab(0); RootPanel.get(APP_ID).add(tabs); ServerFacade.loadCities(); } COM: <s> this is the entry point method </s>
funcom_train/44689351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setStatusBarTextHighlighted(boolean highlighted, Color color) { // Use #coordinateLabel rather than (unattached) dummy label because // dummy label's background does not change when L&F changes. [Jon Aquino] messageTextField.setForeground(highlighted ? Color.black : coordinateLabel.getForeground()); messageTextField.setBackground(highlighted ? color : coordinateLabel.getBackground()); } COM: <s> to highlight a message call warn user </s>
funcom_train/25841606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String authorizationParameters(String authToken) { TreeMap<String, String> parameters = new TreeMap<String, String>(); parameters.put("api_key", mApiKey); parameters.put("auth_token", authToken); parameters.put("popup", "1"); parameters.put("v", "1.0"); return FBMethod.urlParameters(parameters); } COM: <s> generate a url to load in the browser for a user to see </s>
funcom_train/28298507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkMouseOver(TransBaseMap map, int x, int y) { if (map!=null) { TransBaseSelection oldSel=map.getMouseOver(); TransBaseSelection sel=map.getMouseOver(x,y); if (sel!=null || (sel==null && oldSel!=null)) return true; } return false; } COM: <s> checks if the mouse is over something on the map </s>
funcom_train/11074746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean findMatch(Iterator lit, Iterator rit) { HashSet left = new HashSet(); while (lit.hasNext()) { left.add(lit.next()); } while (rit.hasNext()) { if (containsMatch(left.iterator(), rit.next())) { return true; } } return false; } COM: <s> learn whether there is an intersection between two iterators </s>
funcom_train/19311929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateNext() { this.nextPageSequence = null; while (this.nextPageSequence == null) { if (! this.descendantIterator.hasNext()) { return; } final OrderedTreeNode node = this.descendantIterator.next(); if (node instanceof PageSequence) { this.nextPageSequence = (PageSequence) node; } } } COM: <s> loads the instance variable next page sequence with the next item to </s>
funcom_train/32823609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addWebServiceSecurityPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Workflow_webServiceSecurity_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Workflow_webServiceSecurity_feature", "_UI_Workflow_type"), ModelPackage.eINSTANCE.getWorkflow_WebServiceSecurity(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the web service security feature </s>
funcom_train/8685378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getExposedClass(Project project) { if (adaptToClass != null) { Class z = getTypeClass(project); if (z == null || adaptToClass.isAssignableFrom(z)) { return z; } } return (adapterClass == null) ? getTypeClass(project) : adapterClass; } COM: <s> get the exposed class for this </s>
funcom_train/15911602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LiteLink linkTo(LiteOutSlot out) { // Search the common node's parent LiteDesk topLevel = (LiteDesk)getAncestor(LiteDesk.class); LiteDesk topLevel2 = (LiteDesk)getAncestor(LiteDesk.class); if (topLevel == topLevel2) { LiteLink link = new LiteLink(this, out); topLevel.add(0, link); link.invalidate(); return link; } else return null; } COM: <s> creates a new link between this slot and another slot </s>
funcom_train/3414600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toBundleName(String baseName, Locale locale) { if (locale == Locale.ROOT) { return baseName; } String language = locale.getLanguage(); String country = locale.getCountry(); String variant = locale.getVariant(); if (language == "" && country == "" && variant == "") { return baseName; } StringBuilder sb = new StringBuilder(baseName); sb.append('_'); if (variant != "") { sb.append(language).append('_').append(country).append('_').append(variant); } else if (country != "") { sb.append(language).append('_').append(country); } else { sb.append(language); } return sb.toString(); } COM: <s> converts the given code base name code and code locale code </s>
funcom_train/3312982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void configure( Object o ){ putValue(ACCELERATOR_KEY,o); // well, not THAT easy to get some simple keystroke work... cFrame.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW). put((KeyStroke)o,getValue(NAME)); cFrame.getRootPane().getActionMap().put(getValue(NAME),this); if(menuItem!=null) menuItem.setAccelerator((KeyStroke)o); } COM: <s> inherited from configurable </s>
funcom_train/37018061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj){ boolean result= false; if(obj instanceof GridElt){ GridElt tmpElt= (GridElt)obj; if( (getURL() != null) && (tmpElt.getURL() != null) ){ result= getURL().equals(tmpElt.getURL()); } } return result; } COM: <s> compares two objects for equality </s>
funcom_train/4835160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkSelected(int x, int y) { if(x < 0 || x >= level.getMaze().getMaxX() || y < 0 || y >= level.getMaze().getMaxY()) { return false; } Tile t = level.getMaze().getTile(x, y); if (t == null) { return false; } if(t == selectedTile) { return true; } return false; } COM: <s> returns true if the passed x y coordinates correspond to the selected tile </s>
funcom_train/22909119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void matchTracksToSelectedImages() { List<ImageInfo> images = new ArrayList<ImageInfo>(); for (int index = 0; index < selectedRows.length; index++) { images.add(tableModel.getImageInfo(selectedRows[index])); } TaskExecutor.execute(new MatchImagesTask(MATCH_TRACKS, MATCH_TRACK_SELECTED, imagesTable, images)); } COM: <s> use the track matcher to find coordinates for all selected images </s>
funcom_train/40750070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void styleMessageButton(Button button, int buttonLogLevel, String levelText) { if (buttonLogLevel < Log.getCurrentLogLevel()) { button.addStyleDependentName(CSS_NOOP); button.setTitle("Currently has no effect"); } else { button.removeStyleDependentName(CSS_NOOP); button.setTitle("Send a '" + levelText + "' message"); } } COM: <s> update titles on message generating buttons </s>
funcom_train/9563893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateEnabledStatus() { final boolean tmpTsaEnabled = chkbTsaEnabled.isSelected(); tfTsaUrl.setEnabled(tmpTsaEnabled); tfTsaUser.setEnabled(tmpTsaEnabled); pfTsaPwd.setEnabled(tmpTsaEnabled); tfTsaPolicy.setEnabled(tmpTsaEnabled); tfOcspUrl.setEnabled(chkbOcspEnabled.isSelected()); } COM: <s> enabling text field </s>
funcom_train/21015849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSplitPane getLeftSplitPane() { if (leftSplitPane == null) { leftSplitPane = new JSplitPane(); leftSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT); leftSplitPane.setResizeWeight(0.5D); leftSplitPane.setBottomComponent(getBottomleftScrollPane()); leftSplitPane.setTopComponent(getTopleftScrollPane()); } return leftSplitPane; } COM: <s> this method initializes left split pane </s>
funcom_train/45451045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateFromJavaUtilDate() throws Exception { java.util.Date javaDate = new java.util.Date(); Date testDate = new Date(javaDate); assertNotNull("Test Date could not be created.", testDate); assertEquals("Test Date inconsistent", javaDate, testDate.getDate()); } COM: <s> test creating a date from a java </s>
funcom_train/22402223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel1() { if (jPanel1 == null) { jLabelHost = new JLabel(); jPanel1 = new JPanel(); jLabelHost.setText("Host :"); jPanel1.add(jLabelHost, null); jPanel1.add(getJTextFieldHost(), null); jPanel1.add(getJButtonConnect(), null); } return jPanel1; } COM: <s> this method initializes j panel1 </s>