__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/30260515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private QuserSessionContext login(String organization, String login, String pass, Map env) throws QClientAuthException { if (LOG.isTraceEnabled()) { LOG.trace("Entering login ..."); } try { QuserAuthenticationDelegate auth = new QuserAuthenticationDelegate((Properties)null); QuserSessionContext profile = auth.login(organization, login, pass, env); return profile; } catch(Exception e) { throw new QClientAuthException("Login failed for '"+login+"': " + e, e); } } COM: <s> incapsulates auth logic </s>
funcom_train/49263406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void create() { validate(); if (emError.hasError()) { return; } SqlServerGroup group = new SqlServerGroup(txName.getText().trim()); SqlServerGroup.addGroup(group, lsLocation.getSelectionIndex()); try { ServerSerializer.getInstance().save(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } ServerView.getInstance().updateTree(); shell.close(); } COM: <s> called when create is pushed </s>
funcom_train/32057547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNotifyCellChange() { System.out.println("testNotifyCellChange"); Vector v = new Vector(); JGraph j = new JGraph( new DefaultGraphModel() ); DefaultGraphSelectionModel dg = new DefaultGraphSelectionModel(j); dg.notifyCellChange(v); } COM: <s> this function tests notify cell change function of default graph cell class </s>
funcom_train/33639432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator getRelated() { ArrayList related = new ArrayList(m_edges.size()); for (int i = 0; i < m_edges.size(); i++) { Edge e = (Edge)m_edges.get(i); related.add(e.getOtherNode(this)); } return(related.iterator()); } COM: <s> returns all nodes that are incident with adjacent edges minus itself </s>
funcom_train/25787523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Reference getMailRef(String identifier) throws ResourceException { final Template mailTemplate = new Template(getMailUriTemplate()); Reference result = new Reference(mailTemplate.format(new MailResolver( identifier))); if (result.isRelative()) { result.setBaseRef(getMailboxUri()); result = result.getTargetRef(); } return result; } COM: <s> returns the reference of a mail according to its identifier </s>
funcom_train/7518258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(ProcessoAndamento entity) { EntityManagerHelper.log("deleting ProcessoAndamento instance", Level.INFO, null); try { entity = getEntityManager().getReference(ProcessoAndamento.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent processo andamento entity </s>
funcom_train/37004889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assembleMapCuChange(Object refactoringParticipant) { for (CompilationUnitEx cu : changes.keySet()) { TextChange textChange = RefactoringCoreUtils.getTextChange( refactoringParticipant, cu.getCompilationUnit().getResource()); mapCuChange.put(cu, textChange); } } COM: <s> assembles a map of compilation unit synchronized change object </s>
funcom_train/43213729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getTimeSpentDeleting() { long time = timeSpentDeleting; // If currently doing this activity, increment time by run time of this // current activity. if (this.currentActivity == HashSpanFixingThread.ACTIVITY_DELETING) { time += (TimeUtil.getTrancheTimestamp() - lastActivityStartTimestamp); } return time; } COM: <s> p get time in milliseconds spent deleting inappropriate chunks on server </s>
funcom_train/42646434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int readByte() { int returnValue = -1; try { InputStream in = getCorrectInputStream(); if (in != null) returnValue = in.read(); } catch (IOException e) { logger.log(Level.FINE, "Error reading from temporary file ", e); } return returnValue; } COM: <s> reads a byte of data from this input stream </s>
funcom_train/19619530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void registerSourceRoots() { if (sourceRoot != null) { getLog().info("Registering compile source root " + sourceRoot); project.addCompileSourceRoot(sourceRoot.toString()); } if (testSourceRoot != null) { getLog().info( "Registering compile test source root " + testSourceRoot); project.addTestCompileSourceRoot(testSourceRoot.toString()); } } COM: <s> register compile and compile tests source roots if necessary </s>
funcom_train/24569495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAverageCharacterWidthTestString(String newTestString) { checkNotBlank(newTestString, "The test string must not be null, empty, or whitespace."); String oldTestString = averageCharWidthTestString; averageCharWidthTestString = newTestString; changeSupport.firePropertyChange( PROPERTY_AVERAGE_CHARACTER_WIDTH_TEST_STRING, oldTestString, newTestString); } COM: <s> sets a string that will be used to compute the average character width </s>
funcom_train/28867801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void report() { SourcePoint pt = point == null ? new SourcePoint("*unknown*", 0, 0, 0, 0) : point; pt.report(); Terminal.print(" "); Terminal.printRed(errorType); Terminal.print(": "); Terminal.print(message); Terminal.print("\n"); if (STACKTRACES) { printStackTrace(); } } COM: <s> the code report code method generates a textual report of this error </s>
funcom_train/38288120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getCurrentWizardKind() { assert !wizards.isEmpty(); if (wizards.size() == 1) return CURRENT_EXPORT_CLASS; final OnePageWizard< ? extends BaseWizardPage> last = wizards .get(wizards.size() - 1); if (last.getPage() instanceof CoordinatorConfiguratorWizardPage) return CURRENT_CONFIG; if (last.getPage() instanceof GraphSelectorWizardPage) return CURRENT_GRAPH_SELECTOR; if (last.getPage() instanceof FileSelectorWizardPage) return CURRENT_OUTPUT_FILE; // only four types of pages are shown... throw new AssertionError(); } COM: <s> returns what current wizard is showing </s>
funcom_train/29985682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHeader (String type, String value) { int s = headers.size (); for (int i = 0; i < s; i++) { Header h = headers.get (i); if (h.type.equalsIgnoreCase (type)) { h.value = value; return; } } Header h = new Header (type, value); headers.add (h); } COM: <s> set or replaces a value for given type </s>
funcom_train/2289714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isValidURL(String inputString) { boolean isValid = false; try { if (inputString != null) { URL tempURL = new URL(inputString); isValid = (tempURL.getProtocol() != null); } } catch (MalformedURLException mue) { // ignore because it is not harmful } return isValid; } COM: <s> checks if a string is a valid url </s>
funcom_train/31359908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void roundExecutionFinished( RoundExecutionFinished ref ) { log.debug("Received roundExecutionFinished from player: "+ ref.getPlayerId()+", expected: "+caller.getPlayerId() ); if (ref.getPlayerId() == caller.getPlayerId() ) { clientFacadeImpl.getServer().roundExecutionFinished( caller.getPlayerId() ); } } COM: <s> notifies the server that the round protocol provided in client </s>
funcom_train/28224612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createHelpMenu(final MenuItem header) { if (helpMenu != null) { helpMenu.dispose(); } helpMenu = new Menu(shell, SWT.DROP_DOWN); MenuItem helpAboutItem = new MenuItem(helpMenu, SWT.PUSH); helpAboutItem.setText("&About"); helpAboutItem.addSelectionListener(new SelectionAdapter() { public void widgetSelected(final SelectionEvent e) { new AboutShell(); } }); helpMenuHeader.setMenu(helpMenu); } COM: <s> create the help menu </s>
funcom_train/49626527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element readBundleXML() { try { Element config = new SAXBuilder().build( new File(this.baseDir, "bundle.xml")).getRootElement(); this.watchResources.add(new FileResource(new File(this.baseDir, "bundle.xml"))); return config; } catch (Exception e) { throw new LifecycleException( "Error processing bundle.xml for bundle '" + this.name + "' in '" + this.baseDir.getAbsolutePath() + "'.", e); } } COM: <s> reads the bundle </s>
funcom_train/50156567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Element getInputElement() { /* have to first test to see if we are rendering an optional, simpleContent element. if so, then we must test to see if the parent exists before creating the inputElement */ Element inputElement = super.getInputElement(); if (schemaNode.isSimpleOrComplexContent() && !sh.isRequiredBranch(schemaNode)) { Element nodeExists = nodeExistsTest(xpath); nodeExists.add(inputElement); return nodeExists; } else { return inputElement; } } COM: <s> create appropriate input element </s>
funcom_train/50608954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void cancel() { if (cancel_as_close) { System.gc(); System.exit(0); } String string1 = "Yes"; String string2 = "No"; Object[] options = {string1, string2}; int n = JOptionPane.showOptionDialog(null, "Are you sure you want leave \n"+ "the instalation wizard ?", "Question", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, string1); if (n == JOptionPane.NO_OPTION) { return; } else if (n == JOptionPane.YES_OPTION) { dispose(); System.exit(0); } } COM: <s> cancels this install wizard </s>
funcom_train/44011337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetStartDate() { System.out.println("setStartDate"); String startDate = ""; CouponBO instance = new CouponBO(); instance.setStartDate(startDate); // 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 start date method of class edu </s>
funcom_train/11704311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Properties getComponentEnvVars() throws IOException { // get all environment variables that are specified for the current pear file Properties pearEnvProps = InstallationController.buildTableOfEnvVars(this .getInstallationDescriptor()); // removes the UIMA datapath setting if available since it is already returned with the // getComponentDataPath() method. pearEnvProps.remove(RelativePathResolver.UIMA_DATAPATH_PROP); // return the environment variables specified for the component return pearEnvProps; } COM: <s> returns the environment variable settings for the component </s>
funcom_train/21954090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeFolderDisplay(){ Runnable runMe = new Runnable() { public void run() { try { saveWindowSettings(); setClosed(true); } catch (java.beans.PropertyVetoException e) { } } }; if (SwingUtilities.isEventDispatchThread()) { runMe.run(); } else { SwingUtilities.invokeLater(runMe); } } COM: <s> this closes the folder internal frame </s>
funcom_train/12157084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void iterate(OutputStyledElementIteratee iteratee) { if (iteratee == null) { throw new IllegalArgumentException("iteratee may not be null"); } IterationAction action = IterationAction.CONTINUE; Iterator elements = elementList.iterator(); while (action == IterationAction.CONTINUE && elements.hasNext()) { OutputStyledElement ose = (OutputStyledElement) elements.next(); action = iteratee.next(ose); } } COM: <s> iterate over each of the elements in the list calling the the iteratee </s>
funcom_train/11731800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNameValue(Document doc, String fieldName, Name internalValue) { try { String normValue = mappings.getPrefix(internalValue.getNamespaceURI()) + ":" + internalValue.getLocalName(); doc.add(createFieldWithoutNorms(fieldName, normValue, PropertyType.NAME)); } catch (NamespaceException e) { // will never happen } } COM: <s> adds the name value to the document as the named field </s>
funcom_train/7601399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConfigurationPanel() { portChoice.select(parameters.getPortName()); baudChoice.select(parameters.getBaudRateString()); flowChoiceIn.select(parameters.getFlowControlInString()); flowChoiceOut.select(parameters.getFlowControlOutString()); databitsChoice.select(parameters.getDatabitsString()); stopbitsChoice.select(parameters.getStopbitsString()); parityChoice.select(parameters.getParityString()); } COM: <s> sets the configuration panel to the settings in the parameters object </s>
funcom_train/28672839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDestroyMethodPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BeanType_destroyMethod_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BeanType_destroyMethod_feature", "_UI_BeanType_type"), BeansPackage.Literals.BEAN_TYPE__DESTROY_METHOD, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the destroy method feature </s>
funcom_train/7965388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertGenesFormPermutation(final int[] genes) { final int chromosomeLength = genes.length; int[] genesCount = new int[chromosomeLength]; for (int i = 0; i < chromosomeLength; i++) { genesCount[genes[i]]++; } for (int i = 0; i < chromosomeLength; i++) { Assert.assertEquals(genesCount[i], 1); } } COM: <s> asserts that each gene from pool 0 individual size exists only once </s>
funcom_train/29396659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void append(InstructionHandle ih) { if (isEmpty()) { end = ih; start = ih; ih.prev = null; ih.next = null; } else { end.next = ih; ih.prev = end; ih.next = null; end = ih; } length++; // Update length } COM: <s> append an instruction to the end of this list </s>
funcom_train/16269405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Friend removeFriend(String host) { InetAddress iad = null; Friend ret = null; try { iad = InetAddress.getByName(host); ret = (Friend) _friends.remove(iad); } catch (UnknownHostException ex) { Log.warn(ex.getMessage()); } return ret; } COM: <s> removes a friend </s>
funcom_train/9558953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image get(ImageDescriptor descriptor) { if (descriptor == null) descriptor= ImageDescriptor.getMissingImageDescriptor(); Image result= (Image)fRegistry.get(descriptor); if (result != null) return result; Assert.isTrue(fDisplay == Activator.getStandardDisplay(), "Allocating image for wrong display"); result= descriptor.createImage(); if (result != null) fRegistry.put(descriptor, result); return result; } COM: <s> returns the image associated with the given image descriptor </s>
funcom_train/33606796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawSegment(Graphics2D gr, Point3D coord1, Point3D coord2, PathStyle style) { Point3D[] clipped = P3DUtils.clipSegment(proj.clipPoint, proj.tDir, new Point3D[]{coord1, coord2}); if (clipped != null) style.draw(gr, new Line2D.Double(proj.getWindowPointOf(coord1), proj.getWindowPointOf(coord2)), false); } COM: <s> draws a segment on the canvas w specified distance setting </s>
funcom_train/45878757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UnitValue getRainPerImpulse() throws IOException { if (rainPerImpulse == null) { byte[] nibbles = device.read(MemoryMap.RAIN_PER_IMPULSE, 2); double mmPerImpulse = Device.binary(nibbles, 0, 3) / 1000.0; rainPerImpulse = new UnitValue(mmPerImpulse, RainfallUnit.MILLIMETRE); } return rainPerImpulse; } COM: <s> this value is generally 0 </s>
funcom_train/27824061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean moveIntoForegroud(Node node,List list) { Iterator iterator=list.iterator(); while (iterator.hasNext()) { Node current=(Node)iterator.next(); if (node==current) { iterator.remove(); list.add(node); return true; } } return false; } COM: <s> processes given list and moves the supplied node into foreground </s>
funcom_train/28763239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set_Id(java.lang.String value) throws com.intersys.objects.CacheException { com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value); mInternal.setProperty(ii__Id, jj__Id,kk__Id, com.intersys.objects.Database.RET_PRIM, "Id", dh); return; } COM: <s> sets new value for code id code </s>
funcom_train/44837046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String showLayout(Object page) throws SavusPOException { //cast the page to the correct object RegistrationHTML registrationPage = (RegistrationHTML) page; // Shows all information of the page super.showLayout(registrationPage); //code to work with the page goes here // disable resultTable registrationPage.getElementResultTable().getParentNode().removeChild( registrationPage.getElementResultTable()); //send it to the super servlet savusapp return registrationPage.toDocument(); } COM: <s> show the page override the methods superclass </s>
funcom_train/34340508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getEnter() { if (Enter == null) {//GEN-END:|22-getter|0|22-preInit // write pre-init user code here Enter = new Command("Enter", Command.OK, 0);//GEN-LINE:|22-getter|1|22-postInit // write post-init user code here }//GEN-BEGIN:|22-getter|2| return Enter; } COM: <s> returns an initiliazed instance of enter component </s>
funcom_train/43060456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int countNoTuples(String input, String fileType) { BufferedReader r = null; try { r = new BufferedReader(new FileReader(input + fileType)); int count = 0; while (r.readLine() != null) { count++; } log.info("No of Tuples: " +count); return count; } catch (IOException e) { e.printStackTrace(); } finally { try { r.close(); } catch (IOException e) { e.printStackTrace(); } } return -1; } COM: <s> counting the number of tuples in the given input file </s>
funcom_train/16453844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getClassName(File file) throws IOException { BufferedReader br = new BufferedReader(new FileReader(file)); try { String firstLine = br.readLine(); if (firstLine != null) { Matcher matcher = Pattern.compile(".*\\s([\\w.]+)").matcher(firstLine.trim()); if (matcher.matches()) { return matcher.group(1); } } return null; } finally { br.close(); } } COM: <s> reads th supplied file and return the last word of the </s>
funcom_train/24933333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBFSLogClassesToProblem(Collection<MClass> classes, Problem problem) { PriorityQueue<MClass> classes_queue = new PriorityQueue<MClass>(classes.size(),new ClassComparator()); classes_queue.addAll(classes); double classes_number = Math.log(classes.size()); traverseBFS(problem, classes_queue, classes_number); } COM: <s> method performing the creation of inequalities in bfs order traversed class diagram starting </s>
funcom_train/24569319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLabelForUnfocusableField() { builder.add(labelWithoutMnemonic, cc.xy(1, 1)); builder.add(unfocusableField, cc.xy(3, 1)); assertNull("Labeling label", labelWithoutMnemonic.getLabelFor()); } COM: <s> checks the association between label and unfocusable component </s>
funcom_train/23173568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void autoCalculateDuration () { float distance; float avgSpeed; // get distance and AVG speed try { distance = getDistanceEntry (false); avgSpeed = getAvgSpeedEntry (false); } catch (STException se) { return; } int duration = CalculationUtils.calculateDuration (distance, avgSpeed); tfDuration.setText (formatUtils.seconds2TimeString (duration)); } COM: <s> automatic calculation of the duration based on the other values </s>
funcom_train/45388858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RecInfo find( String name ) { for ( int i = 0; i < recList.size(); i++ ) if ( ( ( RecInfo )recList.elementAt( i ) ).getName().equals( name ) ) return ( RecInfo )recList.elementAt( i ); return null; } COM: <s> find searches in the local cache for the record information </s>
funcom_train/9908484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadFrameIcon() { URL imgUrl = null; ImageIcon imgIcon = null; imgUrl = AddressFrame.class.getResource("resource/addressbook32.gif"); imgIcon = new ImageIcon(imgUrl); Image img = imgIcon.getImage(); this.setIconImage(img); } COM: <s> load our own address book icon into our frame window </s>
funcom_train/42944207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMinimumPacketLength() { if (this.minReadLength > 0) { return this.minReadLength; } else if (this.isTextPackets()) { return 1; // at least '\r' (however, this isn't used for text packets) } else { return this.getMaximumPacketLength(); } } COM: <s> returns the minumum packet length </s>
funcom_train/2713907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(EditorContext context) { this.viewLineNumber = context.getConfiguration().getGeneralConfig(). getGeneral().isViewLineNumber(); // Update the menu state as well ActionManager.getActionById(MenuConstants.VIEW_LINE_NUMBER).setSelected( this.viewLineNumber); this.splitStatus = CommonConstants.UNSPLIT; this.saved = true; } COM: <s> initializes states of menu for a document </s>
funcom_train/51342132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAction(final OverflowActionEnum action) { if(action == null) throw new IllegalArgumentException(); if (!lock.isHeldByCurrentThread()) throw new IllegalMonitorStateException(); if (actionRef.get() != null) { throw new IllegalStateException("Already set: " + actionRef.get() + ", given=" + action); } actionRef.set(action); } COM: <s> set the action to be taken </s>
funcom_train/15814447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void RemoveXmlFile(String str_xml_file) { try { File file_xml_file_remove = new File(str_xml_file); file_xml_file_remove.delete(); } catch (Exception e) { logger.error("Exception On xml_file delete: "+e); } } COM: <s> method to remove a xml file </s>
funcom_train/10633204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAdd_unorder_Simple() throws NamingException { int count = 5; Person[] persons = new Person[count]; for (int i = 0; i < count; i++) { persons[i] = Person.getInstance(); assertTrue(unorderedAttribute.add(persons[i])); } for (int i = 0; i < count; i++) { assertSame(persons[i], unorderedAttribute.get(i)); } assertEquals(count, unorderedAttribute.size()); } COM: <s> test add a simple object through add </s>
funcom_train/35111973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONObject getPollingUnreadCount() throws PlurkException { try { HttpGet method = (HttpGet) PlurkActionSheet.getInstance() .getPollingUnreadCount(config.args().getMap()); return JsonUtils.toObject(executor.execute(method)); } catch (Exception e) { throw PlurkException.create(e); } } COM: <s> api polling get unread count br </s>
funcom_train/20042458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _loadModuleByImplName() { log.println("Load module LOWERCASE_UPPERCASE"); oObj.loadModuleByImplName("LOWERCASE_UPPERCASE", loc); String name = oObj.getName(); boolean res = name.equals("lower_to_upper(generic)"); log.println("getName return: " + name); tRes.tested("loadModuleByImplName()", res); } COM: <s> calls the method for load lowercase uppercase module and </s>
funcom_train/49318841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void finishFigure() { if (figure != null) { graphics.clearSelection(); if (figure instanceof RoiFigure) { ((RoiFigure) figure).updateGeometry(); } graphics.select((CanvasFigure) figure); figure = null; } polyline = null; polygon = null; freehand = null; setDrawingMode(SELECT); mouseClicked = false; } COM: <s> finish off the current figure and select it </s>
funcom_train/37590632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _setThreadCellFont(int row) { DebugThreadData currThread = _threads.get(row); if (currThread.getUniqueID() == _currentThreadID && currThread.isSuspended()) { setFont(getFont().deriveFont(Font.BOLD)); } } COM: <s> sets the font for a cell in the thread table </s>
funcom_train/5714096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEmptyFlushing() throws IOException{ ByteArrayOutputStream baos = new ByteArrayOutputStream(); BitOutputStream bos = new BitOutputStream(baos); bos.flush(); byte[] bytes = baos.toByteArray(); assertEquals("check length of returned bytes", 0, bytes.length); } COM: <s> tests the flushing of non existant data while writing bitwise left </s>
funcom_train/23267872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetFechaCobranza() { System.out.println("getFechaCobranza"); Giros instance = new Giros(); String expResult = ""; String result = instance.getFechaCobranza(); 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 fecha cobranza method of class capa negocios </s>
funcom_train/6407176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFrame( Vector3f location, Quaternion axes ) { this.location = location; left = axes.getRotationColumn( 0, left ); up = axes.getRotationColumn( 1, up ); direction = axes.getRotationColumn( 2, direction ); onFrameChange(); } COM: <s> code set frame code sets the orientation and location of the camera </s>
funcom_train/126781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Task newTask(final String command, final String[] arguments, final HashMap inputFiles, final String inputStream) { Task task = null; if(currentTaskCount < maxTaskCount) { task = new Task(this, command, arguments, inputFiles, inputStream, maximumCPUPower / maxTaskCount, serialTaskRef); taskQueue.put(new Long(serialTaskRef), task); serialTaskRef++; currentTaskCount++; currentCPUPower += maximumCPUPower/ maxTaskCount; } return task; } COM: <s> create new task </s>
funcom_train/35095486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseDragged(MouseEvent e) { if (inGesture) { long when = System.currentTimeMillis(); previous.update(e.getPoint()); for (GestureListener l : listeners) { l.gestureMovement(when, previous, this); } consume(e); } /*else { previous.update(e.getPoint()); }*/ } COM: <s> if a gesture is being performed it notifies all listeners </s>
funcom_train/11720035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void depopulateContext(Context ctx) { Iterator iter = cl.getAllParameters(); while (iter.hasNext()) { AbstractParameter param = (AbstractParameter) iter.next(); String ctxKey = param.getContextKey(); log.debug("remove ctx attr: " + ctxKey + "=" + param.getValue()); ctx.remove(ctxKey); } } COM: <s> remove code context code attribute specific to the parsed </s>
funcom_train/19528130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean testData(Object testItem, DataGeneratorContext context) { //no real way to tell if the testItem is valid. Could try to break up the String //using the delimiter and test each individual item, but that assumes that the delimiter //string does not appear in items themselves, which it might, especially if the delimiter //is a space. So just return true. return true; } COM: <s> always returns true </s>
funcom_train/46378293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeMouseListener(MouseListener listener) { if (app == null) { return; } synchronized (app.getAppCleanupLock()) { synchronized (this) { if (mouseListeners == null) { return; } mouseListeners.remove(listener); if (mouseListeners.size() == 0) { mouseListeners = null; } } } } COM: <s> remove a listener for mouse events </s>
funcom_train/50503393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete() { if(ch.orcasys.editor.panel.dlog.Message.confirm(null, "Confirm deletion", "Do you really want to delete\nthe resource env reference '" + getName() + "'?")) { desc.removeResourceEnvReference(this.getName()); } } COM: <s> delete this resource environment reference </s>
funcom_train/33734336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SQLiteDatabase open() { if(this.database == null) { log.debug("Database is null, opening connection to " + this.helper.getDatabaseName()); this.database = this.helper.getWritableDatabase(); return this.database; } else if(!this.database.isOpen()) { log.debug("Opening connection to " + this.helper.getDatabaseName()); this.database = this.helper.getWritableDatabase(); return this.database; } else { log.warn("Connection is already open"); return this.database; } } COM: <s> opens the sql database connection </s>
funcom_train/39545336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLocationLine(Element elt) { synchronized (this) { int hash = elt.hashCode() & 0x7FFFFFFF; int index = hash % table.length; for (Entry e = table[index]; e != null; e = e.next) { if (e.hash != hash) continue; Object o = e.get(); if (o == elt) return e.locationLine; } } return 0; } COM: <s> returns the location in the source file of the end element </s>
funcom_train/22492932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPreferredSchema(String preferredSchema) { String previous = profileSettings.get(PREFERRED_SCHEMA, null); if (preferredSchema == null) { profileSettings.removeProperty(PREFERRED_SCHEMA); } else { profileSettings.put(PREFERRED_SCHEMA, preferredSchema); } propertyListeners.firePropertyChange(PREFERRED_SCHEMA, previous, preferredSchema); } COM: <s> sets the preferred schema name to use when performing schema sensitve operations </s>
funcom_train/26380950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _okButtonActionPerformed(ActionEvent evt) { _okPressed = true; _program.setType(_programTypeComboBox.getSelectedIndex()); _program.setArgList(_argumentsTextField.getText()); _program.setCommands(_commandsTextArea.getText()); this.setVisible(false); } COM: <s> called when the ok button is pressed </s>
funcom_train/41382220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void display(String output, InputStream in) throws CoreException { try { MessageConsole myConsole = LPUIPlugin.getDefault().findConsole( LPUIPlugin.STANDARD_CONSOLE_NAME); MessageConsoleStream out = myConsole.newMessageStream(); while (in.available() != 0) { out.print("" + (char) in.read()); } } catch (IOException e) { //System.out.println(e); e.printStackTrace(); } } COM: <s> display a message in the console of the plugin </s>
funcom_train/4375808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send(OutputStream out) throws IOException { LOG.trace("enter send(OutputStream out)"); sendStart(out); sendDispositionHeader(out); sendContentTypeHeader(out); sendTransferEncodingHeader(out); sendEndOfHeader(out); sendData(out); sendEnd(out); } COM: <s> write all the data to the output stream </s>
funcom_train/41016145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchWaste(long rowId) { Cursor cursor = mDb.query(true, DATABASE_TABLE, null, KEY_ROWID + "=" + rowId, null, null, null, null, null); if (cursor != null) { cursor.moveToFirst(); } return cursor; } COM: <s> return a cursor positioned at the wastes that matches the given row id </s>
funcom_train/20816445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PFUnit divide (PFUnit parUnits) { if (parUnits.getUnits () != 0) { PFUnit tempUnit = (PFUnit) clone (); tempUnit.setUnits (tempUnit.getUnits () / parUnits.getUnits ()); return (tempUnit); } else return (null); } COM: <s> method divide p </s>
funcom_train/5738788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private EJBTestRunner getEJBTestRunner() throws Exception { InitialContext jndiContext = new InitialContext(); // Get a reference from this to the Bean's Home interface Object ref = jndiContext.lookup("ejb/EJBTestRunner"); EJBTestRunnerHome runnerHome = (EJBTestRunnerHome) PortableRemoteObject.narrow (ref, EJBTestRunnerHome.class); // create the test runner return runnerHome.create(); } COM: <s> looks up the ejb test runner home in jndi at ejb ejbtest runner </s>
funcom_train/2301835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String rootFilename(String filename, Serializable structure) { int lastIndex = filename.lastIndexOf('.'); if (lastIndex == -1) return filename; String smallname = filename.substring(0, lastIndex); if (filename.equals(proposeFilename(smallname, structure))) return smallname; return filename; } COM: <s> returns the root of a filename that supposedly belongs to this </s>
funcom_train/33512289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeEvaluationResultOfEachQuery(String resultFilename) { try { PrintStream out = new PrintStream(new FileOutputStream(resultFilename)); StringBuffer sb = new StringBuffer(); for (int i = 0; i < this.queryNo.length; i++) sb.append( queryNo[i] + " " + Rounding.toString( this.AveragePrecisionOfEachQuery[i], 4) + ApplicationSetup.EOL); out.print(sb.toString()); out.close(); } catch (FileNotFoundException fnfe) { fnfe.printStackTrace(); System.exit(1); } } COM: <s> output the evaluation result of each query to the specific file </s>
funcom_train/40350292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component appendSeparator(String text) { ensureCursorColumnInGrid(); ensureHasGapRow(paragraphGapSpec); ensureHasComponentLine(); setColumn(super.getLeadingColumn()); int columnSpan = getColumnCount(); setColumnSpan(getColumnCount()); Component titledSeparator = addSeparator(text); setColumnSpan(1); nextColumn(columnSpan); return titledSeparator; } COM: <s> adds a separator with the given text that spans all columns </s>
funcom_train/17119251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FormObject getField(int i) { if (this.fields.length <= i) { if (Config.LOGGING_SHOW_MISSING_FIELDS) { throw new ArrayIndexOutOfBoundsException("the position " + i + " is not available. The size of the array is : " + this.fields.length); } } return this.fields[i]; } COM: <s> return formobject from a defined position in the array </s>
funcom_train/8222172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createAttributes() { unchanged = new SimpleAttributeSet(); changed = new SimpleAttributeSet(); changed.addAttribute(StyleConstants.Background, changedColor); added = new SimpleAttributeSet(); added.addAttribute(StyleConstants.Background, addedColor); deleted = new SimpleAttributeSet(); deleted.addAttribute(StyleConstants.Background, deletedColor); } COM: <s> creates the attributes </s>
funcom_train/45112495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void filterCaptureFileAndSetTestAgainstObject(String captureFileName) throws Exception { StringBuffer buf = appendFilterCommand(buildTSharkCommand(), captureFileName); WireSharkCliCommand cmd = new WireSharkCliCommand(buf.toString()); cliApplication.handleCliCommand("Filtering capture file", cmd); setTestAgainstObject(cliApplication.getTestAgainstObject()); } COM: <s> filters code capture file name code and sets filter results to </s>
funcom_train/36376572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isMaxActionLimitAlmostExceeded() { try { float maxActions = Integer.parseInt(getMaxActions()); float actions = Integer.parseInt(getMonthlyActions()); maxActionLimitAlmostExceeded = maxActions * 0.8 <= actions && maxActions != 0; } catch (Exception e) { maxActionLimitAlmostExceeded = false; } return maxActionLimitAlmostExceeded; } COM: <s> returns true if number of maximum actions is reached by 80 </s>
funcom_train/48455670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect() { synchronized (this) { if (connections == 0) { try { sock = new Socket(serverAddress, serverPort); output = new PrintWriter(sock.getOutputStream(), true); input = new BufferedReader(new InputStreamReader(sock .getInputStream())); output.println(username); output.println(password); } catch (Exception e) { e.printStackTrace(); System.err.println("Unable to connect to server " + serverAddress + ":" + serverPort); } } connections++; } } COM: <s> build the connection </s>
funcom_train/8080520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int assignIDs(int lastID) { int currLastID = lastID + 1; m_id = currLastID; if (m_left != null) { currLastID = m_left.assignIDs(currLastID); } if (m_right != null) { currLastID = m_right.assignIDs(currLastID); } return currLastID; } COM: <s> assigns a unique identifier to each node in the tree </s>
funcom_train/2294826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRepositoryClass(I_CmsRepository rep) throws CmsConfigurationException { // check if new repositories can still be added if (m_frozen) { throw new CmsConfigurationException(Messages.get().container(Messages.ERR_NO_CONFIG_AFTER_STARTUP_0)); } m_repositoryList.add(rep); } COM: <s> adds a new configured repository </s>
funcom_train/8094971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initOutputLocators(Instances data, int[] indices) { if (indices == null) { m_OutputStringAtts = new StringLocator(data); m_OutputRelAtts = new RelationalLocator(data); } else { m_OutputStringAtts = new StringLocator(data, indices); m_OutputRelAtts = new RelationalLocator(data, indices); } } COM: <s> initializes the output attribute locators </s>
funcom_train/20923085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayImage() { if (_imageSource == null && _image == null) { _imageSource = new MemoryImageSource(_width, _height, ColorModel.getRGBdefault(), _pixels, 0, _width); _imageSource.setAnimated(true); _image = createImage(_imageSource); } if (_imageSource != null) { _imageSource.newPixels(); } } COM: <s> notify this picture that its image has been changed and that it is </s>
funcom_train/38737633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XNoteData getData() { noteData.pn_text = text.getText(); /* Save the size and position of the note. */ Point pt = text.getSize(); noteData.pn_textw = pt.x; noteData.pn_texth = pt.y; pt = text.getLocation(); noteData.pn_shellx = pt.x; noteData.pn_shelly = pt.y; return noteData; } COM: <s> get the data associated with this note </s>
funcom_train/10590756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void outputSuperClassInheritance(ContentHandler handler, JavaClass jClass, int mode) throws SAXException { JavaClass superClass = getJavadocSuperClass(jClass); if (superClass != null && hasInheritance(jClass, mode)) { outputClassInheritance(handler, superClass, mode); } } COM: <s> method output class inheritance </s>
funcom_train/51526471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File returnNewFile(String filePath){ try { File file = new File(filePath); BufferedWriter br = new BufferedWriter(new FileWriter(file)); for(Transaction t: tranList){ StringBuffer b = new StringBuffer(); for(Item i: t.getItems()){ b.append(i.getItemName()+" "); } b.append(t.getClassLabel()); br.write(b.toString()+"\n"); } br.flush(); br.close(); return file; } catch (Exception e) { Log.writeError(e.getMessage()); e.printStackTrace(); return null; } } COM: <s> write new trans to file and return handle </s>
funcom_train/22402197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setChildrenPickable(boolean pickable) { NodeList nodes = cluster.getNodes(); for (int i = 0; i < nodes.size(); i++) { nodes.get(i).getView().setPickable(pickable); } EdgeList edges = cluster.getInternalEdges(); for (int i = 0; i < edges.size(); i++) { edges.get(i).getView().setPickable(pickable); } } COM: <s> sets the pickable status of the child members of this cluster </s>
funcom_train/17795993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createFieldEditors() { FileFieldEditor cssFileEditor = new FileFieldEditor( PreferenceConstants.PREFERENCES_CSS_PATH, "&Path to stylesheet file (CSS):", true, getFieldEditorParent()); cssFileEditor.setFileExtensions(new String[]{"*.css"}); addField( cssFileEditor ); addField( new BooleanFieldEditor( PreferenceConstants.PREFERENCES_TOC, "Enable &table of content", getFieldEditorParent())); addField( new BooleanFieldEditor( PreferenceConstants.PREFERENCES_SECTION_NUMBERING, "Enable sections &numbering", getFieldEditorParent())); } COM: <s> creates the field editors </s>
funcom_train/37858053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SVNInfo doInfo(SVNURL url, SVNRevision pegRevision, SVNRevision revision) throws SVNException { final SVNInfo[] result = new SVNInfo[1]; doInfo(url, pegRevision, revision, SVNDepth.EMPTY, new ISVNInfoHandler() { public void handleInfo(SVNInfo info) { if (result[0] == null) { result[0] = info; } } }); return result[0]; } COM: <s> collects and returns information on a single item in a repository </s>
funcom_train/36557873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getShoesSpecColor(float[] rgbOut) { if (rgbOut == null || rgbOut.length < 3) throw new IllegalArgumentException("Unacceptable array provided!"); rgbOut[0] = shoesSpecColor[0]; rgbOut[1] = shoesSpecColor[1]; rgbOut[2] = shoesSpecColor[2]; } COM: <s> retrieve the shoes specular component color </s>
funcom_train/27785085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private GraphSource getDayHigh() { if(dayHighGraphSource == null) if (indexChart) { dayHighGraphSource = new OHLCVIndexQuoteGraphSource(quoteBundle, Quote.DAY_HIGH); } else { dayHighGraphSource = new OHLCVQuoteGraphSource(quoteBundle, Quote.DAY_HIGH); } return dayHighGraphSource; } COM: <s> returns day high graph source for input to graph </s>
funcom_train/50957490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // protected void initializeEventHandling() { //// super.initializeEventHandling(); // if (eventsEnabled) { // eventDispatcher = new org.apache.batik.gvt.event.AWTEventDispatcher(); // if (selectableText) { // textSelectionManager = null; // // if(currentModeHandler != null) // { // currentModeHandler.setBridgeContext(bridgeContext); // currentModeHandler.getTextSelectionManager(eventDispatcher); // } // } // } // } COM: <s> initializes the event handling classes </s>
funcom_train/15512824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File getConfigDir() { File userHome = new File( System.getProperty("user.home") ); File configDir = new File( userHome, ".net/pandoragames/FAR"); if(( ! configDir.isDirectory() ) && ( ! configDir.mkdirs() )) { throw new ConfigurationException("Configuration directory " + configDir.getPath() + " could not be created"); } return configDir; } COM: <s> finds and returns the configuration directory for this user </s>
funcom_train/51272308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int queryRange(StructuralIdentifier lowKey, StructuralIdentifier highKey, BtreePushOperator results) { if (currentSize == 0) { return CONTINUE_WITH_BINSEARCH; // maybe leaf was emptied by deletions } else { int pos = binarySearch(keys, lowKey, 0, currentSize - 1); if (pos < 0) { // key not found: get starting point for scan pos = -(pos + 1); } // scan from given position onwards return continueScan(pos, highKey, results); } } COM: <s> obtains all values mapped to the given key range in this array </s>
funcom_train/38327915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String generateSimpleRule(int count) { StringBuffer buf = new StringBuffer(); buf.append("(defrule rule" + count); buf.append(" (fact nsh" + count + ") => (printout t \"rule" + count); buf.append(" was fired\" ))" + LINEBREAK); return buf.toString(); } COM: <s> the method generates a rule of the following format </s>
funcom_train/29582221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String canEvaluate(Term [] t){ if (t.length==2 && t[0].getType().intern()==Types.INTEGER_TYPE && t[0].getType().intern()==t[1].getType().intern()){ return Types.BOOLEAN_TYPE; } return null; } COM: <s> this method tells whether this interpreter can evaluate the expression </s>
funcom_train/18079162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createXhtmlFile(String template){ //replace "_VALUE_" in template to specific value String replaceContent = template; for(Iterator it = replacementDictionary.entrySet().iterator(); it.hasNext(); ){ Map.Entry e = (Map.Entry)it.next(); replaceContent = MyHelpingMethods.replace(replaceContent, (String)e.getKey(), (String)e.getValue()); } return replaceContent; } COM: <s> replace values value in input string to values with replacement dictionary </s>
funcom_train/19657430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Observable o, Object arg) { if (o instanceof SearchField) { SearchField field = (SearchField) o; String state = (String) arg; String table = field.getTableName(); String name = field.getField(); String composite = name + " (" + table + ")"; // add anything new if (state.equals(SearchField.CREATED_STATE)) { // do not add the same thin several times if (!alreadyIn.contains(composite)) { alreadyIn.add(composite); addItem(composite); } } } } COM: <s> this method is called by observers namely </s>
funcom_train/9502440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLabels() { setTitle(Plain.Properties); geoTree.root.setUserObject(Plain.Objects); delButton.setText(Plain.Delete); closeButton.setText(geogebra.Menu.Close); defaultsButton.setText(geogebra.Menu.ApplyDefaults); geoTree.setLabels(); propPanel.setLabels(); } COM: <s> update the labels of this dialog </s>
funcom_train/4115835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commandAction(Command command, Displayable displayable) { if (command == cancelCommand) { /* Detecting the soft key press. */ Display.getDisplay(zXingMIDlet).setCurrent(zXingMIDlet.getCanvas()); } else if (command == barcodeCommand || command == SELECT_COMMAND) { if (getSelectedIndex() != -1) { zXingMIDlet.itemRequest(); } } } COM: <s> command listener required implementation for capturing soft key presses </s>