__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/49495325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerWizardPanel(WizardPanelDescriptor panel) { // Add the incoming panel to our JPanel display that is managed by // the CardLayout layout manager. cardPanel.add(panel.getPanelComponent(), panel.getPanelDescriptorIdentifier()); // Set a callback to the current wizard. panel.setWizard(this); // Place a reference to it in the model. wizardModel.registerPanel(panel.getPanelDescriptorIdentifier(), panel); } COM: <s> add a component as a panel for the wizard dialog by registering its </s>
funcom_train/11733358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void skip(long n) throws IOException { long skiplen = n; while (skiplen > 0) { long skipped = dataIn.skip(skiplen); if (skipped <= 0) { break; } skiplen -= skipped; } if (skiplen != 0) { String msg = "Should have skipped " + n + " bytes, only " + (n - skiplen) + " skipped."; throw new IOException(msg); } } COM: <s> skip exactly code n code bytes </s>
funcom_train/4852984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand1() { if (okCommand1 == null) {//GEN-END:|87-getter|0|87-preInit // write pre-init user code here okCommand1 = new Command("Calcular", Command.OK, 0);//GEN-LINE:|87-getter|1|87-postInit // write post-init user code here }//GEN-BEGIN:|87-getter|2| return okCommand1; } COM: <s> returns an initiliazed instance of ok command1 component </s>
funcom_train/40560539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetValueInvalidJSONFormat() { // set up a Source. Source source = new Source("table", "col"); ArrayList<Source> sources = new ArrayList<Source>(); sources.add(source); // we expect an IllegalArgumentException because the JSON is not in the // correct format. try { valueCollection.setValues("{\"table\":1234}", sources); fail("The JSON is not in the correct format and should " + "have failed."); } catch (IllegalArgumentException e) { assertTrue(true); } } COM: <s> test to insure that </s>
funcom_train/50068233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Tokenizer tokenizer() { if (tokenizer == null) { start(); // to reserve the key words tokenizer = new Tokenizer(); tokenizer.setCharacterState('a', 'z', wors()); tokenizer.setCharacterState('A', 'Z', wors()); tokenizer.setCharacterState(0xc0, 0xff, wors()); } return tokenizer; } COM: <s> creates a tokenizer that uses a code word or reserved state </s>
funcom_train/15466541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void outputDocument() throws IOException { // // Serialize the output document and print it. // File outputFile = new File(this.outDirectoryName + File.separator + this.reportName + ".xml"); FileOutputStream outputStream = new FileOutputStream(outputFile); PrintWriter outputWriter = new PrintWriter(outputStream); OutputFormat format = new OutputFormat(this.outputDocument); format.setIndenting(true); format.setIndent(5); XMLSerializer serializer = new XMLSerializer(outputWriter, format); serializer.serialize(this.outputDocument); outputWriter.close(); } COM: <s> method output document </s>
funcom_train/3102483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void exportResource() throws InterruptedException { if (fResource.getType() == IResource.FILE) { final IFile file= (IFile) fResource; exportFile(file, fDestination); } else { final IContainer container= (IContainer) fResource; try { exportResources(container.members(), fDestination); } catch (final CoreException exception) { fErrorList.add(exception); } } } COM: <s> exports the explicit resource and all descendants recursively </s>
funcom_train/33853896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void reportException(Exception e) { assert e != null; FindbugsPlugin.getDefault().logException(e, e.getLocalizedMessage()); MessageDialog.openError(FindbugsPlugin.getShell(), "BugResolution failed.", e.getLocalizedMessage()); } COM: <s> reports an exception to the user </s>
funcom_train/20211122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeProfile(Profile profile) { if (!(profile instanceof Profile)) { throw new ClassCastException( "ContinuumDatabase.removeProfiles(profile) parameter must be instanceof " + Profile.class.getName()); } getProfiles().remove(profile); } // -- void removeProfile(Profile) COM: <s> method remove profile </s>
funcom_train/23791847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void queryClients() { if(isRegistered) { Object[] arg = {incoming_port, name}; OSCMessage msg = new OSCMessage("/query/clients", arg); out.send(msg); } else { if(verbo > 2) System.err.println("\nSenseWorldDataNetwork warning: the client is not yet registered. Cannot query server."); } } COM: <s> queries the server for all the clients present on the network </s>
funcom_train/324672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gotoEvent(OfflineEventDataUnit event) { long evStart = event.getTimeMilliseconds(); if (evStart < hScrollBar.getMinimumMillis() || evStart > hScrollBar.getMaximumMillis()) { long range = hScrollBar.getMaximumMillis() - hScrollBar.getMinimumMillis(); hScrollBar.setRangeMillis(evStart, evStart + range, true); } hScrollBar.setValueMillis(evStart); } COM: <s> scroll the display to a specific event </s>
funcom_train/32144309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(Wizard wizard) throws InstallerException { GWizardTemplate template = (GWizardTemplate) wizard.getTemplate(); if (template == null) { initUI(); } else { JFrame templateFrame = getTemplateFrame(template); initFromTemplate(templateFrame); } frame.setVisible(true); } COM: <s> initialization of the ui renderer </s>
funcom_train/10255171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HsqlName getSchemaHsqlName(String name) { if (name == null) { return defaultSchemaHsqlName; } if (SqlInvariants.INFORMATION_SCHEMA.equals(name)) { return SqlInvariants.INFORMATION_SCHEMA_HSQLNAME; } Schema schema = ((Schema) schemaMap.get(name)); if (schema == null) { throw Error.error(ErrorCode.X_3F000, name); } return schema.name; } COM: <s> if schema name is null return the default schema name else return </s>
funcom_train/22554426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTimeout() throws Exception { mgr.initialize(); // must start timeout thread. mgr.request(URN_1, one, 1); mgr.request(URN_2, two, 1); Thread.sleep(5000); assertEquals(URN_1, one.urn); assertNull(one.response); assertEquals(URN_2, two.urn); assertNull(two.response); } COM: <s> makes sure that stuff times out </s>
funcom_train/42852142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProjectType loadXMLFile(String file_name) throws JAXBException { JAXBContext jc_in = JAXBContext.newInstance("com.mitre.spmif2opnet.spmif"); Unmarshaller um = jc_in.createUnmarshaller(); System.out.println("[INFO] Loading file " + file_name); JAXBElement<ProjectType> root = um.unmarshal(new StreamSource(new File(file_name)), ProjectType.class); // Now we have this in Java form! return root.getValue(); } COM: <s> load from xml into java format </s>
funcom_train/2609999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeAndWait() { try { this.initialize(); System.out.print("Initializing..."); while (!this.isInitialized()) { System.out.print("."); Thread.sleep(1000); } System.out.print("Resolved\n"); } catch (Exception e) { e.printStackTrace(); } } COM: <s> initialize transport resolver and wait until it is complete unitialized </s>
funcom_train/14416048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasScope(CIMScope pScope) { if (pScope == null) throw new IllegalArgumentException("null scope argument"); Iterator iter = iScopes.iterator(); while (iter.hasNext()) { CIMScope scp = (CIMScope) iter.next(); if (scp.equals(pScope) || scp.getScope() == CIMScope.ANY) return true; } return false; } COM: <s> determines if this cimqualifier type has a cimscope value associated with </s>
funcom_train/12527850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disconnect() { if (isClosed() || !isConnected()) { return; } if (impl == null) { try { netSock.Connect(new DEndPoint()); } catch (Throwable t) { // Do nothing } } else impl.disconnect(); address = null; port = -1; isConnected = false; } COM: <s> disconnects this udp datagram socket from the remote host </s>
funcom_train/18036437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndex(Variable variable) { if (ht.containsKey(variable)) { return ((Integer)ht.get(variable)).intValue(); } else { int size = ht.size(); Integer index = new Integer(size); ht.put(variable, index); ht_inverse.put(index, variable); return size; } } COM: <s> get the index associated with this variable </s>
funcom_train/19296070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SpectrumPanel getSpectrumPanel() { if (spectrumPanel == null) { spectrumPanel = new SpectrumPanel(); spectrumPanel.setResids(ARIMAConstants.EST_RESIDS.name); spectrumPanel.setNameResids(ARIMAConstants.EST_RESIDS_NAME.name); spectrumPanel.setDRange(ARIMAConstants.DRANGE_ADJUSTED.name); } return spectrumPanel; } COM: <s> this method initializes spectrum panel </s>
funcom_train/7233157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addTokensAndTimeTillEnabled() { while (!this.tokens2Time.isEmpty() ) { while (!this.tokens2Time.containsValue(new Long(this.time)) ) { this.time++; //increase time to where there are new enabled tokens informListeners(); } addAddedTimedTokens(); // re-evaluation processNetStructure(); if (this.enabledTransitions.size() > 0) { break; } } } COM: <s> increases time and adds timed tokens till enabled or out of tokens </s>
funcom_train/42262371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void informPlayersBallOutOfPlay(Team team, Point2d position, OutType outType) { if (!infoToPlayersSent) { leaveBallAndBackOnField(); for (Player p: players) { p.setBallOutOfPlay(team, position, outType); } outTeam = team; infoToPlayersSent = true; } } COM: <s> sends message to players that ball is outside field </s>
funcom_train/25369117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(SortContainer o) { if ((m_Value == null) || (o.getValue() == null)) { if (m_Value == o.getValue()) return 0; if (m_Value == null) return -1; else return +1; } else { return m_Value.compareTo(o.getValue()); } } COM: <s> compares this object with the specified object for order </s>
funcom_train/2558889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateConstructors(Class type) throws Exception { Creator creator = scanner.getCreator(); List<Initializer> list = creator.getInitializers(); if(creator.isDefault()) { validateConstructors(elements); validateConstructors(attributes); } if(!list.isEmpty()) { validateConstructors(elements, list); validateConstructors(attributes, list); } } COM: <s> this is used to ensure that final methods and fields have a </s>
funcom_train/36286821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBadRequest() throws Exception { URL ogsadaiURL = new URL(mProperties.getServerURL() + "/DataSourceRetrievalServlet"); HttpURLConnection ogsaCon = (HttpURLConnection) ogsadaiURL.openConnection(); assertEquals("Should give bad request", HttpServletResponse.SC_BAD_REQUEST, ogsaCon.getResponseCode()); } COM: <s> tests that the correct response is given if a bad request is </s>
funcom_train/41817892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printCopyFileTask(String file, String toFile, boolean overwrite) { printTab(); output.print("<copy"); //$NON-NLS-1$ printAttribute("file", file, false); //$NON-NLS-1$ printAttribute("tofile", toFile, false); //$NON-NLS-1$ printAttribute("overwrite", overwrite ? "true" : null, false); //$NON-NLS-1$ //$NON-NLS-2$ output.println("/>"); //$NON-NLS-1$ } COM: <s> print a code copy code tak to the script </s>
funcom_train/24213064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ScalarModel getPropertyModel(PropertyMemento pm) { String propertyName = pm.getName(); ScalarModel scalarModel = properties.get(propertyName); if (scalarModel == null) { NakedObject associatedAdapter = pm.getProperty().get(getObject()); scalarModel = new ScalarModel(pm, associatedAdapter); properties.put(propertyName, scalarModel); } return scalarModel; } COM: <s> lazily populates with the current value of each property </s>
funcom_train/3990049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNazwa_szpitalaPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SkierowanieSzpital_nazwa_szpitala_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SkierowanieSzpital_nazwa_szpitala_feature", "_UI_SkierowanieSzpital_type"), PrzychodniaPackage.Literals.SKIEROWANIE_SZPITAL__NAZWA_SZPITALA, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the nazwa szpitala feature </s>
funcom_train/3102380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Text addNumberField(final Composite parent, final String label, final String key, final int indentation, final int limit, final boolean positive) { Assertion.valid(parent); Assertion.valid(label); Assertion.nonEmpty(key); Assertion.nonNegative(indentation); Assertion.positive(limit); final Label caption= new Label(parent, SWT.NONE); caption.setText(label); return addNumberField(parent, caption, key, indentation, limit, positive); } COM: <s> adds a number field to the preference page </s>
funcom_train/40081385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Linebuf ( String prefix, String[] lineset, String line_sep){ this((null != lineset && 0 < lineset.length)?(lineset.length):(10)); if ( null != line_sep) this.output_line_sep = line_sep.toCharArray(); if ( null != prefix) this.output_prefix = prefix.toCharArray(); this.append(lineset); } COM: <s> append argument lines </s>
funcom_train/3799083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void translate(float x, float y, float z) { Matrix4f matrix = new Matrix4f( 1, 0, 0, x, 0, 1, 0, y, 0, 0, 1, z, 0, 0, 0, 1); m4CurrentTransform.mul(matrix); } COM: <s> applies a translation to the current transformation </s>
funcom_train/46454430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize() { if(view!=null) { view.read(); } if(model!=null) { model.initialize(); model.update(); } if(view!=null) { // view.reset(); view.initialize(); view.update(); } } COM: <s> initialize model using user interface changes </s>
funcom_train/48121571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeAutoComplete(String[] array) { eventView = (AutoCompleteTextView) findViewById(R.id.autocomplete_event); ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.list_item, array); eventView.setAdapter(adapter); placeView = (AutoCompleteTextView) findViewById(R.id.autocomplete_place); placeView.setAdapter(adapter); descriptionView = (AutoCompleteTextView) findViewById(R.id.autocomplete_description); descriptionView.setAdapter(adapter); } COM: <s> creates auto complete text view object </s>
funcom_train/1304258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addField(Document document, Publishable publishable) { boolean result = false; if (publishable != null) { byte[] bytes = null; try { bytes = MessageHelper.serialize(publishable); } catch(IOException e) { throw new IllegalStateException(e); } result = addField(document, bytes); } return result; } COM: <s> add the publishable as bytes value for this field to the document </s>
funcom_train/44596169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isClass() { if (typeBinding != null) return typeBinding.isClass(); if (isPrimitive()) return false; if (isArray()) return true; if (typedecl instanceof EnumDeclaration) return true; if (typedecl instanceof AnnotationTypeDeclaration) return false; if (typedecl != null) return !((TypeDeclaration)typedecl).isInterface(); return false; } COM: <s> returns true if the type is a class including enums and arrays </s>
funcom_train/45698232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(Command command) { // parse command into table cells Object[] newRow = new Object[columnNames.length]; for (int i = 0; i < columnNames.length; i++) newRow[i] = command.get(columnNames[i]); // add to current model model.addRow(newRow); // manage size, push out oldest if (model.getRowCount() > records) model.removeRow(0); // simply re-draw the table table.repaint(); } COM: <s> add new data to the bottom of the text are </s>
funcom_train/40517154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scale(double sx, double sy, double sz) { /* equivalent to the following, but since tempm is mostly the identity, * saves 13/16 of the multiplies and the copy. * * tempm.m11 = sx; * tempm.m22 = sy; * tempm.m33 = sz; * * multiply(tempm); */ // just scaling the basis vectors (columns) m11 *= sx; m21 *= sx; m31 *= sx; m41 *= sx; m12 *= sy; m22 *= sy; m32 *= sy; m42 *= sy; m13 *= sz; m23 *= sz; m33 *= sz; m43 *= sz; } COM: <s> scales the matrix by the given vector in em local em coordinates </s>
funcom_train/46436083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void filterDataSet(XComponent dataSet, List valuesList) { for (int j = 0; j < dataSet.getChildCount(); j++) { XComponent row = (XComponent) dataSet.getChild(j); String choice = row.getStringValue(); if (!valuesList.contains(choice)) { row.setFiltered(true); } } } COM: <s> filters the data set </s>
funcom_train/27780358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void factor(float f_len, float f_cap) { if (logger.isLoggable(Level.FINEST)) { logger.finest(getTerm() + " flen=" + f_len + " fcap=" + f_cap); } this.f_len = f_len; this.f_cap = f_cap; } COM: <s> set the two factors that may help the meta data structure in </s>
funcom_train/20885105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTextContent() { TextContentDTO dto = new TextContentDTO(); dto.intField = 21689; assertTrue(JSefaTestUtil.serialize(XML, dto).indexOf("21689") >= 0); JSefaTestUtil.assertRepeatedRoundTripSucceeds(XML, dto); } COM: <s> tests it for a text content </s>
funcom_train/4684321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deregisterProtocol(byte protocolNum) { synchronized (protocolTable) { Object protMgr = protocolTable.remove(protocolNum); if (protMgr == null) { throw new IllegalArgumentException("Cannot remove protocol manager " + "for unknown protocol " + protocolNum); } else { lpStats.protocolCount--; } } } COM: <s> deregister a protocol </s>
funcom_train/32651500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration getSupportedPortletModes() { if (portletModes == null) { portletModes = new Vector(); portletModes.add("view"); portletModes.add("edit"); portletModes.add("help"); portletModes.add("config"); } return portletModes.elements(); } COM: <s> get an enumeration of all code portlet mode code s supported by this </s>
funcom_train/3714146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void readAndDisplay (URL url) { // handleList (url, Thread.MAX_PRIORITY); // // Thread thread = getListReadingThread(); // while (thread.isAlive()); // // int nspectra = getNSpectra(); // int[] indices = new int[nspectra]; // for (int i = 0; i < indices.length; i++) { // indices[i] = i; // } // // combineSpectra(indices); // } COM: <s> reads and displays spectra from a list </s>
funcom_train/2916932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void collectReferencingOawProjects(IProject project, Map<String, IProject> referencingProjects) { for (IProject p : project.getReferencingProjects()) { if (OawPlugin.getOawModelManager().findProject(p) != null) { referencingProjects.put(p.getName(), p); } collectReferencingOawProjects(p, referencingProjects); } } COM: <s> finds oaw projects that depend on the given project recursively </s>
funcom_train/17679457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String generatePkConstraintName(String tableName) { int maxlen = maxConstraintNameLength - pkConstraintPrefix.length(); String name = pkConstraintPrefix + shrinkName(tableName, maxlen); String n = name; for (int i = 2; constraintNames.contains(n); i++) { n = appendInt(name, i, maxConstraintNameLength); } addPkConstraintName(tableName, n); return n; } COM: <s> generate a name for the primary key constaint for table name </s>
funcom_train/22526516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createActivityRef(ILDModelObject ldObject, IActivityStructureModel newParent, int index) { if(newParent.containsActivity(ldObject)) { return; } if(newParent.equals(ldObject)) { return; } // Add IActivityRefModel ref = newParent.addActivity(ldObject, index); if(ref != null) { fViewer.setSelection(new StructuredSelection(ref)); } } COM: <s> create activity ref in as </s>
funcom_train/50453921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initConnection () { outstream = nc.getOutputStream(); connected = true; active_chunkdb = new ConfigChunkDB(); active_chunkdb.setName ("Active Configuration"); active_descdb = new ChunkDescDB(); active_descdb.setName ("Active Descriptions"); config_module.initConnection (this, active_descdb, active_chunkdb); getChunkDescs(); getChunks(); } COM: <s> for a new connection requests chunkdesc and chunkdbs </s>
funcom_train/4519243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RButton getRButton31114() { if (RButton31114 == null) { RButton31114 = new RButton(3); RButton31114.setText("WideHeader"); RButton31114.setBounds(new Rectangle(550, 270, 120, 30)); RButton31114.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { (new TestWideHeaderTabel()).setVisible(true); } }); } return RButton31114; } COM: <s> this method initializes rbutton31114 </s>
funcom_train/25524297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clearFriends() { // Critical region, so lock. synchronized(getJlFriends()) { // Get the list model for the friends list. DefaultListModel m = ((SortedListModel)getJlFriends().getModel()).getUnsortedList(); // Remove this as an observer from all agents. for(int i = 0; i < m.getSize(); i++) { Agent tmpAgent = (Agent)m.get(i); tmpAgent.removeObserver(this); } // Clear the list model. m.clear(); } } COM: <s> clear the list of friends </s>
funcom_train/10647222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDocument(final Document doc) { Document old = document; if (doc != document && highlighter != null) { highlighter.removeAllHighlights(); } document = doc; firePropertyChange(StringConstants.TEXT_COMPONENT_DOCUMENT_PROPERTY, old, doc); setDocumentDirection(); } COM: <s> sets document property java </s>
funcom_train/10748934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test1() { try { Method m = A.class.getMethod("method1", (Class[]) null); assertEquals("incorrect name", "method1", m.getName()); assertSame("objects differ", A.class, m.getDeclaringClass()); } catch (Exception e) { fail(e.toString()); } } COM: <s> method1 method has public accessibility so it should be accessible </s>
funcom_train/22962520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean identified(int b, int position) { justIdentified = false; if (count == len) { if (endingCharacter != 0) { // Does have an ending character if (b == endingCharacter){ recordFinding(position); } } return true; } else { if (keyName.charAt(count) == (char)b) { count++; if (count == len) { if (endingCharacter == 0) { // Does not have an ending character logger.debug("->"); recordFinding(position); return true; } startIndex = position - len; } } else count = 0; } return false; } COM: <s> idenitify the position of the key name and store its location </s>
funcom_train/22563181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doLevelSelected(final ValueChangeEvent event) { activeEntry.setSelectedLevel(Long.valueOf((String) event.getNewValue())); try { activeEntry.save(PortletUtils.getServiceContext()); goalManager.selectGoal(activeEntry.getGoal(), PortletUtils.getServiceContext().getUserId(), PortletUtils .getGroupId()); } catch (Exception e) { PortletUtils.handleError(LOG, e); } } COM: <s> handle the selection event from the profile level list </s>
funcom_train/2369597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Move appendMove(final Card card, final Player player) { assert card != null && player != null; assert getMove(player) == null; assert getMove(card) == null; final Move result = new Move(card, player); this.add(result); return result; } COM: <s> appends the specified move </s>
funcom_train/25656940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void suspend() { ArrayList<JobThread> bT = null; synchronized (idleThreads) { suspended = true; bT = (ArrayList<JobThread>) busyThreads.clone(); } for (JobThread jt : bT) { log.info("Killing thread " + jt); jt.kill(); } while (!isIdle()) Thread.yield(); } COM: <s> suspend execution of the thread queue till resume is called </s>
funcom_train/42533333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void PrintCaller(String caller_name, Object caller, String called_name, String method){ called_names.addElement(called_name); called_method_names.addElement(method); System.out.println("CALL\t" + caller_name + " : " + caller.getClass().toString().substring(6) + " : " + caller.hashCode()); } COM: <s> fuggvenyhivas elott meghivando fuggveny </s>
funcom_train/44421119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkGroupRemovable(int id){ Integer gid = new Integer(id); if( id == LOBBY_ID){ return; } //sanity check; can't remove lobby if( ! groupList.containsKey(gid)){ return; } //sanity check Group g = (Group) groupList.get(gid); if (g.shouldRemoveGroup() ){ groupList.remove(gid); } } COM: <s> checks if a group should be removed or not </s>
funcom_train/47311800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PolygonGroup loadObject(String path, String filename) throws IOException { this.path = path; object = new PolygonGroup(); object.setFilename(filename); vertices.removeAllElements(); currentGroup = object; parseFile(filename); return object; // File file = new File(filename); // object = new PolygonGroup(); // object.setFilename(file.getName()); // path = file.getParentFile(); // // vertices.clear(); // currentGroup = object; // parseFile(file.getName()); // // return object; } COM: <s> loads an obj file as a polygon group </s>
funcom_train/38500727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReadRecord_SingleEntry() { // create the reader Reader in1 = new StringReader("single entry"); CSVReader csvreader = new CSVReader(in1); try { List listRet = csvreader.readRecord(); assertNotNull(listRet); assertEquals(1, listRet.size()); } catch(Exception e) { System.err.println("Exception thrown: "+e); } } COM: <s> test read record parse single data entry </s>
funcom_train/50775278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int interact(String context, String message, int buttongroup) { InteractionNotice n = new InteractionNotice(context, message, buttongroup); isListenerAvailable(message); InteractionReturn r = listener.interaction(n); if (r == null) { System.out.println("InteractionMessage:" + message); throw new RuntimeException("internal Error at InteractionSupport#interact: Backend asks for an interaction with buttons and gets no return object."); } return r.getPressedButton(); } COM: <s> creates an interaction with the frontend and returns the </s>
funcom_train/31660202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEntry(String anchor, String text, int level) { if (this.status != STATUS_NO_TOC) { this.status = STATUS_TOC_INITIALIZED; } TableOfContentsEntry entry = new TableOfContentsEntry(anchor, text, level); entries.add(entry); if (level < minLevel) { minLevel = level; } } COM: <s> add a new table of contents entry </s>
funcom_train/2364821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawMouseMovesPaths(BufferedImage image, Color c) { Graphics2D g2d = image.createGraphics(); g2d.setColor(c); g2d.setStroke(new BasicStroke(5)); Iterator itr = movesList.iterator(); while (itr.hasNext()) { MouseMoveInfo mouseMoveInfo = (MouseMoveInfo) itr.next(); g2d.drawLine(mouseMoveInfo.getStartX(), mouseMoveInfo.getStartY(), mouseMoveInfo.getEndX(), mouseMoveInfo.getEndY()); } } COM: <s> draws the mousemovements path held by this class on an image </s>
funcom_train/12194190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSortMultipleCharsetQvalue() { doSortParserTest(new String[] { "A;q=0.5", "B;q=0.600", "C;q=0.2", "D;q=0.5" }, new String[] { "B", "A", "D", "C" }); } COM: <s> test that a default accept parser works with multiple quality values with </s>
funcom_train/12244196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopFilters() { // send a stop Mackill request to each node Iterator it = this.tableModel.getData().iterator(); while (it.hasNext()) { Vector node = (Vector) it.next(); String name = (String) node.get(0); String ip = (String) node.get(1); System.out.println("Sending Stop filters request to " + name + " (" + ip + ")"); filtering.stop(ip); System.out.println("*********"); } } COM: <s> stops mac kill in all nodes of the current scenario </s>
funcom_train/4358730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPattern(String pattern) { if (pattern == null) pattern = ""; if (pattern.equals(Constants.AccessLog.COMMON_ALIAS)) pattern = Constants.AccessLog.COMMON_PATTERN; if (pattern.equals(Constants.AccessLog.COMBINED_ALIAS)) pattern = Constants.AccessLog.COMBINED_PATTERN; this.pattern = pattern; logElements = createLogElements(); } COM: <s> set the format pattern first translating any recognized alias </s>
funcom_train/14378721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveTo(Vector3D destination, float speed) { temp.setTo(destination); temp.subtract(location); // calc the time needed to move float distance = temp.length(); long time = (long) (distance / speed); // normalize the direction vector temp.divide(distance); temp.multiply(speed); setVelocity(temp, time); } COM: <s> sets the velocity to move to the following destination at the specified </s>
funcom_train/11772905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateAndExecuteEvent(PhaseListener listener, FacesContext facesContext, PhaseId phaseId, int times) { PhaseEvent phaseEvent = new PhaseEvent(facesContext, phaseId, new LifecycleImpl()); for (int i=0; i<times; i++) { listener.beforePhase(phaseEvent); listener.afterPhase(phaseEvent); } } COM: <s> generates a phase event and executes the before and after phase methods </s>
funcom_train/32223430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearReg() { byte[] clear = new byte[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; this.regModel.resetBuffer(clear); } COM: <s> this clears out the registers </s>
funcom_train/8527796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getStringFromLevels(ArrayList<Integer> levels) { String levelsRepresentation = ""; for (int i = 0; i < levels.size(); i++) { try { levelsRepresentation += this.getTransformer(i).transform( levels.get(i)); levelsRepresentation += "."; } catch (NullPointerException e) { // do nothing } } return (!levelsRepresentation.isEmpty()) ? levelsRepresentation .substring(0, levelsRepresentation.length() - 1) : levelsRepresentation; } COM: <s> gets the string from levels </s>
funcom_train/8018188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void expandDirtyRect(float historicalX, float historicalY) { if (historicalX < dirtyRect.left) { dirtyRect.left = historicalX; } else if (historicalX > dirtyRect.right) { dirtyRect.right = historicalX; } if (historicalY < dirtyRect.top) { dirtyRect.top = historicalY; } else if (historicalY > dirtyRect.bottom) { dirtyRect.bottom = historicalY; } } COM: <s> called when replaying history to ensure the dirty region includes all </s>
funcom_train/3133814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void extract() throws IOException { int count = limit; for(Packet packet : compact) { int length = packet.length(); if(length <= count) { packet = packet.extract(); count -= length; } if(packet != null) { ready.offer(packet); } } compact.clear(); } COM: <s> this is used to take all packets queued in to the compact queue </s>
funcom_train/19543220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColumnName(String name) { if (findColumnName(name) != null) return name; PropertyDescriptor pd = get(name); if (pd != null) return pd.getColumnName(); pd = findDisplayName(name); if (pd != null) return pd.getColumnName(); throw new IllegalArgumentException("Invalid column/property/display name '" + name + "'"); } COM: <s> find the column name for any given column property display name </s>
funcom_train/48406954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addConstrainedElementPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Constraint_constrainedElement_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Constraint_constrainedElement_feature", "_UI_Constraint_type"), SpemxtcompletePackage.eINSTANCE.getConstraint_ConstrainedElement(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the constrained element feature </s>
funcom_train/49211265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void hardening(Harden harden, QualityMeasure qualityMeasure, ClusterGraphInterface graph){ if(qualityMeasure != null && harden instanceof HardenMaxQuality) harden.qualityMeasure(qualityMeasure); logger.info("Hardening starts with: " + clusterSeedMap.size()); // do hardening clusterSeedMap = harden.harden(clusterSeedMap, graph); harden.removeDuplicateAndEmptyClusters(clusterSeedMap); logger.info("Hardening ends with: " + clusterSeedMap.size()); } COM: <s> hardening and removing of duplicate or empty clusters in </s>
funcom_train/3391100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printStackMap(MethodData method) { StackMapData[] stack_map_tb = method.getStackMap(); int number_of_entries = stack_map_tb.length; if (number_of_entries > 0) { out.println(" StackMap: number_of_entries = " + number_of_entries); for (StackMapData frame : stack_map_tb) { frame.print(this); } } out.println(); } COM: <s> print stack map attribute information </s>
funcom_train/26573446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public boolean isLoseNormalChess(Board b, int nextTurn){ boolean debug = false; // check if king is checkmated if (debug) System.out.println ("islose possible moves: \n"); if (getValidMoves(b,nextTurn).isEmpty() && kingInCheck(b, nextTurn)) return true; return false; } COM: <s> returns if a particular side has lost </s>
funcom_train/7965157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Double getTrendCorrectedStandardDeviation() { double intercept = getIntercept(); double slope = getSlope(); TimeSeries t = new TimeSeries(name); for (Entry<Long, Double> entry : valueMap.entrySet()) { t.addValue(entry.getKey(), entry.getValue() - (slope * entry.getKey() + intercept)); } return t.getStandardDeviation(); } COM: <s> returns standard deviation corrected for linear trend of </s>
funcom_train/1512094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkLenient(Type a, Type b, Ast l) { if (possiblyEq(a, b)) return; errors.add(new FbError(FbError.Type.BAD_TYPE, l, TypeUtils.typeToString(a), TypeUtils.typeToString(b))); } COM: <s> checks that two types may be equal </s>
funcom_train/31645942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BodyPart getBodyPart(int index) throws MessagingException { BodyPart part = null; try { part = (BodyPart) this.parts.elementAt(index); } catch (ArrayIndexOutOfBoundsException e) { throw new MessagingException("Index is out of the range for this object. Indices must adhere to these rules: 0 <= index < this.getCount()", e); } return part; }// getBodyPart(int) COM: <s> the the body part at code index code numbered from 0 </s>
funcom_train/16086668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Polygon2D translate(double deltaX, double deltaY) { for (int i = 0; i < vertices.size(); i++) { vertices.get(i).add(deltaX, deltaY); } if (bounds != null) { bounds.setFrame(bounds.getMinX()+deltaX, bounds.getMinY()+deltaY, bounds.getWidth(), bounds.getHeight()); } return this; } COM: <s> translates the vertices of the code polygon code by </s>
funcom_train/1548798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void percolateUpMinHeap(final int index) { int hole = index; E element = elements[hole]; while (hole > 1 && compare(element, elements[hole / 2]) < 0) { // save element that is being pushed down // as the element "bubble" is percolated up final int next = hole / 2; elements[hole] = elements[next]; hole = next; } elements[hole] = element; } COM: <s> percolates element up heap from the position given by the index </s>
funcom_train/18847332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createServiceInterfaceNotFoundException(String tscToken, String srvintfID) { PropertyMap propertyMap = new PropertyMap(); DiagnosticsListCreator edg; edg = new DiagnosticsListCreator(); String severityType = DiagnosticsCodes.getErrorDiagnosticsCode(); String exceptionID = "80380"; propertyMap.addPropertyValuePair("srvintfID", srvintfID); String serExMsg = edg.constructErrorDocOneItemParam(tscToken, componentID, severityType, subSystemCode, exceptionID, propertyMap); return serExMsg; } COM: <s> construct service interface not found exception message </s>
funcom_train/8797178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLookAt( Point3d lookAt ) { Transform3D currentTransform = new Transform3D(); this.lookAt = lookAt; transformGroup.getTransform( currentTransform ); currentTransform.lookAt( location, lookAt, up ); currentTransform.invert(); transformGroup.setTransform( currentTransform ); } COM: <s> sets the look at of the camera </s>
funcom_train/14307123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveNode(VPTNode node, Writer out) throws IOException { startElement(out); VPTFile file = (VPTFile) node; if (!file.getName().equals(file.getFile().getName())) { writeAttr(NAME_ATTR, file.getName(), out); } writeAttr(PATH_ATTR, translatePath(file.getFile().getAbsolutePath()), out); } COM: <s> saves a file node to the config file </s>
funcom_train/20443140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getItemCommand1() { if (itemCommand1 == null) {//GEN-END:|27-getter|0|27-preInit // write pre-init user code here itemCommand1 = new Command("Ligar", Command.ITEM, 0);//GEN-LINE:|27-getter|1|27-postInit // write post-init user code here }//GEN-BEGIN:|27-getter|2| return itemCommand1; } COM: <s> returns an initiliazed instance of item command1 component </s>
funcom_train/536940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRateAlbum() throws Exception { this.fairDj.send("rate 1 neutral\n"); this.fairDj.expect("[] Album 1 has been rated NEUTRAL by root"); this.fairDj.send("rate 1 neutral\n"); // All tracks in the albums have already been rated (by the previous RATE command) this.fairDj.expect("[] There are no tracks"); } COM: <s> verify that its possible to rate a whole album </s>
funcom_train/40616248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void seek(long pos) { if (SysProperties.CHECK && pos % Constants.FILE_BLOCK_SIZE != 0) { DbException.throwInternalError("unaligned seek " + name + " pos " + pos); } try { if (pos != filePos) { file.seek(pos); filePos = pos; } } catch (IOException e) { throw DbException.convertIOException(e, name); } } COM: <s> go to the specified file location </s>
funcom_train/10979975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFormPropertyConfig(FormPropertyConfig config) { throwIfConfigured(); if (formProperties.containsKey(config.getName())) { throw new IllegalArgumentException("Property " + config.getName() + " already defined"); } formProperties.put(config.getName(), config); } COM: <s> add a new code form property config code instance to the set </s>
funcom_train/19657190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsCheckedAndValueEmptyCollection() { mockRadioCollection = new MockAbstractRadioCollection("test", new String[] {}); assertEquals(false, mockRadioCollection.isChecked()); assertEquals(null, mockRadioCollection.getValue()); // try to set a value, insure we get null. mockRadioCollection.setValue("blah"); assertEquals(null, mockRadioCollection.getValue()); } COM: <s> test is checked get value and set value on an empty </s>
funcom_train/26024743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void emptyTree() { DefaultTreeModel model = (DefaultTreeModel) getModel(); DefaultMutableTreeNode root = (DefaultMutableTreeNode) getRoot(); for (int i = root.getChildCount() - 1; i >=0 ; i--) { DefaultMutableTreeNode child = (DefaultMutableTreeNode) root.getChildAt(i); model.removeNodeFromParent(child); } } COM: <s> makes the tree empty by removing all children of the invisible root </s>
funcom_train/3847273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addType(Element type){ if( type.getLocalName().equalsIgnoreCase( TYPE ) ){ String className = type.getAttribute( JAVA_CLASS ); String qName = type.getAttribute( QNAME ); String regStart = type.getAttribute(REG_START); try{ addType( className, qName, regStart); } catch(Throwable t){ Logger.getRef().error( t + " : Error adding type " + className + " with qName " + qName, "SOAPServicesInfo"); } } } COM: <s> adds the type described by the given xml element </s>
funcom_train/45064029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected StringBuffer additionalCSV() { StringBuffer sb = new StringBuffer(1000); sb.append("," + javaVersion); sb.append("," + javaVendor); sb.append("," + javaHome); sb.append("," + userName); sb.append("," + userHome); sb.append("," + userDir); return sb; } COM: <s> generate csv containing the data </s>
funcom_train/7281534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testValidStoreDownloads() throws Exception { URN urn = UrnHelper.URNS[0]; URL url = new URL("http://test.com"); RemoteFileDesc rfd = remoteFileDescFactory.createUrlRemoteFileDesc(url, "test.txt", urn, 10L); downloadManager.downloadFromStore(rfd, false, _storeDir, "test.txt" ); } COM: <s> tests creating a valid store download </s>
funcom_train/8825002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkInSequence(ACLMessage reply) { boolean ret = false; String inReplyTo = reply.getInReplyTo(); Session s = (Session) sessions.get(inReplyTo); if (s != null) { int perf = reply.getPerformative(); if (s.update(perf)) { List<ACLMessage> all = (List<ACLMessage>) getDataStore().get( ALL_RECEIVED_PROPOSE_MSGS); all.add(reply); ret = true; } if (s.isCompleted()) { sessions.remove(inReplyTo); } } return ret; } COM: <s> checks whether a reply is in sequence and update the appropriate session </s>
funcom_train/8047209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCharacters(BitmapFontCharacter[] characters) { uniCodeToChar.clear(); charNameToChar.clear(); for (int i = 0; i < characters.length; i++) { BitmapFontCharacter currentChar = characters[i]; uniCodeToChar.put(currentChar.getUnicode(), currentChar); charNameToChar.put(currentChar.getName(), currentChar); } this.characters = characters; } COM: <s> sets the characters for the font </s>
funcom_train/4814117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Icon getIcon() { if (!isEnabled()) return null; // Enabled - set the icon based on the direction switch (direction) { case Directional.BIG_X: return ICON_EAST; case Directional.BIG_Y: return ICON_SOUTH; case Directional.SMALL_X: return ICON_WEST; case Directional.SMALL_Y: return ICON_NORTH; default: throw new IllegalStateException("Invalid direction: " + direction); } } COM: <s> returns the icon for this button purely based on its direction not </s>
funcom_train/12603072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void bindBroadcaster() throws IOException { if (!canBroadcast()) { warn(log, "MultiConnectThinkGearSocket is not broadcasting events, cannot bind broadcaster"); return; } if (thinkGearSocketBroadcaster.isActive()) { warn(log, "MultiConnectThinkGearSocket is already bound"); return; } thinkGearSocketBroadcaster.bind(new InetSocketAddress(ThinkGearSocketConnector.THINK_GEAR_SOCKET_BROADCASTER_PORT)); notifyConnectionEventListeners(State.BOUND); } COM: <s> binds the broadcaster to the local host and the broadcaster port in </s>
funcom_train/20045101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _disconnectController() { XController cont2 = (XController) tEnv.getObjRelation("CONT2"); result = false; if (cont2 == null) { log.println("No controller no show"); } else { oObj.disconnectController(cont2); result = (oObj.getCurrentController() != cont2); } tRes.tested("disconnectController()", result); } COM: <s> after obtaining object relation cont2 test calls the method </s>
funcom_train/9713055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OMElement toOM() throws MexOMException { if (eprElement == null) { throw new MexOMException( "Must have EndpointReference element in MetadataReference"); } OMElement metadataRef = null; try { metadataRef = EndpointReferenceHelper.toOM(factory, epr, new QName( namespaceValue, MexConstants.SPEC.METADATA_REFERENCE, MexConstants.SPEC.NS_PREFIX), eprElement.getNamespace() .getNamespaceURI()); } catch (AxisFault e) { throw new MexOMException(e); } return metadataRef; } COM: <s> convert metadat reference object content to the omelement representation </s>
funcom_train/21015629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(){ nextButton.setActionCommand("Eingabe fertig"); this.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0)); nextButton.addActionListener(estimationController); this.showInputPanel(); sliders.bSlider.addMouseMotionListener(this); sliders.aSlider.addMouseMotionListener(this); } COM: <s> method for initializing the mean estimation method window with a panel for </s>