__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/10865062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToArray(int value) { if (size == data.length) { int[] newArray = new int[2 * size + 1]; System.arraycopy(data, 0, newArray, 0, size); data = newArray; } data[size] = value; ++size; shouldSort = true; } COM: <s> adds a value to the array </s>
funcom_train/34558873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPaddings(int top, int left, int right, int bottom) throws IllegalStateException { Paddings paddings = new Paddings(top, left, right, bottom); String style = paddings.getStyleString(); String bodyStyle = ""; if (bodyStyle == null) { setStyle(style); } else { setStyle(bodyStyle + style); } } COM: <s> set the paddings for the portlet column </s>
funcom_train/45076743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDefaultPolicies() { NameValuePair[] policies = queryAcc.get_default_policies(); for (int i = 0; i < policies.length; i++) policyList.put(policies[i].name, new Boolean(policies[i].value.extract_boolean())); } COM: <s> get the default policies from the server and populate the policy list </s>
funcom_train/40760279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public boolean equals(@Nullable Object object) { if (object instanceof Entry) { Entry<?, ?> that = (Entry<?, ?>) object; return Objects.equal(this.getKey(), that.getKey()) && Objects.equal(this.getValue(), that.getValue()); } return false; } COM: <s> indicates whether an object equals this entry following the behavior </s>
funcom_train/11319148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNamespaceIdentifier(String namespace) { for (Attribute attribute : element.getAttributes()) { if (attribute.getValue().equals(namespace) && attribute.getName().startsWith(Namespaces.XMLNS_AND_COLON)) { return attribute.getName().substring(Namespaces.XMLNS_AND_COLON.length()); } } return null; } COM: <s> example for http my ns </s>
funcom_train/27845666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { g.translate(0, -visibleRow * getRowHeight()); super.paint(g); // Draw the Table border if we have focus. if (table.getHighlightBorder() != null) { table.getHighlightBorder().paintBorder(this, g, 0, visibleRow * getRowHeight(), getWidth(), getRowHeight()); } } COM: <s> sublcassed to translate the graphics such that the last visible row will </s>
funcom_train/49429936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeDefaultGaps() { for(int i=springs.size() ; i-->0 ;) { Spring s = springs.get(i); if(s instanceof GapSpring) { if(((GapSpring)s).isDefault) { springs.remove(i); } } else if(s instanceof Group) { ((Group)s).removeDefaultGaps(); } } } COM: <s> remove all default gaps from this and child groups </s>
funcom_train/644780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String correctIllegalCharacters(String input) { String correctedString = ""; char currentChar; for (int i = 0; i < input.length(); i++) { currentChar = input.charAt(i); if (legalCharacters.contains(currentChar)) { correctedString = correctedString + currentChar; } } return correctedString; } COM: <s> removes illegal mathematic characters from the input string </s>
funcom_train/10520476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ArrayList gatherFromDirectory(File dir) { Project project = getProject(); DirectoryScanner ds = new DirectoryScanner(); ds.setBasedir(dir); ds.setIncludes(patterns.getIncludePatterns(project)); ds.setExcludes(patterns.getExcludePatterns(project)); ds.scan(); String[] included = ds.getIncludedFiles(); return testClassNameFromFile(included); } COM: <s> return the list of classnames from a directory that match </s>
funcom_train/31171631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String setVar(String varName, String varValue){ //System.err.println("setVar(\""+varName+"\",\""+varValue+"\");"); variables.put(varName, varValue); return(varName); } COM: <s> sets a variable which is shared among all the cards </s>
funcom_train/19826845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unregisterShortcuts(JComponent comp) { comp.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT). remove(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, InputEvent.CTRL_DOWN_MASK)); comp.getActionMap().remove(PIN_ACTION); } COM: <s> registers shortcut for enable disable auto hide functionality </s>
funcom_train/33968796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FMDRequest buildAccountInfoRequest() { FMDRequest request = mAccountRequest; if (request == null) { request = new FMDRequest(); } else { request.reset(); } request.requestType = cREQUEST_ACCOUNT_DETAILS; request.state = mAppStateManager.getState(); request.method = FMDHTTPConnectionController.cHTTP_GET; request.request.append(sSERVER_ADDRESS); request.request.append(sACCOUNT_METHOD); request.request.append("infos/"); request.request.append(mUser.getUserToken()); request.request.append(appendFMLParametersUri()); return request; } COM: <s> build a request to retrieve user account details </s>
funcom_train/16883153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addVertex(Vertex vertex) { if (vertices.contains(vertex)) { throw new IllegalArgumentException("Vertex already in graph"); } if ((vertex.getOutgoingEdges().size() != 0) || (vertex.getIncomingEdges().size() != 0)) { throw new IllegalArgumentException("Vertex has adjusted edges"); } vertices.add(vertex); } COM: <s> adds given vertex to graph </s>
funcom_train/48876797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getGraphPanel() { if (graphPanel == null) { graphPanel = new JPanel(); graphPanel.setLayout(new BorderLayout()); ItFramePanel diagramsPanel = new ItFramePanel(":: Diagrams", ItFramePanel.NO_MINIMIZE_MAXIMIZE); diagramsPanel.setContent(getGraphTabbedPane(), false); graphPanel.add(diagramsPanel, BorderLayout.CENTER); } return graphPanel; } COM: <s> this method initializes graph panel </s>
funcom_train/2940077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getAdapter(Class aRequired) { if (IContentOutlinePage.class.equals(aRequired)) { if (ivOutlinePage == null) { ivOutlinePage = new XPandContentOutlinePage(getDocumentProvider(), this); if (getEditorInput() != null) { ivOutlinePage.setInput(getEditorInput()); } } return ivOutlinePage; } return super.getAdapter(aRequired); } COM: <s> returns an object which is an instance of the given class associated with </s>
funcom_train/27722864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String handleMissingRoleName(Element doElement) { String replacement = ""; //we know that sometimes the role name will be missing //for timer related <do>'s. in this case the current will be the previous String messageType = doElement.getAttributeValue("type").trim(); if (messageType.equals("Timer_Set") || messageType.equals("Timer_Reset") || messageType.equals("Timeout")) { replacement = previousRoleName; } else { replacement = environmentRoleName; } return replacement; } COM: <s> some do element in the ucmnav xml are missing the attributes </s>
funcom_train/49745972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showUrl(final Browser browser, final String urlStr) { try { if (urlStr.length() > 1) { browser.loadUrl(urlStr); } else { System.out.println("This is the url to load: " + urlStr); } } catch (Exception e) { System.out.println("Could not show url: " + urlStr + " ex:" + stackToString(e)); } } COM: <s> load the current url from the row that is selected </s>
funcom_train/8519499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String updateLeftEarState() { Request request = new Request(Method.POST, this.getLeftEarUrl()); request.setReferrerRef("http://www.hackystat.org"); // Handle it using an HTTP client connector Client client = new Client(Protocol.HTTP); Response response = client.handle(request); if (response.getStatus().isSuccess()) { return Boolean.TRUE.toString(); } else { return response.getStatus().getDescription(); } } COM: <s> updates the nabaztags ear position state by sending http request to the bunny </s>
funcom_train/19761946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOrganizationEnums() throws Exception { _logger.info("----------------------------------------------------------------------------"); _logger.info("Testing com.netstoke.core.organization package."); Class[] classes = new Class[]{OrganizationType.class}; testEnumValues(classes); Long id = null; try { OrganizationType.valueOf(id);fail(); } catch (NullPointerException e) {assertFalse(e.getMessage().contains("!"));} try { id = 9000L;OrganizationType.valueOf(id);fail(); } catch (IllegalArgumentException e) {assertFalse(e.getMessage().contains("!"));} } COM: <s> tests organization package enum values </s>
funcom_train/3361856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getDefaultValue() { // Special case for ArrayType and TabularType // [JF] TODO: clone it so that it cannot be altered, // [JF] TODO: if we decide to support defaultValue as an array itself. // [JF] As of today (oct 2000) it is not supported so // defaultValue is null for arrays. Nothing to do. return defaultValue; } COM: <s> returns the default value for the parameter described by this </s>
funcom_train/44657945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addCustomGridded(AbstractButton button) { builder.getLayout().appendRow(this.rowSpec); builder.getLayout().addGroupedRow(builder.getRow()); button.putClientProperty("jgoodies.isNarrow", Boolean.TRUE); builder.add(button); builder.nextRow(); } COM: <s> handle the custom row spec </s>
funcom_train/47546238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getSystemImage (int id) { checkDevice (); switch (id) { case SWT.ICON_ERROR: if (errorImage == null) { errorImage = createImage ("gtk-dialog-error"); } return errorImage; case SWT.ICON_INFORMATION: case SWT.ICON_WORKING: if (infoImage == null) { infoImage = createImage ("gtk-dialog-info"); } return infoImage; case SWT.ICON_QUESTION: if (questionImage == null) { questionImage = createImage ("gtk-dialog-question"); } return questionImage; case SWT.ICON_WARNING: if (warningImage == null) { warningImage = createImage ("gtk-dialog-warning"); } return warningImage; } return null; } COM: <s> returns the matching standard platform image for the given </s>
funcom_train/44623206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String writeJava(JCTree tree, boolean source) { try { // Here we use the Pretty constructor because we specifically // want only Java, not any JML StringWriter sw = new StringWriter(); tree.accept(new Pretty(sw,true)); return sw.toString(); } catch(Exception e) {} return "<Exception>"; } COM: <s> writes out a tree in pretty printed fashion with two character indentation </s>
funcom_train/32057662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetModified() { System.out.println("testSetModified"); GPGraphpad pad = new GPGraphpad(); GPGraph graph = new GPGraph(); GraphUndoManager undo = new GraphUndoManager(); GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo); try { newDoc.setModified(true); } catch (Exception e) { fail(); } } COM: <s> test of set modified method of class gpdocument </s>
funcom_train/27904301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void grow_and_invalidate_cache(NodeTable nt) { cache_bits++; int size = 1 << cache_bits; cache_mask = size - 1; num_grows++; CacheEntry [] tmp = new CacheEntry[size]; for(int i = 0; i < cache_size; i++) tmp[i] = entries[i]; invalidate_cache(nt, cache_size); for(int i = cache_size; i < size; i++) tmp[i] = new CacheEntry(); cache_size = size; entries = tmp; } COM: <s> grow the cache and invalidate everything since the hash function hash chagned </s>
funcom_train/7347233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean exists() { dbg("exists: " + getPath()); try { BufferedReader r = new BufferedReader(new InputStreamReader(httpPost(url, getPath(), "exists", "1"))); String result = br2string(r); if ("1".equals(result)) { return true; } else { dbg("exists Failed(" + result.length() + "): '" +result + "'"); return false; } } catch(IOException x) { x.printStackTrace(); return false; } } COM: <s> returns true if file exists on web server </s>
funcom_train/20885252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAttribute() { AttributeTestDTO obj = new AttributeTestDTO(); obj.attribute = "attributeValue"; String serializationResult = JSefaTestUtil.serialize(XML, obj); assertTrue(serializationResult.indexOf("attribute=") >= 0); JSefaTestUtil.assertRepeatedRoundTripSucceeds(XML, obj); } COM: <s> test the attribute type </s>
funcom_train/44018067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(final ActionEvent arg0) { // Figure out how many results to use int target = 0; try { target = Integer.parseInt(NumSearchField.getText()); setTargetImages(target); OptionsDialog.setVisible(false); } catch (final Exception e) { JOptionPane .showMessageDialog( OptionsPane, "Invalid input. Please enter a valid number of images to retrieve.", "Invalid Input", JOptionPane.WARNING_MESSAGE); } } COM: <s> when the user accepts the options screen validate our parameters </s>
funcom_train/12160078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsEmpty() { JDOMFactory factory = new LPDMODOMFactory(); ODOMElement e1 = (ODOMElement) factory.element("Element1"); ODOMElement[] elements = new ODOMElement[]{e1}; ODOMElementSelection selection = new ODOMElementSelection( Arrays.asList(elements)); assertFalse("There should be one element.", selection.isEmpty()); selection = new ODOMElementSelection(null); assertTrue("There are no elements in the selection.", selection.isEmpty()); } COM: <s> test is empty </s>
funcom_train/13847333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateDisplayListSquare() { // Init display list dp_square = glGenLists(1); glNewList(dp_square, GL_COMPILE); glBegin(GL_QUADS); glTexCoord2f(0, 0); glVertex2f(0, 0); glTexCoord2f(1, 0); glVertex2f(1, 0); glTexCoord2f(1, 1); glVertex2f(1, 1); glTexCoord2f(0, 1); glVertex2f(0, 1); glEnd(); glEndList(); } COM: <s> used to generate the display list representing a textured square </s>
funcom_train/46621295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Label getMessageOutputLevelLabel() { if (iMessageOutputLevelLabel == null) { try { iMessageOutputLevelLabel = new Label(); iMessageOutputLevelLabel.setName("MessageOutputLevelLabel"); iMessageOutputLevelLabel.setText("Message Level:"); } catch (Throwable iExc) { handleException(iExc); } } return iMessageOutputLevelLabel; } COM: <s> return the message output level label property value </s>
funcom_train/4991755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addWordField() { nbwords++; WordField wf = new WordField(wordcontainer, SWT.NONE, nbwords); // wf.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, // false)); wordfields.add(wf); if (nbwords == 1) chercheLabel.setText(Messages.QueryAssistDialog_2); else chercheLabel.setText(Messages.bind(Messages.QueryAssistDialog_3, nbwords)); wordcontainer.update(); mainPanel.update(); } COM: <s> adds the word field </s>
funcom_train/33776076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand () { if (backCommand == null) {//GEN-END:|172-getter|0|172-preInit // write pre-init user code here backCommand = new Command ("Back", Command.BACK, 0);//GEN-LINE:|172-getter|1|172-postInit // write post-init user code here }//GEN-BEGIN:|172-getter|2| return backCommand; } COM: <s> returns an initiliazed instance of back command component </s>
funcom_train/20296005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initBoard() { for (int i = 0; i < board.length; i++) { for (int j = 0; j < board[i].length; j++) { board[i][j] = Cell.EMPTY; } } for (int j = 0; j < columnsFil.length; j++) { columnsFil[j] = -1; } numOfSteps = 0; } COM: <s> initialize the whole board to be empty </s>
funcom_train/18146042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public C merge(C object, Feature feature, T value, Locator loc) { if(value == null) return object; LOGGER.info(addLoc("SAVING:" + value + "[" + value.getTitle() + "] ...",loc)); value.setInboundRelationship(null); object.setTarget(null); _applicationContext.getPersistence().save(value); _applicationContext.getPersistence().commit(); _applicationContext.getPersistence().close(); clearQueryCache(); clearObjectCache(); LOGGER.info("... as " + value); return null; } COM: <s> merging means saving we return the same object </s>
funcom_train/25332045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAndSetChromosomeName() { DAChromosome instance = new DAChromosome(); String expResult = "bob"; String result = instance.getChromosomeName(); assertNull(result); instance.setChromosomeName(expResult); result = instance.getChromosomeName(); assertEquals(result,expResult); } COM: <s> test of get chromosome name method of class dachromosome </s>
funcom_train/39538743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHighlighter(Highlighter hl, boolean prepend) { if (prepend) { highlighters.add(0, hl); } else { highlighters.add(highlighters.size(), hl); } updateUI(hl); hl.addChangeListener(getHighlighterChangeListener()); fireStateChanged(); } COM: <s> adds a highlighter to the pipeline </s>
funcom_train/36019008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void receive(Message incoming, int comm) throws IOException { super.receive(incoming, comm); ConnectMessage mess = (ConnectMessage) incoming; Node origin = mess.getOrigin(); Message reply = new AcknowledgeMessage(local); server.reply(comm, reply, origin.getInetAddress(), origin.getPort()); } COM: <s> responds to a connect message by sending a connect reply message </s>
funcom_train/9381440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private UnlockMode getUnlockMode() { final IccCard.State simState = mUpdateMonitor.getSimState(); if (simState == IccCard.State.PIN_REQUIRED || simState == IccCard.State.PUK_REQUIRED) { return UnlockMode.SimPin; } else { return (mForgotPattern || mLockPatternUtils.isPermanentlyLocked()) ? UnlockMode.Account: UnlockMode.Pattern; } } COM: <s> given the current state of things what should the unlock screen be </s>
funcom_train/32081524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCursor (Cursor cursor) { checkWidget (); if (cursor != null && cursor.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); this.cursor = cursor; if (cursor != null) { OS.FrameworkElement_Cursor (handle, cursor.handle); } else { int property = OS.FrameworkElement_CursorProperty (); OS.DependencyObject_ClearValue (handle, property); OS.GCHandle_Free (property); } } COM: <s> sets the receivers cursor to the cursor specified by the </s>
funcom_train/17362653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelArhiveOverview() { if (jPanelArhiveOverview == null) { jPanelArhiveOverview = new JPanel(); jPanelArhiveOverview.setLayout(null); // jPanelArhiveOverview.add(new FileInfoPanel(), null); // jPanelArhiveOverview.add(getFileInfoPanel(), null); } return jPanelArhiveOverview; } COM: <s> this method initializes j panel arhive overview </s>
funcom_train/4110628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newGame() { // Clear walls. walls = new Wall[width - 1][height - 1]; // Create fresh players. Color[] cs = createPlayerColors(2); players[0] = new Player(this, Orientation.SOUTH, "Player 1", 10, cs[0]); players[1] = new Player(this, Orientation.NORTH, "Player 2", 10, cs[1]); // Reset turn. turn = 0; // Clear history. history.clear(); // Notify listeners. fireNewGame(); } COM: <s> starts a new game clearing the history </s>
funcom_train/45762105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(Object[] p0) throws com.sun.star.uno.Exception { for(int i = 0; i + 2 < p0.length; i += 3) { add((String)p0[i], (String)p0[i + 1], (String)p0[i + 2]); } } COM: <s> initialize this class </s>
funcom_train/9710987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OperationDescription getOperation(String operationName) { if (DescriptionUtils.isEmpty(operationName)) { return null; } OperationDescription matchingOperation = null; for (OperationDescription operation : getOperations()) { if (operationName.equals(operation.getOperationName())) { matchingOperation = operation; break; } } return matchingOperation; } COM: <s> return the operation desription only one corresponding to the operation name passed in </s>
funcom_train/35175415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { for (String mbean : mbeanMap.keySet()) { MBeanHolder h = mbeanMap.get(mbean); h.publish(); } } catch ( Exception ex ) { // Robust exception to prevent thread death log.warning("Exception thrown sampling Mbeans"); log.throwing( this.getClass().getName(), "Exception thrown sampling Mbeans:", ex) ; } } COM: <s> called by the jmxagent periodically to sample the mbeans </s>
funcom_train/40682813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AclFeed getAclFeed(String resourceId) throws IOException, MalformedURLException, ServiceException, DocumentListException { if (resourceId == null) { throw new DocumentListException("null resourceId"); } URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + resourceId + URL_ACL); return service.getFeed(url, AclFeed.class); } COM: <s> gets the access control list for a object </s>
funcom_train/48660188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setFields(JPanel tttPanel) { for(int i = 0; i < 3; i++){ for(int j = 0; j < 3; j++){ final int iF = i; final int jF = j; btns[i][j] = new JButton(" "); btns[i][j].addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { btnAction(iF, jF); }}); tttPanel.add(btns[i][j]); } } } COM: <s> adds 9 buttons to a given jpanel </s>
funcom_train/32280291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isNodeSibling(TreeNode node) { // Check for null if (node == null) { return false; } // if // Check if nodes share a parent if (node.getParent() == getParent() && getParent() != null) { return true; } // if // Nodes are not siblings return false; } // isNodeSibling() COM: <s> is node sibling </s>
funcom_train/50894557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rest(String commandArgs, FTPConnection parent) { int position; try { position = Integer.parseInt(commandArgs); } catch (Exception e) { parent.output("504 Resume position cannot be set to " + commandArgs); return; } parent.setResumePosition(position); parent.output("350 REST command succeded, transfers will begin at " + position); } COM: <s> this sets the offset from the beginning of the file at which transfers </s>
funcom_train/39881578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Socket accept() throws IOException { checkClosedAndCreate(false); if (!isBound()) { throw new SocketException("Socket is not bound"); } Socket aSocket = new Socket(); try { implAccept(aSocket); } catch (SecurityException e) { aSocket.close(); throw e; } catch (IOException e) { aSocket.close(); throw e; } return aSocket; } COM: <s> waits for an incoming request and blocks until the connection is opened </s>
funcom_train/44870071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WCMTangentLineBean getWCMTangentLineBean() { if (WCMTangentLineBean == null) { WCMTangentLineBean = new WCMTangentLineBean(); WCMTangentLineBean.setColor(new Color(255, 179, 255)); WCMTangentLineBean.setFunction(getWCMExpressionInputBean()); WCMTangentLineBean.setXValue(getXInput()); if (presentation) { WCMTangentLineBean.setLineWidth(3); } } return WCMTangentLineBean; } COM: <s> this method initializes wcmtangent line bean </s>
funcom_train/11023392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInterfaceNotFound() { String property = "XXXXXX"; Class clazz = MappedPropertyTestInterface.class; try { MappedPropertyDescriptor desc = new MappedPropertyDescriptor(property, clazz); fail("Property '" + property + "' found in " + clazz.getName()); } catch (Exception ex) { } } COM: <s> test property not found in interface </s>
funcom_train/43096757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPackage() { Object target = getTarget(); if (Model.getFacade().isANamespace(target)) { Object ns = /*(MNamespace)*/ target; Object ownedElem = Model.getModelManagementFactory() .createPackage(); Model.getCoreHelper().addOwnedElement(ns, ownedElem); TargetManager.getInstance().setTarget(ownedElem); } } COM: <s> create a new package within the namespace </s>
funcom_train/8008667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Timestamp getDateTime() { String value = getValue(); if (value == null) return null; try { _dsTemp.setFormattedString(0, value); switch (_dsDataType) { case DataStore.DATATYPE_DATE : return new Timestamp(_dsTemp.getDate(0, 0).getTime()); case DataStore.DATATYPE_DATETIME : return new Timestamp(_dsTemp.getDateTime(0, 0).getTime()); } } catch (DataStoreException e) { return null; } return null; } COM: <s> this method returns a timestamp value from the component </s>
funcom_train/12645590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Window getFullScreenWindow() { Window returnWindow = null; synchronized (this) { // Only return a handle to the current fs window if we are in the // same AppContext that set the fs window if (fullScreenAppContext == AppContext.getAppContext()) { returnWindow = fullScreenWindow; } } return returnWindow; //6208413 } COM: <s> returns the code window code object representing the </s>
funcom_train/9737076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getEdgeInstanceCount (boolean activeOnly_p) { int instCount = 0; for (int i=0; i<this.edgeList.size(); i++) { Edge edgeObj = (Edge) this.edgeList.get(i); if (edgeObj.isActive() || !activeOnly_p) instCount = instCount + edgeObj.getCount(); } return instCount; } COM: <s> returns of edge instances including the repeating of the edges and excluding inactive </s>
funcom_train/51273091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected WindowIterator getNewWindowIteratorWithNodeIds(int startNodeId, int endNodeId) { WindowSequenceIterator window = null; synchronized (lock) { window = new WindowSequenceIterator(this, windowId, startNodeId, endNodeId); //System.out.print("Creating new window: "+winds.size()); winds.put(new Integer(windowId), window); //System.out.println(" "+winds.size()); windowId++; } return window; } COM: <s> returns a new window iterator for the given range with node ids node </s>
funcom_train/15628944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean doCopy(final boolean performAction) { final MapView<G, A, R> mapView = currentMapView; if (mapView == null) { return false; } final Rectangle selectedRec = mapView.getMapGrid().getSelectedRec(); if (selectedRec == null) { return false; } if (performAction) { copyBuffer.copy(mapView, selectedRec); } return true; } COM: <s> executes the copy action </s>
funcom_train/50863213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getItemResourceTotalMass() { double result = 0D; if (containedItemResources != null) { final Set<Entry<ItemResource, Integer>> es = containedItemResources.entrySet(); for(Entry<ItemResource, Integer> e : es){ result += e.getValue() * e.getKey().getMassPerItem(); } } return result; } COM: <s> gets the total mass of item resources in storage </s>
funcom_train/45391642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRectTransformation() { SWOG swog = new SWOG(); int X = 10; int Y = 20; swog.executeCommand("origin " + X + "," + Y); swog.executeCommand("rect 0,0 10 30 :rect"); SRect rect = (SRect) swog.getObjectByName("rect"); Point2D.Double point = rect.getMainPoint(); assertEquals(X, point.x, 0); assertEquals(Y, point.y, 0); } COM: <s> test if origin command is working for rect </s>
funcom_train/1344340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setSuggestions(final ChartPanel cp) { AsyncCallback<List<CellData>> callback = new AsyncCallback<List<CellData>>() { public void onFailure(Throwable caught) { Window.alert(caught.getMessage()); } public void onSuccess(List<CellData> result) { List<String> suggs = new ArrayList<String>(); for (CellData cd : result) { suggs.add(cd.toString()); } cp.setSuggestions(suggs); } }; ByronSvc.getColumn("Serie", "", callback); } COM: <s> retrieves all primary key values from the database and populates the </s>
funcom_train/19361531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IRI getDocumentIRIFromMappers(OWLOntologyID ontologyID, boolean quiet) { IRI defIRI = ontologyID.getDefaultDocumentIRI(); if (defIRI == null) { return null; } for (OWLOntologyIRIMapper mapper : documentMappers) { IRI documentIRI = mapper.getDocumentIRI(defIRI); if (documentIRI != null) { return documentIRI; } } if (!quiet) { throw new OWLOntologyIRIMappingNotFoundException( ontologyID.getDefaultDocumentIRI()); } else { return null; } } COM: <s> uses the mapper mechanism to obtain an ontology document iri from an </s>
funcom_train/1728738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTimeLength() { // in milliseconds String song_length; long size = 0; try { if (bitRate > 0) { size = fileSize * 8L / (long) bitRate; } } catch (Exception e) { log .debug("There was an exception in the getTimeLength(), probably a bitrate=0 problem."); } song_length = Long.toString(size); return song_length; } COM: <s> gets the time length attribute of the song info id3v2 object </s>
funcom_train/10636008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSSLContext07() throws NoSuchAlgorithmException { if (!DEFSupported) { fail(NotSupportMsg); return; } Provider provider = null; for (int i = 0; i < validValues.length; i++) { try { SSLContext.getInstance(validValues[i], provider); fail("IllegalArgumentException must be thrown when provider is null"); } catch (IllegalArgumentException e) { } } } COM: <s> test for code get instance string protocol provider provider code </s>
funcom_train/18787525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToCache(DataObject root, Map<DataObjectId, DataObject> cache) { DataObjectMgr manager = Application.getApplication().getDataObjectMgr(); for (DataObject object : manager.getRoots(root)) { cache.put(new DataObjectId(object), object); } } COM: <s> updates the cache with all root objects part of the the graph </s>
funcom_train/8689888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StringBuffer buildFilterChain(StringBuffer inputBuffer) { StringBuffer buf = inputBuffer; for (int i = 0; i < replacefilters.size(); i++) { Replacefilter filter = (Replacefilter) replacefilters.elementAt(i); filter.setInputBuffer(buf); buf = filter.getOutputBuffer(); } return buf; } COM: <s> creates the chain of filters to operate </s>
funcom_train/9557285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ArrayList getAttachmentsAsArrayList(){ try{ String contentType=message.getContentType(); Object obj=message.getContent(); if ( (isMultipart(message))){ MimeMultipart multipart = (MimeMultipart)obj; return getAttachmentsAsArray(multipart); } }catch (IOException e){System.out.println(e+"problem: getAttachment");} catch (MessagingException e){System.out.println(e+"problem: getAttachment");} return new ArrayList(); } COM: <s> returns list of attachments from a message </s>
funcom_train/46995145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws IOException { // On linux it seems one can manipulate terminal characteristics // through the master fd, hence masterTIOCSWINSZ(). So perhaps keeping // a slave fd around is pointless. // On Solaris it used to be that you could manipulate only // from the slave end. Needs more experimentation. // Can't close fd's directly so create a temporary stream (new FileOutputStream(slave_fd)).close(); } COM: <s> close the slave file descriptor </s>
funcom_train/130168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSpeed (int xS, int yS, int zS, int pitchS, int rollS, int yawS) { setPosition (this.xPos, this.yPos, this.zPos, this.pitch, this.roll, this.yaw, xS, yS, zS, pitchS, rollS, yawS, (byte)1, (byte)0); } COM: <s> set speed turnrate and side speed </s>
funcom_train/11709846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TreeItem getSettingsGroupTreeItemByName(String name) { TreeItem[] items = settingsTree.getItems(); for (int i = 0; i < items.length; i++) { if (name.equals(getName(items[i].getText()))) return items[i]; } throw new InternalErrorCDE("invalid state"); //$NON-NLS-1$ } COM: <s> find settings tree item for group name </s>
funcom_train/8452409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shareGroup(String groupName, boolean editable) throws LembreteSystemException { if (isSharedGroup(groupName)) { throw new LembreteSystemException("Group " + groupName + " is already shared"); } SharedGroup sGroup = new SharedGroup(getGroup(groupName), editable, getOwner()); sGroup.setAlias(groupName); this.sharedGroups.add(sGroup); } COM: <s> creates a shared group from a group in the agenda </s>
funcom_train/20044561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _unbind () { requiredMethod("bind()"); boolean result = false; // get the current thread's holder log.println("unbinding the shape..."); oObj.unbind(group); int countAfterUnbind = oShapes.getCount(); log.println("Count after unbind:" + countAfterUnbind); result = countAfterUnbind >= countBeforeBind; tRes.tested("unbind()", result); } COM: <s> unbinds the group created before </s>
funcom_train/24536334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Command createChangeConstraintCommand(Object child, Object constraint, boolean moved, boolean resize) { NullLayoutPolicyHelper.NullConstraint nullConstraint = new NullLayoutPolicyHelper.NullConstraint((Rectangle) constraint, moved, resize); return helper.getChangeConstraintCommand(Collections.singletonList(child), Collections.singletonList(nullConstraint)); } COM: <s> prim change constraint command create the command to change the constraint </s>
funcom_train/3429582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getXStr(String type) { if (this.length(this.getBaseNamespace(), type) != 1) { return ""; } Element xElem = XMLUtils.selectNode(this._constructionElement.getFirstChild(), this.getBaseNamespace(), type,0); return XMLUtils.getFullTextChildrenFromElement(xElem); } COM: <s> method get xstr </s>
funcom_train/14615401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while (timerThread != null) { try { Thread.sleep( delay ); if (timerThread != null) { target.update(); } } catch (InterruptedException e) { // Do nothing. If the thread needs to be killed, then the // outer while loop will return false. } } } COM: <s> waits for the given period then calls code update code if </s>
funcom_train/3762217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Container makeGUI() { JPanel contentPane = new JPanel(); contentPane.setLayout(new BorderLayout()); m_textArea = new JTextArea(); m_textArea.setEditable(false); JScrollPane m_scrollPane = new JScrollPane(m_textArea); contentPane.add(m_scrollPane, BorderLayout.CENTER); return contentPane; } COM: <s> make the gui of this log display </s>
funcom_train/28549464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void confirmAndDelete(Set<EntityType> selents) { assert selents.size() == 1; OWLEntity entToDelete = selents.iterator().next(); final int ret = JOptionPane.showConfirmDialog( SwingBridge.findActiveFrame(), scopedEntityDeleter.getConfirmationMessage(entToDelete), "Delete", JOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE); if (ret == JOptionPane.YES_OPTION) { delete(selents); } } COM: <s> show a confirmation message to ask the user to confirm the deletion of </s>
funcom_train/19164771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReflectionActionConstructorOkOk() { BeanEditPanel panel = new BeanEditPanel(new TestBeanPerson(10, "blue")); try { Method methodToTest = MethodUtils.getAccessibleMethod(BeanEditPanel.class, "doCommitAction", new Class[0]); new ReflectionAction( panel, methodToTest ); //alles ok } catch (Exception e) { e.printStackTrace(); fail("unexpected exception "+e.getMessage() ); } } COM: <s> test reflection action constructor ok ok </s>
funcom_train/7353265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSystemDisplayName(File f) { // FIXME - Determine display name if (f.equals(getComputer())) { return getSystemVolume().getName(); } else { if (OSXFile.canWorkWithAliases()) { return OSXFile.getDisplayName(f); } else { return target.getSystemDisplayName(f); } } } COM: <s> name of a file directory or folder as it would be displayed in </s>
funcom_train/34889401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getSingletonElement(Element element, String elemName) { // If any of the parameters are null, return null. if (element == null || elemName == null) { return null; } NodeList nl = element.getElementsByTagName(elemName); return (Element)nl.item(0); } COM: <s> returns first element node contained in the element node passed into </s>
funcom_train/46747905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFacilityLocationRef(DisplayModel facilityLocationRef) { if (Converter.isDifferent(this.facilityLocationRef, facilityLocationRef)) { DisplayModel oldfacilityLocationRef= new DisplayModel(this); oldfacilityLocationRef.copyAllFrom(this.facilityLocationRef); this.facilityLocationRef.copyAllFrom(facilityLocationRef); setModified("facilityLocationRef"); firePropertyChange(String.valueOf(APPOINTMENTTYPES_FACILITYLOCATIONREFID), oldfacilityLocationRef, facilityLocationRef); } } COM: <s> facility for the appointment type </s>
funcom_train/27900017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getList(ServletContext app, String request) { ConnPool pool = ROPool.getPool(app); Connection conn; try { conn = pool.getInstance(); } catch (Exception ex) { return ""; } try { return getList(conn, request); } finally { pool.returnInstance(conn); } } COM: <s> get a result set as a list of li tags </s>
funcom_train/45623408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDependenciesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GenerateApplicationManifestType_dependencies_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GenerateApplicationManifestType_dependencies_feature", "_UI_GenerateApplicationManifestType_type"), MSBPackage.eINSTANCE.getGenerateApplicationManifestType_Dependencies(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the dependencies feature </s>
funcom_train/7607232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean touches(float x, float y, AABox other, float otherx, float othery) { float totalWidth = (other.width + width) / 2; float totalHeight = (other.height + height) / 2; float dx = Math.abs((x + offsetx) - (otherx + other.offsetx)); float dy = Math.abs((y + offsety) - (othery + other.offsety)); return (totalWidth > dx) && (totalHeight > dy); } COM: <s> check if this box touches another </s>
funcom_train/39380909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsReadonly() { // Fieldset is not disabled. assertFalse(this.fieldSet.isReadonly()); // Textfield inside is not disabled. assertFalse(this.trackField.isReadonly()); // Change fieldset state. this.fieldSet.setReadonly(true); // Textfield is now disabled too. assertTrue(this.trackField.isReadonly()); } COM: <s> test the is readonly for a child component </s>
funcom_train/49753462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTextField1() { if (textField1 == null) {//GEN-END:|97-getter|0|97-preInit // write pre-init user code here textField1 = new TextField("Host", null, 32, TextField.ANY);//GEN-LINE:|97-getter|1|97-postInit // write post-init user code here }//GEN-BEGIN:|97-getter|2| return textField1; } COM: <s> returns an initiliazed instance of text field1 component </s>
funcom_train/12212465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTabSaved(String toolTip) { int index = getTabIndex(toolTip); if (index != -1 && isTabEdited(toolTip)) { editorTab.setTitleAt(index, editorTab.getTitleAt(index) .replaceFirst("\\*", "")); } else log.debug("Tab with toolTip " + toolTip + " not found"); } COM: <s> mark the tab as saved mode </s>
funcom_train/27822477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getSimilarity(InstanceTupel instances) throws KAONException { Double result = (Double) cache.get(instances); if (result == null) { //to bad, i have to calculate it :-( result = new Double( getSimilarity(instances.inst1, instances.inst2)); cache.put(instances,result); } return result.doubleValue(); } COM: <s> calculates the semantic similarity between two instances </s>
funcom_train/24376878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String writeIDF_file(String targetdir) { String filename = TaskID + ".idf"; String[] SearchStrings = SearchStringList.toArray(new String[0]); String[] Newvals = AltValueList.toArray(new String[0]); boolean ok = EPlusWinTools.updateIDFFile(filename, WorkEnv.IDFTemplate, SearchStrings, Newvals, targetdir); return ok ? filename : null; } COM: <s> this method should be disused </s>
funcom_train/16819020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addFolder(File f) { if (f.isDirectory()) { File[] files = f.listFiles(); if (files != null && files.length > 0) { for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) { addFolder(files[i]); } else { if (!model.contains(files[i])&& isAccepted(f)) { model.addElement(files[i]); } } } } } } COM: <s> add content of folder recursively </s>
funcom_train/3746304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSettingType(SecuritySession securitySession, String name) throws CausedByException { PersistenceSession persistenceSession = persistenceManager.openSession(); try { return ((SettingDO)persistenceManager.findInstance(persistenceSession, "adminSettingName", new Object[] {name})).getType(); } finally { persistenceSession.close(); } } COM: <s> p get the type of a setting p </s>
funcom_train/37459583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String findAcForPublication( Publication publication ) { // TODO add primary-reference first, then shortlabel Query query = getEntityManager().createQuery( "select pub.ac from Publication pub where pub.shortLabel = :shortLabel" ); query.setParameter( "shortLabel", publication.getShortLabel() ); return getFirstAcForQuery( query, publication ); } COM: <s> finds a publication based on its properties </s>
funcom_train/40610648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LocatedSpot getClosestSpot(final Locatable location) { if(spots == null || spots.size() == 0) { return null; } // Copy this so we can reorder them without altering the order // in the copy the trip object keeps. final List<LocatedSpot> spotClone = new LinkedList<LocatedSpot>(spots); Collections.sort(spotClone, new DistanceComparator(location.getGeoLocation())); return spotClone.get(0); } COM: <s> get the closest spot on this trip to the location given in meters </s>
funcom_train/5381445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(String name, double value) { if (Double.isNaN(value)) throw new IllegalArgumentException(); final double doubleValue = getDouble(name); if (value == doubleValue) return; Double oldValue = new Double(doubleValue); Double newValue = new Double(value); try { notify = false; if (getDefaultDouble(name) == value) getPluginPreferences(true).remove(name); else getPluginPreferences(true).putDouble(name, value); firePropertyChangeEvent(name, oldValue, newValue); } finally { notify = true; } } COM: <s> sets the current value of the double valued property with the </s>
funcom_train/33622158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getJMenu3() { if (jMenu3 == null) { jMenu3 = new JMenu(); jMenu3.setText("Min Filter"); ButtonGroup bg = new ButtonGroup(); bg.add(getJRadioButtonMenuItem()); bg.add(getJRadioButtonMenuItem1()); bg.setSelected(getJRadioButtonMenuItem().getModel(), true); jMenu3.add(getJRadioButtonMenuItem()); jMenu3.add(getJRadioButtonMenuItem1()); } return jMenu3; } COM: <s> this method initializes j menu3 </s>
funcom_train/2387320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttrStartTable (int page, String [] attrStartTable) { // clear entries in this.table! for(int i=0;i < attrStartTable.length;i++) { if(attrStartTable[i] != null) { Integer idx = new Integer(i+5); this.attrStartTable.put(attrStartTable[i],idx); } } if (page != 0) throw new RuntimeException ("code pages curr. not supp."); } COM: <s> sets the attribute start table for a given page </s>
funcom_train/21850412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BufferedImage getBufferedImage() { if (m_buffered_image == null && m_icon != null) { int width = m_icon.getIconWidth(); int height = m_icon.getIconHeight(); m_buffered_image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); Graphics2D bg = m_buffered_image.createGraphics(); bg.drawImage(m_icon.imageIcon().getImage(), 0, 0, bg.getColor(), null); bg.dispose(); } return m_buffered_image; } COM: <s> returns a buffered image of the icon associated with this texture </s>
funcom_train/19845852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String result = "Transform[[" + matrixPosition[0] + "," + matrixPosition[1] + "," + matrixPosition[2] + "][" + matrixPosition[3] + "," + matrixPosition[4] + "," + matrixPosition[5] + "][" + matrixPosition[6] + "," + matrixPosition[7] + "," + matrixPosition[8] + "]]"; return result.toString(); } COM: <s> convert this transform to a string </s>
funcom_train/7802254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { // Write out any hidden stuff s.defaultWriteObject(); // Write out Comparator s.writeObject(m.comparator()); // Write out size s.writeInt(m.size()); // Write out all elements in the proper order. for (Iterator<E> i = m.keySet().iterator(); i.hasNext();) s.writeObject(i.next()); } COM: <s> save the state of the </s>
funcom_train/8643113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Template getTemplate(String templateName, String encoding) throws Exception { Template template; if (encoding == null || encoding.length() == 0 || encoding.equals("8859-1") || encoding.equals("8859_1")) { template = ve.getTemplate(templateName); } else { template = ve.getTemplate(templateName, encoding); } return template; } COM: <s> returns a template based on encoding and path </s>