__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/2627321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireChildPropertyChange(final PropertyChangeEvent event, final int propertyCode) { if (changeSupport != null) { changeSupport.firePropertyChange(event); } if (parent != null && (propertyCode & propertyChangeParentMask) != 0) { parent.fireChildPropertyChange(event, propertyCode); } } COM: <s> called by child node to forward property change events up the node tree </s>
funcom_train/14182225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset () { BankSlider.setValue ( 0 ); BankAngleTextField.setText ( "0" ); SpeedSlider.setValue ( 0 ); SpeedText.setText ( "0" ); TorqueSlider.setValue ( 64 ); TorqueTextField.setText ( "64" ); ammo = 14; hai.reset (); repaint (); } // end reset() COM: <s> resets the helicoptors state variables bank speed and torque </s>
funcom_train/28134468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getRepositories() { final IPreferenceStore ps = Maven2Plugin.getDefault().getPreferenceStore(); final String repositories = ps.getString(Maven2PreferenceConstants.P_M2_REPOSITORIES); final String[] repos = repositories.split(org.maven.ide.eclipse.ext.Maven2Plugin.REPO_SEPARATOR); final StringBuilder sbRepos= new StringBuilder(); for (int k=0; k<repos.length; k++) { sbRepos.append(repos[k]); if (k!=repos.length-1) { sbRepos.append(",");//$NON-NLS-1$ } } return sbRepos.toString(); } COM: <s> p a comma separated list of remote repositories p </s>
funcom_train/34339621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getCodVendedor() { if (CodVendedor == null) {//GEN-END:|41-getter|0|41-preInit // write pre-init user code here CodVendedor = new TextField("Cod Vendedor:", null, 5, TextField.ANY);//GEN-LINE:|41-getter|1|41-postInit // write post-init user code here }//GEN-BEGIN:|41-getter|2| return CodVendedor; } COM: <s> returns an initiliazed instance of cod vendedor component </s>
funcom_train/24937643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLongestSpace() { int largestSpace = -1; for (Object obj : latestComplement.keySet()) { AccessId accessid = (AccessId) obj; Latency latency = latestComplement.get(accessid); // Access access = accessid.getAccess(); if (latency.getMaxClocks() == Latency.UNKNOWN) { return Task.INDETERMINATE_GO_SPACING; } final int space = latency.getMaxClocks() - baseLatency.getMinClocks(); largestSpace = Math.max(space, largestSpace); } return largestSpace; } COM: <s> returns the largest difference between a latest accessor and the base </s>
funcom_train/14333449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ParamBoolean getBooleanParam(String name) throws BatchException { try { ParamBoolean p = (ParamBoolean) params.get(name); if (p == null) { throw new BatchException("Parameter " + name + " not found"); } else { return p; } } catch (ClassCastException e) { throw new BatchException("Parameter " + name + " is not of type Boolean"); } } COM: <s> get a boolean parameter by name </s>
funcom_train/10237669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IIntValue canProceed(IExtArguments arg) { // the return value boolean ret = true; int[] aliveThreads = arg.getSchedulingStrategyContext().getState() .getThreadIds(); try { ret = connectionRateManager .isMyTurn(arg.getSchedulingStrategyContext().getThreadId(), aliveThreads); } catch (Exception e) { ret = false; e.printStackTrace(); } return getBogorBooleanValue(ret); } COM: <s> implements the code expdef boolean can proceed a code </s>
funcom_train/44452258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validateCall(FacesContext context, UIComponent toValidate, Object value) { String rulename = (String) value; if (!containsRule(rulename)) { ((UIInput) toValidate).setValid(false); context.addMessage(toValidate.getClientId(context), new FacesMessage("This rule does not exist")); } } COM: <s> validation method for validating calls called rule name </s>
funcom_train/4205718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeRow(Object rowID) { if (Activator.getDefault().TRACE_SOURCE_MODEL) { LogUtils.debug(getModel(), "Model[" + getGrid().hashCode() + "]: removeRow(" + rowID + ")"); } final IGridBindingRowInformation row = getRows().get(rowID); row.dispose(); getContext().reflow(); } COM: <s> removes an existing row </s>
funcom_train/4786294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumnText(String[] columnTextStrings) { this.columnLabelStrings = columnTextStrings; this.columnAlignments = new int[columnLabelStrings.length]; for (int i = 0; i < columnAlignments.length; i++) { columnAlignments[i] = SWT.LEFT; } initializeColumns(); } COM: <s> clients must call this method or its overloaded cousin exactly once </s>
funcom_train/10585483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String updateCDATA(String pname, boolean parent) { String xupdateUpdate = pname + getParameterAsString(pname) + "]]></xupdate:update>"; return "<xupdate:modifications xmlns:xupdate=\"http://www.xmldb.org/xupdate\">" + xupdateUpdate + "</xupdate:modifications>"; } COM: <s> xupdate update cdata </s>
funcom_train/5437077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperty(Object name, Object value) { if(name == null || value == null) { throw new NullPointerException("Properties cannot have null names or values."); } if(properties == null) { System.out.println("No properties table set on this PacketInputStream."); return; } properties.put(name, value); } COM: <s> sets the property given by name to the given value </s>
funcom_train/32136472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTable getJTableSelectedFeatures() { if (jTableSelectedFeatures == null) { jTableSelectedFeatures = new JTable(); jTableSelectedFeatures.setShowGrid(false); jTableSelectedFeatures.setShowHorizontalLines(true); jTableSelectedFeatures.addPropertyChangeListener("tableCellEditor",new PropertyChangeListener(){ @Override public void propertyChange( PropertyChangeEvent propertychangeevent) { if(propertychangeevent.getNewValue() == null) saveSelectedFeatures(); } }); } return jTableSelectedFeatures; } COM: <s> this method initializes j table selected features </s>
funcom_train/15487889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSplitPane getJSplitPaneText() { if (jSplitPaneText == null) { jSplitPaneText = new JSplitPane(JSplitPane.VERTICAL_SPLIT); jSplitPaneText.setDividerSize(5); jSplitPaneText.setContinuousLayout(true); jSplitPaneText.setOneTouchExpandable(false); jSplitPaneText.setLeftComponent(getRegExTextPanel()); jSplitPaneText.setRightComponent(getTextPanel()); } return jSplitPaneText; } COM: <s> this method initializes j split pane text </s>
funcom_train/18740235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStaticEmptyGrammar() { ReteSearchEngine g = new ReteSearchEngine(new GraphGrammar("empty")); ReteNetwork network = g.getNetwork(); assertEquals(0, network.getRoot().getSuccessors().size()); assertEquals(0, network.getConditonCheckerNodes().size()); assertEquals(0, network.getProductionNodes().size()); } COM: <s> tests the static structure of the rete network for an empty grammar </s>
funcom_train/13994736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toURLParameterPart() { StringBuffer result = new StringBuffer().append('?'); for (Iterator it = parameters.keySet().iterator(); it.hasNext();) { String key = (String) it.next(); result.append(key).append('=').append(getParameter(key)[0]).append( '&'); } result.deleteCharAt(result.length() - 1); return result.toString(); } COM: <s> returns the parameters contained in this parameter parser as the url </s>
funcom_train/24288762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setLocale(Locale l, boolean select) { Locale oldLocale = locale; locale = l; int n = 0; if (select) { for (int i = 0; i < localeCount; i++) { if (locales[i].getCountry().length() > 0) { if (locales[i].equals(locale)) setSelectedIndex(n); n += 1; } } } firePropertyChange("locale", oldLocale, locale); //$NON-NLS-1$ if(component != null) { component.setLocale(l); } } COM: <s> sets the locale </s>
funcom_train/46768897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLocale(Locale locale) { if (locale == null) { return; } String lang = locale.getLanguage(); if (!table.containsKey(lang)) { // if a table for this language doesn't exist, create one. HashMap<String, String> newLocaleTable = new HashMap<String, String>(); // add the new locale table to the main table. table.put(lang, newLocaleTable); } } COM: <s> adds the specified locale to the store without any key value pairs </s>
funcom_train/38534489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addVariableChangeListener(VariableChangeListener listener) { super.addVariableChangeListener(listener); if (activity!=null) ((VariableChangeSource) activity).addVariableChangeListener(listener); for (int i=0;i<resources.length; i++) { ((VariableChangeSource) resources[i]).addVariableChangeListener(listener); } } COM: <s> adds a listener interested in variable change events </s>
funcom_train/20281873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParent(AstNode parent) { if (parent == this.parent) { return; } // Convert position back to absolute. if (this.parent != null) { setRelative(-this.parent.getPosition()); } this.parent = parent; if (parent != null) { setRelative(parent.getPosition()); } } COM: <s> sets the node parent </s>
funcom_train/20400413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void combineDefaults(Defaults dest, Defaults src) { if (src != null) { for (Iterator<String> i = src.idIterator(); i.hasNext();) { String paramID = (String) i.next(); dest.setDefaultIfNeeded(paramID, src.getDefault(paramID)); } } } COM: <s> merges the specified defaults objects only copying default values from </s>
funcom_train/16337325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void _drawPoint(Graphics graphics, int dataset, long xpos, long ypos, boolean clip) { boolean pointinside = ypos <= _lry && ypos >= _uly && xpos <= _lrx && xpos >= _ulx; if (!pointinside && clip) { return; } graphics.fillRect((int)xpos - 6, (int)ypos - 6, 6, 6); } COM: <s> put a mark corresponding to the specified dataset at the specified x and </s>
funcom_train/3473092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testCursor(MouseEvent event) { if (root == null) { root = SwingUtilities.getRoot(this); } Component component = SwingUtilities.getDeepestComponentAt(root, event.getX(), event.getY()); if (component != null) { Cursor cursor = component.getCursor(); if (cursor != null && cursor != defaultCursor) { component.setCursor(defaultCursor); } } } COM: <s> when the user moves the real mouse while showing the pseudo </s>
funcom_train/22909141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showAllImagesOnMap(boolean showDirection) { ImagesTableModel tableModel = (ImagesTableModel) imagesTable.getModel(); List<ImageInfo> images = new ArrayList<ImageInfo>(); for (int index = 0; index < tableModel.getRowCount(); index++) { images.add(tableModel.getImageInfo(index)); } showImagesOnMap(images, showDirection); } COM: <s> open a web browser and show all image locations on a map </s>
funcom_train/18751457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu createEditMenu() { JMenu result = new JMenu(Options.EDIT_MENU_NAME); result.add(getNewRuleAction()); result.addSeparator(); result.add(getEnableRuleAction()); result.addSeparator(); result.add(getCopyRuleAction()); result.add(getDeleteRuleAction()); result.add(getRenameRuleAction()); result.addSeparator(); result.add(getEditRuleAction()); result.add(getEditGraphAction()); result.addSeparator(); result.add(getEditRulePropertiesAction()); result.add(getEditSystemPropertiesAction()); return result; } COM: <s> creates and returns a file menu for the menu bar </s>
funcom_train/46322139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void enterCoords(TextPage page) { PVector pos = page.getPosition().get(); PVector rot = page.getRotation().get(); g2.translate(pos.x, pos.y); g2.translate(g.width/2.0f, g.height/2.0f); g2.rotate(rot.z); g2.translate(-g.width/2.0f, -g.height/2.0f); } COM: <s> transform the graphics2 d into the coordinates of the given text page </s>
funcom_train/37444726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected HttpServletRequest getRequest() { if (request == null) { final StringBuffer message = new StringBuffer(getStringID()); message.append("Request unavailable. Don't access request from constructor"); message.append(" and not before header.inc is executed!"); LOGGER.debug(getStringID()); throw new IllegalStateException(message.toString()); } return request; } COM: <s> gets the http request object belonging to the jsp </s>
funcom_train/44706685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canAccess(PageState state, Security security) { boolean canAccess = true; User user = KernelHelper.getCurrentUser(state.getRequest()); for ( Iterator i = getAccessCheckList().iterator(); i.hasNext(); ) { String check = (String) i.next(); if ( !security.canAccess(user, check) ) { canAccess = false; break; } } return canAccess; } COM: <s> do all the access checks registered to the component pass </s>
funcom_train/18045314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getImage() { if (Image == null) { try { Image = new ImagePanel("/images/Icon.png"); Image.setLayout(new GridBagLayout()); Image.setToolTipText("Drag Here your PDF file"); }catch (NullPointerException e) { Image = new JPanel(); Image.add(new JLabel("<html><h1>Development Mode</h1>" + "<br><h3>Drag file HERE</h3>"+"</html>")); } } return Image; } COM: <s> this method initializes image </s>
funcom_train/40933973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setUpEventDetector(EventDetector osf) { EventHandler handler = new AdaptedEventDetector(osf, startDate, this.mu, this.initialState.getFrame(), this.attitudeLaw); this.integrator.addEventHandler(handler, osf.getMaxCheckInterval(), osf.getThreshold(), osf.getMaxIterationCount()); } COM: <s> wrap an orekit event detector and register it to the </s>
funcom_train/11322839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNullOuterJoin() { // Test with null child object TestObject row = new TestObject("name", "label"); Column column = new Column("child.name"); HtmlStringBuffer buffer = new HtmlStringBuffer(); column.renderTableData(row, buffer, null, 0); assertTrue(buffer.length() > 0); } COM: <s> check that column renders when binding object is null </s>
funcom_train/20110422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMembershipToolPageURL_ReturnsCommandResult() { String result = service.getMembershipToolPageURL(userContext1); GetMembershipToolPageURLInvoker cmd = (GetMembershipToolPageURLInvoker) service.getExecuteSiteServiceCall_CommandArg(); assertEquals(service.stringResultFirstElement(cmd.getResult()), result); } COM: <s> verifies that string returned from get membership tool page url </s>
funcom_train/8072855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(List<? extends Object> columns) throws IOException { for(int i=0;i<columns.size();i++) { out.write(column(columns.get(i))); if(i!=columns.size()-1) out.write(separator); } out.write("\n"); } COM: <s> writes the columns to the file </s>
funcom_train/2345075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDocument(IDocument document) { if (fDocument != null) fDocument.removePrenotifiedDocumentListener(this); fDocument= document; fLineDelimiter= null; if (!fIsForwarding) { fDocumentClone= null; if (fDocument != null) { fOriginalContent= fDocument.get(); fOriginalLineDelimiters= fDocument.getLegalLineDelimiters(); } else { fOriginalContent= null; fOriginalLineDelimiters= null; } } if (fDocument != null) fDocument.addPrenotifiedDocumentListener(this); } COM: <s> sets the given document as the document to be adapted </s>
funcom_train/40809517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteRecursively(File file) { if (file.isFile()) { file.delete(); return; } // file argument is a directory File[] list = file.listFiles(); for (int i = 0; i < list.length; i++) { deleteRecursively(list[i]); } // By the the directory should be empty so delete it file.delete(); } COM: <s> delete file or directory recursively </s>
funcom_train/21954885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected FetchProfile createColumnInformation() { FetchProfile fp = super.createColumnInformation(); // we need to get the full headers for the CachingFolderInfo. fp = new FetchProfile(); fp.add(FetchProfile.Item.FLAGS); fp.add(com.sun.mail.imap.IMAPFolder.FetchProfileItem.HEADERS); return fp; } COM: <s> loads the column names and sizes </s>
funcom_train/46382652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void zoom(float amount) { offset.z += amount; if (amount > 0f && !collisionEnabled) { // zoom in -- check for collision collisionCheck = true; } else if (amount < 0f) { // zoom out -- disable collision until we // zoom in again collisionEnabled = false; collisionCheck = false; } } COM: <s> zoom in or out </s>
funcom_train/3426862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processingInstruction(String target, String data) { appendTextNode(); final Node last = (Node)_nodeStk.peek(); ProcessingInstruction pi = _document.createProcessingInstruction( target, data); if (pi != null){ if (last == _root && _nextSibling != null) last.insertBefore(pi, _nextSibling); else last.appendChild(pi); _lastSibling = pi; } } COM: <s> adds processing instruction node to dom </s>
funcom_train/43326918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readVarTomRecord(String buffer) throws IOException { char recordType = buffer.charAt(14); if ((type != recordType) && (Residue.isRes(recordType))) throw new IOException("VARTOM record '"+ String.valueOf(recordType) + "' for residue " + String.valueOf(n)+ " doesn't match '" + String.valueOf(type) + "' in sequence"); env = StringUtil.atoi(buffer,15); } COM: <s> read var tom record out of yapf file </s>
funcom_train/7468763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setUp() throws Exception { conf = NutchConfiguration.create(); conf.set("plugin.includes", ".*"); conf.set("parse.plugin.file", "org/apache/nutch/parse/parse-plugin-test.xml"); parserFactory = new ParserFactory(conf); } COM: <s> inits the test case with the test parse plugin file </s>
funcom_train/46590927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Unit createUnit(String unitDefinition) throws NoSuchUnitException, ValidationException { Unit unit = null; //retrieve the unit out of the definition file and wrap exceptions in a NoSuchUnitException. try { InputStream stream = repository.getStream(ResourcePackage.ARMY, unitDefinition, ResourceType.XML); unit = this.xmlManager.unmarshal(stream); } catch (Exception e) { throw new NoSuchUnitException("Could not create unit with the definition " + unitDefinition, e); } //validate validateUnit(unit); //post-creation postCreate(unit); return unit; } COM: <s> creates an unit instance based on a name </s>
funcom_train/2294965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String adjustKey(String key) { // replace the &nbsp; with spaces key = key.replaceAll("&nbsp;", " "); // now eleiminate all double spaces int keyLen; do { keyLen = key.length(); key = key.replaceAll(" ", " "); } while (key.length() != keyLen); return key; } COM: <s> adjusts the key for the decoration </s>
funcom_train/4972476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFreeChart createNewChartFromDataset(XYDataset dataset) { JFreeChart chart = ChartFactory.createXYLineChart( null, "ppm", null, dataset, PlotOrientation.VERTICAL, false, true, false); XYPlot plot = (XYPlot) chart.getPlot(); chart.setAntiAlias(false); return chart; } COM: <s> creates a sample chart </s>
funcom_train/18748656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public State setActiveState(State state) { State result = activeState; activeState = state; Set<JCell> changedCells = new HashSet<JCell>(); if (state != null) { changedCells.add(getJCell(state)); } if (result != null) { changedCells.add(getJCell(result)); } refresh(changedCells); return result; } COM: <s> sets the active state to a new value </s>
funcom_train/25040023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getFlagIsTrue(String argument) { String value = getArgumentValue(argument); if (value == null) { return false; } else if ( value.equalsIgnoreCase("true") || value.equalsIgnoreCase("on") || value.equalsIgnoreCase("enable") || value.equalsIgnoreCase("enabled") || value.equalsIgnoreCase("yes") || value.equalsIgnoreCase("1")) { return true; } else { return false; } } COM: <s> query if a argument interpreted as a flag is set to true </s>
funcom_train/32812810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List xpath( String path ) { List result = null; if (path != null) { try { result = new JDOMXPath( path ).selectNodes( getDocument()); } catch (Exception e) { cat.error("XPath failed: " + path + " : " + e.getClass().getName() + ": " + e.getMessage()); } } return result; } COM: <s> code xpath code implements the jaxen xpath extension to </s>
funcom_train/28308630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleSuccess() throws Exception { String fileName = connector.getOkDir() + File.separator + connector.getName() + "_ok_" + container.getId() + ".container"; if (!fileToProcess.renameTo(new File(fileName))) { logger.error("Could not rename " + fileToProcess + " to " + fileName); } handleSuccessSpecific(); } COM: <s> implements the generic success handling for all handlers moves the file that </s>
funcom_train/22947486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double MSE(double[] calculated, double[] real) { double MSE = 0; int count = calculated.length; for (int i = 0; i < count; i++) { MSE += Math.pow((real[i] - calculated[i]), 2); } MSE /= count; return MSE; } COM: <s> calculate mean squared error of a dataset </s>
funcom_train/40166175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIcon() { icon = (imageFilename != null) ? new ImageIcon(imageFilename) : getDefaultIcon(); thumbnailIcon = new ImageIcon(ImageEffects.createRoundBorderImage(ImageEffects.createScaledImage(icon.getImage(), 40, -1))); } COM: <s> sets the default icon used by the player </s>
funcom_train/16710795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCreatorName() { log.debug("~getCreatorName() : Retrieving creator name"); final AbstractSimulation simulation = (AbstractSimulation) getCurrentRowObject(); final Long creatorId = simulation.getCreatorId(); final String creatorName = userMap.containsKey(creatorId) ? userMap.get(creatorId) : creatorId.toString(); return creatorName; } COM: <s> retrieve the simulation creator name </s>
funcom_train/9237065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkFiles(final String desired) { if (desired.isEmpty()) { return true; } for (String files : desired.split(",")) { final String[] filelist = files.split("\\|"); boolean foundFile = false; for (String file : filelist) { if ((new File(file)).exists()) { foundFile = true; break; } } if (!foundFile) { requirementsError = "Required file '"+files+"' not found"; return false; } } return true; } COM: <s> checks to see if the file requirements of the plugin are satisfied </s>
funcom_train/16886495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Activity xml2Assign(Element assignElement) { Assign assign = BPELFactory.eINSTANCE.createAssign(); assign.setElement(assignElement); if (assignElement.hasAttribute("validate")) { assign.setValidate(new Boolean(assignElement.getAttribute( "validate").equals("yes"))); } for (Element copyElement : getBPELChildElementsByLocalName( assignElement, "copy")) { assign.getCopy().add(xml2Copy(copyElement)); } setStandardAttributes(assignElement, assign); return assign; } COM: <s> converts an xml assign element to a bpel assign object </s>
funcom_train/28471838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Categories createCategories(int pCount, String pPrefix, String pSuffix){ Categories categories = new Categories(); for (int i = 0; i < pCount; i++){ Category category = new Category(); category.setName(pPrefix + " " + (pCount + 1) + " " + pSuffix); categories.add(category); } return categories; } COM: <s> creates a collection of categories with an indexed adjustible name </s>
funcom_train/46395037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Point translatePoint(final Point point) { double newy = Math.abs(this.state.getMapState().getHeight() - point.getY()); final Point p = new Point(); p.setLocation(point.getX() * canvasSize.width / (Constants.MAP_WIDTH / Constants.MAP_GRANULARITY * 2), newy * canvasSize.height / (Constants.MAP_HEIGHT / Constants.MAP_GRANULARITY * 2)); return p; } COM: <s> from map coordinates to screen coordinates </s>
funcom_train/47735463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print(Vector g) { System.out.println("Lat Lon"); for (int i = 0; i < g.size(); i++) { System.out.println(((GridPoint) g.elementAt(i)).lat + " " + ((GridPoint) g.elementAt(i)).lon); } } COM: <s> display a list of grid points </s>
funcom_train/10361487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateBeanDefinitions(final ConfigurableListableBeanFactory beanFactory, final ElementBuilder builder) { String[] names = beanFactory.getBeanDefinitionNames(); if (sortBeansByName) { Arrays.sort(names); } for (String name : names) { BeanDefinition definition = beanFactory.getBeanDefinition(name); processBeanDefinition(name, definition, builder, false); } } COM: <s> method generates declarations for top level bean declaration in given context </s>
funcom_train/28751477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTesterror(Long newVal) { if ((newVal != null && this.testerror != null && (newVal.compareTo(this.testerror) == 0)) || (newVal == null && this.testerror == null && testerror_is_initialized)) { return; } this.testerror = newVal; testerror_is_modified = true; testerror_is_initialized = true; } COM: <s> setter method for testerror </s>
funcom_train/18166165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean writeBackFile(File directory){ File logFile = new File (directory, LOG_FILE_NAME); try { resources.store(new FileOutputStream(logFile), "Updated on: " + new Date()); } catch (Exception e) { e.printStackTrace(); return false; } return true; } COM: <s> write into the desired directory the properties log file </s>
funcom_train/4505698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sessionDestroyed(Session session) { String username = session.getAddress().toBareJID().split("@")[0]; SipAccount sipAccount = SipAccountDAO.getAccountByUser(username); if (sipAccount != null) { try { sipAccount.setStatus(SipRegisterStatus.Unregistered); SipAccountDAO.update(sipAccount); } catch (SQLException e) { Log.error(e); } } } COM: <s> sets the user sip presence to unregistered if his jabber account is disconnected </s>
funcom_train/50067022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand() { if (okCommand == null) {//GEN-END:|150-getter|0|150-preInit // write pre-init user code here okCommand = new Command("Start", Command.OK, 0);//GEN-LINE:|150-getter|1|150-postInit // write post-init user code here }//GEN-BEGIN:|150-getter|2| return okCommand; } COM: <s> returns an initiliazed instance of ok command component </s>
funcom_train/50532994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean _upStart(Event event) { TimeScheduler timer; timer = stack != null ? stack.timer : null; if(timer == null) Trace.println("TOTAL.Up()", Trace.FATAL, "[START] timer is null"); reqTbl = new TreeMap(); upTbl = new TreeMap(); retransmitter = new AckSenderWindow(new Command(), 0, AVG_RETRANSMIT_INTERVAL, MIN_RETRANSMIT_INTERVAL, timer); return(true); } COM: <s> prepare this layer to receive messages from above </s>
funcom_train/3424217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillXMLAttribute(Attributes att, int index) { fillQName(fAttributeQName, att.getURI(index), att.getLocalName(index), att.getQName(index)); String type = att.getType(index); fAttributes.addAttributeNS(fAttributeQName, (type != null) ? type : XMLSymbols.fCDATASymbol, att.getValue(index)); } COM: <s> adds an attribute to the xmlattributes object </s>
funcom_train/7981215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long hash( final CharSequence s, final int l, final int k ) { final int[] w = weight[ k ]; int h = 0, i = l; while( i-- != 0 ) h ^= s.charAt( i ) * w[ i % NUMBER_OF_WEIGHTS ]; return ((long)h-Integer.MIN_VALUE) % m; } COM: <s> hashes the given sequence with the given hash function </s>
funcom_train/24533872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ExpressionTemplate getExpressionTemplate(String[] args) throws CodeGenException { String mtd = fFmapper.getDecorator().getWriteMethod().getName(); String sel = fbeanPart.getSimpleName(); ExpressionTemplate exp = new ExpressionTemplate(sel, mtd, args, null, 0); exp.setLineSeperator(fbeanPart.getModel().getLineSeperator()); return exp; } COM: <s> create a default expression template with the existing arguments </s>
funcom_train/37090693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doExpansion(int step, boolean is3D) { // its actually more effiticent to iterate on both as del() is n time expandEdgePrep(step); expandNodePrep(step); // iterate on GraphData NodeViews addExpandedNodesFromModel(step,is3D); // iter on GraphEltSet NBNodes addExpandedEdgesFromModel(step); } COM: <s> delete edges nodes of step above and flag undeleted nodes as </s>
funcom_train/49639739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEscapeTwoSysProps() { String home = System.getProperty("user.home"); String ioTmpdir = System.getProperty("java.io.tmpdir"); String source = "${user.home} ${java.io.tmpdir}"; assertEquals(home + " " + ioTmpdir, Environment.escapeSystemProperties(source)); } COM: <s> test escape two system properties </s>
funcom_train/7867486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDescription() { return "The inspection score for each confident peptidehit is summed. '0' is considered optimistic by this aggregator and sums '-1' to the final scoring. If the final sum is greater then or equal to " + iProperties.getProperty(SCORE) + " , only then the peptideidentiication will be matched. Plus, if a confident peptidehit with veto set to true returns +1 upon inspection, the peptideidentification is matched as well.\n"; } COM: <s> return a string descritiption of the optimistic agent aggregator </s>
funcom_train/43245053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetInsuranceTypeOptions() throws Exception { System.out.println("getInsuranceTypeOptions"); String securitytoken = secToken; org.vistaoutreach.voe.refdata.ws.RefDataServicesImpl instance = new org.vistaoutreach.voe.refdata.ws.RefDataServicesImpl(); String[] expResult = null; String[] result = instance.getInsuranceTypeOptions(securitytoken); assertTrue(result.length>0); } COM: <s> test of get insurance type options method of class org </s>
funcom_train/25116516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws SQLException { // Close the database connection if (getDatabaseConnection() != null) { getDatabaseConnection().close(); getLogger().info("Database connection is closed."); } // Disconnect services on iSeries disconnectAllServices(); getLogger().info("All services closed."); getLogger().info("Movex session was closed successfully."); } COM: <s> handles the actions required for closing this movex session </s>
funcom_train/43611346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClassType findMethodScopeInHost(String name) { ClassType container = findMethodContainerInThisScope(name); if (container != null) { return fakeType; } if (outer != null) { return ((AJContext_c)outer).findMethodScopeInHost(name); } throw new InternalCompilerError ("Method " + name + " not found."); } COM: <s> finds the class which added a method to the host scope </s>
funcom_train/7518210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Contato entity) { EntityManagerHelper.log("deleting Contato instance", Level.INFO, null); try { entity = getEntityManager().getReference(Contato.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent contato entity </s>
funcom_train/2813488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPropertyMatcher() throws Exception { System.out.println("Property Matcher Test"); PropertyMatcher pm = new PropertyMatcher(LegacyObject.class, NewObject.class); Collection v = pm.getTransformations(); if (v != null) doTest(v.iterator(), 1); } COM: <s> test the property matcher based transforms </s>
funcom_train/16273689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void stopSharedCache(Cache cache) { try { if (cache.getCacheStatus() == CacheStatus.STARTED) { cache.stop(); } if (cache.getCacheStatus() != CacheStatus.DESTROYED && cache.getCacheStatus() != CacheStatus.INSTANTIATED) { cache.destroy(); } } catch (Throwable t) { log.warn("Unable to stop cache instance", t); } } COM: <s> stops the shared cache </s>
funcom_train/41806460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleOpenReplace(String path) { if (!activeEditor.checkModified(false)) { return; // sketch was modified, and user canceled } // Close the running window, avoid window boogers with multiple sketches activeEditor.internalCloseRunner(); boolean loaded = activeEditor.handleOpenInternal(path); if (!loaded) { // replace the document without checking if that's ok handleNewReplaceImpl(); } } COM: <s> open a sketch replacing the sketch in the current window </s>
funcom_train/32093280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TaskNetwork switchTaskNetwork(TaskNetwork tnNew) throws Exception { TaskNetwork tnOld = m_TaskNetwork; m_RunningNetwork.clearConfig(m_Comm); m_RunningNetwork = null; m_TaskNetwork = tnNew; m_RunningNetwork = m_Compiler.compileNetwork(m_TaskNetwork); m_RunningNetwork.configureNetwork(m_Comm); return tnOld; } COM: <s> switches the task network currently running </s>
funcom_train/369537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void applyRowProcessors(Sheet sheet, Row row) { for (int i = 0, c=rowProcessors.size(); i < c; i++) { RowProcessor rowProcessor = (RowProcessor) rowProcessors.get(i); rowProcessor.processRow(row, sheet.getNamedCells()); } } COM: <s> applies all registered row processors to a row </s>
funcom_train/23286321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newBetRound(){ for(int i = 0; i < players.size(); ++i){ Bet temp = players.get(i); temp.add(0,false); players.set(i,temp); } highestBet = bigBlind; lastAmountRaise = bigBlind; } COM: <s> creates a new round of betting </s>
funcom_train/48502296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFilterIfPolyModel() { if (modelMeta.getClassHierarchyList().isEmpty()) { return; } query.addFilter( modelMeta.getClassHierarchyListName(), FilterOperator.EQUAL, modelMeta.getModelClass().getName()); } COM: <s> adds a filter for polymorphic model </s>
funcom_train/42225540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDistance(StarNode destination) { Point3f thisPosition = this.getPosition(); Point3f thatPosition = destination.getPosition(); int distance = GameManager.distance(thisPosition.getX(), thisPosition.getZ(), thatPosition.getX(), thatPosition.getZ()); logger.info("Distance from " + this + " to " + destination + ": " + distance); return distance; } COM: <s> calculate the distance in parsecs of this star to the given star </s>
funcom_train/3946153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLocationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DocumentRoot_location_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_location_feature", "_UI_DocumentRoot_type"), AdlcpRootv1p2Package.eINSTANCE.getDocumentRoot_Location(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the location feature </s>
funcom_train/3945903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateDatafromlmsType_MaxLength(String datafromlmsType, DiagnosticChain diagnostics, Map context) { int length = datafromlmsType.length(); boolean result = length <= 255; if (!result && diagnostics != null) reportMaxLengthViolation(AdlcpRootv1p2Package.eINSTANCE.getDatafromlmsType(), datafromlmsType, length, 255, diagnostics, context); return result; } COM: <s> validates the max length constraint of em datafromlms type em </s>
funcom_train/33609001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFunction(String value) { FunctionTreeModel ftm = new FunctionTreeModel(value); String label = "f("+ftm.getRoot().getVariables().toString()+")="; s.add(new SettingsProperty(label,ftm,Settings.EDIT_FUNCTION)); } COM: <s> appends a function to the panel </s>
funcom_train/23714331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeIfPossible() { if (context.isEmpty() && !isPersistent()) { destroyInstance(); sendMessage(new AFPropertyMsg(ROLE_PLAY_ENDED_MSG, true), context.getParentAddress()); stopAllTimers(); return true; } return false; } COM: <s> check if this actor can be removed </s>
funcom_train/9977725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIntToHex() { System.out.println("intToHex"); Integer value = 168; String expResult = "a8"; String result = new String(); try { result = NumeralSystem.intToHex(value); } catch(Exception ex) { System.out.println("Exception"); assertEquals(true, false); } assertEquals(expResult, result); } COM: <s> test of int to hex method of class numeral system </s>
funcom_train/7660352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddAll() { CopyOnWriteArraySet full = populatedSet(3); Vector v = new Vector(); v.add(three); v.add(four); v.add(five); full.addAll(v); assertEquals(6, full.size()); } COM: <s> add all adds each element from the given collection </s>
funcom_train/33058608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { Object deepCopy = null; try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(this); ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); ObjectInputStream ois = new ObjectInputStream(bais); deepCopy = ois.readObject(); } catch (Exception e) { try { logger.error("Error while cloning",e); } catch (Exception ee) {} } return deepCopy; } COM: <s> clones the report </s>
funcom_train/9564023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getAsBool(String aKey, boolean aDefault) { boolean tmpResult = aDefault; synchronized (properties) { if (properties.containsKey(aKey)) { tmpResult = ConvertUtils.toBoolean(properties.getProperty(aKey), aDefault); } } return tmpResult; } COM: <s> returns value for given key converted to boolean if key doesnt exists </s>
funcom_train/13711484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String readFileFromJar(String fileName) throws IOException{ String result = ""; JarFile jarFile = new JarFile(meta.getFile().getAbsolutePath()); InputStream input = jarFile.getInputStream(jarFile.getJarEntry(fileName)); BufferedReader reader = new BufferedReader(new InputStreamReader(input)); String str; while ((str = reader.readLine()) != null) result += str + "\r\n"; reader.close(); input.close(); jarFile.close(); return result; } COM: <s> reads inn a text file </s>
funcom_train/46331740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String collectQueryParameters(Collection<Parameter> parameters) { String url = request.getRequestUrl(); int q = url.indexOf('?'); if (q >= 0) { // Combine the URL query string with the other parameters: parameters.addAll(OAuth.decodeForm(url.substring(q + 1))); url = url.substring(0, q); } return url; } COM: <s> collects http get query string parameters as per oauth core 1 </s>
funcom_train/25307094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Group findGroup(String name) { Group result = null; Group group; for (int i = 0; (result == null) && (i < getUsers().size()); i++) { group = getRootGroups().get(i); if (group.getName().equals(name)) { result = group; break; } } return result; } COM: <s> finds a group based on its name </s>
funcom_train/16736667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void visitChildren(ParentNode node, P param) { for (Iterator<VisitableNode> children = node.getChildrenByType(VisitableNode.class).iterator(); children.hasNext();) { // accept each child in iterator children.next().accept(this, param); } } COM: <s> visits all this nodes children </s>
funcom_train/13960841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String key() { if(!synchronizesVariablesWithBindings()) { if (key==null) { key=(String)super.valueForBinding(Keys.key); } } if (key==null && d2wContext() != null) { key=(String)d2wContext().valueForKey(Keys.propertyKey); } return key; } COM: <s> the active property key </s>
funcom_train/12184087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XPath getParent() { XPath parent = null; String parentStr = getParentStr(); if (parentStr != null) { parent = new XPath(parentStr); // XPath instances are immutable so it is ok to share the same // namespace map. parent.namespaceURIMap = namespaceURIMap; } return parent; } COM: <s> returns the xpath that represents the parent of the node that this xpath </s>
funcom_train/14012152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDefaultWindow(Window window) { if (defaultWindow != null) { throw new UnsupportedOperationException("Default window already set."); } defaultWindow = window; window.register(this); firePropertyChange(WINDOWS_CHANGED_PROPERTY, null, window); window.doInit(); } COM: <s> sets the default top level window </s>
funcom_train/25191279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void read (BufferedReader reader) throws IOException { if (reader.ready ()) { String line = null; while (reader.ready ()) { line = reader.readLine (); if (line != null) { if (listener != null && line.indexOf ("Exception") > 0) { listener.receivedException (line); } writer.write (line + "\n"); } } writer.flush (); } } COM: <s> read from the buffered reader all available output and display this in the </s>
funcom_train/2626959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test1( ) { assertEquals( m_stub.ripper, null ); m_stub.setRipper( null ); assertEquals( m_stub.ripper, null ); m_stub.setRipper( m_ripper1 ); assertSame( m_stub.ripper, m_ripper1 ); m_stub.setRipper( m_ripper2 ); assertSame( m_stub.ripper, m_ripper2 ); m_stub.setRipper( null ); assertEquals( m_stub.ripper, null ); } COM: <s> this function tests the gripper monitor set ripper function </s>
funcom_train/43245388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsTmpAddrActive() { System.out.println("isTmpAddrActive"); PatientDemographicsDG5Object instance = new PatientDemographicsDG5Object(); boolean expResult = true; boolean result = instance.isTmpAddrActive(); 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 is tmp addr active method of class org </s>
funcom_train/18488116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(int rowIndex, int columnIndex) { if (rowIndex >= 0 && rowIndex < vRowData.size() && columnIndex >= 0 && columnIndex < 4) { String data[] = (String[]) vRowData.elementAt(rowIndex); if (data != null) { return data[columnIndex]; } } return ""; } COM: <s> returns the value for the cell at code column index code and </s>
funcom_train/4758515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void msgNotFound(Component target) { JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(target), MessageFormat.format(java.util.ResourceBundle.getBundle("jsyntaxpane/Bundle").getString("DocumentSearchData.SearchStringNotFound"), getPattern()), java.util.ResourceBundle.getBundle("jsyntaxpane/Bundle").getString("DocumentSearchData.Find"), JOptionPane.INFORMATION_MESSAGE); } COM: <s> display an option pane dialog that the search string is not found </s>
funcom_train/15628710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newParameter() { final PluginParameter<G, A, R> pluginParameter; try { pluginParameter = pluginParameterFactory.createParameter(StringParameter.PARAMETER_TYPE); } catch (final NoSuchParameterException ex) { log.warn("Cannot create parameter: " + ex.getMessage()); return; } parameters.add(pluginParameter); modified = true; notifyListeners(); } COM: <s> creates a new plugin parameter </s>