__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/19066586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startTLS() throws IOException, SSLException, POP3Exception { sendCommand("STLS", null); POP3Response response = readSingleLineResponse(); if( response.isERR() ) throw new CommandNotSupportedException("STLS"); socket = RistrettoSSLSocketFactory.getInstance().createSocket(socket, servername, port, true); // handshake (which cyper algorithms are used?) ((SSLSocket) socket).startHandshake(); createStreams(); } COM: <s> switches to a ssl socket using the tls extension </s>
funcom_train/2661509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent ev) { if (session != null) { IObjectTreeAPI treeAPI = session.getSessionInternalFrame().getObjectTreeAPI(); IDatabaseObjectInfo[] tables = treeAPI.getSelectedDatabaseObjects(); if (tables.length == 1 && tables[0] instanceof ITableInfo) { try { new ImportTableDataCommand(session, (ITableInfo) tables[0]).execute(); } catch (Throwable th) { session.showErrorMessage(th); } } else { session.showErrorMessage("Wrong object"); } } } COM: <s> this method is the actual action method </s>
funcom_train/134690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTrimColor(Color col) { if (col != this.trim_color) { this.trim_color = col; if (this.left_trim_glyph != null) { this.left_trim_glyph.setBackgroundColor(this.trim_color); } if (this.right_trim_glyph != null) { this.right_trim_glyph.setBackgroundColor(this.trim_color); } } } COM: <s> specify the background color for the trimmed portion of the trace </s>
funcom_train/51209864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double ensureGoodTransformParam(TransformMode transformMode, double parameter) { if (Double.isInfinite(parameter)) parameter = (parameter > 0. ? 1. : -1.); if (Double.isNaN(parameter)) parameter = 0.; if (transformMode == TransformMode.Transform_Logarithm) { double d = MathTools.log(parameter, 1.); if (Double.isNaN(d) || Double.isInfinite(d)) { if (0 > parameter) parameter = -parameter; if (1. == parameter) parameter = 0.; } } return parameter; } COM: <s> ensure that the transformation parameter has a legal value for the given </s>
funcom_train/18950523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isControlFlow( String pLine, RegExp pControlFlowRegExp ) throws RegExpException { boolean result = ( !Standard.EMPTY.equals( pControlFlowRegExp.match( pLine ) ) ); //System.out.println("PI.isControlFlow: result:"+result+" line:"+pLine); return result; } COM: <s> true if statement ends with a </s>
funcom_train/48406442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsEnumeratedPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_List_isEnumerated_feature"), getString("_UI_PropertyDescriptor_description", "_UI_List_isEnumerated_feature", "_UI_List_type"), SpemxtcompletePackage.eINSTANCE.getList_IsEnumerated(), true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is enumerated feature </s>
funcom_train/4205426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Composite createFieldsComposite() { final Composite fc = myToolkit.createComposite(myTop, SWT.NONE); fc.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP)); final GridLayout layout = new GridLayout(2, false); layout.marginHeight = layout.marginWidth = 0; layout.horizontalSpacing = 10; fc.setLayout(layout); fc.setData(FIELDS_COMPOSITE_MARKER); return fc; } COM: <s> creates a new suitable fields </s>
funcom_train/29686504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInstantiateFactoryForMIMEAndFile() { MetadataResourceFactoryManager manager = new MetadataResourceFactoryManager(); manager.setManagerProperties("magoffin/matt/meta/smeta.properties"); MetadataResourceFactory factory = manager.getMetadataResourceFactory("foo/mime"); assertNotNull(factory); // now get again, to test retrieving via file MetadataResourceFactory factory2 = manager.getMetadataResourceFactory( new File("foo.test")); assertNotNull(factory2); assertSame(factory.getClass(), factory2.getClass()); } COM: <s> test able to instantiate factory for a mime type and file </s>
funcom_train/22545593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int add(LibraryTableDataLine dl, int row) { File init = dl.getInitializeObject(); if ( !contains(init) ) { return forceAdd(dl, row); } else { FileDesc fd = dl.getFileDesc(); if ( fd != null ) { row = getRow(init); get( row ).setFileDesc(fd); fireTableRowsUpdated( row, row ); } // we aren't going to use this dl, so clean it up. dl.cleanup(); } return -1; } COM: <s> override the dataline add so we can re initialize files </s>
funcom_train/5346223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasCCLicense(String license, String type) { return (type != null && type.equals(CCConstants.CC_URI_PREFIX)) || (license != null && license.indexOf(CCConstants.CC_URI_PREFIX) != -1 && license.indexOf(CCConstants.URL_INDICATOR) != -1) ; } COM: <s> determines if this document has a cc license </s>
funcom_train/5812836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String determinePrivProtocol(Definition def) { String authPrivProtocol = (def.getPrivacyProtocol() == null ? m_config.getPrivacyProtocol() : def.getPrivacyProtocol()); if (authPrivProtocol == null) { authPrivProtocol = SnmpAgentConfig.DEFAULT_PRIV_PROTOCOL; } return authPrivProtocol; } COM: <s> helper method to find a privacy protocol to use from the snmp config </s>
funcom_train/7522023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class get(String clazzname) { try { // return ClassConfigurator.class.getClassLoader().loadClass(clazzname); return Util.loadClass(clazzname, this.getClass()); } catch(Exception x) { if(log.isErrorEnabled()) log.error("failed loading class " + clazzname, x); } return null; } COM: <s> loads and returns the class from the class name </s>
funcom_train/33757578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Ticker getChooseGameMode () { if (ChooseGameMode == null) {//GEN-END:|23-getter|0|23-preInit // Insert pre-init code here ChooseGameMode = new Ticker ("Host to start a 1 or 2 player game");//GEN-LINE:|23-getter|1|23-postInit // Insert post-init code here }//GEN-BEGIN:|23-getter|2| return ChooseGameMode; } COM: <s> returns an initiliazed instance of choose game mode component </s>
funcom_train/25484527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void redo() throws CannotRedoException { Iterator itSelection = fMainElements.iterator(); while(itSelection.hasNext()) { DrawableElement element = (DrawableElement)itSelection.next(); fDiagram.delete(element); } fDiagram.setUnedited(false); fDiagram.repaint(); } COM: <s> redo the delete action </s>
funcom_train/30007412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLink(String type, Link link) { List<String> linksOfCategory = _links.get(type + link.getCategory()); if (linksOfCategory == null) linksOfCategory = new ArrayList<String>(); linksOfCategory.add(link.getLink()); _links.put(type + link.getCategory(), linksOfCategory); } COM: <s> adding a link to repository </s>
funcom_train/4009169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnclosedQuotes() throws Exception { String line = "'foo' \\'bar '" ; StringReader reader = new StringReader(line) ; CommandTokenizer tokenizer = new CommandTokenizer(reader) ; assertEquals("foo",tokenizer.nextToken()) ; try { System.err.println(tokenizer.nextToken()) ; fail("unclosed quotes accepted") ; } catch (IOException e) {} } COM: <s> test a string with an unclosed quote </s>
funcom_train/43927173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTextProperty(String propertyName) { // propertyValue == null does not work, since getAttribute returns the // empty string if the attribute is not found if (schema.hasAttribute(propertyName)) { return schema.getAttribute(propertyName); } else { NodeList nodes = schema.getElementsByTagName(propertyName); if (nodes.getLength() > 0) { Element node = (Element) nodes.item(0); return XMLUtil.getStringValue(node); } return null; } } COM: <s> get the value of a simple text property </s>
funcom_train/13271773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setYStart(float yStart) { if (yStart != this.yStart) { float oldYStart = this.yStart; this.yStart = yStart; this.shapeCache = null; this.propertyChangeSupport.firePropertyChange(Property.Y_START.name(), oldYStart, yStart); } } COM: <s> sets the start point ordinate of this dimension line </s>
funcom_train/36756446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRemainingCreditCount() { System.out.println("getRemainingCreditCount"); Plan plan = null; Degree instance = null; int expResult = 0; int result = instance.getRemainingCreditCount(plan); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get remaining credit count method of class csis543 tfinal project </s>
funcom_train/5304416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeChildrenFromInputbox() { String numberString = JOptionPane.showInputDialog("Number of new children"); numNewChildren = 0; try { numNewChildren = Integer.parseInt(numberString); } catch (NumberFormatException ex){ numNewChildren = 0; DSIllustrator.log("Invalid input for number of new children" + numberString); } if (numNewChildren > 0) { if (v.childrenVertices.isEmpty()) { insertNewChildren(null); } else { graph.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR)); } } } COM: <s> pop up a dialog box for the number of new children to add </s>
funcom_train/22335386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testSimpleConfigRequestCompiled() { try { XmlHttpClient xmlHttpClient = new XmlHttpClient("org/placidus/xmlhttplib/test/tests/test6/test6-compiled-clients.xml"); Map<String, Object> result = xmlHttpClient.execMap("simpleconfigrequest", getDefaultParams()); Log.logInfo("Result of simpleconfigrequest: " + CollectionHelper.dump(result)); assertTrue(((String) result.get("simpleconfigrequest_statuscode")).equals("200")); } catch (Exception ex) { Log.logError(ex); fail(ex.getMessage()); } } COM: <s> tests simple set of connections params </s>
funcom_train/10586664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void modify(String name, int mod_op, Map attributes) throws ProcessingException { try { if (this.context == null) initialize(); if (getLogger().isDebugEnabled()) { getLogger().debug("Modifying Entry: " + name); } context.modifyAttributes(name, mod_op, map2Attributes(attributes)); } catch (Exception e) { throw new ProcessingException(e); } } COM: <s> modifies an existing entry </s>
funcom_train/3652408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FileFilter createCPFileFilter() { String[] cpElementExts = { "ZIP", "zip", "JAR", "jar" }; return new DefaultFileFilter(cpElementExts, classChooser.getLocalizer(). getText("filter_desc")); } COM: <s> gets the filter we use for choosing entries for the classpath </s>
funcom_train/47036984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printCVSPassTask(String cvsRoot, String password, String passFile) { printTab(); output.print("<cvspass"); //$NON-NLS-1$ printAttribute("cvsRoot", cvsRoot, true); //$NON-NLS-1$ printAttribute("password", password, true); //$NON-NLS-1$ printAttribute("passfile", passFile, false); //$NON-NLS-1$ output.println("/>"); //$NON-NLS-1$ } COM: <s> print a code cvspass code task to the ant script </s>
funcom_train/13271940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDescription(String description) { if (description != this.description || (description != null && !description.equals(this.description))) { String oldDescription = this.description; this.description = description; this.propertyChangeSupport.firePropertyChange(Property.DESCRIPTION.name(), oldDescription, description); } } COM: <s> sets the description of this piece of furniture </s>
funcom_train/10874804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Explanation explain(int doc, Explanation freq) { Explanation result = new Explanation(score(doc, (int)freq.getValue()), "score(doc=" + doc + ",freq=" + freq.getValue() +"), with freq of:"); result.addDetail(freq); return result; } COM: <s> explain the score for a single document </s>
funcom_train/19663288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Cache getCache(SQLQuery query) { SQLTemplate sqlTempalte = query.getSQLTemplate(); if (sqlTempalte instanceof NamedSQLTemplate) { // only cache NamedQuery String cacheName = ((NamedSQLTemplate) sqlTempalte).getCacheName(); CacheFactory cacheFactory = query.getCacheFactory(); return cacheFactory.newCache(cacheName); } else { return null; } } COM: <s> get cache by sqlquery </s>
funcom_train/45698100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBookshareId(final String id) { final Element isbnIdent = new Element("Identifier", "dc", DC_NAMESPACE); isbnIdent.setAttribute("id", "uid"); isbnIdent.setAttribute("scheme", "BKSH"); // XXX, this needs to be a system generated id isbnIdent.setText("Bookshare-" + id); fixNamespace(isbnIdent, true); getDCMetadata().addContent(isbnIdent); } COM: <s> set the bookshare id </s>
funcom_train/14396143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* private void parseCharacter(char aExpectedCharacter) throws ParseException, IOException { theTokenizer.nextToken(); if (theTokenizer.getTokenChar() != aExpectedCharacter) { handleTokenError(MOFParserException.PARSECHARACTER_SPECIAL_CHARACTER_EXPECTED, "'"+aExpectedCharacter+"' expected"); } }*/ COM: <s> parses a character </s>
funcom_train/46657061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (this.jContentPane == null) { this.jContentPane = new JPanel(); this.jContentPane.setLayout(new BorderLayout()); this.jContentPane.add(this.getJTextPaneError(), BorderLayout.CENTER); this.jContentPane.add(this.getJButtonOk(), BorderLayout.SOUTH); } return this.jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/4628693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ComboBoxModel getContainers() { DefaultComboBoxModel model = new DefaultComboBoxModel(); try { List<FilesContainer> containers = client.listContainers(); for (FilesContainer container : containers) { model.addElement(container.getName()); } } catch (Exception e) { JOptionPane.showMessageDialog(this, "Error: " + e.getLocalizedMessage()); } return model; } COM: <s> fetches the list of containers owned by the user </s>
funcom_train/5377238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _exec(CommandInterpreter intp) throws Exception { String command = intp.nextArgument(); if (command == null) { intp.println(ConsoleMsg.CONSOLE_NO_COMMAND_SPECIFIED_ERROR); return; } Process p = Runtime.getRuntime().exec(command); intp.println(NLS.bind(ConsoleMsg.CONSOLE_STARTED_IN_MESSAGE, command, String.valueOf(p))); int result = p.waitFor(); intp.println(NLS.bind(ConsoleMsg.CONSOLE_EXECUTED_RESULT_CODE_MESSAGE, command, String.valueOf(result))); } COM: <s> executes the given system command in a separate system process </s>
funcom_train/17455733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadPropertyDescriptors(E beanObject) { Class<E> beanClass = (Class<E>) beanObject.getClass(); beanProperties = new ArrayList<BeanProperty>(); for(String property: propertyNames) { beanProperties.add( new BeanProperty<E>(beanClass, property, true, false) ); } } COM: <s> loads the property descriptors which are used to invoke property </s>
funcom_train/50465941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getClassPathString() { Iterator it = classPath.iterator(); StringBuffer cp = new StringBuffer(); while (it.hasNext()) { ClassPathEntry entry = (ClassPathEntry) it.next(); cp.append(entry.getResourceURL().toString()); cp.append("\n"); } return cp.toString(); } COM: <s> return a class path string </s>
funcom_train/14108178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PSObject remove(final int index) throws PSErrorRangeCheck { if ((index < 0) || (index >= size())) { throw new PSErrorRangeCheck(); } PSObject element = getArray().remove(index + offset); if (count != -1) { count--; } return element; } COM: <s> remove an element from this array </s>
funcom_train/44210473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SearchResult getResult(int index_) throws IllegalArgumentException { if (_isDestroyed) { throw new IllegalStateException(); } if ( (index_ < 0) || (index_ > _results.length) ) { throw new IllegalArgumentException( _bundle.getString("cvebrowser.dictionary.data.persistence.web.SearchBag.getResult.error.invalidRange") + ", (" + index_ + ")"); } return _results[index_]; } COM: <s> returns a search result given the index </s>
funcom_train/41516745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SnmpResponse getNext(String[] oids) throws SnmpException { BlockPdu pdu = new BlockPdu(context); pdu.setPduType(BlockPdu.GETNEXT); for (int i = 0; i < oids.length; i++) { addOid(pdu, oids[i]); } return send(pdu); } COM: <s> sends an snmp get gext request for multiple oids </s>
funcom_train/22560369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLookupInternalId() { final String externalID = "A40"; final ObjectType objectType = ObjectType.Action; final DBManagerInterface manager = DBManagerFactory.getDBManager(); manager.beginTransaction(); try { final Integer internalId = DBUtil.getInternalId(manager, externalID,objectType); assertEquals(internalId, Integer.valueOf(40)); } catch (TENCServerException e) { fail("Not expected exception."); } finally { manager.commitTransaction(); } } COM: <s> lookup the internal id when external id and object type are given </s>
funcom_train/26468736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getRequesterCallSigns (boolean includeSelf) throws AccessDeniedException, BusyException { Iterator responders = server.getResponderList().iterator(); HashSet callSigns = new HashSet(server.getResponderList().size()); Responder curr = null; while (responders.hasNext()){ curr = (Responder) responders.next(); if (includeSelf || (curr != this)){ callSigns.add(curr.getRequesterCallSign()); } } return callSigns; } COM: <s> provides a set of all requester call signs </s>
funcom_train/39787797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructorSpecific() { Insets insets = new Insets(PX_1, PX_2, PX_3, PX_4); assertEquals(insets.getLeft(), PX_1); assertEquals(insets.getTop(), PX_2); assertEquals(insets.getRight(), PX_3); assertEquals(insets.getBottom(), PX_4); } COM: <s> test all margins specific constructor </s>
funcom_train/35326846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { int h = hash; if (h == 0 && count > 0) { int off = offset; char val[] = value; int len = count; for (int i = 0; i < len; i++) { h = 31*h + val[off++]; } hash = h; } return h; } COM: <s> returns a hash code for this string </s>
funcom_train/180613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prepForXML() { GameObj tempObj; for(int i = 0; i < contents.size();i++) { tempObj = (GameObj)contents.getObject(i); if(tempObj.getClass().equals(Player.class)) { //TODO - Find a better way to remove the player from exporting. contents.removeObject(tempObj); } } } COM: <s> call this a player filter </s>
funcom_train/17013203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTimes(String src, long mtime, long atime) throws IOException { checkOpen(); try { namenode.setTimes(src, mtime, atime); } catch(RemoteException re) { throw re.unwrapRemoteException(AccessControlException.class, FileNotFoundException.class); } } COM: <s> set the modification and access time of a file </s>
funcom_train/47193673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCreatenewVerse() { if (CreatenewVerse == null) { CreatenewVerse = new JButton(); CreatenewVerse.setText("Create new Verse"); CreatenewVerse .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { selector.setVisible(true); jLabel2.setText(Config.mapName); } }); } return CreatenewVerse; } COM: <s> this method initializes createnew verse </s>
funcom_train/16613984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addScore(long source, long target, float score) { CombinedKey key = new CombinedKey(source, target); if (combinedMap.containsKey(key)) { Entry oldEntry = (Entry) combinedMap.get(key); oldEntry.score = score; } else { Entry newEntry = new Entry(source, target, score); addEntry( newEntry ); } } COM: <s> put a score to the two given objects </s>
funcom_train/13502905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Writer open() throws IOException { switch (state) { case OPEN: throw new IllegalStateException("File " + tempFile + " is already open."); case CLOSED: throw new IllegalStateException("File " + tempFile + " has been closed already."); default: // READY state = State.OPEN; tempFile.createNewFile(); fileWriter = new FileWriter(tempFile); return fileWriter; } } COM: <s> create the file with its in progress filename </s>
funcom_train/28122766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeConnections() { // detach reference connections while (getConnectionCount()>0) getConnection(0).disconnect(); // clear all reference connections References = new java.util.Vector(); // remove connector connections for (int i=0; i<getConnectorCount(); i++) getConnector(i).removeConnections(); } COM: <s> remove all connections and any message visualisers associated with the connections </s>
funcom_train/12646221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNotify() { synchronized (getTreeLock()) { if (peer == null) { peer = ((PeerBasedToolkit) Toolkit.getDefaultToolkit()).createMenu(this); } int nitems = getItemCount(); for (int i = 0; i < nitems; i++) { MenuItem mi = getItem(i); mi.parent = this; mi.addNotify(); } } } COM: <s> creates the menus peer </s>
funcom_train/44779416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeDistinctProperty(Property property) { JPanel current = (JPanel)myDistinctPanes.get(property); if (current == null) { return; } myCenterPanel.remove(current); myDistinctPanes.remove(property); myCurrentConnections.remove(property); myCenterPanel.validate(); repaint(); //validate(); } COM: <s> removes the distinct values panel for the given property </s>
funcom_train/28750385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMolweight(Long newVal) { if ((newVal != null && this.molweight != null && (newVal.compareTo(this.molweight) == 0)) || (newVal == null && this.molweight == null && molweight_is_initialized)) { return; } this.molweight = newVal; molweight_is_modified = true; molweight_is_initialized = true; } COM: <s> setter method for molweight </s>
funcom_train/9978058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleInterceptorsSelectionChanged() { Struts2InterceptorRef ref = getSelectedInterceptor(); if (ref == null) { // Reset and return. interceptorRefNameField.setText(""); interceptorParameters.setParameters(new String[0][]); interceptorRemoveButton.setEnabled(false); interceptorUpdateButton.setEnabled(false); } else { // Edit it... interceptorRefNameField.setText(ref.referenceName); interceptorParameters.setParameters(ref.getParametersArray()); interceptorRemoveButton.setEnabled(true); interceptorUpdateButton.setEnabled(true); } } COM: <s> manages interceptor selection change </s>
funcom_train/3286897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean getBoolean(String label_key, String default_value_key, Locale locale) throws IOException { String result = this.getString(label_key, default_value_key, locale); ResourceBundle bundle = this.getBundle(locale); String yes_long = bundle.getString("yes.long"); String yes_short = bundle.getString("yes.short"); return ((result.equalsIgnoreCase(yes_long)) || (result.equalsIgnoreCase(yes_short))); } COM: <s> retrieve a boolean value from the system </s>
funcom_train/3022227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isViewPrivate() { Component[] components = getComponents(); for (int i = 0; i < components.length; i++) { if (components[i] instanceof UMLType) { UMLType umlType = (UMLType)components[i]; return umlType.isViewPrivate(); } } return true; } COM: <s> gets the view private attribute of the umlpackage object </s>
funcom_train/21883904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void validate() { if (null == resultproperty) { throw new BuildException("resultproperty attribute not set"); } if (null == inputproperty && (null == type || null == name)) { throw new BuildException("inputproperty attribute not set"); } /** if (null == field) { throw new BuildException("field attribute not set"); } **/ } COM: <s> validate the task input </s>
funcom_train/10258895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setXmlResource(String file_name) throws RSSException{ f = new File(file_name); try{ in = new InputSource(new FileInputStream(f)); }catch(Exception e){ throw new RSSException("RSSParser::setXmlResource fails: "+e.getMessage()); } } COM: <s> set rss resource by local file name </s>
funcom_train/28750841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReportgroupname(String newVal) { if ((newVal != null && this.reportgroupname != null && (newVal.compareTo(this.reportgroupname) == 0)) || (newVal == null && this.reportgroupname == null && reportgroupname_is_initialized)) { return; } this.reportgroupname = newVal; reportgroupname_is_modified = true; reportgroupname_is_initialized = true; } COM: <s> setter method for reportgroupname </s>
funcom_train/49994521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVersion(String version) { Window.setTitle("Hackystat: SensorDataViewer " + version); RootPanel.get("version").add(new HTML("<b>" + version + "</b>")); setGadgetTitle("Hackystat: SensorDataViewer " + version); } COM: <s> this method displays the passed version in the ui </s>
funcom_train/48909019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPanelPrincipal() { if (panelPrincipal == null) { panelPrincipal = new JPanel(); panelPrincipal.setLayout(null); panelPrincipal.setBounds(new Rectangle(8, 7, 781, 503)); panelPrincipal.add(getPanelDatosConsulta(), null); panelPrincipal.add(getScroll(), null); panelPrincipal.setBackground(Constante.TERCER_FONDO); } return panelPrincipal; } COM: <s> this method initializes panel principal </s>
funcom_train/2325695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dhtColumns() { if (content instanceof DenseLargeFloatMatrix2D) { if (this.isNoView == true) { ((DenseLargeFloatMatrix2D) content).dhtColumns(); } else { DenseLargeFloatMatrix2D copy = (DenseLargeFloatMatrix2D) copy(); copy.dhtColumns(); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } } COM: <s> computes the discrete hertley transform dht of each column of this </s>
funcom_train/1443452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void moveCollidedBallToPlayerMargin() { Ball ballRef = this.world.getBallRef(); double angle = this.world.getSelfRef() .getAngleTo(ballRef.getPosition()); ballRef.getPosition().pointAtPolar( this.world.getMyPConf().PLAYER_SIZE + SConf.getInstance().BALL_SIZE + 0.001, angle); ballRef.getPosition().addToThis(this.world.getSelfRef().getPosition()); } COM: <s> the ball is moved in radial direction outside the player </s>
funcom_train/49044573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPlanningLevelPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PropertyDescriptor_planningLevel_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PropertyDescriptor_planningLevel_feature", "_UI_PropertyDescriptor_type"), ItemsPackage.Literals.PROPERTY_DESCRIPTOR__PLANNING_LEVEL, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the planning level feature </s>
funcom_train/18739242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void registerErasure(HostEdge edge) { HostNode target = edge.target(); if (target instanceof ValueNode) { Set<HostEdge> edges = getValueNodeEdges((ValueNode) target); edges.remove(edge); if (edges.isEmpty()) { addIsolatedValueNode((ValueNode) target); } } } COM: <s> callback method to notify that an edge has been erased </s>
funcom_train/43245576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetSecondMostRecentDateOfCare() { System.out.println("setSecondMostRecentDateOfCare"); Calendar secondMostRecentDateOfCare = null; PatientDataDG2Object instance = new PatientDataDG2Object(); instance.setSecondMostRecentDateOfCare(secondMostRecentDateOfCare); // 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 second most recent date of care method of class org </s>
funcom_train/44657041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateInfo() { boolean oldInfo = hasInfo; hasInfo = false; if (validationResults.getHasInfo()) { hasInfo = true; } else { Iterator childIter = children.iterator(); while (childIter.hasNext()) { ValidationResultsModel childModel = (ValidationResultsModel) childIter.next(); if (childModel.getHasInfo()) { hasInfo = true; break; } } } firePropertyChange(HAS_INFO_PROPERTY, oldInfo, hasInfo); } COM: <s> revaluate the has info property and fire an event if things have changed </s>
funcom_train/40298780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { Object src = e.getSource(); if (src == timer) { saveToFile(); } else { /* int row = tasks.indexOf(src); */ for (int row=0; row<tasks.size(); row++) { fireTableCellUpdated(row, 1); fireTableCellUpdated(row, 2); } } } COM: <s> processes an action event </s>
funcom_train/10791194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void recordOrder(Object ord, boolean asc) { if (ord == null) return; orderIdxs = null; int idx = orders++; if (desc.get(idx) && asc) throw new UserException(_loc.get("incompat-ordering")); if (!asc) desc.set(idx); } COM: <s> record that were ordering by a sql expression </s>
funcom_train/3604131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getImage(Image base, int kind) { Object key= base; if (key == null) key= fgDummy; kind &= 15; Image[] a= (Image[]) fgMap.get(key); if (a == null) { a= new Image[16]; fgMap.put(key, a); } Image b= a[kind]; if (b == null) { b= new DiffImage(base, fgImages[kind], WIDTH, !fLeftIsLocal).createImage(); CompareUI.disposeOnShutdown(b); a[kind]= b; } return b; } COM: <s> returns an image showing the specified change kind applied to a </s>
funcom_train/2962008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateConstraintByType(final ConstraintType t, final Constraint c) { TIntHashSet hs = constraintsByType.get(t); if (hs == null) { hs = new TIntHashSet(); } final int id = constraints.get(c); if (!hs.contains(id)) { hs.add(id); } constraintsByType.put(t, hs); } COM: <s> add constraint into constraints by type collections </s>
funcom_train/18671825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getQualifiedName() { // Note: Any changes here should be reflected in // XMLOutputter.printQualifiedName() final String prefix = this.namespace.getPrefix(); if ((prefix != null) && (!prefix.equals(""))) { return new StringBuffer(prefix).append(':').append(this.getName()) .toString(); } return this.getName(); } COM: <s> this will retrieve the qualified name of the code attribute code </s>
funcom_train/26535423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object putImpl(String key, Object value) { if (key.length() == 0) throw new IllegalArgumentException ("Cannot replace self using put operation"); if (key.endsWith(SEPARATOR) && !isValidHashTreeNode(value)) throw new IllegalArgumentException ("Key names a context, but value is not a valid HashTree"); return putImpl2(key, value); } COM: <s> check put parameters for validity </s>
funcom_train/41157457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setObjects(Vector noteObjects) { objDLM.clear(); if (noteObjects != null) { objects = noteObjects; Iterator it = objects.iterator(); while (it.hasNext()) { NoteObject nobj = (NoteObject) it.next(); objDLM.addElement(" " + nobj.getName()); } } } COM: <s> sets the vector and the list of objects </s>
funcom_train/45078933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doEndTag() throws JspException { // Print the ending element to our output writer JspWriter writer = pageContext.getOut(); try { writer.print("</a>"); } catch (IOException e) { throw new JspException(messages.getMessage("linkItem.io", e.toString())); } return (EVAL_PAGE); } COM: <s> render the end of the hyperlink </s>
funcom_train/8229090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateGear() { gear.clear(); // Scans inventory int[] inventoryArray = getInventoryArray(); for (int i = 27; i > 0; i--) { if (inventoryArray[i] != -1) { gear.add(inventoryArray[i]); } } // Adds stuff from the keep list for (int x : KEEP_ITEMS) { gear.add(x); } } COM: <s> adds stuff in your current inventory so you wont drop them later </s>
funcom_train/39483838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttr (int fieldOrElementIndex, Object attr){ if (attrs == null){ if (attr == null){ return; // no need to waste an array object for storing null } attrs = new Object[getNumberOfFieldsOrElements()]; } attrs[fieldOrElementIndex] = attr; } COM: <s> set the optional attribute for a field </s>
funcom_train/42262528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void countNodes(BGTTreeNode node) { if (node.getSiblingCount() <= 1) { // 1 mean that has no siblings, so here is leaf added to leaf ++nodesNumber; ++nodesBranchingFactorSum; ++leafsDephtSum; } else { // leaf added to node with few children ++nodesBranchingFactorSum; leafsDephtSum += node.getLevel(); ++leafsNumber; // every new node is a leaf } } COM: <s> counts nodes parameters like sum of nodes sum of leafs </s>
funcom_train/7518202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PropostaServicoLocalAtuacao update(PropostaServicoLocalAtuacao entity) { EntityManagerHelper.log( "updating PropostaServicoLocalAtuacao instance", Level.INFO, null); try { PropostaServicoLocalAtuacao result = getEntityManager().merge( entity); EntityManagerHelper.log("update successful", Level.INFO, null); return result; } catch (RuntimeException re) { EntityManagerHelper.log("update failed", Level.SEVERE, re); throw re; } } COM: <s> persist a previously saved proposta servico local atuacao entity and return </s>
funcom_train/22432670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getMenuAccount() { if (menuAccount == null) { menuAccount = new JMenu(); menuAccount.setText(MessageText.getString( "master.gui.Main.Menu.Account")); menuAccount.add(getMenuItemAccountNew()); menuAccount.add(getMenuItemAccountDelete()); menuAccount.add(getMenuItemAccountUpdateSelf()); menuAccount.add(getMenuItemAccountUpdateAll()); menuAccount.add(getMenuItemAccountResetPw()); } return menuAccount; } COM: <s> this method initializes menu account </s>
funcom_train/43290673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { container.removeContainerListener(this); Iterator it2 = componentDescriptors.iterator(); while (it2.hasNext()) { ComponentDescriptor cd = (ComponentDescriptor) it2.next(); cd.removeModelListener(this); } Iterator it = new LinkedList(correlation.keySet()).iterator(); // remove all listeners + ensure handlers are disposed while (it.hasNext()) { ConfigurationInstance instance = (ConfigurationInstance) it.next(); removedInstance(instance); } // remove myself as error filter editor.getEditorContext().getErrorHandler().removeErrorFilter(this); } COM: <s> dispose the customization </s>
funcom_train/49029628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean storableProperty(String key, String value) { if (key.equalsIgnoreCase(importKey)) { // Evaluate value to get actual file name value = doSubstitutions(value); try { addFromFile(value); } catch (IOException ioe) { throw new PropertiesException("Error reading file. " + ioe); } return false; } return true; } COM: <s> detect import dirrective and import file </s>
funcom_train/28506079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContainers(int nr) { container.removeAllElements(); for (int i=0;i<nr;i++) { container.addElement(new container(gl)); container.lastElement().setColor(0.6f, 0.3f, 0.3f); alignContainers(); } } COM: <s> add containers to a truck </s>
funcom_train/13814821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCollection(PhotoCollection v) { if ( photoCollection != null ) { photoCollection.removePhotoCollectionChangeListener( this ); } photoCollection = new SortedPhotoCollection( v ); if ( photoOrderComparator != null ) { photoCollection.setComparator( photoOrderComparator ); } photoCollection.addPhotoCollectionChangeListener( this ); refreshPhotoChangeListeners(); revalidate(); repaint(); } COM: <s> set the collection that should be viewed </s>
funcom_train/11389659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int runAll() { int exitCode = 0; for (String src : args) { try { PathData[] srcs = PathData.expandAsGlob(src, getConf()); for (PathData s : srcs) { run(s.path); } } catch (IOException e) { exitCode = -1; displayError(e); } } return exitCode; } COM: <s> for each source path execute the command </s>
funcom_train/25389721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initNetGameStuff() { //this.netbuffer = new doomdata_t(); this.doomcom = new doomcom_t(); this.netcmds = new ticcmd_t[MAXPLAYERS][BACKUPTICS]; C2JUtils.initArrayOfObjects(localcmds); for (int i=0;i<MAXPLAYERS;i++){ C2JUtils.initArrayOfObjects(netcmds[i]); } } COM: <s> maes this was not in the original </s>
funcom_train/41842578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopPlaying() { // stop audio player thread and playing of playlist if (this.ap != null) { this.ap.setStopped(true); // the trick here is to set the current track number to a value so that the condition of the for-loop // in the method "playCompleteList" does not hold and no new audio player thread is created currentTrackNo = this.audioFiles.size(); } } COM: <s> stops the audio output </s>
funcom_train/19318233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeInt(int value) throws JMSException { if(!isBodyModifiable()) { throw new MessageNotWriteableException("BytesMessage read_only"); } try { getOutputStream().writeInt(value); } catch(IOException e) { throw new JMSException(e.getMessage()); } } COM: <s> writes an code int code to the bytes message stream as four bytes </s>
funcom_train/9937851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeEntry() throws LhaException, IOException { long skipCount = skip(entryCount); if (entryCount != skipCount) { throw new LhaException("Data length not matched"); } if ((entry.hasCRC()) && (entry.getCRC() != crc.getValue())) { throw new LhaException("Data crc is not matched"); } close(); } COM: <s> reads out the current input stream check crc closes the current input </s>
funcom_train/39378432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueObject(Object object) { if (object != null) { if (Date.class.isAssignableFrom(object.getClass())) { setDate((Date) object); } else { String msg = "Invalid object class: " + object.getClass().getName(); throw new IllegalArgumentException(msg); } } } COM: <s> set the date value of the field using the given object </s>
funcom_train/36995855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllInstances( Frame lastFrame ) { IVVector layers = getOccupiedLayers(); for( int i = 0; i<layers.size(); i++ ) { Instance inst = (Instance) layers.elementAt(i); if( inst == null ) continue; lastFrame.removeInstance(i); } } COM: <s> removes all hanging instances of the timeline in the specified frame </s>
funcom_train/8334950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHidSetup(HidSetup hidSetup) { HidSetup oldHidSetup = this.hidSetup; this.hidSetup = hidSetup; features.get(HID).setDimensionality(hidSetup.getNumFeaturesUsed()); propertyChangeSupport.firePropertyChange(PROP_HIDSETUP, oldHidSetup, hidSetup); } COM: <s> set the value of hid setup </s>
funcom_train/10951681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean shippingApplies() { boolean shippingApplies = false; Iterator<ShoppingCartItem> i = this.iterator(); while (i.hasNext()) { ShoppingCartItem item = i.next(); if (item.shippingApplies()) { shippingApplies = true; break; } } return shippingApplies; } COM: <s> returns true when there are shippable items in the cart </s>
funcom_train/2447634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void nodesWereRemoved(KongaTreeNode node, int[] childIndices, Object[] removedChildren) { if (node != null && childIndices != null) { fireTreeNodesRemoved(this, getPathToRoot(node), childIndices, removedChildren); } } COM: <s> invoke this method after youve removed some tree nodes from node </s>
funcom_train/45850736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String currentWordGram(int n) { String segment = currentSegment(); StringBuffer wordGram = new StringBuffer(); if(segment==null) return null; String s[] = splitWords(segment); int j = 0; StringBuffer s2 = new StringBuffer(s[j++]); for( int k=j; k<n && k<s.length; k++) { s2.append(" "); s2.append(s[k]); } return s2.toString(); } COM: <s> returns the current word n gram from the input </s>
funcom_train/7508436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testCipherSpec() { cipherSpec = new CipherSpec( dfltECBCipher ); assertTrue( cipherSpec.getCipherTransformation().equals("AES/ECB/NoPadding") ); assertTrue( cipherSpec.getIV() == null ); cipherSpec = new CipherSpec(dfltOtherCipher); assertTrue( cipherSpec.getCipherMode().equals("OFB8") ); } COM: <s> test cipher spec </s>
funcom_train/25484835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(Writer out) throws IOException { out.write("\t\t<isaid id=\"" + getID() + "\" posX=\"" + getX() + "\" posY=\"" + getY() + "\"></isaid>\n"); } COM: <s> writes the xml rule for this isa relationship to the write buffer </s>
funcom_train/18497416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addActor(Actor add) { List<Actor> list = null; Team team = add.getTeam(); if(team == Team.Player) { list = playerList; } else if(team == Team.Enemy) { list = enemyList; } else if(team == Team.Neutral) { list = neutralList; } else { throw new IllegalStateException("Actor with unknown type: " + add + ", " + team); } addActor(add, list); } COM: <s> add an object to the hit detection system </s>
funcom_train/37564817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(PageInstruction that) { this.opcode = that.opcode; if (this.page == null) { this.page = new Page(); } this.page.set(that.page); if (this.link == null) { this.link = new Link(); } this.hasLink = that.hasLink; if (this.hasLink) { this.link.set(that.link); } } COM: <s> init from another page instruction object </s>
funcom_train/648467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFileChooser getFchFolders() { if (fchFolders == null) { fchFolders = new JFileChooser(); fchFolders.setFileSelectionMode(javax.swing.JFileChooser.FILES_AND_DIRECTORIES); fchFolders.setDialogTitle("Select Files or Folders to Backup"); fchFolders.setApproveButtonText("Select Folder or File"); fchFolders.setMultiSelectionEnabled(true); fchFolders.setFileHidingEnabled(false); } return fchFolders; } COM: <s> this method initializes j file chooser folders </s>
funcom_train/12308079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void group(List entries) { if (fMemento.getInteger(P_GROUP_BY).intValue() == GROUP_BY_NONE) { elements.addAll(entries); } else { for (Iterator i = entries.iterator(); i.hasNext();) { LogEntry entry = (LogEntry) i.next(); Group group = getGroup(entry); group.addChild(entry); } } } COM: <s> add new entries to correct groups in the view </s>
funcom_train/9469621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeValue(String name) { if (name == null) { throw new IllegalArgumentException("Parameter is null"); } Object old = values.remove(name, AccessController.getContext()); if (old instanceof SSLSessionBindingListener) { SSLSessionBindingListener listener = (SSLSessionBindingListener) old; listener.valueUnbound(new SSLSessionBindingEvent(this, name)); } } COM: <s> removes a link name with the specified value object of the ssl </s>
funcom_train/2422747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static final ServerInformationStore EMPTY = new ServerInformationStore() { @Override public List<KnownServer> getRegisteredServers() { return Collections.emptyList(); } @Override public boolean removeServerRegistration(ServerGuid serverId) { return false; } @Override public void storeNewLogin(ServerInfo serverInfo, String user, String password, boolean https) { // Does nothing } }; COM: <s> defines a permanently empty code server information store code </s>