__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/37421422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean getAliasKey(StringBuffer aliasKey) { String aliasKeyAttr = mCurElement.getAttrValue(ALIAS_KEY_ATTR_NAME); if (! aliasKeyAttr.equals("")) { // Ensure string length not zero. aliasKey.replace(0, aliasKey.length(), aliasKeyAttr); return true; } else { // #ifdef _DEBUG // logSyntaxWarningMessage(); // #endif return false; } } COM: <s> returns the alias key </s>
funcom_train/25734145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void storeHMapInfos() throws IOException { /** add key mode information at last byte */ byte[] k = KEYMODE_REGISTER_INDEX_BYTES; byte[] v = keyingModeSerializer.serialize(mode); hFileWriter.append(k, v); /** add key to index map */ if (mode == KeyingMode.MAPPED_LIST) { k = KEY2INDEX_REGISTER_INDEX_BYTES; v = str2strbSerializer.serialize(key2indicesMap); hFileWriter.append(k, v); key2indicesMap.clear(); } } COM: <s> store informations about the mode of keying and the access to the mapping </s>
funcom_train/50156920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getSelectInput() { // prtln ("getSelectInput() with " + xpath); Element input = df.createElement("html__select") .addAttribute("name", formBeanName) .addAttribute("property", "valueOf(" + xpath + ")"); Element options = input.addElement("html__optionsCollection") .addAttribute("property", "selectOptions(" + normalizedXPath + ")"); return input; } COM: <s> gets the select input attribute of the simple jsp renderer object </s>
funcom_train/21483517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTraversalUsingMBeanServer() throws JMException { //Test CacheManager //not all attributes are accessible due to serializability constraints traverseMBeanAttributesUsingMBeanServer("CacheManager"); //Test Cache //not all attributes are accessible due to serializability constraints traverseMBeanAttributesUsingMBeanServer("Cache"); //Test CacheStatistics traverseMBeanAttributesUsingMBeanServer("CacheStatistics"); //Test CacheConfiguration traverseMBeanAttributesUsingMBeanServer("CacheConfiguration"); } COM: <s> shows that all mbeans are fully traversable locally </s>
funcom_train/23057214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getNewProjectorNamejTextField() { if (NewProjectorNamejTextField == null) { NewProjectorNamejTextField = new JTextField(); NewProjectorNamejTextField.setColumns(100); NewProjectorNamejTextField.setPreferredSize(new Dimension(200, 20)); NewProjectorNamejTextField.setText(""); NewProjectorNamejTextField.setName(""); NewProjectorNamejTextField.setHorizontalAlignment(JTextField.LEFT); NewProjectorNamejTextField.setComponentOrientation(ComponentOrientation.UNKNOWN); } return NewProjectorNamejTextField; } COM: <s> this method initializes new projector namej text field </s>
funcom_train/651968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { IStyleSheet styleSheet = getStyleSheet(); if (styleSheet != null) { TreeViewer viewer = getTreeViewer(); if (viewer != null) { Control control = viewer.getControl(); if ((control != null) && !control.isDisposed()) { control.setRedraw(false); viewer.setInput(styleSheet); viewer.expandAll(); control.setRedraw(true); } } } } COM: <s> updates the outline page </s>
funcom_train/10601149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testXSLTTransformation() throws Exception { this.loadXmlPage("/cocoon-it/xslt/main"); assertTrue(this.response.getStatusCode() == 200); assertEquals("text/xml", this.response.getContentType()); assertXPath("/xslt/servlet", "servlet"); assertXPath("/xslt/file", "file"); } COM: <s> use an xslt that includes sub stylesheets using the file and the servlet </s>
funcom_train/16913188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String toString(double[] point) { StringBuilder builder = new StringBuilder(); for (int i = 0; i < point.length; i++) { builder.append(point[i]); if (i < point.length - 1) builder.append(", "); } return builder.toString(); } COM: <s> pretty prints the point </s>
funcom_train/48021217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveOrUpdate(T obj) throws DataAccessLayerException { LOGGER.info(String.format(JavaConstants.RESOURCE_BUNDLE_MODEL_DEBUG .getString("AbstractDao.saveBegin"), obj.getClass(), obj)); //$NON-NLS-1$ try { startOperation(); this.session.saveOrUpdate(obj); this.tx.commit(); } catch (HibernateException e) { handleException(e); } finally { HibernateFactory.close(this.session); } LOGGER.info(String.format(JavaConstants.RESOURCE_BUNDLE_MODEL_DEBUG .getString("AbstractDao.saveEnd"), obj.getClass(), obj)); //$NON-NLS-1$ } COM: <s> save or update an object to database </s>
funcom_train/15620783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDataMode() throws M4CompilerError { Value dataModeV = (Value) this.getSingleParameter("DataMode"); if (dataModeV == null || dataModeV.getValue() == null) { return DATAMODE_DEFAULT; } else { String dataModeS = dataModeV.getValue(); if (dataModeS.equalsIgnoreCase(DATAMODE_BAG)) { return DATAMODE_BAG; } else return DATAMODE_SET; } } COM: <s> getter for the parameter quot data mode quot </s>
funcom_train/46760958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CensusModel getCensus(final long censusId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return PatientData.getCensus(censusId, chain, call); }}; return (CensusModel) call(method, call); } COM: <s> same transaction return the single census model for the primary key </s>
funcom_train/16543871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearAnimation() { if (!this.model.isSaved()) { if (JOptionPane .showConfirmDialog( this.view, Messages.getString("GraphView.0"), Messages.getString("GraphView.1"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE) != JOptionPane.YES_OPTION) //$NON-NLS-1$ //$NON-NLS-2$ { return; } } this.model.clear(); this.currentIndex = 0; } COM: <s> clears model and animation </s>
funcom_train/9886050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConnected(boolean connected, Boss boss) { this.isConnected = connected; gaggleBoss = boss; if(isConnected) { try { } catch (NullPointerException npe) { //Suppress exception if menubar doesn't exist. } } else { myGaggleName = GaggleConstants.ORIGINAL_GAGGLE_NAME; } listener.onUpdateConnected(connected); } COM: <s> this method is for the gaggle connection listener implementation </s>
funcom_train/19307964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private char createNode() { if (this.freenode >= Character.MAX_VALUE) { throw new IllegalStateException("Node capacity of " + this.getClass().getName() + " is limited to " + Character.MAX_VALUE); } final char newNode = this.freenode; this.freenode ++; return newNode; } COM: <s> allocates an index for a new node after first checking for an overflow </s>
funcom_train/29419327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void nodeNumbering() { // this is the default for the viz anyways // final AlloyModel model = vizState.getCurrentModel(); // for (final AlloyType t : model.getTypes()) { // if (enumerationTypes.contains(t) || singletonTypes.contains(t)) { // vizState.number(t, false); // } // } } COM: <s> syntactic visual should nodes of a given type be numbered </s>
funcom_train/32191411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ZSaveIndividual saveIndividual(ZSaveIndividual individual) throws Exception { ZJenaConnection connection = null; try { connection = (ZJenaConnection) connectionPool.borrowObject(); individual = individualDAO.save(individual, connection); indexerJobManager.addAction(individual.getID(), IndexerJobManager.ACTION_INSERT); return individual; } finally { if (connection != null) { connectionPool.returnObject(connection); } } } COM: <s> creates or updates an individual in the ontology </s>
funcom_train/23281053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean conditionExists(List content, String condition) { if(content == null) return false; StringTokenizer st = new StringTokenizer((String)content.get(0),";"); while(st.hasMoreTokens()) { if(st.nextToken().equals(condition)) return true; } return false; } COM: <s> tests whether the given condition exists in the attributes complex </s>
funcom_train/21612551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createTag(boolean close, boolean inline, boolean flush) { String buffer = flush ? flushBuffer() : getBuffer(); if (close) { if (inline) { notifyWordReader("<" + buffer + "/>"); } else { notifyWordReader("</" + buffer + ">"); } } else { notifyWordReader("<" + buffer + ">"); } } COM: <s> flushes the content of the buffer as a tag </s>
funcom_train/15828266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String sendCommand(String command) { XULPacket packet = new XULPacket(command); XULPacket response = null; try { this.out.writePacket(packet); response = this.in.readPacket(); } catch (IOException e) { XULThinlet.log.error("Error sending command [" + command + "] to application", e); } return (response == null) ? "" : response.getBody(); } COM: <s> sends the given string to the application and returns the result </s>
funcom_train/36231021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rotate(RotationMatrix rot) { if (rot == null) { return; } setOri(rotatePoint(rot, getOri())); setExt1(rotatePoint(rot, getExt1())); setExt2(rotatePoint(rot, getExt2())); setAxis(rotatePoint(rot, getAxis()).normer()); defineTransformation(); } COM: <s> rotation of the primitive using the input rotation matrix </s>
funcom_train/31909400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseDragged(MouseEvent e) { JGVTComponent c = (JGVTComponent)e.getSource(); xCurrent = e.getX(); yCurrent = e.getY(); AffineTransform at = AffineTransform.getTranslateInstance(xCurrent - xStart, yCurrent - yStart); c.setPaintingTransform(at); } COM: <s> invoked when a mouse button is pressed on a component and then </s>
funcom_train/19837731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int digitLength() { int bitLength = this.bitLength(); int min = (int) (bitLength * BITS_TO_DIGITS) + 1; int max = (int) ((bitLength + 1) * BITS_TO_DIGITS) + 1; if (min == max) return min; return (LargeInteger.ONE.times10pow(min + 1).isLargerThan(this)) ? min : min + 1; } COM: <s> returns the minimal number of decimal digits necessary to represent </s>
funcom_train/44770793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer(); // name sb.append(name.toString()); // index int index = getIndex(); if (index > 0) { sb.append('['); sb.append(index); sb.append(']'); } return sb.toString(); } COM: <s> returns a string representation of this path element </s>
funcom_train/17401828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public ParseException generateParseException() { Token errortok = token.next; int line = errortok.beginLine, column = errortok.beginColumn; String mess = (errortok.kind == 0) ? tokenImage[0] : errortok.image; return new ParseException("Parse error at line " + line + ", column " + column + ". Encountered: " + mess); } COM: <s> generate parse exception </s>
funcom_train/23934465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize() throws Exception { logger.info("initialize"); //resources = context.getResources(TableComponent.class); for (Iterator<TableComponentExtension> it = extensionList.iterator(); it.hasNext();) ((TableComponentExtension) it.next()).initialize( this); columnAxisBuilder.initialize(this); rowAxisBuilder.initialize( this); cellBuilder.initialize( this); cornerBuilder.initialize( this); slicerBuilder.initialize( this); //logger.info("leave"); } COM: <s> deferred ctor called once by the creating tag </s>
funcom_train/7844320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeFile(File file){ FileOutputStream fos; DataOutputStream dos; String str = null; try { fos = new FileOutputStream(file); dos=new DataOutputStream(fos); for(int i =0; i<results.length; i++) dos.writeChars(i+1 + ". " + results[i].toString()); } catch (IOException e) { e.printStackTrace(); } } COM: <s> method to create and write to a file </s>
funcom_train/14302549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testScreenBufferWriteHasCorrectCursorPosition() { String testData = "0123456789"; screenBuffer.write(testData); assertCursorPosition(screenBuffer.getCursorPosition(), testData .length(), 0); StringBuffer currentLineBuffer = screenBuffer.getCurrentLineBuffer(); assertEquals("Current line buffer does not contain written data.", testData, currentLineBuffer.toString()); } COM: <s> test that after writing to the screen buffer the cursor position is </s>
funcom_train/570782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBackgroundForRow( int row, Color color ) { for ( int i = 0; i < tabMdl.getColumnCount( ); i++ ) { StringBuffer sb = new StringBuffer( ); sb.append( row ); sb.append( "-" ); sb.append( i ); cellColors.put( sb.toString( ), color ); } } COM: <s> change the row background </s>
funcom_train/14655116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Transformation getTransformation(String name) { Iterator iter = transformationIterator(); while (iter.hasNext()) { Transformation trans = (Transformation) iter.next(); String name2 = trans.getAttribute("name").getValue(); if (name2.equals(name)) { return trans; } } return null; } COM: <s> tries to find a transformation by name </s>
funcom_train/37071421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getAttribute(String attribute) throws SQLException { String query = "select " + attribute + " from pub_article " + " where id = ? "; PreparedStatement stmt = conn.prepareStatement(query); try { stmt.setString(1, article_id); ResultSet rs = stmt.executeQuery(); if (rs.next()) { return rs.getString(1); } return null; } finally { stmt.close(); } } COM: <s> given a primary key and the column name returns the value </s>
funcom_train/50497377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Filter getLaunchConfigurationFilter() { Filter filter = null; ILaunchConfiguration launchConfig = getLaunchConfiguration(); if (launchConfig != null) { // Get the filter value from the launch configuration try { Map defaultMap = (new Filter()).toMap(); Map filterMap = launchConfig.getAttribute( ProfilingLaunchSupport.ATTR_PROFILER_FILTER, defaultMap); filter = new Filter(filterMap); } catch (CoreException e) { ProfilerLog.log( ProfilerLog.WARNING, "getLaunchConfiguration", e); } } return filter; } COM: <s> get the filter settings from the launch configuration for </s>
funcom_train/124345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Book makeBook() { if (pageFormat == null) { PrinterJob printJob = PrinterJob.getPrinterJob(); pageFormat = printJob.defaultPage(); } Book book = new Book(); book.append(resultTextArea, pageFormat, resultTextArea .getPageCount(pageFormat)); return book; } COM: <s> printing support method to enable multi page printing </s>
funcom_train/31626064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Wizard buildWizard() throws WizardException { try { WizDefinition wizard = this.getWizDefinition(); BranchList steps = constuctCompletionSteps(); Wizard wiz = constructWizard(wizard, steps); return wiz; } catch (DBException ex) { throw new WizardException("Error building wizard: " + this.getWizardId(), ex); } } COM: <s> constructs a new wizard instance and returns it </s>
funcom_train/39294030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRepTitlePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RepresentativeType_repTitle_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RepresentativeType_repTitle_feature", "_UI_RepresentativeType_type"), CntPackage.Literals.REPRESENTATIVE_TYPE__REP_TITLE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the rep title feature </s>
funcom_train/17047725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T next() { T result = this.record; if (result != null) { try { this.record = readNextRecord(); } catch (IOException e) { throw new IllegalStateException("Can't read next record from '" + file + "'!", e); } } // else, already reached end of stream return result; } COM: <s> get the next record and increment </s>
funcom_train/23284757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeTransportSettings(String newTransportSettings) throws IOException, UPNPResponseException { ActionMessage message = messageFactory.getMessage("ChangeTransportSettings"); message.setInputParameter("InstanceID", 0); message.setInputParameter("NewTransportSettings", newTransportSettings); message.service(); } COM: <s> changes transport settings to the settings provided </s>
funcom_train/35099679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeMessageListener( MessageListener listener ) { if ( this.messageListenerDequeue.contains(listener) ) this.messageListenerDequeue.remove(listener); else { throw new NoSuchElementException("Listener that you want to remove can't be found in current message listener dequeue."); } if ( canDebug ) { this.logger.debug("MessageContainer removes a message listener [" + listener + "]"); } } COM: <s> removes a listener for message </s>
funcom_train/24302825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Report createReport(String reportObjectiveAsXml) { accessChecker.checkIsLoggedInUserMemberOfGroup(ProjectForgeGroup.FINANCE_GROUP, ProjectForgeGroup.CONTROLLING_GROUP); ReportObjective reportObjective = deserializeFromXML(reportObjectiveAsXml); Report report = new Report(reportObjective); return report; } COM: <s> only for test cases </s>
funcom_train/50327020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void restartTimer(int delay) { if (timer==null) { timer = new javax.swing.Timer(delay, new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { timeout(); } }); } timer.stop(); timer.setInitialDelay(delay); timer.setRepeats(false); timer.start(); } COM: <s> internal routine to handle timer starts restarts </s>
funcom_train/1484795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createActionList() { View view; String title; Drawable icon; OnClickListener listener; int index = 1; for (int i = 0; i < actionList.size(); i++) { title = actionList.get(i).getTitle(); icon = actionList.get(i).getIcon(); listener = actionList.get(i).getListener(); view = getActionItem(title, icon, listener); view.setFocusable(true); view.setClickable(true); mTrack.addView(view, index); index++; } } COM: <s> create action list </s>
funcom_train/25390269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getVolumeChangeChannel(MidiMessage message) { if (message.getLength() >= 3) { byte[] mBytes = message.getMessage(); if ((byte) 0xb0 <= mBytes[0] && mBytes[0] < (byte) 0xc0 && mBytes[1] == 7) { return mBytes[0] & 15; } } return -1; } COM: <s> determine if the given message is a channel volume change </s>
funcom_train/33686336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IMinimaxNode retrieveMinValue() { IMinimaxNode currentMinNode = root; float currentMinVal = root.getValue(); List<IMinimaxNode> allDescendants = root.getAllDescendants(); for(int i = 0; i < allDescendants.size(); i++){ if(allDescendants.get(i).getValue() < currentMinVal){ currentMinNode = allDescendants.get(i); currentMinVal = allDescendants.get(i).getValue(); } } return currentMinNode; } COM: <s> returns min valued node of tree </s>
funcom_train/823273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void convert() throws Exception { logInfo("Launching awt viewer.."); String[] options = new String[5]; options[0] = "-xml"; options[1] = inputFile; options[2] = "-xsl"; options[3] = getXSLForKey(XSL, XML2AWT); // remove file:/ from the path. its not required options[3] = options[3].substring(5, options[3].length()); options[4] = "-awt"; org.apache.fop.apps.Fop.main(options); } COM: <s> main method which does the conversion </s>
funcom_train/8193916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { // start thread if (e.getSource() == startButton && !started) { delay = 500; try { delay = Integer.parseInt(delayField.getText().trim()); } catch (NumberFormatException ex) { delay = 500; delayField.setText("500"); } scrollThread = new Thread(this); started = true; scrollThread.start(); } // stop thread else if (e.getSource() == stopButton && started) { started = false; scrollThread = null; } } COM: <s> starts or stops the data scrolling </s>
funcom_train/14515866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createAllNew() throws Exception { log.trace(">createAllNew"); String iMsg = intres.getLocalizedMessage("batch.generatingallstatus", "NEW"); log.info(iMsg); createAllWithStatus(UserDataConstants.STATUS_NEW); log.trace("<createAllNew"); } // createAllNew COM: <s> creates p12 files for all users with status new in the local database </s>
funcom_train/1316815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StaticPacketBuilder addInt(int val) { ensureCapacity(curLength + 4); addByte((byte) (val >> 24), false); addByte((byte) (val >> 16), false); addByte((byte) (val >> 8), false); addByte((byte) val, false); return this; } COM: <s> adds a code int code to the data stream </s>
funcom_train/13439587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doNewAddressLine(int addrPos, int addrLine) { JTextField tfNew = createTextField("", false, 1); ArrayList lines = (ArrayList)fieldList.get(addrPos); lines.add(addrLine+1, tfNew); saveContent(); loadContent(); setCursorPosition(addrPos, addrLine+1); } COM: <s> adds an address line </s>
funcom_train/19035828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replacePostWatches(PostWatchCollection watchedPosts) { if(isConnected()) { try { synchronized(this) { this.getOutputStream().writeInt(ServerMessageCode.REPLACEPOSTWATCHES.getIndex()); watchedPosts.sendData(this.getOutputStream()); this.getOutputStream().flush(); } } catch (IOException e) { this.messageFailed(e); } } } COM: <s> replaces all of the post watches with the provided collection </s>
funcom_train/44287938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getFileName(Map<String, String> headers) { String fileName = null; String cd = getHeader(headers, CONTENT_DISPOSITION); if (cd.startsWith(FORM_DATA) || cd.startsWith(ATTACHMENT)) { int start = cd.indexOf("filename=\""); int end = cd.indexOf('"', start + FILENAME_HEADER_PREFIX_SIZE); if (start != -1 && end != -1) { fileName = cd.substring(start + FILENAME_HEADER_PREFIX_SIZE, end).trim(); } } return fileName; } COM: <s> retrieves the file name from the code content disposition code header </s>
funcom_train/17362329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rearangeComponents(){ pnlButtons.setLocation(pnlButtons.getLocation().x, getHeight() - pnlButtons.getHeight() - 5); pnlButtons.setSize(getWidth() - 10, pnlButtons.getHeight()); spnpList.setSize(getWidth() - 20, getHeight() - 65); setVisible(false); setVisible(true); } COM: <s> rearanges components on a playlist after it is </s>
funcom_train/14328168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean check_class_link(final Statement sStatement, final String class1, final String link, final String class2) { try { sStatement.execute("SELECT * FROM " + class1 + "_" + link + "_" + class2); } catch (SQLException e) { return false; } return true; } COM: <s> return true if the classes link exists </s>
funcom_train/40463297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Spacer getSpacer() { if (spacer == null) {//GEN-END:|29-getter|0|29-preInit // write pre-init user code here spacer = new Spacer(16, 1);//GEN-LINE:|29-getter|1|29-postInit // write post-init user code here }//GEN-BEGIN:|29-getter|2| return spacer; } COM: <s> returns an initiliazed instance of spacer component </s>
funcom_train/32751349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MenuListener getMenuHandlerForMenuKey( final String menuKey ) { final String menuHandlerKey = getItemFieldProperty( menuKey, "handler" ); try { return menuHandlerKey != null ? (MenuListener)_commands.get( menuHandlerKey ) : null; } catch ( ClassCastException exception ) { System.err.println( "Excepting casting menu handler item to MenuListener for key: " + menuHandlerKey ); return null; } } COM: <s> get the menu handler for the menu key if one has been assigned </s>
funcom_train/3990271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPrzepuklinaPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BadanieOkresowe_przepuklina_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_przepuklina_feature", "_UI_BadanieOkresowe_type"), PrzychodniaPackage.Literals.BADANIE_OKRESOWE__PRZEPUKLINA, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the przepuklina feature </s>
funcom_train/9234839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(final Object target) { if (type.equals(((ConfigTarget) target).getType())) { return ((ConfigTarget) target).getOrder() - order; } else { return type.compareTo(((ConfigTarget) target).getType()); } } COM: <s> compares this target to another to determine which is more specific </s>
funcom_train/7867189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMs_lims_identification_id_selected(ArrayList<Long> aIdentificationId) { ImportPanel anImport = ImportPanel_Ms_Lims_IdentificationIDList.getInstance(); ((ImportPanel_Ms_Lims_IdentificationIDList) anImport).setIdentificationIDs(aIdentificationId); jpanSource.setSelectedIterator(anImport); } COM: <s> set the combobox selection to ms lims enter the list with identification ids </s>
funcom_train/2903999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initMenu(){ StringBuffer sb = new StringBuffer(256); sb = sb.append(ZLocater.getDefaultWorkspacePropertyPath()).append(File.separator); sb = sb.append("menu").append(File.separator).append("default-switcher-menu.xml"); try{ FileInputStream fis = new FileInputStream(sb.toString()); popup = new ZPopupMenu(XMLHandler.parseXML((InputStream)fis), this); fis.close(); } catch(Exception e){ new JXError(getClass(), "Error restoring the popup menu properties", e.getStackTrace()); } } COM: <s> restore system switcher menu property values </s>
funcom_train/46981098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteNamespace(MNamespace elem) { List ownedElements = new ArrayList(); ownedElements.addAll(elem.getOwnedElements()); Iterator it = ownedElements.iterator(); while (it.hasNext()) { UmlFactory.getFactory().delete((MModelElement)it.next()); } } COM: <s> a namespace deletes its owned elements </s>
funcom_train/47160454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws IOException { for (Entry<String, ArrayList<String[]>> e : facts.entrySet()) { ArrayList<String[]> arrList = e.getValue(); for (String[] f : arrList) { super.writeFact(e.getKey(), f); } } super.close(); } COM: <s> flushes prolog facts to the data sink in sorted way and closes the </s>
funcom_train/17053514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand1() { if (okCommand1 == null) {//GEN-END:|42-getter|0|42-preInit // write pre-init user code here okCommand1 = new Command("OK", Command.OK, 0);//GEN-LINE:|42-getter|1|42-postInit // write post-init user code here }//GEN-BEGIN:|42-getter|2| return okCommand1; } COM: <s> returns an initiliazed instance of ok command1 component </s>
funcom_train/3986944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Page getLinkedPage (Enumeration e, String url) { while(e.hasMoreElements()) { Page page = (Page)e.nextElement(); if(page.getTarget()!=null && page.getTarget().equals(url)) { return page; } Page p = getLinkedPage(page.children(), url); if(p!=null) return p; } return null; } COM: <s> return the page with the specify url </s>
funcom_train/3791429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsMapUnit(MapUnit mu) { int ydiff = mu.getY()-_ref.getY(); int xdiff = mu.getX()-_ref.getX(); if ( xdiff > _maxWidth || xdiff < 0) return false; if ( ydiff > _maxHeight || ydiff < 0) return false; return true; } COM: <s> returns true if the path place contains the map unit given in argument </s>
funcom_train/32769949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMenuItemCircle() { if (menuItemCircle == null) { menuItemCircle = new JMenuItem(); menuItemCircle.setText(OpenJCADLanguage.getString("_circle_")); // Generated menuItemCircle.addActionListener(new OpenJCADDraw2DCircleAction(this.tabbedPane)); } return menuItemCircle; } COM: <s> this method initializes menu item circle </s>
funcom_train/17209367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getHelpMenuItem() { if (helpMenuItem == null) { helpMenuItem = new JMenuItem("Help", KeyEvent.VK_H); helpMenuItem.setAccelerator(KeyStroke.getKeyStroke("F1")); helpMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { Help help = new Help(thisClass); help.setLocationRelativeTo(content); help.setVisible(true); draw(); } }); } return helpMenuItem; } COM: <s> this method initializes help menu item </s>
funcom_train/36884000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printExitMessage() { StringBuilder builder = new StringBuilder(messages.getText()); builder.append("\n"); builder.append(session.getNode().getName()); builder.append(" exit\n"); builder.append("\n"); messages.setText(builder.toString()); } COM: <s> print the distant node exit message </s>
funcom_train/24933776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(final Object object1, final Object object2) { final String firstComparisonString = ((MClassInvariant) object1).getNameAndClassAsString(); final String secondComparisonString = ((MClassInvariant) object2).getNameAndClassAsString(); return compareUtil.compareString(firstComparisonString, secondComparisonString); } COM: <s> compares two invariants by their name </s>
funcom_train/21977891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFileName(String dlgHdr) { JFileChooser chooser; String filename; File dir; int rc; chooser = new JFileChooser(); chooser.setDialogTitle(dlgHdr); chooser.setCurrentDirectory(new File(System.getProperty("userdir", ""))); rc = chooser.showOpenDialog(this); if (rc == JFileChooser.APPROVE_OPTION) { filename = chooser.getSelectedFile().getName(); dir = chooser.getCurrentDirectory(); return new String(dir + "\\" + filename); } return new String(""); } COM: <s> get a file name </s>
funcom_train/785413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDepth(int node) { if ( !getNodeTable().isValidRow(node) ) return -1; int depth = 0; for ( int i=node; i!=m_root && i>=0; ++depth, i=getParent(i) ); return depth; } COM: <s> get the depth of the given node id in the tree </s>
funcom_train/25332402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetandSetFeatureID() { System.out.println("getFeatureID"); FeatureQuery instance = new FeatureQuery(); Integer expResult = new Integer(5); Integer result = instance.getFeatureID(); assertNull(result); instance.setFeatureID(expResult); result = instance.getFeatureID(); assertEquals(result, expResult); } COM: <s> test of get feature id method of class feature query </s>
funcom_train/14094041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(final Object o) { if (!super.equals(o)) { return false; } MouseWheelEventData data = (MouseWheelEventData) o; return (data.getWheelRotation() == getWheelRotation()) && (data.getScrollAmount() == getScrollAmount()); } COM: <s> compare to event data and deterime if they are equal </s>
funcom_train/41857040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadOntology(OntologyInfo ontology, String graphId) throws Exception { String full_path = aquaUploadsDir+ "/" +ontology.getFilePath() + "/" + ontology.getFilename(); log.info("Loading: " +full_path+ " in graph; uri=" +ontology.getUri()); _loadOntology(ontology, full_path); } COM: <s> loads the given model into the graph </s>
funcom_train/32192055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String generateSPARQLModelNameFromAlias(String modelAlias) throws ZOntologyUtilsException { if (!modelAlias.equals(BASE_MODEL_NAME) && !modelAlias.equals(INFERRED_MODEL_NAME) && !aliasURLMap.containsKey(modelAlias)) { throw new ZOntologyUtilsException("\"" + modelAlias + "\" isn't the main model or any other model in the database"); } return "<" + MODEL_PREFIX + modelAlias + ">"; } COM: <s> generate a sparql model name from its alias </s>
funcom_train/14296294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ElementSet ReferenceAssociation() { if (myReferenceAssociation == null) { myReferenceAssociation = new ElementSet(Cm3RefAssociation.class); for (Iterator i = Provision().iterator(); i.hasNext();) { Dependency dep = (Dependency) i.next(); if (dep.Client() instanceof Cm3RefAssociation) { myReferenceAssociation.add(dep.Client()); } } } return myReferenceAssociation; } COM: <s> returns the value of field my reference association </s>
funcom_train/50846648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetClientInfo() throws Exception { String name = "a"; Connection conn = newConnection(); String expResult = null; String result = null; try { result = conn.getClientInfo(name); } catch (SQLException ex) { fail(ex.toString()); } assertEquals(expResult, result); } COM: <s> test of get client info method of interface java </s>
funcom_train/22050243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GenericBaseData InitIteration(BRIteratorSorted it) { GenericBaseData l_data = null; for (int i = 0; i < m_iCurrentObjects; i++) { l_data = GetElement(i); if (l_data != null) { it.addItem(l_data.getName(), i); } } return InitIteration( (BRIterator)it); } COM: <s> this function sorts the data and initialises the iterator for sorted </s>
funcom_train/28911903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void saveBaseURI() { baseURIScope.push(fDepth); baseURI.push(fCurrentBaseURI.getBaseSystemId()); literalSystemID.push(fCurrentBaseURI.getLiteralSystemId()); expandedSystemID.push(fCurrentBaseURI.getExpandedSystemId()); } COM: <s> saves the current base uri to the top of the stack </s>
funcom_train/5243282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deactivateEquipment(Equipment equipment) { equipment.setInUse(false); Enumeration keys = equipment.getAttControl().getAttTempTable().elements(); Att att = null; while (keys.hasMoreElements()) { // take all final attributes and apply them Object key = keys.nextElement(); att = (Att)key; removeAttribute(att); } } COM: <s> removes temporary attributes from equiped unit </s>
funcom_train/32649034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createBorderWidthThemeTextField() { GridData gridData10 = new GridData(); gridData10.widthHint = 30; borderWidthThemeTextField = new ThemeTextField(borderGroup, SWT.NONE); borderWidthThemeTextField.setEmbeddedInBindableGroup(false); borderWidthThemeTextField.setBindingSubPath("borderWidth"); borderWidthThemeTextField.setIntValued(true); borderWidthThemeTextField.setLayoutData(gridData10); } COM: <s> this method initializes border width theme text field </s>
funcom_train/5379935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FontData makeFontData(String value) throws MissingResourceException { try { return StringConverter.asFontData(value.trim()); } catch (DataFormatException e) { throw new MissingResourceException( "Wrong font data format. Value is: \"" + value + "\"", getClass().getName(), value); //$NON-NLS-2$//$NON-NLS-1$ } } COM: <s> converts a string into a font data object </s>
funcom_train/40767962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getHowManyVerses(int bid) { String sbid = Integer.toString(bid); String query = "SELECT Verse FROM bible where book = '" + sbid + "'"; int rsSize = 0; try { Connection connection = getConn(); Statement select = connection.createStatement(); ResultSet result = select.executeQuery(query); rsSize = getResultSetSize(result); // size the array // clean up result.close(); connection.close(); } catch (Exception e) { System.err.println("Mysql Statement Error: " + query); e.printStackTrace(); } return rsSize; } COM: <s> get how many verses are in a book </s>
funcom_train/44876133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMultiWildcard() { Pattern pattern = RegExUtil.createPathPattern("/META-INF/**"); assertTrue("Not matching multi wildcard", pattern.matcher("/META-INF/MANIFEST.MF").matches()); assertTrue("Not matching subdirectories", pattern.matcher("/META-INF/services/my.properties").matches()); } COM: <s> test that uses a double wildcard </s>
funcom_train/43911119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set addFeatures(FeatureCollection fc) throws IOException { FeatureStore store = store(); //check if the feature collection needs to be retyped if (!store.getSchema().equals(fc.getSchema())) { fc = new RetypingFeatureCollection(fc, store.getSchema()); } return store().addFeatures(fc); } COM: <s> see interface for details </s>
funcom_train/29549344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPredicate2ObjectEdgePredicateHidden(Node predicateNode, Node objectNode, String predicateUri) { Edge edge=tgPanel.addEdge(predicateNode, objectNode, Edge.DEFAULT_LENGTH); if(predicateUri!=null && !predicateUri.startsWith(MindRaiderConstants.RDF_NS)) { // non-standard predicate edge.setColor(render.getEdgeExtraColor()); } } COM: <s> create predicate to object edge when predicates are hidden </s>
funcom_train/31224066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSeaZone(int newID, String newAbbreviation, String newName, int cx, int cy) { zones.put(newID, new Zone(newID, newAbbreviation, newName, (short)0, Zone.TYPE_WATER, cx, cy)); setChanged(); notifyObservers(); } COM: <s> used by the board loader to add a sea zone to the board </s>
funcom_train/13993431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertBorder(EtchedBorder expectedBorder, String property) { JPropertyView propAView = detailView.getComponent(property); EtchedBorder componentBorder = (EtchedBorder) propAView .getComponentBorder(); assertEquals(expectedBorder.getHighlightColor(), componentBorder .getHighlightColor()); assertEquals(expectedBorder.getShadowColor(), componentBorder .getShadowColor()); } COM: <s> asserts that the border of the component rendering code property code </s>
funcom_train/3102874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleRemoveEntry(final BoundedCacheEntry entry, final boolean shuffle) { Assertion.valid(entry); final BoundedCacheEntry previous= entry.predecessor; final BoundedCacheEntry next= entry.successor; if (!shuffle) { fTable.remove(entry.entryKey); fSpace-= entry.entrySpace; handleDeleteEntry(entry); } if (previous == null) { fHead= next; } else { previous.successor= next; } if (next == null) { fTail= previous; } else { next.predecessor= previous; } } COM: <s> handles the remove event </s>
funcom_train/31985420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Entity pred(Entity e) { if (e==null) { sendWarning ( "Can not find predecessor of Entity in Queue!", "Queue : " +getName()+" Method: Entity pred(Entity e)", "The Entity -e- given as parameter is a null reference!", "Check to always have valid references when querying for Entities"); return null; // no proper parameter } return ql.pred(e); } COM: <s> returns the entity enqueued directly before the given entity in the </s>
funcom_train/26313577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendLoadGame(int connId, String sFile) { String sFinalFile = sFile; if (!sFinalFile.endsWith(".sav")) { sFinalFile = sFile + ".sav"; } send(connId, new Packet(Packet.COMMAND_LOAD_SAVEGAME, new Object[] { sFinalFile })); } COM: <s> send a packet to the connection tells it load a locally saved game </s>
funcom_train/37763946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long getOftenHours() { Recurrence r = ((TaskMaintenanceComponent) getComponent()).getRecurrence(); Integer oftenHours = r != null && r instanceof Recurrence.Often ? ((Recurrence.Often) r).getHours() : null; return oftenHours != null ? new Long(oftenHours) : null; } COM: <s> getter for property often hours </s>
funcom_train/10913255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean breakBeforeServed(LayoutContext context, List<ListElement> elements) { if (!breakBeforeServed) { breakBeforeServed = true; if (!context.suppressBreakBefore()) { if (addKnuthElementsForBreakBefore(elements, context)) { return false; } } } return breakBeforeServed; } COM: <s> check whether there is a break before condition </s>
funcom_train/45916159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doStartResearch() { ResearchTech rt = gameWorld.player.selectedTech; if (rt == null) { return; } ResearchProgress rp = gameWorld.player.researchProgresses.get(rt); if (rp == null) { rp = new ResearchProgress(); rp.research = rt; rp.moneyRemaining = rt.maxCost; rp.allocatedRemainingMoney = rt.maxCost * 6 / 10; gameWorld.player.researchProgresses.put(rt, rp); } gameWorld.player.activeResearch = rp; repaint(); } COM: <s> start continue researching the current item </s>
funcom_train/51765744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt(Object value, int row, int col) { ///////not implemented!!! // get the array for the proper row Object o[] = (Object[]) data.elementAt(row); // replace the boolean object that changed o[col] = value; fireTableCellUpdated(row,col); } COM: <s> sets the value in our data model </s>
funcom_train/608063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getNailStats() { Map result = new java.util.TreeMap(); synchronized(allNailStats) { for (Iterator i = allNailStats.keySet().iterator(); i.hasNext();) { Class nailclass = (Class) i.next(); result.put(nailclass.getName(), ((NailStats) allNailStats.get(nailclass)).clone()); } } return (result); } COM: <s> returns a snapshot of this ngservers nail statistics </s>
funcom_train/31036191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Object o1, Object o2) { int tag1 = ((DerValue)o1).getTag(); int tag2 = ((DerValue)o2).getTag(); int diff = Tags.getTagClass(tag1) - Tags.getTagClass(tag2); if (diff != 0) return diff; else return Tags.getTagNumber(tag1) - Tags.getTagNumber(tag2); } COM: <s> compares the tags of two specified code der value code instances </s>
funcom_train/35723734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CtClass getMethodReturnType(CtMethod ctMethod) { try { return ctMethod.getReturnType(); } catch (NotFoundException e) { throw new KtrI18NException( "Getting the return type of the method failed(methodName=" + ctMethod.getName() + ").", e); } } COM: <s> gets the return type class definition from the method definition </s>
funcom_train/1111918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createEditDialog(Object cell) { Dimension editorSize = editingComponent.getPreferredSize(); editDialog = new JFrame("Edit " + graph.convertValueToString(cell)); editDialog.setSize(editorSize.width, editorSize.height); editDialog.getContentPane().add(editingComponent); editingComponent.validate(); editDialog.pack(); editDialog.setVisible(true); // Invokes complete editing when the window is closing editDialog.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { completeEditing(); } }); } COM: <s> create the dialog using the cells editing component </s>
funcom_train/13996064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintBackground(Graphics g, Dimension componentSize) { // gray area g.setColor(SystemColor.control); g.fillRect( 0, 0, GRAY_BACKGROUND_WIDTH, componentSize.height); // white area g.setColor(SystemColor.controlLtHighlight); g.fillRect( GRAY_BACKGROUND_WIDTH, 0, componentSize.width - GRAY_BACKGROUND_WIDTH, componentSize.height); } COM: <s> paints the menu background </s>
funcom_train/17094236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "[PenEvent " + type + " pt: " + Debug.num(pt) + " prevPt: " + Debug.num(ptPrevious) + " flowPt: " + Debug.num(ptFlow) + " fsPhase: " + Debug.num(fsPhase) + "]"; } COM: <s> returns a nicely formatted debugging string </s>
funcom_train/26546417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMyNick (String nick) { // set my nick with spaces turned into + myNick = nick.replace (' ', '+'); // take away all cgi script stuff from nickname int ampersandIndex = myNick.indexOf ('&'); if (ampersandIndex != -1) { myNick = myNick.substring (0, ampersandIndex); } } COM: <s> sets the chat managers nickname </s>
funcom_train/37588585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeRegion(final R region, Lambda<R,Object> cmd) { cmd.value(region); // notify _lock.startRead(); try { for (RegionManagerListener<R> l: _listeners) { l.regionChanged(region); } } finally { _lock.endRead(); } } COM: <s> apply the given command to the specified region to change it </s>