__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/50179425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readXmi() throws FileNotFoundException, AXmodelException { if (!initialized) { init(); } boolean fail = true; try { rep.beginTrans(true); reader.read(xmiStream, xmiUri, uml); fail = false; } catch (Exception e) { e.printStackTrace(); if (rep != null) { rep.endTrans(true); } if (e instanceof FileNotFoundException) { throw (FileNotFoundException)e; } throw new AXmodelException("Failed to read XMI", e); } finally { rep.endTrans(fail); } } COM: <s> p reads the xmi into the repository </s>
funcom_train/37655096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSingleCharacterStringLiteral() { if (isString) { String image = getImage(); int length = image.length(); if (length == 3) { return true; } else if (image.charAt(1) == '\\') { return SINGLE_CHAR_ESCAPE_PATTERN.matcher(image).matches(); } } return false; } COM: <s> returns true if this is a string literal with only one character </s>
funcom_train/3945284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void restoreState() { if (memento == null) return; IMemento memResourceURI = memento.getChild("resourceURI"); if (memResourceURI != null) { URI uri = URI.createURI(memResourceURI.getID()); loadResource(uri); } memento = null; } COM: <s> restore the state from the saved memento </s>
funcom_train/17676344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsApplicationIdentityFields() { checkCmd(); if (cmd.identityType != MDStatics.IDENTITY_TYPE_APPLICATION) return false; FieldMetaData[] pkf = cmd.pcHeirachy[0].pkFields; for (int i = pkf.length - 1; i >= 0; i--) { if (!containsField(pkf[i].stateFieldNo)) return false; } return true; } COM: <s> does this state contain all of the application identity fields for </s>
funcom_train/17028946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object nextElement() { // The object to return Object obj = null; // Now read it try { obj = readObject(); } catch (EOFException e) { // If you get an EOF exception from the read, // it is most likely from the URL and you can // set the more URL elements to false to indicate // that no more are available. } catch (IOException e) { logger .error("There was an IOException while trying get the next element:" + e.getMessage()); } // Now return it return obj; } COM: <s> this method implement the next element method from the </s>
funcom_train/12172910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPaneCellAttributes(Element element, Styles styles) { String value; // Now add the specific attributes for a table cell if ((value = horizontalAlignHandler.getAsString(styles)) != null) { element.setAttribute ("align", value); } if ((value = verticalAlignHandler.getAsString(styles)) != null) { element.setAttribute ("valign", value); } } COM: <s> add attributes to the cell created for the pane </s>
funcom_train/12708003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanUpHierarchy() { Vector clean = new Vector(); for (int count = 0; count < this.m_childs.size(); count++) { String elementName = this.m_childs.get(count).toString(); if (this.isIncludedInHigherLevel(elementName)) clean.add(elementName); } System.out.println("=="); System.out.println("E " + this.m_childs); System.out.println("R " + clean); this.m_childs.removeAll(clean); } COM: <s> clean up the hierarchy </s>
funcom_train/5009679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setViewProperties(List<Property> viewProperties){ this.viewProperties=viewProperties; this.lines=new ArrayList<Line>(Collections.nCopies(nLines, (Line) null));//we could make it less radically. But teh data is cached anyway... for (Property property : viewProperties) { if(cache.get(property)==null) cache.put(property, new DataProxy(property)); } } COM: <s> set the view properties </s>
funcom_train/9296843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createControl(Composite parent) { Composite container = new Composite(parent, SWT.NULL); setControl(container); container.setLayout(new FillLayout(SWT.HORIZONTAL)); AgencyComposite groupComposite = new AgencyComposite(container, SWT.NONE); // PLQ : start by hand AgencyCompositeController controller = new AgencyCompositeController( groupComposite, newGroup); WizardPageSupport.create(this, controller.getBindingContext()); // PLQ : end by hand } COM: <s> create contents of the wizard </s>
funcom_train/29934786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTfStreetDefaultColor() { if (tfStreetDefaultColor == null) { tfStreetDefaultColor = new JTextField(); tfStreetDefaultColor.setPreferredSize(new Dimension(40, 20)); tfStreetDefaultColor.setBackground(Color.yellow); } return tfStreetDefaultColor; } COM: <s> this method initializes tf street default color </s>
funcom_train/29938020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialise() { // define the binary sub-folder profileBinaryFolderName = configurationId; IContainer projectBinaryFolder = Stores.BINARY_PATHS.getProjectBinaryFolder(project); setProfileBinaryFolder(projectBinaryFolder); // the dependency manager is specific to a project dependencyManager = new DependencyManager(project); // update all the other components launchUpdate(); } COM: <s> initialises the profile </s>
funcom_train/45317568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendNotFound(String text) { Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).info("Not found " + text); AACCNormalResponse response = new AACCNormalResponse(); response.setCode(AACCNormalResponse.MSG_NOT_FOUND); response.setMessage(text); sendMessage(response); } COM: <s> sends text to the client with response code 404 </s>
funcom_train/12562047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isValidRandomRecord(byte[] record) { if (record.length < 2) { return false; } byte ind = record [0]; if (ind < 0) { return false; } for (int i = 1; i < record.length; i++) { if (record[i] != largeData[(ind + i) % largeData.length]) { return false; } } return true; } COM: <s> checks if record given could be created by get random record </s>
funcom_train/3718120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isHyphenCountOk(String isbn) { // do we have 3 hyphens int idx = 0, idxOld = 0, hyphenCount = 0; while ((idxOld = isbn.indexOf('-', idx)) != -1) { // 2 hyphens side by side are not allowed if (idxOld + 1 == idx) { hyphenCount = 0; break; } idx = idxOld + 1; hyphenCount++; } return hyphenCount == 3; } COM: <s> isbns must have exactly 3 hyphens </s>
funcom_train/4208206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Emoticon getEmoticon(String key) { final Collection<Emoticon> emoticons = emoticonMap.get(getActiveEmoticonSetName()); for (Emoticon emoticon : emoticons) { for (String string : emoticon.getEquivalants()) { if (key.toLowerCase().equals(string.toLowerCase())) { return emoticon; } } } return null; } COM: <s> returns the code emoticon code associated with the given key </s>
funcom_train/15467603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCatalog(String catalog) throws SQLException { logger.debug(" setCatalog(String catalog) throws SQLException "); String methodName = "setCatalog"; ArrayList<Serializable> methodSignature = new ArrayList<Serializable>(); methodSignature.add(String.class); ArrayList<Serializable> methodParameters = new ArrayList<Serializable>(); methodSignature.add(catalog); remoteCall(CaTIES_Null.class, this.remoteObjectUuid, methodName, methodSignature, methodParameters); } COM: <s> sets the catalog </s>
funcom_train/48534097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void simulate(ProgramStatement statement) throws ProcessingException { int value = 0; try { value = SystemIO.readInteger(this.getNumber()); } catch (NumberFormatException e) { throw new ProcessingException(statement, "invalid integer input (syscall "+this.getNumber()+")", Exceptions.SYSCALL_EXCEPTION); } RegisterFile.updateRegister(4, value); } COM: <s> performs syscall function to read an integer from input console into v0 </s>
funcom_train/3306221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renameNode (Integer nodeId, String newLabel) { CommandTreeNode node = (CommandTreeNode) nodeIdIndex.get(nodeId); node.setLabel(newLabel); // Build Delta HashMap values = new HashMap(); values.put(TreeDelta.KEY_NODE_ID, nodeId); values.put(TreeDelta.KEY_LABEL, newLabel); deltaqueue.addDelta (TreeDelta.ACTION_UPDATE, values); } COM: <s> renames a node in the tree </s>
funcom_train/3731882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void run() { if (!connect()) return; if (fRerunTest != null) { rerunTest(Integer.parseInt(fRerunTest), fTestClassNames[0], fTestName); return; } fTestResult= new TestResult(); fTestResult.addListener(this); runTests(fTestClassNames, fTestName); fTestResult.removeListener(this); if (fTestResult != null) { fTestResult.stop(); fTestResult= null; } if (fKeepAlive) waitForReruns(); shutDown(); } COM: <s> connects to the remote ports and runs the tests </s>
funcom_train/9953691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getNextEmptyOrOpener() throws IOException, ParseException { String nextWord = getNextWord(); if (nextWord.equals(EMPTY) || nextWord.equals(L_PAREN)) { return nextWord; } parseErrorExpected(EMPTY + " or " + L_PAREN); return null; } COM: <s> returns the next empty or l paren in the stream as uppercase text </s>
funcom_train/14008788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getId() { String startingSlash = ""; if (!_category.startsWith("/")) { startingSlash = "/"; } return startingSlash + BlojsomUtils.urlEncodeForLink(_category) + '?' + PERMALINK_PARAM + '=' + BlojsomUtils.urlEncode(_source.getName()); } COM: <s> returns the blog id for this entry </s>
funcom_train/46322036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(Map<String, Property> properties) { // Initialize the required properties on the TextObject. Iterator<Map.Entry<String, Property>> i = properties.entrySet().iterator(); while (i.hasNext()) { Map.Entry<String, Property> e = i.next(); init(e.getKey(), e.getValue()); } } COM: <s> initialize all the properties in the map if not already defined </s>
funcom_train/50154045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMessageResourcesConfig(MessageResourcesConfig config) { synchronized (msgResourceConfigs) { ArrayList old = new ArrayList(msgResourceConfigs); msgResourceConfigs.add(config); config.addPropertyChangeListener(this); getPropertyChangeSupport().firePropertyChange("messageResourcesConfigs", old, msgResourceConfigs); } } COM: <s> add information about a message resources bundle that will be available </s>
funcom_train/14462363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getColNames(){ FastAddVector retvec = new FastAddVector(); for(int x= 0;x<cols.length;x++) { if(cols[x]!=null) { String c = (String) cols[x].toString(); retvec.add(c); } } return retvec; } COM: <s> get the fast add vector of columns defined on this sheet </s>
funcom_train/9641566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node createZoomSessionsNode(Document document) { Element zoomSessionsRootNode = document.createElement("zoomSessions"); for (Iterator iter = AllSubgroupPluginController.getInstance() .getZoomController().getStoredSessions().iterator(); iter .hasNext();) { ZoomSession session = (ZoomSession) iter.next(); zoomSessionsRootNode.appendChild(createSingleZoomSessionNode( document, session)); } return zoomSessionsRootNode; } COM: <s> creates the zoom sessions node </s>
funcom_train/21014948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNPieces ( int nPieces ) { if ( frozen ) { return; } int old = this.nPieces; this.nPieces = nPieces; randomValues ( ); createColors ( ); fillTexts ( ); pcs.firePropertyChange ( "nPieces", old, this.nPieces ); } COM: <s> sets the number of pieces the pie chart should have </s>
funcom_train/38519929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String writeVariables(Map variableList) { if (variableList.isEmpty()) return ""; String output = " Variables:\n"; Set keys = variableList.keySet(); Iterator kIter = keys.iterator(); while (kIter.hasNext()) { String key = (String) kIter.next(); output += " " + key + "='" + variableList.get(key) + "'\n"; } return output; } COM: <s> returns a documentation text about a list of variables </s>
funcom_train/9877792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean clearAll() { boolean cleared = false; if(JOptionPane.showConfirmDialog(this, "Are you sure you are ready to clear the list?", "Clear All Selected Loci", JOptionPane.YES_NO_OPTION ) == JOptionPane.YES_OPTION ) { model.removeAllRows(); cleared = true; lem.repaint(); } return cleared; } COM: <s> clears the list </s>
funcom_train/41238837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DefaultMutableTreeNode processHierarchy(Object[] hierarchy) { DefaultMutableTreeNode node = new DefaultMutableTreeNode(hierarchy[0]); DefaultMutableTreeNode child; for(int i=1; i<hierarchy.length; i++) { Object nodeSpecifier = hierarchy[i]; if (nodeSpecifier instanceof Object[]) // Ie node with children child = processHierarchy((Object[]) nodeSpecifier); else child = new DefaultMutableTreeNode(nodeSpecifier); // Ie Leaf node.add(child); } return(node); } COM: <s> small routine that will make node out of the first entry </s>
funcom_train/38962778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonAceptarPunto() { if (jButtonAceptarPunto == null) { jButtonAceptarPunto = new JButton(); jButtonAceptarPunto.setBounds(new Rectangle(47, 142, 109, 31)); jButtonAceptarPunto.setText("Aceptar"); jButtonAceptarPunto.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setVisible(false); // TODO Auto-generated Event stub actionPerformed() } }); } return jButtonAceptarPunto; } COM: <s> this method initializes j button aceptar punto </s>
funcom_train/7881149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sub(String bin) { // TO DO Nick int r1 = Integer.parseInt(bin.substring(8, 11), 2); int r2 = Integer.parseInt(bin.substring(11, 14), 2); int r3 = Integer.parseInt(bin.substring(14, 17), 2); try { int temp = twosCompliment(getBinReg(r2)) - twosCompliment(getBinReg(r3)); setReg(r1, temp); } catch (NumberFormatException e) { // overflow occurs } } COM: <s> description subtract the values of two registers if the values are valid </s>
funcom_train/8774120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disconnect() throws SkypeException { try { String response = Connector.getInstance().execute("ALTER APPLICATION " + application.getName() + " DISCONNECT " + getId()); Utils.checkError(response); } catch (ConnectorException e) { Utils.convertToSkypeException(e); } } COM: <s> disconenct this stream and close the ap2 ap connection </s>
funcom_train/15931486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stopAllWorkers() { final ReentrantLock lock = this.workerLock; lock.lock(); try { ForkJoinWorkerThread[] ws = workers; for (int i = 0; i < ws.length; ++i) { ForkJoinWorkerThread t = ws[i]; if (t != null) t.shutdownNow(); } } finally { lock.unlock(); } } COM: <s> set each workers status to terminating </s>
funcom_train/10588405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isUserInRole(final User user, final String role) { final ProcessInfoProvider pip = (ProcessInfoProvider)WebAppContextUtils.getCurrentWebApplicationContext().getBean(ProcessInfoProvider.ROLE); final Map objectModel = pip.getObjectModel(); return isUserInRole(user, role, objectModel); } COM: <s> checks if the user has the given role </s>
funcom_train/10772025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void endSecondaryTable() { ClassMapping cm = (ClassMapping) currentElement(); ClassMappingInfo info = cm.getMappingInfo(); info.setSecondaryTableJoinColumns(DBIdentifier.newTable(_secondaryTable, delimit()), _joinCols); clearSecondaryTableInfo(); } COM: <s> set the secondary table information back to the owning class mapping </s>
funcom_train/47584419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTagetNamespacePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ProcessInformation_tagetNamespace_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ProcessInformation_tagetNamespace_feature", "_UI_ProcessInformation_type"), PimPackage.Literals.PROCESS_INFORMATION__TAGET_NAMESPACE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the taget namespace feature </s>
funcom_train/46965872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateGUIAfterSegChange() { jLabelTotalVidSegNum .setText("/" + mp7Manager.getVideoSegments().size()); /* add the video segment id's to the "from" jcombobox */ ((DefaultComboBoxModel) getJComboBoxMergeFrom().getModel()) .removeAllElements(); for (int i = 0; i < mp7Manager.getVideoSegments().size(); i++) getJComboBoxMergeFrom().addItem(i + 1); } COM: <s> update the component using the video segment change the number of video </s>
funcom_train/30009235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNoOfPages() { System.out.println("setNoOfPages"); int noOfPages = 0; Document instance = new Document(); int expResult = 0; int result = instance.setNoOfPages(noOfPages); 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 set no of pages method of class papyrus </s>
funcom_train/31777409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void launch(Properties preferences) throws ModuleLaunchException { String timeoutValue=preferences.getProperty("session-timeout"); long timeout=30; //default at 30 minutes try { if (timeoutValue!=null&&timeoutValue.length()>0) timeout=Long.parseLong(timeoutValue); } catch (NumberFormatException e) { throw new ModuleLaunchException("you specified a value ("+timeoutValue+") for session-timeout but the system could not convert it to a number"); } this.cleanupBackgroundThread=new SessionCleanup(this,sessions,timeout); } COM: <s> the implementation of the code launch code method </s>
funcom_train/15602927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateMask(File file) throws IOException{ BufferedImage im = ImageIO.read(file); int w = im.getWidth(); int h = im.getHeight(); mask = new byte[w][h]; for(int y=0;y<h;y++){ for(int x=0;x<w;x++){ switch(im.getRGB(x,y)){ case -1: mask[x][y] = BACKGROUND; break; case -16777216: mask[x][y] = FORGROUND; break; default: //throw new RuntimeException("not a monochrome image"); printError("The image is not monochrome."); frame.dispose(); break; } } } } COM: <s> generates the mask from a png file </s>
funcom_train/19400634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void abort(long ts) { ITx tx = getTx(ts); if (tx == null) throw new IllegalArgumentException("No such tx: " + ts); if(tx.isReadOnly()) { // abort is synchronous. tx.abort(); } else { // queue the abort request. writeService.submit(new TxAbortTask(tx)); } } COM: <s> abort a transaction synchronous low latency for read only transactions </s>
funcom_train/36061090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateYeast(long rowId, String name, String description) { ContentValues args = new ContentValues(); args.put(KEY_NAME, name); args.put(KEY_DESCRIPTION, description); return mDb.update(YEAST_TABLE, args, KEY_ID + "=" + rowId, null) > 0; } COM: <s> update the yeast using the details provided </s>
funcom_train/38949408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateCodeInJ2SE() { logger.info("generateCodeInJ2SE method"); String [] args = new String[] {"-o", TEMP_GEN_FOLDER, config.getString("wsdl")}; logger.info("arguments: -o " + TEMP_GEN_FOLDER + " " + config.getString("wsdl")); WSDL2Java.main(args); } COM: <s> generates web services client in j2 se </s>
funcom_train/20928061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectionsAsBits(List<String> selectionsAsBits) { if (selectionsAsBits == null) selections = null; else { if (selections == null) selections = new ArrayList<DataSelection>(); else selections.clear(); for (String bits : selectionsAsBits) { DataSelection dataSelection = new DataSelection(); dataSelection.setAsBitSet(Base64.decode(bits), this); selections.add(dataSelection); } } updateDrawingPanels(); } COM: <s> sets the current list of selections to be a new list popupated with </s>
funcom_train/19536380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAlignItems(boolean aAlignItems) { if (alignItems == aAlignItems) return; boolean old = alignItems; alignItems = aAlignItems; pcs.firePropertyChange(ALIGN_ITEMS_PROP_NAME, old, alignItems); ps.getPreferences().putBoolean(ALIGN_ITEMS_PROP_NAME, alignItems); } COM: <s> set the value of align items for this init tool preferences </s>
funcom_train/18365047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mixDownChannels() { float[] firstChannel = getChannel(0); int localSampleCount = getSampleCount(); for (int ch = getChannelCount() - 1; ch > 0; ch--) { float[] thisChannel = getChannel(ch); for (int i = 0; i < localSampleCount; i++) { firstChannel[i] += thisChannel[i]; } removeChannel(ch); } } COM: <s> mix down of n channels to one channel </s>
funcom_train/26325046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void findPartImpls() { _itemImpls = new ArrayList(); List descriptors = getResourceDescriptors(); Iterator i = descriptors.iterator(); while (i.hasNext()) { ResourceDescriptor des = (ResourceDescriptor)i.next(); _itemImpls.addAll(des.getFCObjects()); } } COM: <s> finds the available implementations of part </s>
funcom_train/8090596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restoreWeights() { // copy the saved best weights back into the weights System.arraycopy(m_bestWeights, 0, m_weights, 0, m_weights.length); // tell inputs to restore weights for (int i = 0; i < m_numInputs; i++) { m_inputList[i].restoreWeights(); } } COM: <s> call this to have the connection restore from the saved </s>
funcom_train/4470117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addItem(T item) { int index = list.countItems(); CheckBox cb = new CheckBox(); cb.addClickHandler(listener); String text = item.toString(); if ( renderer != null) { text = renderer.getCellRendererValue(item,index); } cb.setText(text); model.put(cb,item); list.add(cb); } COM: <s> adds a new object in the list </s>
funcom_train/27845235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddIllegalDependency() { DependencyRule rule = new DependencyRule("foo"); rule.addIllegalDependency("bar"); assertEquals(1, rule.getIllegalDependencyPackagePatterns().size()); assertEquals("bar", ((Pattern) rule.getIllegalDependencyPackagePatterns() .iterator() .next()).pattern()); } COM: <s> tests add illegal dependency </s>
funcom_train/39309216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeChannels() { RegisteredHardware hardware = (RegisteredHardware) getUserObject(); if (hardware instanceof HomenetHardware) { // build some channel nodes for (int channel = 0; channel < ((HomenetHardware) hardware).getNumChannels(); channel++) { add(new ChannelNode(((HomenetHardware) hardware).getChannel(channel), treeView, serverContext)); } } } COM: <s> initialize the input channels </s>
funcom_train/42950753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean editCellAt(int row, int column, EventObject e) { expandOrCollapseNode(e); // RG: Fix Issue 49! boolean canEdit = super.editCellAt(row, column, e); if (canEdit && isHierarchical(column)) { repaint(getCellRect(row, column, false)); } return canEdit; } COM: <s> overriden to invoke repaint for the particular location if </s>
funcom_train/46379218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PersistenceType getPersistenceType(Properties props) { String persistStr = props.getProperty(PERSISTENCE_TYPE_PROP); if (persistStr == null) { persistStr = System.getProperty(PERSISTENCE_TYPE_PROP); } if (persistStr != null) { return PersistenceType.parsePersistenceType(persistStr); } else { return PERSISTENCE_TYPE_DEFAULT; } } COM: <s> get the persistence type from a property </s>
funcom_train/3833190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTheme(Theme theme) throws Exception { themes.put( theme.getName(), theme ); themesL.add( theme ); enabled.put( theme.getName(), Boolean.TRUE ); activatedTh = theme; theme.setParent( this ); theme.getLayer().setCoordinatesSystem( crs ); } COM: <s> adds a theme to the map view </s>
funcom_train/3688789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processAreaSelected(ActionEvent actionEvent) { AreaSelectedEvent event = (AreaSelectedEvent) actionEvent; String current = event.getMapComponent().getCurrent(); FacesContext context = FacesContext.getCurrentInstance(); context.getViewRoot().setLocale((Locale) locales.get(current)); } COM: <s> p select a new locale based on this event </s>
funcom_train/17784445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeAll(Collection<?> c) { boolean ret=super.removeAll(c); if (ret) { java.util.Iterator<?> iter=c.iterator(); while (iter.hasNext()) { Object val=iter.next(); if (val instanceof ModelObject) { ((ModelObject)val).setParent(null); } } } return(ret); } COM: <s> removes from this list all the elements that are contained in the </s>
funcom_train/27943446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireOnCancel() { Iterator<JPluginPreferencesContainer> itItem = hPropertyPages.values().iterator(); while( itItem.hasNext() ) { JPluginPreferencesContainer preferencesContainer = itItem.next(); try { preferencesContainer.onCancel(); } catch( Exception e ) { System.err.println( "JPluginPreferencesManager.fireOnCancel() - " + e ); } } } COM: <s> fire the on cancel event of plugin </s>
funcom_train/1550336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAll(Collection<? extends E> coll) { if (this.mutator == null) { throw new UnsupportedOperationException("addAll() is not supported on CompositeCollection without a CollectionMutator strategy"); } return this.mutator.addAll(this, this.all, coll); } COM: <s> adds a collection of elements to this collection throwing </s>
funcom_train/7621600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void relayoutMeasuredItem(View child) { final int w = child.getMeasuredWidth(); final int h = child.getMeasuredHeight(); final int childLeft = mListPadding.left; final int childRight = childLeft + w; final int childTop = child.getTop(); final int childBottom = childTop + h; child.layout(childLeft, childTop, childRight, childBottom); } COM: <s> layout a child that has been measured preserving its top position </s>
funcom_train/49403701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (o != null && o instanceof StringHeader) { StringHeader that = (StringHeader) o; if (this.value == null) { return that.value == null; } else { return this.value.equals(that.value); } } else { return false; } } COM: <s> checks equality on the value of the header </s>
funcom_train/29031815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void kickButtonActionPerformed(ActionEvent evt) { KickPlayerRequestMessage kprm = new KickPlayerRequestMessage(); kprm.setPlayerName((String) playerlist.getSelectedValue()); // can't kick the player himself if (((String) playerlist.getSelectedValue()).equals( getCore().getPlayerName())) { return; } getCore().getNetwork().sendMessage(kprm); } COM: <s> method for action event on kick button to kick a player </s>
funcom_train/29919491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addFilter(String lastItem) { int count = combo.getItemCount(); for (int i = 0; i < count; i++) { String value = (String) combo.getItemAt(i); if (value.equals(lastItem)) return; } combo.addItem(lastItem); } COM: <s> add filter value to combo </s>
funcom_train/33280578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HtmlSelect getSelectByName(final String name) throws ElementNotFoundException { final List<HtmlSelect> list = getSelectsByName(name); if (list.isEmpty()) { throw new ElementNotFoundException("select", "name", name); } return list.get(0); } COM: <s> returns the first </s>
funcom_train/31558274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer result = new StringBuffer(); result.append("[Site: "); // name, code, id result.append("name='" + name + "' "); result.append("code='" + code + "' "); result.append("id='" + id + "' "); // location, if available if (location != null) result.append("location=" + location + " "); // return it result.append("]"); return result.toString(); } COM: <s> a pretty printer for sites </s>
funcom_train/4745031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkMakeImagePublic(String imageID) { MakeImagePublicAction makePublic = actionRegistry.getCoreAction( MakeImagePublicAction.class); makePublic.setProperties(authenticator.getUsername(), authenticator.getHash(), imageID); return actionRegistry.accessControl(makePublic); } COM: <s> checks if it is possible to publish the given image </s>
funcom_train/15918939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node visitChildren(NodeVisitor v) { List<AnnotationNode> oldAnnotations = annotations(); Node n = super.visitChildren(v); if (oldAnnotations == null || oldAnnotations.isEmpty()) { return n; } List<AnnotationNode> newAnnotations = node().visitList(oldAnnotations, v); if (! CollectionUtil.allEqual(oldAnnotations, newAnnotations)) { return ((X10Del) n.del()).annotations(newAnnotations); } return n; } COM: <s> override visit children for all nodes so annotations are visited </s>
funcom_train/20421945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setName("JFrame1"); this.setPreferredSize(new Dimension(855, 649)); this.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); this.setContentPane(getJFrameContentPane()); this.setBounds(0, 0, 427, 356); this.setTitle("BasicSwingComponents"); this.setJMenuBar(getJJMenuBar()); this.setTitle("Project Reporting System"); } COM: <s> initialize the class </s>
funcom_train/2903305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateJLFDataFile(String path){ if(path != null){ File saved = new File(path); if(saved.exists()){ try{ FileInputStream fis = new FileInputStream(saved); jlf = new ZLookAndFeel(XMLHandler.parseXML((InputStream)fis)); fis.close(); return updateJLFData(jlf); } catch(Exception e){ new JXError(getClass(), "Error while initializing look and feel, property="+path, e.getStackTrace()); } } } return false; } COM: <s> function to update java look and feel data </s>
funcom_train/33717633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onAxedEvent(AxedEvent event) { switch (event.type) { case AxedEvent.INSERT_CHAR : case AxedEvent.INSERT_TEXT : case AxedEvent.JOIN_LINE : case AxedEvent.MOVE_CURSOR : case AxedEvent.REMOVE_CHAR : case AxedEvent.REMOVE_TEXT : case AxedEvent.SPLIT_LINE : update(); break; case AxedEvent.REFRESH : case AxedEvent.FONT_SIZE_CHANGED : case AxedEvent.SCROLL : showMode(mode); } } COM: <s> handles events generated by axed </s>
funcom_train/17205363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateTIBEntry(RVMMethod m) { if (VM.VerifyAssertions) { RVMMethod vm = findVirtualMethod(m.getName(), m.getDescriptor()); VM._assert(vm == m); } typeInformationBlock.setVirtualMethod(m.getOffset(), m.getCurrentEntryCodeArray()); InterfaceInvocation.updateTIBEntry(this, m); } COM: <s> update this classs tib entry for the given method to point to </s>
funcom_train/5304824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void dsiExit() { View currentView; DSIWorkAreaPanel currentWorkArea; boolean cancel = false; Iterator<View> it = work_area.getViewIterator(); while(it.hasNext() && !cancel) { currentView = it.next(); currentWorkArea = (DSIWorkAreaPanel) currentView.getComponent(); cancel = !checkClosingDocument(currentView); } if(!cancel) { DSIFileSave.saveConfig(dsi_manager.getCurrentDSIGraph()); System.exit(0); } } COM: <s> performs the necessary functions before the program actually exits such as </s>
funcom_train/50909654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddItem() { assertTrue("Inventory not empty.", inventory.getWeight() == 0); inventory.add(item1); assertTrue("Item was not added.", inventory.getWeight() == item1.getWeight()); inventory.add(item2); assertTrue("Item was not added.", inventory.getWeight() == item1.getWeight() + item2.getWeight()); } COM: <s> tests adding of item </s>
funcom_train/16853212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doInSession(ThreadLocal<Selenium> sessionHolder, Runnable callback) { startEmbeddedServerIfNecessary(); Selenium selenium = startSession(); sessionHolder.set(selenium); try { callback.run(); } catch (Exception ex) { throw new RuntimeException("Test execution failure", ex); } finally { sessionHolder.set(null); stopSession(selenium); } } COM: <s> executes the tt callback tt within a new </s>
funcom_train/13196350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DCMove getMoveTo(DCCoord location) throws DCLocationException { //go through all moves in the list until right target found for (int i = 0; i < list.size(); i++) { DCMove move = (DCMove) list.get(i); if (move.getTarget().equals(location)) { return move; } } //if no move found, throw exception throw new DCLocationException("No Valid Move Found"); } COM: <s> returns the dcmove in the list with the given target location </s>
funcom_train/15627028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reloadPickmap(@NotNull final File file) { final MapFile<G, A, R> mapFile = pickmapChooserModel.getPickmap(file); if (mapFile != null) { try { mapFile.revert(); } catch (final IOException ex) { log.warn("cannot reload pickmap " + mapFile.getFile() + ": " + ex.getMessage()); } } } COM: <s> reload a pickmap </s>
funcom_train/45698067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNumberOfPages(final Integer numberOfPages) { if (numberOfPages != null) { Element numPagesEl = getXMetadataElement("NumberOfPages"); if (numPagesEl == null) { numPagesEl = new Element("meta"); numPagesEl.setAttribute("name", "NumberOfPages"); getXMetadata().addContent(numPagesEl); fixNamespace(numPagesEl, false); } numPagesEl.setText(String.valueOf(numberOfPages)); } } COM: <s> sets number of pages as an extended metadata element </s>
funcom_train/28591385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBody(JComponent body) { if (this.body != null) { bodyWrapper.remove(this.body); bodyWrapper.revalidate(); bodyWrapper.repaint(); } this.body = body; if (this.body != null) { bodyWrapper.add(body, BorderLayout.CENTER); bodyWrapper.revalidate(); bodyWrapper.repaint(); } guaranteePreferredSize(); } COM: <s> set the body </s>
funcom_train/19395528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Value goalIdToValue(ValueFactory theValueFactory, String theId) { if (isAnon(theId)) return theValueFactory.createBNode(getAnonId(theId)); else if (isURI(theId)) return theValueFactory.createURI(theId); else return theValueFactory.createLiteral(theId); } COM: <s> takes a goal id and returns an equivalent sesame value </s>
funcom_train/32746681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRedAga() { int reds = 0; MatchEvent me; Enumeration enum = red_.elements(); while(enum.hasMoreElements()) { me = (MatchEvent)enum.nextElement(); if(me.getPlayer1().isPlayer(Player.OPPONENT)) reds++; } return reds; } COM: <s> number of red cards for opponent team </s>
funcom_train/16452985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startNewDocument() { Document oldDoc = textPane.getDocument(); if (oldDoc != null) oldDoc.removeUndoableEditListener(undoHandler); HTMLEditorKit editorKit = new HTMLEditorKit(); document = (HTMLDocument) editorKit.createDefaultDocument(); textPane.setDocument(document); currentFile = null; // setTitle("HTMLDocumentEditor"); textPane.getDocument().addUndoableEditListener(undoHandler); resetUndoManager(); } COM: <s> start new document </s>
funcom_train/23240062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void bkp_setpc(java.awt.event.ActionEvent evt) { int idx = -1; idx = asmTable.getSelectedRow(); if (idx == -1) return; hub.cogSetBreakPoint(currentCog, hub.BKP_PC, idx, 0); memdumpATM.fireTableDataChanged(); asmATM.fireTableDataChanged(); } COM: <s> breakpoint actions set clear </s>
funcom_train/19654591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DasMethod dasMethod = (DasMethod) o; if (!id.equals(dasMethod.id)) return false; if (cvId != null ? !cvId.equals(dasMethod.cvId) : dasMethod.cvId != null) return false; return true; } COM: <s> implementation of equals method </s>
funcom_train/46166880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Routine getBestRoutine(String name, CPU cpu) { if (routineCollection.get(name) == null) { return null; } Routine smallestRuntime = null; for (Routine each : routineCollection.get(name)) { if (each.isSupported(cpu) && (smallestRuntime == null || smallestRuntime.getRuntime() < each.getRuntime())) { smallestRuntime = each; } } return smallestRuntime; } COM: <s> returns the routine with the smallest runtime for a given name and processor </s>
funcom_train/5635461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PyObject __findattr_ex__(String name) { if ("__methods__".equals(name)) { return __methods__; } else if ("__members__".equals(name)) { return __members__; } return super.__findattr_ex__(name); } COM: <s> finds the attribute </s>
funcom_train/16556213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getNextEmptyOrOpener(StreamTokenizer tokenizer) throws IOException, ParseException { String nextWord = getNextWord(tokenizer); if (nextWord.equals("EMPTY") || nextWord.equals("(")) { return nextWord; } throw new ParseException("Expected 'EMPTY' or '(' but encountered '" + nextWord + "'"); } COM: <s> returns the next empty or in the stream as uppercase text </s>
funcom_train/5272389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while(cont) { try { String s; InetSocketAddress a; datagramSocket.receive(recvPacket); a = (InetSocketAddress)recvPacket.getSocketAddress(); s = new String(a.getAddress().getHostAddress()+":"+a.getPort()); prog.receiveMessage(s, decodePacket(recvPacket)); } catch(IOException e) { DEBUG.warn("UDPSocket: run: packet receiving error"); } } } COM: <s> function waits for packet on socket and sends them prog </s>
funcom_train/37204919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private URL findStartupURL(Properties properties) { URL result = null; String startup=properties.getProperty("taverna.startup"); if (startup!=null) { File repository = new File(startup,"repository"); if (repository.exists()) { try { result = repository.toURI().toURL(); } catch (MalformedURLException e) { System.out.println("Malformed URL exception whilst determining startup repository ($taverna.startup/repository/"); e.printStackTrace(); } } } return result; } COM: <s> returns the url for the startup repsitory taverna </s>
funcom_train/22848509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateStackAndRiserData() { if (chart.isUpdateSuspended()) { return; } for (IAxis xAxis : chart.getAxisSet().getXAxes()) { ((Axis) xAxis).setNumRisers(0); for (IAxis yAxis : chart.getAxisSet().getYAxes()) { updateStackAndRiserData(xAxis, yAxis); } } } COM: <s> updates the stack and riser data </s>
funcom_train/22309737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveImage(String fileExtension, String filePath, PlanarImage img) throws IOException { OutputStream outputStream = new FileOutputStream(new File(filePath)); ImageEncoder tEncoder = ImageCodec.createImageEncoder(fileExtension, outputStream, null); tEncoder.encode(img); outputStream.close(); } COM: <s> really save a image on file system </s>
funcom_train/50485495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean fireConfirmInsertMode() { for (int i=0; i<listeners.size(); i++) if (!((RowListener)listeners.elementAt(i)).confirmInsertMode(new RowEvent(dbRow,"ConfirmInsertMode"))) return false; return true; } COM: <s> fire confirmation for insert mode </s>
funcom_train/43436106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getOpenButton() { if (OpenButton == null) { OpenButton = new JButton(); OpenButton.setIcon(new ImageIcon(getClass().getResource("/icones/open.png"))); OpenButton.setToolTipText("Open XML file..."); OpenButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { openfile(); // TODO Auto-generated Event stub actionPerformed() } }); } return OpenButton; } COM: <s> this method initializes j button2 </s>
funcom_train/48467674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String sign(String message) { try { final byte[] signature = signer.sign(message.getBytes(charsetName)); return new String(Base64.encodeBase64(signature, false)); } catch (UnsupportedEncodingException e) { throw new SignatureException("unsupported encoding: charsetName=" + charsetName, e); } } COM: <s> signs a message </s>
funcom_train/26484580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTableNode(DefaultMutableTreeNode categoryNode, Table table) { FPTableInfo info = new FPTableInfo(table, designer); DefaultMutableTreeNode tableNode = new DefaultMutableTreeNode(info); info.setTableNode(tableNode); categoryNode.add(tableNode); // Add a dummy node that will be removed when the table node // loads its column nodes. tableNode.add(new DefaultMutableTreeNode("")); } COM: <s> creates and adds a node representing a data source table </s>
funcom_train/23381661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ClassVisitor createAnalyzingVisitor(final long classid) { final ExecutionData data = executionData.get(classid); final boolean[] classExec = data == null ? null : data.getData(); final ClassAnalyzer analyzer = new ClassAnalyzer(classid, classExec, stringPool) { @Override public void visitEnd() { super.visitEnd(); coverageVisitor.visitCoverage(getCoverage()); } }; return new ClassProbesAdapter(analyzer); } COM: <s> creates an asm class visitor for analysis </s>
funcom_train/46629066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSShell() { sShell = new Shell(parent, SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM); sShell.setText(messages.getString("EXAMPLE_IMAGES_WINDOW_TITLE")); sShell.setLayout(new GridLayout()); labelBefore = new Label(sShell, SWT.NONE); labelBefore.setText(messages.getString("EXAMPLE_IMAGES_WINDOW_LABEL")); createCompositeButtons(); createCompositeBottom(); //dispose the two created images on disposing this dialog sShell.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { } }); } COM: <s> this method initializes s shell </s>
funcom_train/40369991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColor(int x, int y, Color color) { int index = getIndex(x, y); pixelData.setData(index, color.getR()); pixelData.setData(index + 1, color.getG()); pixelData.setData(index + 2, color.getB()); pixelData.setData(index + 3, (int) (color.getAlpha() * 255)); } COM: <s> sets the color at the given position </s>
funcom_train/37556073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getColumnCount () { checkWidget (); int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0); int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0); if (count == 1 && columns [0] == null) count = 0; return count; } COM: <s> returns the number of columns contained in the receiver </s>
funcom_train/42535549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o){ if(!(o instanceof EnvEntry))return false; if(o == this)return true; EnvEntry oo = (EnvEntry)o; return (((Object)type).equals(oo.type))&&(((Object)ret).equals(oo.ret))&&(((Object)choices).equals(oo.choices)); } COM: <s> is the given object equal to this env entry </s>
funcom_train/23403550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public ObjectRepository getRepository() { if (repository == null) { Display.getDefault().syncExec(new Runnable() { @Override public void run() { try { ProgressMonitorDialog pmd = new ProgressMonitorDialog( new Shell()); BuildRepositoryRunnable runnable = new BuildRepositoryRunnable(); pmd.run(false, false, runnable); repository = runnable.getRepository(); } catch (Exception e) { log.error("Error loading service repository {}", e); e.printStackTrace(System.err); } } }); } return repository; } COM: <s> gets the current ontology service repository </s>
funcom_train/50301928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector parseAllDeps(String resources) { Vector ret = new Vector(); if(resources != null) { StringTokenizer resTokenizer = new StringTokenizer(resources, ";"); while(resTokenizer.hasMoreElements()) { String path = (String)resTokenizer.nextElement(); ret.addElement(path); } } return ret; } COM: <s> parse the string which holds all dependencies </s>