__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/536414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendRawLine(String line) { if (isModeHuman()) { println("[] " + line); LOG.debug("Mserv response sent: [] " + line); } else { println(line); LOG.debug("Mserv response sent: " + line); } this.out.flush(); } COM: <s> this function should only be used by classes that know and or </s>
funcom_train/4975088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean filterTSProperties(Datapoint dp) throws CommException { try { String[] record = csvParser.current(); for (FieldParser p : dp.tsPropParsers) { if (!isEqual(dp.dpProperties.get(p.getKey()), p.parse(record))) { return false; } } return true; } catch (IOException ex) { throw new CommException( "IOException while filtering timeseries properties.", ex); } } COM: <s> helper method for reading the time series properties of the current csv </s>
funcom_train/50092457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testIPTripleDescriptor1() throws java.lang.Exception{ SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IMolecule mol = sp.parseSmiles("C#CCC"); addExplicitHydrogens(mol); lpcheck.saturate(mol); double result= ((DoubleResult)descriptor.calculate(mol.getBond(0),mol).getValue()).doubleValue(); double resultAccordingNIST = 9.44; Assert.assertEquals(resultAccordingNIST, result, 0.75); } COM: <s> a unit test for junit with c ccc </s>
funcom_train/46836852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMouseOverActive(boolean mouseOverActive) { this.mouseOverActive = mouseOverActive; if (mouseOverActive) { // register the handler to track the mouse addMouseMotionListener(mouseOverHandler); addMouseListener(mouseOverHandler); } else { // remove the handler removeMouseMotionListener(mouseOverHandler); removeMouseListener(mouseOverHandler); } } COM: <s> activates deactivates the mouse over effect </s>
funcom_train/8689907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSourcefiles(String src) { StringTokenizer tok = new StringTokenizer(src, ","); while (tok.hasMoreTokens()) { String f = tok.nextToken(); SourceFile sf = new SourceFile(); sf.setFile(getProject().resolveFile(f.trim())); addSource(sf); } } COM: <s> set the list of source files to process </s>
funcom_train/44152622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double get(int index) { double value = Double.NaN; if (index >= size) { throw new ArrayIndexOutOfBoundsException("Invalid index: " + index); } else if (index >= 0) { value = array[index]; } else { throw new ArrayIndexOutOfBoundsException( "Index must be non-negative."); } return value; } COM: <s> access the element at the given index </s>
funcom_train/3733631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isSelected(String name, File file) { if (selectors != null) { for (int i = 0; i < selectors.length; i++) { if ((selectors[i].isSelected(basedir, name, file)) == false) { return false; } } } return true; } COM: <s> tests whether a name should be selected </s>
funcom_train/5374709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawFocus (int x, int y, int width, int height) { if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); // RECT rect = new RECT(); // OS.SetRect(rect, x, y, x + width, y + height); // OS.DrawFocusRect(handle, rect); } COM: <s> draws a rectangle based on the specified arguments which has </s>
funcom_train/47170681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRoman(String text) { String internalText = this.getRearrangedInternalForm(text); log.debug("applying transform from internal form on '" + internalText + "'"); String roman = this.internalToRoman(internalText); if (log.isDebugEnabled()) { log.debug("indic: " + text + ", roman: " + roman); } return roman; } COM: <s> returns the roman representation of the indic text code text code </s>
funcom_train/51537929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lDelete(int offset, int length) { if (cursor.index >= offset) { int diff = cursor.index - offset; cursor.index -= (diff < length) ? diff : length; cursor.option = Text.PAINT_USE_CURSOR_INDEX; } myInfo.isModified = true; setVerticalScroll(); lRequestPaint(); } COM: <s> notifies l amsp f of character deletion in the corresponding </s>
funcom_train/31239650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float intersect(Vector3f start, Vector3f end, Vector3f result) { float t = - (d + (start.x * a + start.y * b + start.z * c)) / (end.x * a + end.y * b + end.z * c); result.set( start.x + end.x * t, start.y + end.y * t, start.z + end.z * t); return t; } COM: <s> compute the ray plane intersection between start and end </s>
funcom_train/42709913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getJButtonUpdateArticle() { if (jButtonUpdateArticle == null) { jButtonUpdateArticle = new JButton(); jButtonUpdateArticle.setBounds(new Rectangle(140, 240, 121, 21)); jButtonUpdateArticle.setText("Update"); jButtonUpdateArticle.setMnemonic(KeyEvent.VK_UNDEFINED); jButtonUpdateArticle.setActionCommand("AddArticle"); } return jButtonUpdateArticle; } COM: <s> this method initializes j button update article </s>
funcom_train/444330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void serializeToFile() { StringBuffer str = new StringBuffer(); TopEntity[] tops = {ontology}; serializer.serialize(tops, str); try { BufferedWriter out = new BufferedWriter( new FileWriter(fileOut)); out.write(str.toString()); out.close(); } catch (IOException ioe) { ioe.getStackTrace(); } } COM: <s> the ontology with the added axiom is serialized and written into the file </s>
funcom_train/10958497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doExecute(String location, ActionInvocation invocation) throws Exception { setLocation(location); ServletContext servletContext = ServletActionContext.getServletContext(); TilesContainer container = TilesAccess.getContainer(servletContext); HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); container.render(location, request, response); } COM: <s> dispatches to the given location </s>
funcom_train/51590783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIcon(String icon) { /* change the main icon of the frame */ try { Image i = ResourceLoader.getInstance().getImageNamed(icon); this.setIconImage(i); } catch(ResourceException e) { logger.error("Unable to find icon main-icon.png for main frame"); } } COM: <s> set the icon of the frame </s>
funcom_train/25394366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void decompose(final JVector3d a_input, JVector3d a_parallel, JVector3d a_perpendicular) { double scale = (dot(a_input) / (a_input.dot(a_input))); a_parallel = a_input; a_parallel.mul(scale); subr(a_parallel, a_perpendicular); } COM: <s> decompose me into components parallel and perpendicular to the input </s>
funcom_train/31452839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getToolTipText(MouseEvent evt) { if (getRowForLocation(evt.getX(), evt.getY()) == -1) { return null; } TreePath curPath = getPathForLocation(evt.getX(), evt.getY()); return ((BookmarkNode) curPath.getLastPathComponent()).getToolTipText(); } COM: <s> we show our own tooltips </s>
funcom_train/33264815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHelpMenu(MenuGadget m) { synchronized(getTreeLock()) { if (helpMenu == m) { return; } if (helpMenu != null) { helpMenu.parent = null; } if (m.parent != this) { add(m); } helpMenu = m; if (m != null) { m.isHelpMenu = true; m.parent = this; } } } COM: <s> sets the help menu to the specified menu on the menu bar </s>
funcom_train/51197001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testgetHeight() { System.out.println("getHeight"); try { jjil.core.RgbImage instance = imageTest; int expectedResult = 40; int result = instance.getHeight(); assertEquals(expectedResult, result); } catch (Exception ex) { ex.printStackTrace(); fail(ex.toString() + " thrown"); } } COM: <s> test of get height method of class jjil </s>
funcom_train/24185340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean orderedDomains() { int number_of_variables = variables.length; int domain_size; V[] domain; V value; for (int i = 0 ; i < number_of_variables ; i++){ domain = domains[i]; domain_size = domain.length; value = domain[0]; for (int j = 1 ; j < domain_size ; j++) { if (value.compareTo(domain[j]) > 0) return false; else value = domain[j]; } } return true; } COM: <s> checks that the domains of the hypercube are ordered </s>
funcom_train/45018399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDataPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NXdataData_data_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NXdataData_data_feature", "_UI_NXdataData_type"), NexusPackageImpl.Literals.NXDATA_DATA__DATA, true, null, null, null)); } COM: <s> this adds a property descriptor for the data feature </s>
funcom_train/19270797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRefreshDelayInSeconds(int refreshDelayInSeconds) { ValueOutOfRangeException.checkRange(Integer.valueOf(refreshDelayInSeconds), MIN_DELAY, Integer.valueOf(Integer.MAX_VALUE), getClass().getSimpleName() + ".refreshDelayInSeconds"); this.refreshDelayInSeconds = refreshDelayInSeconds; } COM: <s> this method sets the refresh delay in seconds </s>
funcom_train/25365900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addQuestItemPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Quest_questItem_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Quest_questItem_feature", "_UI_Quest_type"), LeveleditorPackage.Literals.QUEST__QUEST_ITEM, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the quest item feature </s>
funcom_train/10276741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String _renderTagStart(XmlSerializer serializer) throws IOException { String tagName = getTagName(); if (tagName == null) throw new IllegalStateException("Component " + getComponentId() + " must have a defined tag name."); serializer.startTag("", tagName); if (renderId) serializer.attribute("", "id", getComponentId()); _renderXhtmlAttributes(serializer); _renderClassReferenceFromHints(serializer); return tagName; } COM: <s> renders the tag start based on the rendering hints </s>
funcom_train/26488753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFileName(String path){ String fileName =path; int index = path.lastIndexOf("\\"); if(index==-1){ index = path.lastIndexOf("/"); } if(index!=-1){ fileName = fileName.substring(index+1); } return fileName; } COM: <s> takes out the name of the file from a path </s>
funcom_train/32080807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scroll (int destX, int destY, int x, int y, int width, int height, boolean all) { checkWidget (); // boolean isFocus = caret != null && caret.isFocusCaret (); // if (isFocus) caret.killFocus (); //TODO redraw (false); // if (isFocus) caret.setFocus (); } COM: <s> scrolls a rectangular area of the receiver by first copying </s>
funcom_train/49703679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void takeFetchdata (FetchData fetchdata) throws Exception { if (null == fetchdata) { fetchdataQueue.close(); logger.debug("Closing fetchdataQueue. No more fetchdata will be received."); return; } progress.addFetched(fetchdata.getSize()); progress.report(); // else, enqueue it boolean enqueued = false; while (!enqueued) { enqueued = fetchdataQueue.enqueueBlock(fetchdata,100); } } COM: <s> accepts fetched data to be processed </s>
funcom_train/22233819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReverbCoefficient(float coefficient) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_REVERB_COEFFICIENT_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes24")); ((AuralAttributesRetained)this.retained).setReverbCoefficient(coefficient); } COM: <s> set reverb coefficient </s>
funcom_train/5459915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JTree getFolderTree() { if (folderTree == null) { folderTree = new JTree(); folderTree.setModel(null); folderTree.setShowsRootHandles(true); folderTree.setCellRenderer(new FolderRenderer()); folderTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); } return folderTree; } COM: <s> this method initializes folder tree </s>
funcom_train/26024077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getBounds(int index) { Rectangle outer = getBounds(); int cols = Math.max(outer.width / (entrywidth + hgap), 1); int col = index % cols; int row = index / cols; int x = hgap + col * (entrywidth + hgap); int y = vgap + row * (entryheight + vgap); return new Rectangle(x, y, entrywidth, entryheight); } COM: <s> returns the bounds of the entry at code index code </s>
funcom_train/8305700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Fraction invert() { if (numerator == 0) { throw new ArithmeticException("Unable to invert zero."); } if (numerator==Integer.MIN_VALUE) { throw new ArithmeticException("overflow: can't negate numerator"); } if (numerator<0) { return new Fraction(-denominator, -numerator); } else { return new Fraction(denominator, numerator); } } COM: <s> p gets a fraction that is the inverse 1 fraction of this one </s>
funcom_train/1071566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void contributeToToolBar(IToolBarManager toolBarManager) { toolBarManager.add(getAction(ActionFactory.UNDO.getId())); toolBarManager.add(getAction(ActionFactory.REDO.getId())); toolBarManager.add(getAction(SaveImageAction.ID)); toolBarManager.add(new Separator()); toolBarManager.add(getAction(GEFActionConstants.ZOOM_IN)); toolBarManager.add(getAction(GEFActionConstants.ZOOM_OUT)); toolBarManager.add(new ZoomComboContributionItem(getPage())); } COM: <s> add actions to the given toolbar </s>
funcom_train/34224478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawNorthArrow(Graphics2D g, int x, int y) { g.draw(new Line2D.Double(getX(x) - ARROW_WIDTH / 2, getY(y) + ARROW_LENGTH, getX(x), getY(y))); g.draw(new Line2D.Double(getX(x) + ARROW_WIDTH / 2, getY(y) + ARROW_LENGTH, getX(x), getY(y))); } COM: <s> draws north arrow pointing to the point code x y code </s>
funcom_train/10954199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected StrutsException fieldError(String field, String errorMsg, Exception e) { String msg = "tag '" + getComponentName() + "', field '" + field + ( parameters != null && parameters.containsKey("name")?"', name '" + parameters.get("name"):"") + "': " + errorMsg; throw new StrutsException(msg, e); } COM: <s> constructs a code runtime exception code based on the given information </s>
funcom_train/28643707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Competence findByFrenchName(String name) throws DaoException { Competence result = null; try { Map<String, Object> params = new HashMap<String, Object>(); params.put("name", name); result = initializeCompetence((Competence) getSingleResult("CompetenceByFrenchName", params)); } catch (Throwable ex) { throw new DaoException(ex); } return result; } COM: <s> finds an competence by its french name </s>
funcom_train/21775730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int yToLine(int y) { FontMetrics fm = painter.getFontMetrics(); int height = (int) (fm.getHeight() * lineSpacing); return Math.max(0,Math.min(getLineCount() - 1, y / height + firstLine)); } COM: <s> converts a y co ordinate to a line index </s>
funcom_train/50995078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateButtons() { int index = tblCaptions.getSelectionModel().getMinSelectionIndex(); if( index >= 0 ) { // something selected. Enable modifiers. btnRotateCW.setEnabled( true ); btnRotateCCW.setEnabled( true ); } else { // nothing selected. Disable modifiers. btnRotateCW.setEnabled( false ); btnRotateCCW.setEnabled( false ); } } COM: <s> updates the modifier buttons based on the current selection state </s>
funcom_train/21850668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getComponent(Container c) { Component result = null; if (c == null) return null; Container parent = c; Iterator iter = m_focus_keys.iterator(); while (iter.hasNext()) { FocusKey fkey = (FocusKey) iter.next(); Component comp = fkey.getComponent(parent); if (iter.hasNext()) { if (comp instanceof Container) { parent = (Container) comp; } else { return null; } } else { result = comp; } } return result; } COM: <s> focus key implementation </s>
funcom_train/42012755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTFDescuento() { if (jTFDescuento == null) { jTFDescuento = new JTextField(); jTFDescuento.setBounds(new Rectangle(142, 382, 211, 20)); jTFDescuento.setEditable(false); jTFDescuento.setHorizontalAlignment(JTextField.TRAILING); jTFDescuento.setText("0 €"); } return jTFDescuento; } COM: <s> this method initializes j tfdescuento </s>
funcom_train/25290395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRasterOpEnable(boolean rasterOpEnable) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_RASTER_OP_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("RenderingAttributes10")); if (isLive()) ((RenderingAttributesRetained)this.retained).setRasterOpEnable(rasterOpEnable); else ((RenderingAttributesRetained)this.retained).initRasterOpEnable(rasterOpEnable); } COM: <s> sets the raster op enable flag for this rendering attributes </s>
funcom_train/3743167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkCredentials(String username, String password) throws Exception { UserDAO userDao = (UserDAO) Context.getInstance().getBean(UserDAO.class); if (!userDao.validateUser(username, password)) { log.error("Invalid credentials " + username + "/" + password); throw new Exception("Invalid credentials"); } } COM: <s> check provided credentials </s>
funcom_train/7778097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update (String id, String menuId, String name, String price, String number) throws ErrorBean { MenuItemBean menuItem = new MenuItemBean(checkMenuItemId(id), new MenuBean(checkMenuId(menuId)), name, null, checkPrice(price), checkMenuItemNumber(number)); mib.persist(menuItem); } COM: <s> updates a menu item </s>
funcom_train/47184131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAllergy(long pid, String description) throws DBException { Connection conn = null; PreparedStatement ps = null; try { conn = factory.getConnection(); ps = conn.prepareStatement("INSERT INTO Allergies(PatientID, Description) VALUES (?,?)"); ps.setLong(1, pid); ps.setString(2, description); ps.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } COM: <s> adds an allergy to this patients list </s>
funcom_train/50140019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getConfig() { Element config = new Element("PermanentInstanceCache"); config.setAttribute("class", getClass().getName()); config.addContent("\n"); Element e = new Element("disableReplace"); e.addContent(String.valueOf(disableReplace)); config.addContent(e); config.addContent("\n"); return config; } COM: <s> set a jdom tree reprenting the current state </s>
funcom_train/17758132
/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 TextViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); viewer.setInput(getViewSite()); viewer.setEditable(false); viewer.setDocument(contents); updateFont(false); HelpUtils.setHelp(viewer.getControl(), "resultsView"); makeActions(); hookContextMenu(); contributeToActionBars(); Activator.getDefault().getPreferenceStore().addPropertyChangeListener(this); } COM: <s> this is a callback that will allow us </s>
funcom_train/44011464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetCoupon() { System.out.println("setCoupon"); CouponBO coupon = null; TransLineBO instance = new TransLineBO(); instance.setCoupon(coupon); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set coupon method of class edu </s>
funcom_train/5787543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeTag() { if(isRfid()) { rfid = false; if(null == parent) return; if(parent.oneChild == null || parent.zeroChild == null) System.out.println(parent.oneChild+" and "+parent.zeroChild); if(parent.isLeaf()) System.out.println("How can parent of this also be a leaf!?"); parent.relax(); } else { System.err.println("could not remove non-rfid node!"); System.exit(1); } } COM: <s> removes an rfid tag location </s>
funcom_train/4127608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean obtains(Unit unit) { return !unit.isDisposed() && unit.getMovesLeft() > 0 && (unit.getDestination() != null || unit.getTradeRoute() != null) && !(unit.getLocation() instanceof WorkLocation) && unit.getTile() != null; } COM: <s> returns true if the unit has order to go somewhere </s>
funcom_train/12544028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadLookup() { if (texts != null) { return; } Object[][] contents = getContents(); Hashtable temp = new Hashtable(contents.length); for (int i = 0; i < contents.length; ++i) { String key = (String) contents[i][0]; Object value = contents[i][1]; if (key == null || value == null) { throw new NullPointerException(); } temp.put(key, value); } texts = temp; } COM: <s> we lazily load the texts hashtable </s>
funcom_train/7276112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDiskJob(final ChunkDiskJob job) { synchronized(SCHEDULE_LOCK) { chunksScheduled++; QUEUE.execute(new Runnable() { public void run() { try { job.runChunkJob(job.getChunk()); } finally { synchronized(SCHEDULE_LOCK) { chunksScheduled--; } releaseChunk(job.getChunk(), true); job.finish(); } } }); } } COM: <s> adds a job to be performed on the disk </s>
funcom_train/29779350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return super.toString() .concat("[") .concat("weight=" + weight + ",") .concat("size=" + size + ",") .concat("minimumSize=" + minimumSize + ",") .concat("preferredSize=" + preferredSize + ",") .concat("maximumSize=" + maximumSize + "]"); } COM: <s> return a description of the internal state of the current instance </s>
funcom_train/9442721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAllowed(WnnWord word) { if (filter == 0) { return true; } if ((filter & FILTER_NON_ASCII) != 0) { String str = word.candidate; for (int i = 0; i < str.length(); i++) { if (str.charAt(i) < 0x20 || 0x7E < str.charAt(i)) { return false; } } } return true; } COM: <s> checking whether a specified word is filtered </s>
funcom_train/9442578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setShiftByEditorInfo() { if (mEnableAutoCaps && (mCurrentKeyMode == KEYMODE_JA_HALF_ALPHABET)) { int shift = getShiftKeyState(mWnn.getCurrentInputEditorInfo()); mShiftOn = shift; changeKeyboard(getShiftChangeKeyboard(shift)); } } COM: <s> set the shift key state from </s>
funcom_train/23929056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendBest() throws CloudException { boolean newBest = false; for( AlignmentParticle a: particles){ if( a.getPersonalBest().getFitness() < localBest.getFitness() ) { localBest = a.getPersonalBest(); newBest = true; } } if (newBest){ logger.debug("Sending local Best to controller."); com.send(localBest); } else { logger.debug("Sending null to controller."); com.send(null); } } COM: <s> searches the local best alignment and sends it </s>
funcom_train/17921653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTitle(Title title) { if (title == null) { return; } if (titles == null) { titles = new ArrayList(); } int pos = titles.indexOf(title); if (pos < 0) { titles.add(title); } else { titles.set(pos, title); } } COM: <s> adds a new title to the title list </s>
funcom_train/15530063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loginAccount(String accountName, String password) throws Exception{ // accountID = RMI::loginAccount(accountName, password); if (connectionID == 0){ throw new Exception("Not connected to a server."); } String response = remoteServer.loginAccount(connectionID, accountName, password); //System.out.println("response: " + response); } COM: <s> login to an account at the server </s>
funcom_train/13551621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setP2_(int value) { if ((portDir & 0x04)!=0) { // output port ? if (((portDataOut & value)^value)!=0) remember|=0x04; } if (value!=0) portDataOut|=value; else portDataOut&=~0x04; } COM: <s> set the value of output port 2 by internal operation </s>
funcom_train/4917275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFailIfAddFirstEntryAgain() { Entry first = new Entry(); // added first time new Entry(); new Entry(); try { this.linkedList.addEntry(first); fail("Should not be able to re-add an entry"); } catch (IllegalStateException ex) { assertEquals("Incorrect failure details", "Entry already added (entry=" + first + ", list=" + this.linkedList + ")", ex.getMessage()); } } COM: <s> ensure failure if first entry of list added again </s>
funcom_train/976264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLonDeg(int format) { switch (format) { case DD: return Double.toString(this.getLonDec()); case CW: case DMM: case DMS: return (((getLonDec() < 100.0) && (getLonDec() > -100.0)) ? "0" : "") + getDMS(getLonDec(), 0, format); default: return ""; } } COM: <s> get degrees of longitude in different formats </s>
funcom_train/40658022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run () { System.out.println ("Running."); BotGroup pBots = BotManager.getInstance ().getBots ().getBotsInChannel ("#LVP.CoD.echo"); for (IrcBot pBot : pBots) { pBot.out.privmsg ("#LVP.CoD.echo", "What's up?"); } } COM: <s> the run method will be called every time the bot timer is </s>
funcom_train/23852448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object nextID() { currentMolecule = molIterator.next(); progressListeners.setProgressValue(progress++); String value = (String) currentMolecule.getProperty(mergeBy); if (mergeByNumeric) { try { double val = Double.parseDouble(value); return val; } catch (NumberFormatException e) { return null; } } return value; } COM: <s> forward the iterator to the next molecule in the import job </s>
funcom_train/31739799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { status = STATUS_LOGIN; while (status != STATUS_EXIT) { switch (status) { case STATUS_LOGIN: status = showLoginDialog(); break; case STATUS_RECONNECT: loginDialog.setFirstLogin(true); status = showLoginDialog(); break; case STATUS_MAINWINDOW: status = showMainWindow(); break; case STATUS_CREATE_ACCOUNT: status = showCreateAccountDialog(); break; } } } COM: <s> run the client </s>
funcom_train/14094078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getRoot(final JMenuItem mi) { Component lastParent = null; Component parent = mi; while (parent instanceof JMenuItem) { lastParent = parent; parent = parent.getParent(); if (parent instanceof JPopupMenu) { lastParent = parent; parent = ((JPopupMenu) parent).getInvoker(); } } if (parent instanceof JMenuBar) { return parent; } return lastParent; } COM: <s> get the root object </s>
funcom_train/14069664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireEvent(Room room) { Object[] path; if (room != null) { path = new Object[] { getRoot(),room }; } else { path = new Object[] { getRoot() }; } TreeModelEvent event = new TreeModelEvent(this,path); for (TreeModelListener l : listeners) { l.treeStructureChanged(event); } } COM: <s> fire off a notification of change </s>
funcom_train/28898450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getSetItems() { if (setItems == null) { GridLayout gridLayout = new GridLayout(0, 1); setItems = new JPanel(); setItems.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); setItems.setLayout(gridLayout); setItems.setBackground(new Color(55, 31, 11)); } return setItems; } COM: <s> this method initializes set items </s>
funcom_train/40409496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPartialFromInputStream_malformed() throws UnsupportedEncodingException { try { ReportResponse.partialFromInputStream(new ByteArrayInputStream(MALFORMED_RESPONSE .getBytes("UTF-8"))); fail("Excpeted excpetion not thrown."); } catch (ReportResponseMarshallException e) { // Expected. } } COM: <s> test method for </s>
funcom_train/25603420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPredictedFeatureUri() { String predictedFeature = null; StmtIterator stmt_iter = jenaModel.listStatements( new SimpleSelector(null, OT.predictedVariables, (Resource) null)); if (stmt_iter.hasNext()){ predictedFeature = stmt_iter.next().getObject().as(Resource.class).getURI(); } return predictedFeature; } COM: <s> get the uri of the predicted feature of the model </s>
funcom_train/42294979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawText(String text) { float[] pos; GlyphVector gv; FontRenderContext frc = new FontRenderContext( state.transform, true, state.usesFractionalFontMetrics); gv = state.font.createGlyphVector(frc, text); pos = gv.getGlyphPositions(0, gv.getNumGlyphs(), null); drawGlyphs(gv.getGlyphCodes(0, gv.getNumGlyphs(), null), pos); } COM: <s> draws the given text using the current font fill color and </s>
funcom_train/12162677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetElementDetails() throws Exception { ElementDetails elementDetails = createElementDetails(ELEMENT, TEST_STYLES); AbstractModelElement testClass = createTestInstance(elementDetails); ElementDetails testElementDetails = testClass.getElementDetails(); assertNotNull("element details should not be null", testElementDetails); assertEquals("element details should be the same", elementDetails, testElementDetails); } COM: <s> this method tests the get element details method of the </s>
funcom_train/50208884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DecisionFlowletBind createDecisionFlowletBind(DecisionFlowletModelPart flowlet) { DecisionFlowletBind decisionFlowletBind = new DecisionFlowletBind(); decisionFlowletBind.setX(flowlet.getLocation().x); decisionFlowletBind.setY(flowlet.getLocation().y); decisionFlowletBind.setDescription(flowlet.getDescription()); decisionFlowletBind.setLabel(createFlowletLabelBind(flowlet.getFlowletLabel())); return decisionFlowletBind; } COM: <s> creates a new decision flowlet bind object using the data from the model </s>
funcom_train/38464142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OID getOID(Object obj) throws StorageException { if(obj == null) { throw new NullPointerException("Null object"); } JSOStorableMetadata storableMetadata = transientMap.get(obj); if(storableMetadata == null) { throw new StorageException("Invalid object"); } return storableMetadata.getOID(); } COM: <s> returns oid of a transient storable object </s>
funcom_train/16598379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JPanel getPnlButtons() { if (panelS == null) { panelS = new JPanel(); panelS.setPreferredSize(new java.awt.Dimension(417, 32)); panelS.add(getBintervals(), null); panelS.add(getBInsert(), null); panelS.add(getBDelAll(), null); panelS.add(getBDel(), null); } return panelS; } COM: <s> this method initializes panel s </s>
funcom_train/12641979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putAll(Map t) { int n = t.size(); if (n == 0) return; if (n > threshold) // conservatively pre-expand resize(capacity(n)); for (Iterator it = t.entrySet().iterator(); it.hasNext(); ) { Entry e = (Entry) it.next(); put(e.getKey(), e.getValue()); } } COM: <s> copies all of the mappings from the specified map to this map </s>
funcom_train/10938978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T get(HttpSession session, Map<String, Object> expandContext) { AttributeAccessor<T> aa = new AttributeAccessor<T>(name, expandContext, this.attributeName, this.fma, this.needsExpand); return aa.get(session); } COM: <s> based on name get from http session or from list in http session </s>
funcom_train/25332328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddMappedObjectType() { ObjectType mappedType = null; DAFeature instance = new DAFeatureImpl(); ObjectType targetType = EnsemblCoordSystemType.chromosome; assertFalse(instance.isObjectTypeMapped(mappedType)); instance.addMappedObjectType(mappedType); assertTrue(instance.isObjectTypeMapped(mappedType)); } COM: <s> test of add mapped object type method of class dafeature </s>
funcom_train/12294088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHashCode() { System.out.println("hashCode"); DWordData instance = new DWordData(); int expResult = 0; int result = instance.hashCode(); assertEquals(expResult, result); instance = d.clone(); assertEquals(instance.hashCode(), d.hashCode()); } COM: <s> test of hash code method of class dword data </s>
funcom_train/9918580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIntParameter(String param, int x) { CGparameter p = CgGL.cgGetNamedEffectParameter(effect, param); if (p != null) CgGL.cgSetParameter1i(p, x); else System.err.println("GLCgFXEffect: param1f is null"); } COM: <s> sets the int parameter with name to the given value </s>
funcom_train/8096057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void highLight(int iNode) { Graphics2D g = (Graphics2D) this.getGraphics(); RenderingHints rh = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); rh.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_SPEED); g.setRenderingHints(rh); g.setPaintMode(); g.scale(m_fScale, m_fScale); drawNode(g, iNode, HIGHLIGHTED); } // highlight COM: <s> this method highlights a given node and all its incoming and outgoing arcs </s>
funcom_train/37587266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void javadocEnded(boolean success, File destDir, boolean allDocs) { _lock.startRead(); try { for (GlobalModelListener l : _listeners) { l.javadocEnded(success, destDir, allDocs); } } finally { _lock.endRead(); } } COM: <s> called after javadoc is finished </s>
funcom_train/31428852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int write(byte[] buffer, int offset) { int startOffset = offset; byte flag = 0; if (lastExtension) { flag = setBit(flag, 7); } if (encoded) { flag = setBit(flag, 6); } if (compressed) { flag = setBit(flag, 5); } flag |= extensionID.getLength(); buffer[offset++] = flag; byte[] idBytes = extensionID.getBytes(); System.arraycopy(idBytes, 0, buffer, offset, idBytes.length); offset += idBytes.length; return offset - startOffset; } COM: <s> writes the flags and the id </s>
funcom_train/4923624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnknownGwtService() throws Exception { // Start the Server UnknownGwtServiceInterface service = this .startServer(UnknownGwtServiceInterface.class); // Ensure services request try { service.unknown("UNKNOWN"); fail("Should not be successful on unknown method"); } catch (IncompatibleRemoteServiceException ex) { String causeMessage = ex.getMessage(); assertTrue( "Incorrect exception: " + causeMessage, causeMessage .endsWith("( Unknown service method 'unknown(...)' )")); } } COM: <s> validate handle unknown gwt service </s>
funcom_train/1533922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public interface ContinuousDistribution extends Distribution { /** * For this distribution, X, this method returns x such that P(X &lt; x) = p. * @param p the cumulative probability. * @return x. * @throws MathException if the inverse cumulative probability can not be * computed due to convergence or other numerical errors. */ double inverseCumulativeProbability(double p) throws MathException; } COM: <s> p base interface for continuous distributions </s>
funcom_train/25907589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String addCreditCard() throws Exception { if (logger.isDebugEnabled()) { logger.debug("addCreditCard() - start"); } if (creditcard != null && creditcard.getCreaditCardId() != null) { creditcard = CreditCardServiceDelegator.getCreditcard( this.creditcard.getCreaditCardId(), SessionUtil .getUser(request)); } if (logger.isDebugEnabled()) { logger.debug("addCreditCard() - end"); } return SUCCESS; } COM: <s> adds the credit card </s>
funcom_train/28455366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSystemProperties() { Properties systemP = x.java.lang.System.getProperties(); Enumeration e = systemP.propertyNames(); while (e.hasMoreElements()) { String propertyName = (String) e.nextElement(); String value = systemP.getProperty(propertyName); this.setPropertyInternal(propertyName, value); } } COM: <s> add all system properties which arent already defined as </s>
funcom_train/34520146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InstructionHandle getHandleEndingAt(int position){ // gets the InstructionHandle ih such that ih.next would start at 'position' for (InstructionHandle iter=handleFirst.next;iter!=handleLast;iter=iter.next){ if ((iter.getPosition() + iter.getInstruction().getLength())==position) return iter; } return null; } COM: <s> returns the instruciton handle that would end at byte offset position i </s>
funcom_train/44457864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void noOp() throws IOException, NoSuchFunctionException, AccessDeniedException { Map<String, Object> backpack = new HashMap<String, Object>(); backpack.put(BackpackConstants.IP, _ip); FunctionRequest noOpRequest = new FunctionRequest("_NoOp", Collections.EMPTY_MAP, null, backpack); _api.handleCall(noOpRequest, null); } COM: <s> executes the no op meta function </s>
funcom_train/324070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int countAmplitudeDeselected() { PamDataBlock<ClickDetection> clickData = clickControl.getClickDataBlock(); ClickDetection click; int n = 0; synchronized (clickData) { ListIterator<ClickDetection> clickIterator = clickData.getListIterator(0); while (clickIterator.hasNext()) { click = clickIterator.next(); if (click.getAmplitudeDB() < btDisplayParameters.minAmplitude) { n++; } } } return n; } COM: <s> count the number of loaded clicks not displayed due to </s>
funcom_train/21688831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Snippet findSnippetByMnemonic(String mnemonic) { DetachedCriteria criteria = DetachedCriteria.forClass(getEntityClass()); criteria.add(Restrictions.eq("mnemonic", mnemonic)); List snippets = getHibernateTemplate().findByCriteria(criteria); if (snippets.size() > 0) { return (Snippet) snippets.get(0); } return null; } COM: <s> find snippet by mnemonic </s>
funcom_train/27778677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get(Object key, Object subKey) { if ((subKey == null) || (key == null)) { return null; } Hashtable tempHash = get(key); if (tempHash.containsKey(subKey)) { return tempHash.get(subKey); } else { return null; } //return (value == this) ? null : value; } COM: <s> returns an object from the sub hashtable specified by key and associated </s>
funcom_train/3391674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printDescription(PackageDoc pkg) { dt(); printPackageLink(pkg, Util.getPackageName(pkg), true); print(" - "); print(configuration.getText("doclet.package") + " " + pkg.name()); dd(); printSummaryComment(pkg); } COM: <s> print one line summary comment for the package </s>
funcom_train/44325576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTransition(String event, String to) { if (fTransitionStack.empty()) return; String from = (String) fTransitionStack.peek(); IStateDescriptor descriptor = getCurrentDescriptor(); if (descriptor != null) descriptor.setNextSubstateKey(from, event, to); } COM: <s> adds a new transition from the current substate for the given event </s>
funcom_train/50389312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkVersion(Persist<?> p, String tableName)throws PersistenceException{ Set<String>ids=p.getIDs(); try{ if(ids.size()>0){ p.read(ids.iterator().next()); } }catch(DataVersionException v){ //check if we really should delete all unreadable data if(!Boolean.getBoolean("unicore.update.force")){ throw v; } logger.info("Removing unreadable data from table "+tableName); for(String id: ids){ try{ p.read(id); } catch(DataVersionException ex){ try{ p.remove(id); }catch(PersistenceException pe){ Log.logException("Error removing "+id, pe); } } } } } COM: <s> check that the data from the given persist instance can be used </s>
funcom_train/31804323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void popup(int location) { if (shown == false) { pack(); if (location == CENTER_ONLY_ONCE) { location = ALWAYS_CENTER; } } switch (location) { case ALWAYS_CENTER: Dimension d = getToolkit().getScreenSize(); setLocation((d.width - getSize().width) / 2, (d.height - getSize().height) / 2); break; case CENTER_ONLY_ONCE: case FREE: break; } show(); } COM: <s> pops up the dialog window according to the location given as a parameter </s>
funcom_train/867769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClassTranslation forJavaClass( ClassModel javaClass ) { String className = javaClass.type.name; ClassTranslation ct = translatedClasses.get( className ); if( ct == null ) { ct = new ClassTranslation( this, javaClass ); translatedClasses.put( className, ct ); } return ct; } COM: <s> get the translated class for the given java class </s>
funcom_train/41207681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getVerticalScrollWidth() { if(verticalScroll == null) { initScroll(); } Style scrollStyle = verticalScroll.getStyle(); // bidi doesn't matter for width calculations return scrollStyle.getMargin(false, Component.LEFT) + scrollStyle.getMargin(false, Component.RIGHT) + scrollStyle.getPadding(false, Component.LEFT) + scrollStyle.getPadding(false, Component.RIGHT); } COM: <s> returns the default width of a vertical scroll bar </s>
funcom_train/44852343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DomainObject create(String inMemberID, String inGroupID) throws VException, WorkflowException, SQLException { Long lMemberID = new Long(inMemberID); Long lGroupID = new Long(inGroupID); create(lMemberID, lGroupID); return find(lMemberID, lGroupID); } COM: <s> makes the specified member an active participant in the specified group </s>
funcom_train/13679951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFile(String path){ FileModel fileToRemove = null; for (FileModel file : classes){ if (file.getFilePath().equals(path)){ fileToRemove = file; } } if (fileToRemove != null){ classes.remove(fileToRemove); return; } for (FileModel file : interfaces){ if (file.getFilePath().equals(path)){ fileToRemove = file; } } if (fileToRemove != null){ interfaces.remove(fileToRemove); } } COM: <s> removes file from list of classes and interfaces </s>
funcom_train/986633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem3() { if (stringItem3 == null) {//GEN-END:|59-getter|0|59-preInit // write pre-init user code here stringItem3 = new StringItem("Parqueadero:", "valor 2500");//GEN-LINE:|59-getter|1|59-postInit // write post-init user code here }//GEN-BEGIN:|59-getter|2| return stringItem3; } COM: <s> returns an initiliazed instance of string item3 component </s>
funcom_train/48337616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (this == o) return true; if (! (o instanceof Control)) return false; Control other = (Control)o; return ( (name.equals(other.name)) && (opcode == other.opcode) && (minArgs == other.minArgs) && (maxArgs == other.maxArgs)); } COM: <s> determine whether this control operator equals the specified </s>
funcom_train/42395923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetNombre() { System.out.println("getNombre"); Partida instance = new Partida(); String expResult = ""; String result = instance.getNombre(); 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 nombre method of class model </s>