__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/48397526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeWeight(int neuronNumber,double[] vector, int iteration){ TreeMap neighboorhood = topology.getNeighbourhood(neuronNumber); Iterator it = neighboorhood.keySet().iterator(); int neuronNr; while(it.hasNext()){ neuronNr = (Integer)it.next(); changeNeuronWeight(neuronNr,vector,iteration,(Integer)neighboorhood.get(neuronNr)); } } COM: <s> change specified neuron weight </s>
funcom_train/32867388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUnavailable() { Container c = available.getParent(); if( c != null ) { unavailable.setBackground(available.getBackground()); c.remove(available); c.add(unavailable,"North"); unavailable.setVisible(true); wrapper.repaint(); wrapper.validate(); } setEnabled(false); } COM: <s> roster list to reflect unavailable status </s>
funcom_train/26489719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireUserLogoutEvent(UserLogoutEvent e) { Iterator iter = userLogoutListenerList.iterator(); while ( iter.hasNext() ) { try { ((UserLogoutListener)iter.next()).onUserLogout(e); } catch ( Throwable ex ) { log.println(Log.ERROR, "Failed to dispatch UserLogoutEvent!", ex); } } } COM: <s> fire a user logout event notifies all registered listeners that a user </s>
funcom_train/47395687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDouble(String name, double def) { String v = getProperty(name, null); if ( v != null ) { try { return Double.valueOf(v).doubleValue(); } catch (NumberFormatException ex) { Messages.warn(0, BPR04_ + def, name); } } else { Messages.warn(0, BPR04_ + def, name); } return def; } COM: <s> get this property value as a double </s>
funcom_train/44711014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Component buildUserBrowsePanel() { String headers[] = new String[] { "ID", "Name", "Screen Name", "Email" }; Table table = new Table(new UserTableModelBuilder(), headers); table.setClassAttr("AlternateTable"); table.setDefaultCellRenderer(this); table.addTableActionListener(this); return addSegment(BROWSE_USER_PANEL_HEADER, table); } COM: <s> build the browse user panel </s>
funcom_train/1539325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doPutToMap(ExpVector e, C c) { if ( false && debug ) { C a = val.get( e ); if ( a != null ) { logger.info("map entry exists " + e + " to " + a + " new " + c ); } } if ( ! c.isZERO() ) { val.put(e,c); } } COM: <s> put an exp vector to coefficient entry into the internal map </s>
funcom_train/32057891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetEnableTooltips() { System.out.println("testSetEnableTooltips"); GPGraphpad pad = new GPGraphpad(); GPGraph graph = new GPGraph(); GraphUndoManager undo = new GraphUndoManager(); GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo); try { newDoc.setEnableTooltips(false); } catch (Exception e) { fail(); } } COM: <s> test of set enable tooltips method of class gpdocument </s>
funcom_train/16380636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCorrectionTemplateImagePropertyDescriptor(Object object) { itemPropertyDescriptors.add (new UnsettablePropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ImagesType_correctionTemplateImage_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ImagesType_correctionTemplateImage_feature", "_UI_ImagesType_type"), CTEPackage.Literals.IMAGES_TYPE__CORRECTION_TEMPLATE_IMAGE, true, true, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the correction template image feature </s>
funcom_train/44658474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PageComponent createPageComponent(PageComponentDescriptor descriptor) { PageComponent pageComponent = descriptor.createPageComponent(); pageComponent.setContext(new DefaultViewContext(this, createPageComponentPane(pageComponent))); if (pageComponent instanceof ApplicationListener && getApplicationEventMulticaster() != null) { getApplicationEventMulticaster().addApplicationListener((ApplicationListener) pageComponent); } return pageComponent; } COM: <s> creates a page component for the given page component descriptor </s>
funcom_train/19378940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insert( int index, String num ) { if( strings[index] == num ) return; else { if( string_count == strings.length ) strings = (String[]) Array.grow( strings, growth_rate ); System.arraycopy( strings, index, strings, index+1, string_count-index ); strings[index] = num; string_count++; } } COM: <s> inserts the string passed to the array at the index passed </s>
funcom_train/21996459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getParentLink() { Map map = new HashMap(); if (getSrcId() > 0) map.put( "srcId", new Integer( getSrcId()) ); map.put( "folderId", new Integer( getParentId()) ); return map; } COM: <s> obtain the params to return to the parent </s>
funcom_train/43468313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLineNumber() { if (fullInfo == null) return NA; if (lineNumber == null) { int iend = fullInfo.lastIndexOf(')'); int ibegin = fullInfo.lastIndexOf(':', iend - 1); if (ibegin == -1) lineNumber = NA; else lineNumber = this.fullInfo.substring(ibegin + 1, iend); } return lineNumber; } COM: <s> returns the line number of the caller </s>
funcom_train/17256969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFrameRate(int fps) { if (fps <= 0) { throw new IllegalArgumentException( "Frames per second cannot be less than one."); } LoggingSystem.getLogger().log(Level.INFO, "Attempting to run at " + fps + " fps."); preferredTicksPerFrame = timer.getResolution() / fps; } COM: <s> set preferred frame rate </s>
funcom_train/49758592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getPoint(HorizontalDirection h, VerticalDirection v) { int x2 = (h == HorizontalDirection.LEFT ? x : h == HorizontalDirection.CENTER ? x + width / 2 : x + width); int y2 = (v == VerticalDirection.TOP ? y : v == VerticalDirection.CENTER ? y + height / 2 : y + height); return new Point(x2, y2); } COM: <s> gets a special point of the node </s>
funcom_train/29018345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getState () { checkWidget (); if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) { int state = (int)/*64*/OS.SendMessage (handle, OS.PBM_GETSTATE, 0, 0); switch (state) { case OS.PBST_NORMAL: return SWT.NORMAL; case OS.PBST_ERROR: return SWT.ERROR; case OS.PBST_PAUSED: return SWT.PAUSED; } } return SWT.NORMAL; } COM: <s> returns the state of the receiver </s>
funcom_train/585496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createTabFolder() { tabFolder = new TabFolder( top, SWT.NONE ); createCRaw(); createCDbIni(); TabItem tabItem1 = new TabItem( tabFolder, SWT.NONE ); tabItem1.setText( "Properties" ); tabItem1.setControl( cDbIni ); TabItem tabItem = new TabItem( tabFolder, SWT.NONE ); tabItem.setText( "Raw" ); tabItem.setControl( cRaw ); } COM: <s> this method initializes tab folder </s>
funcom_train/46745646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaritalStatusRef(DisplayModel maritalStatusRef) { if (Converter.isDifferent(this.maritalStatusRef, maritalStatusRef)) { DisplayModel oldmaritalStatusRef= new DisplayModel(this); oldmaritalStatusRef.copyAllFrom(this.maritalStatusRef); this.maritalStatusRef.copyAllFrom(maritalStatusRef); setModified("maritalStatusRef"); firePropertyChange(String.valueOf(PATIENTS_MARITALSTATUSREFID), oldmaritalStatusRef, maritalStatusRef); } } COM: <s> patients marital status single married </s>
funcom_train/44712460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean columnExists(String tableName, String proposedColumnName) { DataQuery query = SessionManager.getSession().retrieveQuery ("com.arsdigita.persistence.getPostgresColumnNames"); query.addEqualsFilter("tableName", tableName.toLowerCase()); query.addEqualsFilter("columnName", proposedColumnName.toLowerCase()); return (query.size() > 0); } COM: <s> this method returns a boolean indicating whether the database table </s>
funcom_train/18865648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BigDecimal getReconciledBalance() { if (reconciledBalance != null) { return reconciledBalance; } BigDecimal balance = ZERO; synchronized (tMutex) { for (int i = 0; i < transactions.size(); i++) { if (transactions.get(i).isReconciled(this)) { balance = balance.add(transactions.get(i).getAmount(this)); } } } return reconciledBalance = balance; } COM: <s> the reconciled balance is cached to improve performance and reduce </s>
funcom_train/46335936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetProcedures() { System.out.println("getProcedures"); PlsqlPackage instance = new PlsqlPackage(); List<PlsqlCall> expResult = new ArrayList<PlsqlCall>(); List<PlsqlCall> result = instance.getProcedures(); assertEquals(expResult, result); assertSame(result, instance.getProcedures()); } COM: <s> test of get procedures method of class plsql package </s>
funcom_train/21105935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MJComboBox getcbBS_TO() { if (cbBS_TO == null) { cbBS_TO = new MJComboBox(); cbBS_TO.setPreferredSize(new java.awt.Dimension(90, 20)); cbBS_TO.setEnabled(false); cbBS_TO.ComboType = CT_DATE; } return cbBS_TO; } COM: <s> this method initializes cb bs to </s>
funcom_train/31985919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int numQueues() { int count = 0; // the counter // Note that QueueLink.queues instead of QueueLink.next used here! for (QueueLink i = myQLink; i != null ; i = i.getNextQueue()) { count++; // increment for each other QueueLink found } return count; // this should be the total of all queues } COM: <s> returns the number of queues this entity is currently queued in </s>
funcom_train/28263265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BService (String dnsName) { this.dnssdName = dnsName; txtRecord = new TXTRecord(); nodes = new HashMap<String,BNode>(); // add shutdown hook BServiceShutdownHook shutdownHook = new BServiceShutdownHook(); Runtime.getRuntime().addShutdownHook(shutdownHook); try { DNSSD.browse(dnssdName, this); } catch (Exception e) { e.printStackTrace(); } } COM: <s> register a zero conf service using the raw service type name </s>
funcom_train/14630189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { try{ String s = "ADDRESS " + Converter.binToHex(Converter.positiveIntToBin(32,this.getAddress())); s += ", VALUE " + Converter.binToHex(this.getBinString()); s += ", LABEL " + this.getLabel(); s += ", CODE " + this.getCode(); s += ", COMMENT " + this.getComment(); return s; } catch(IrregularStringOfBitsException e){ e.printStackTrace(); } return "ERRORE"; } COM: <s> returns a string represention of this memory element formatted with the address and </s>
funcom_train/19137846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void login() throws Exception { url = new URLName(protocol, getHostname(), -1, mbox, getUsername(), getPassword()); Properties props = System.getProperties(); session = Session.getInstance(props, null); store = session.getStore(url); store.connect(); folder = session.getFolder(url); folder.open(Folder.READ_WRITE); } COM: <s> method used to login to the mail host </s>
funcom_train/45450190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tearDown() { /* * Delete the Organization and its dependents, and confirm. */ OrganizationService.delete(testOrganization.getOrganizationRef()); Persistence.flush(); assertNull("Organization was found after it was deleted", OrganizationService .getOrganizationInfo(testOrganizationName)); } COM: <s> perform this method after each test case </s>
funcom_train/50302474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSet getSchemas() throws SQLException { XSQLVAR[] xsqlvars = new XSQLVAR[1]; xsqlvars[0] = new XSQLVAR(); xsqlvars[0].sqltype = ISCConstants.SQL_VARYING; xsqlvars[0].sqllen = 31; xsqlvars[0].sqlname = "TABLE_SCHEM"; xsqlvars[0].relname = "TABLESCHEMAS"; ArrayList rows = new ArrayList(0); return new FBResultSet(xsqlvars, rows); } COM: <s> gets the schema names available in this database </s>
funcom_train/18032000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public KategoryBean getParentBean() { if (getParent() < 0) { return null; } if (m_parentBean == null) { try { m_parentBean = KategoryBean.loadKategoryBean(getParent()); } catch (SQLException e) { LOG.log(Level.SEVERE, "Failed to load parent catergory of bean id : " + getId(), //$NON-NLS-1$ e); return null; } } return m_parentBean; } COM: <s> returns the parent category bean if available </s>
funcom_train/19149176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String line; if (dataValid) { line = new String(".DC " + src.getSelectedItem() + " "+sval.getText()+" "+eval.getText()+" "+ " "+cnt.getText()+"\n"); line += ".options TEMP="+temp.getText()+"\n"; return line; } else return null; } COM: <s> this generates the needed line for simulation </s>
funcom_train/12553886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration allNodes(){ Vector <Character >the_nodes = new Vector <Character> (1); for(int i = 0; i < MAX_NODES; i++) { if(my_nodeset[i].isActivated()) the_nodes.addElement(new Character(translateIndexChar(i))); } Enumeration enumeration = the_nodes.elements(); return enumeration; } COM: <s> returns an code enumeration code of all the nodes in this </s>
funcom_train/7384065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEdgePoints(Object edge, List<mxPoint> points) { mxIGraphModel model = graph.getModel(); mxGeometry geometry = model.getGeometry(edge); if (geometry == null) { geometry = new mxGeometry(); geometry.setRelative(true); } else { geometry = (mxGeometry) geometry.clone(); } geometry.setPoints(points); model.setGeometry(edge, geometry); } COM: <s> sets the control points of the given edge to the given </s>
funcom_train/22946096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValuesTF(Double positiveValue, Double negativeValue){ this.positiveValue=positiveValue; this.negativeValue=negativeValue; this.panel.positiveValueTF.setText(this.positiveValue.toString()); this.panel.negativeValueTF.setText(this.negativeValue.toString()); } COM: <s> sets file to the panel after loading </s>
funcom_train/8097271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean generateJreFile() { Vector setup; setup = new Vector(); setup.add(new File(mJRE).getName()); setup.add("del " + new File(mJRE).getName()); // write file return writeToFile(setup, mOutputDir + "/" + JRE_BATCH); } COM: <s> generates the batch file for installing the jre </s>
funcom_train/14176531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readConfiguration() { IDialogSettings s = getDialogSettings(); try { int historySize = s.getInt(STORE_HISTORY_SIZE); for (int i = 0; i < historySize; i++) { IDialogSettings histSettings = s.getSection(STORE_HISTORY + i); if (histSettings != null) { SearchData data = SearchData.create(histSettings); if (data != null) { previousSearchPatterns.add(data); } } } } catch (NumberFormatException e) { // ignore } } COM: <s> initializes itself from the stored page settings </s>
funcom_train/48908922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJbtAceptar() { if (jbtAceptar == null) { jbtAceptar = new JButton(); jbtAceptar.setBounds(new Rectangle(73, 77, 121, 25)); jbtAceptar.setText("Aceptar"); jbtAceptar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { guardarTipoCambio(); } }); } return jbtAceptar; } COM: <s> this method initializes jbt aceptar </s>
funcom_train/28125856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWriteProjectsHier() throws IOException, SAXException { ProjectGroup results = getSampleDataHier(); ProjectGroup newResults = writeAndReadProjects(results); assertEquals(5, newResults.getProjects().size()); assertEquals(1, newResults.getRootProject().getChildren().size()); } COM: <s> tests writing the projects hierarchically </s>
funcom_train/25792832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsCellEditable() { assertTrue(m_toolTreeModel.isCellEditable(m_rootNode, ToolTreeModel.VISIBLE_COLUMN)); assertTrue(m_toolTreeModel.isCellEditable(m_rootNode, ToolTreeModel.TOOL_COLUMN)); assertFalse(m_toolTreeModel.isCellEditable(m_rootNode, ToolTreeModel.ID_COLUMN)); } COM: <s> tests if all the cells are not editable </s>
funcom_train/36956064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void configureToggleCommentAction() { IAction action = getAction("ToggleComment"); //$NON-NLS-1$ if (action instanceof ToggleCommentAction) { ISourceViewer sourceViewer = getSourceViewer(); SourceViewerConfiguration configuration = getSourceViewerConfiguration(); ((ToggleCommentAction) action).configure(sourceViewer, configuration); } } COM: <s> configures the toggle comment action </s>
funcom_train/3604239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object findDifferences(boolean threeWay, IProgressMonitor pm, Object data, Object ancestor, Object left, Object right) { Node root= new Node(); int code= traverse(threeWay, root, pm, threeWay ? ancestor : null, left, right); if (code != NO_CHANGE) { List l= root.fChildren; if (l.size() > 0) { Node first= (Node)l.get(0); return first.visit(this, data, 0); } } return null; } COM: <s> starts the differencing engine on the three input objects </s>
funcom_train/327713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int channelIndexesToPhones(int channelIndexes) { int phones = 0; int newPhone; int nChan = PamUtils.getNumChannels(channelIndexes); for (int i = 0; i < nChan; i++) { newPhone = channelIndexToPhone(PamUtils.getNthChannel(i, channelIndexes)); if (newPhone >= 0) { // avoid indexes where phone < 0 i.e. does not exist. phones |= 1<<newPhone; } } return phones; } COM: <s> convert a bitmap of channel indexes to a bitmap of phones </s>
funcom_train/42398080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isSerializable(final Type type) { boolean serialize = false; while (true) { if (type.isPrimitive()) { serialize = true; break; } // special test for arrays, all array are considered to be // serializable. if (type.isArray()) { serialize = true; break; } // is not blacklisted and is serializable... if (this.implementsSerializable(type)) { serialize = true; } break; } return serialize; } COM: <s> tests if the given type is serializable </s>
funcom_train/5655078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String placeattrGeneration(Place p){ String placeattr = new String(tfnCons.COMMSTART + p.getLabel() + tfnCons.COMMA + tfnCons.WS); placeattr = placeattr + coordinateGeneration(p.getXCoordinate(),p.getYCoordinate()); placeattr = placeattr + tfnCons.COMMA + tfnCons.WS + p.getCapacity() + tfnCons.COMMA + tfnCons.WS; placeattr = placeattr + tokenlistGeneration(p.getTokens()); placeattr = placeattr + tfnCons.COMMEND + tfnCons.NL; return placeattr; } COM: <s> method generates code associated with the nonterminal placeattr </s>
funcom_train/51584976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText() { final TriggerSequence[] bindings = getBindingService().getActiveBindingsFor( CONFIGURE_ACTION_INVOCATION_ACTION_ID); final String binding = bindings.length == 0 ? MESSAGES.get("configureActionInvocation-noBinding") : bindings[0].format(); return MESSAGES.get("text", binding); } COM: <s> the reminder text </s>
funcom_train/51378869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isMember(String candidategroupname) throws DBException { boolean result = false; List list = getGroupsList(); for (Iterator iterator = list.iterator(); iterator.hasNext();) { String grpname = (String) iterator.next(); if (grpname.equals(candidategroupname)) { result = true; break; } } return result; } COM: <s> determine whether this user is in this group </s>
funcom_train/29617741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getJRadioFaoDesignatedNo() { if (jRadioFaoDesignatedNo == null) { jRadioFaoDesignatedNo = new MgisRadioButton(); jRadioFaoDesignatedNo.setText(AppTextsDAO.get("LABEL_NO")); jRadioFaoDesignatedNo.setBounds(232, 60, 58, 16); jRadioFaoDesignatedNo.setValue("2"); faoDesignated.add(jRadioFaoDesignatedNo); } return jRadioFaoDesignatedNo; } COM: <s> this method initializes j radio fao designated no </s>
funcom_train/14638051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onCallTransferRefused(ExtendedCall call, String reason, Message resp) { printLog("onCallTransferRefused()",LogLevel.LOW); if (call!=this.m_extendedCall) { printLog("NOT the current call",LogLevel.LOW); return; } printLog("Transfer refused",LogLevel.HIGH); } COM: <s> callback function called when a m extended call transfer is refused </s>
funcom_train/39536489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getType() { int jwidgetType=MENU_BAR; if(currentElement!=null) { String name=currentElement.getAttribute( fr.itris.glips.library.Toolkit.nameAttribute); if(name.equals(POP_UP_NAME)) { jwidgetType=POP_UP; }else if(name.equals(MENU_NAME)) { jwidgetType=MENU; }else if(name.equals(MENU_ITEM_NAME)) { jwidgetType=MENU_ITEM; } } return jwidgetType; } COM: <s> computes and returns the type of the jwidget element </s>
funcom_train/1164601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StatusStream getFirehoseStream(int count) throws WeiboException { try { return new StatusStream(http.post(getStreamBaseURL() + "1/statuses/firehose.json" , new PostParameter[]{new PostParameter("count" , String.valueOf(count))}, true)); } catch (IOException e) { throw new WeiboException(e); } } COM: <s> returns a status stream of all public statuses </s>
funcom_train/3644523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIrateSimple() { double P = 1; double I = 0.0001; long Ispan = 15 * 60 * 1000; int deltaT = 300; long start = System.currentTimeMillis(); long COUNT = (Ispan / deltaT) * 2; ProcessController pc = new SimplePidController(0.0, P, I, 0, 0); testIrate(pc, start, deltaT, COUNT); } COM: <s> estimate how bad the performance of the integral set is in real life </s>
funcom_train/22009095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PhotoDimensions getThumbnailSize() throws Exception { PhotoDimensions rv=null; SpyCache cache=SpyCache.getInstance(); String key="ph_thumbnail_size_" + imageId; rv=(PhotoDimensions)cache.get(key); if(rv == null) { PhotoImage pi=getThumbnail(); rv=new PhotoDimensionsImpl(pi.getWidth(), pi.getHeight()); cache.store(key, rv, 1800000); } return(rv); } COM: <s> get the size of this image as a thumbnail </s>
funcom_train/26490081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getParentId() { String node = getNodeId(); NewsHolder nh = NewsHolder.getInstance(); // try one level down: int i = node.lastIndexOf(PropertyHandler.getNodeDelim()); if (i>-1) { return node.substring(0,i); } return ""; } COM: <s> returns the links parent node id </s>
funcom_train/14607862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetValues(String prefix) throws UIException { prefix = (prefix != null) ? prefix + ":" : ""; List fields = getFields(); for (int i = 0; i < fields.size(); i++) { Field field = (Field)fields.get(i); if (field.getName().startsWith(prefix)) field.resetValue(); } } COM: <s> initializes all fields contained in this form </s>
funcom_train/20299845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isValid(MessageType type) { try { return !(this.props == null && this.host == null && this.from == null && getTo(type) == null && getSubject(type) == null && getBody(type) == null); } catch (MessageNotValidException e) { return false; } } COM: <s> validates the message generated for a given type </s>
funcom_train/3415417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void advanceRunState(int targetState) { for (;;) { int c = ctl.get(); if (runStateAtLeast(c, targetState) || ctl.compareAndSet(c, ctlOf(targetState, workerCountOf(c)))) break; } } COM: <s> transitions run state to given target or leaves it alone if </s>
funcom_train/37519211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String executeMethod(Class cls, String methodname, String[] args) { try { Method method = cls.getMethod(methodname, new Class[] { String[].class }); return executeMethod(method,args); } catch (NoSuchMethodException e) { Utils.restoreStreams(); System.out.println("No method compile in class " + cls); e.printStackTrace(); throw new RuntimeException(e.toString()); } } COM: <s> finds and executes the method with the given name in the given class </s>
funcom_train/16514658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String queryOneResult(String sqlQuery) { String ret = null; ResultSet res = dbQuery(sqlQuery); try { if (res.next()) { ret = res.getString(1); } res.close(); } catch (SQLException e) { e.printStackTrace(); throw new RuntimeException(); } return ret; } COM: <s> returns the first result returned by the given query </s>
funcom_train/28167740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Color toColor(String value) throws IOException { String str = value; if (str == null) { return null; } if (str.startsWith("#") && str.length() == 7) { return new Color(Integer.decode(str)); } else { return null; } } COM: <s> reads a color style attribute </s>
funcom_train/21701205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getChildrenOfExceptRepoEntries(CatalogEntry ce) { List res = DBFactory.getInstance().find( "select cei from" + " org.olat.catalog.CatalogEntryImpl as cei" + " where cei.parent = ? and cei.repositoryEntry = null order by cei.name", new Object[] { ce.getKey() }, new Type[] { Hibernate.LONG }); return res; } COM: <s> finds all catalog entries which are not a repositoryentry </s>
funcom_train/12912392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void apertureEditButtonPressed(ActionEvent evt) { updateAttributes(true); JSnarkElement source = (JSnarkElement)((JButton)evt.getSource()).getClientProperty("instance"); if (source == element) element.getChild("aperture").getGraphics(this).initComponents(); else source.getGraphics(this).initComponents(); } COM: <s> action to take when the edit button is pressed </s>
funcom_train/12163075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String toString(int[] indices) { StringBuffer buffer = new StringBuffer("["); for (int i = 0; i < indices.length; i++) { buffer.append(indices[i]); if (i < (indices.length - 1)) { buffer.append(","); } } return buffer.append("]").toString(); } COM: <s> used to generate a string representation of an integer array </s>
funcom_train/15923068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node visitChildren(NodeVisitor v) { FlagsNode flags = (FlagsNode) visitChild(this.flags, v); TypeNode type = (TypeNode) visitChild(this.type, v); Id name = (Id) visitChild(this.name, v); return reconstruct(flags, type, name); } COM: <s> visit the children of the formal </s>
funcom_train/27747293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBorderVisible(boolean show) { checkWidget(); if (showBorders == show) return; showBorders = show; if (showBorders) { if ((getStyle() & SWT.FLAT) != 0) { borderBottom = borderTop = borderLeft = borderRight = 1; } else { borderLeft = borderTop = 1; borderRight = borderBottom = 3; } } else { borderBottom = borderTop = borderLeft = borderRight = 0; } onClientAreaChange(); } COM: <s> toggle the visibility of the border </s>
funcom_train/29828939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hyperlinkUpdate(HyperlinkEvent evt) { if (HyperlinkEvent.EventType.ACTIVATED == evt.getEventType()) { URL url = evt.getURL(); if (url == null) return; JID jid = new JID(url.toString()); String namespace = "http"; if (parent != null) parent.performAction(jid, namespace); } } COM: <s> called when link action performed calls open link in extern browser </s>
funcom_train/167479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean render(Graphics2D arg0, Rectangle2D arg1, int arg2, PlotRenderingInfo arg3, CrosshairState arg4) { try { return super.render(arg0, arg1, arg2, arg3, arg4); } catch (IndexOutOfBoundsException e) { PlotLine.log.info("IndexOutOfBoundsException"); if (PlotLine.log.isDebugEnabled()) PlotLine.log.debug(e); return false; } catch (NullPointerException e) { PlotLine.log.info("NullPointerException"); if (PlotLine.log.isDebugEnabled()) PlotLine.log.debug(e); return false; } } COM: <s> check index out of bounds exception and null pointer exception to suppress error </s>
funcom_train/22215992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void create(String text) { this.ngrams.clear(); this.computeNGrams(1, 5, text); if (this.ngrams.containsKey("_")) { int blanksScore = this.ngrams.remove("_"); this.ngrams.put("_", blanksScore / 2); } this.entries.clear(); this.entries.addAll(this.ngrams.entrySet()); } COM: <s> fills the finger print with all the ngrams and their numer of </s>
funcom_train/8095136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int weightedDistribution(int [] weights) { int sum=0; for(int i=0; i<weights.length; i++) sum += weights[i]; int val = (int)Math.floor(m_random.nextDouble()*sum); for(int i=0; i<weights.length; i++) { val -= weights[i]; if(val<0) return i; } return -1; } COM: <s> calculates a weighted distribution </s>
funcom_train/37078782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addGeneOrTranscriptAllowed() { return (evidenceSet.getLeafFeatures().size() > 0 // cursorSet is non-empty if some annotations are selected. // I'm not sure why that's so bad. && cursorSet.getLeafFeatures().size() == 0); } COM: <s> determine whether its ok to do an add gene or transcript </s>
funcom_train/3473008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopVideo() { MediaClipReplayer replayer = (MediaClipReplayer) this.trackSynchronizer .getSyncModel().getController(BlockType.AUDIO); if (replayer != null) { replayer.stopVideo(); } Block currentBlock = this.trackSynchronizer.getSyncModel() .getCurrentBlock(BlockType.VIDEO); if (currentBlock != null) { this.trackSynchronizer.getSyncModel().clearCurrentBlock( currentBlock); } } COM: <s> stops the video replay </s>
funcom_train/18012846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void nodeRemoved(Object node, Object child, int index) { if(node != null && child != null && index >= 0) { TreePath tp = new TreePath(getPathToRoot(node)); int[] ai = { index }; Object[] ac = { child }; fireTreeNodesRemoved(new TreeModelEvent(this, tp, ai, ac)); } } COM: <s> notifies the tree that nodes were removed </s>
funcom_train/18837358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeSelectedJob() { JobListItem item = (JobListItem) this.jobsList.getSelectedValue(); ((DefaultListModel) this.jobsList.getModel()).removeElement(item); try { SessionHandler.getService().abort(item.getID(), ComputingInterface.ABORT_AND_REMOVE); } catch (RemoteException e) { } } COM: <s> remove job from local list and release all resources from the server </s>
funcom_train/5165583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addGene(Gene a_gene) { Gene[] genes = new Gene[m_genes.length + 1]; System.arraycopy(m_genes, 0, genes, 0, m_genes.length); genes[m_genes.length] = a_gene; m_genes = genes; } COM: <s> append a new gene to the gene array </s>
funcom_train/5865105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getActionAttrs() { if (_action == null) return ""; //To have smaller footprint for each component, we don't cache //the parsed result final StringBuffer sb = new StringBuffer(100); for (Iterator it = parseAction(_action).entrySet().iterator(); it.hasNext();) { final Map.Entry me = (Map.Entry)it.next(); HTMLs.appendAttribute(sb, (String)me.getKey(), toJavaScript((String)me.getValue())); } return sb.toString(); } COM: <s> returns the html attributes representing the client side action </s>
funcom_train/35069167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void parseStatusCode(HttpRequest req, HttpResponse res, StatusLine line, String path) throws ConnectionException, ConnectionAuthenticationException, ConnectionUnavailableException { switch (line.getStatusCode()) { case 200: case 304: break; case 401: Log.d(TAG, "request"); dumpHeaders(req); Log.d(TAG, "response"); dumpHeaders(res); throw new ConnectionAuthenticationException(line.getReasonPhrase()); case 400: case 403: case 404: throw new ConnectionException(line.getReasonPhrase()); case 500: case 502: case 503: throw new ConnectionUnavailableException(line.getReasonPhrase()); } } COM: <s> parse the status code and throw appropriate exceptions when necessary </s>
funcom_train/14212763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getFields(Collection keysofFields) { if (keysofFields == null) return null; Iterator keys = keysofFields.iterator(); Object aKey = null; Map aMap = FastMap.newInstance(); while (keys.hasNext()) { aKey = keys.next(); aMap.put(aKey, this.fields.get(aKey)); } return aMap; } COM: <s> used by clients to specify exactly the fields they are interested in </s>
funcom_train/11754680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModelMBeanNotificationInfo createNotificationInfo() { // Return our cached information (if any) if (info != null) return (info); // Create and return a new information object info = new ModelMBeanNotificationInfo (getNotifTypes(), getName(), getDescription()); Descriptor descriptor = info.getDescriptor(); addFields(descriptor); info.setDescriptor(descriptor); return (info); } COM: <s> create and return a code model mbean notification info code object that </s>
funcom_train/51489796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double sample(){ int i = k_; double v = uni.sample(); pr = Math.pow(p_, k_); f = pr; while(v>f){ pr = pr*(1-p_)*i/(i-k_+1); f = f + pr; i++; } System.out.println(" :"+i); return i; } COM: <s> returns a number of the negative binomial distribution </s>
funcom_train/33839650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setPrimaryHDU(boolean status) { try { super.setPrimaryHDU(status); } catch (FitsException e) { System.err.println("Impossible exception in ImageData"); } if (status) { myHeader.setSimple(true); } else { myHeader.setXtension("IMAGE"); } } COM: <s> change the image from to primary </s>
funcom_train/42652441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNoOperandsConstructor() { PropertyRestriction restriction = new PropertyRestriction("noOperands", Operation.TEST_IS_NULL); assertEquals("noOperands", restriction.getTargetName()); assertEquals(Operation.TEST_IS_NULL, restriction.getOperation()); assertTrue(restriction.getOperands().isEmpty()) ; } COM: <s> tests the instanciation of a restriction with an operation that does </s>
funcom_train/25217886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LValue readSymbol() throws IOException { StringBuilder sb = new StringBuilder(); do { sb.append((char) c); c = reader.read(); } while (c >= 0 && isNotSpecial(c)); String s = sb.toString(); if ("nil".equals(s)) { return new LList(); } return LSymbol.get(s); } COM: <s> read a symbol </s>
funcom_train/37869586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int populate(Document doc) { int childrenCount = addChildren (doc, siblingCount); // Add a long fat branch at root's first child : deepBranch = doc.getDocumentElement().getFirstChild(); effectiveDepth = addFatBranch( doc, deepBranch, depth, null); System.out.println("TEST> populate() done."); return childrenCount; } COM: <s> this one provokes the exception </s>
funcom_train/36459980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopPreview() { if (previewRenderer != null) { if (previewDataSource != null) { previewDataSource.disconnect(); } previewPanel.removeAll(); previewRenderer.stop(); previewDevice.stop(null); } previewRenderer = null; previewDataSource = null; previewDevice = null; } COM: <s> stops any preview </s>
funcom_train/25256752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startTimeout() { timeoutTimer = DHT.getScheduler().schedule(new Runnable() { /* * (non-Javadoc) * @see java.lang.Runnable#run() */ public void run() { if (!taskFinished) { Log.d(TAG, "Task was Killed by Timeout. TaskID: " + taskID); kill(); } } }, DHTConstants.TASK_TIMEOUT, TimeUnit.MILLISECONDS); } COM: <s> starts the timeout timer </s>
funcom_train/14276548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { if (this.serverSocket == null) { throw new IllegalStateException("Listening socket is not open - terminating"); } while (!this.stopped) { try { this.dispatch(); // do the stuff } catch (Exception e) { logger.log(Level.WARNING, "Unexpected Exception", e); } } } COM: <s> this is the main loop for accepting new request and delegating work to </s>
funcom_train/37730364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSong(String title, Song song) throws Exception { Song old = (Song) songMap.put(title, song); if (old != null) { System.out.println("SongCollection.addSong: song already exists, not added : " + title); songMap.put(old.getTitle(), old); throw new Exception ("Duplicate song title"); } } COM: <s> adds a song to the song collection </s>
funcom_train/10635974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSSLException05() { SSLException tE = new SSLException(null, null); assertNull("getMessage() must return null", tE.getMessage()); assertNull("getCause() must return null", tE.getCause()); } COM: <s> test for code sslexception string throwable code constructor </s>
funcom_train/17592603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String globalInfo() { return "Class for constructing an unpruned decision tree based on the ID3 " + "algorithm. Can only deal with nominal attributes. " + "Empty leaves may result in unclassified instances. For more " + "information see: \n\n" + " R. Quinlan (1986). \"Induction of decision " + "trees\". Machine Learning. Vol.1, No.1, pp. 81-106"; } COM: <s> returns a string describing the classifier </s>
funcom_train/33859732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelInput() { if (jPanelInput == null) { GridBagConstraints gridBagConstraints7 = new GridBagConstraints(); gridBagConstraints7.fill = GridBagConstraints.BOTH; gridBagConstraints7.gridy = 0; gridBagConstraints7.weightx = 1.0; gridBagConstraints7.weighty = 1.0; gridBagConstraints7.gridx = 0; jPanelInput = new JPanel(); jPanelInput.setLayout(new GridBagLayout()); jPanelInput.add(getJSplitPane2(), gridBagConstraints7); } return jPanelInput; } COM: <s> this method initializes j panel input </s>
funcom_train/8711478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkParentLinks() { this.visit(new NodeVisitor() { public boolean visit(AstNode node) { int type = node.getType(); if (type == Token.SCRIPT) return true; if (node.getParent() == null) throw new IllegalStateException ("No parent for node: " + node + "\n" + node.toSource(0)); return true; } }); } COM: <s> debugging function to check that the parser has set the parent </s>
funcom_train/7801334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateEntryPoint(final K iOldKey, final OMVRBTreeEntryPersistent<K, V> iNode) { final OMVRBTreeEntryPersistent<K, V> node = entryPoints.remove(iOldKey); if (node != iNode) OLogManager.instance().warn(this, "Entrypoints nodes are different during update: old %s <-> new %s", node, iNode); addNodeAsEntrypoint(node); } COM: <s> updates the position of the node between the entry points </s>
funcom_train/2292133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List getProjectResources() { if (m_projectResources == null) { try { m_projectResources = getCms().readProjectResources(getReferenceProject()); } catch (Throwable e) { LOG.error(e.getLocalizedMessage(), e); // use an empty list (all resources are "outside") m_projectResources = new ArrayList(); } } return m_projectResources; } COM: <s> returns the reference project resources </s>
funcom_train/50340768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOccupancySensorName(String name) { occupancySensorName = name; Sensor sensor = jmri.InstanceManager.sensorManagerInstance(). getSensor(name); if (sensor!=null){ occupancyNamedSensor = jmri.InstanceManager.getDefault(jmri.NamedBeanHandleManager.class).getNamedBeanHandle(name, sensor); if (block!=null) block.setNamedSensor(occupancyNamedSensor); } } COM: <s> add occupancy sensor by name </s>
funcom_train/28216212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int backward() { this.runState = MOTOR_RUN_STATE_RUNNING; try { return nxtCommand.setOutputState(id, (byte)-power, this.mode + MOTORON, regulationMode, turnRatio, runState, 0); } catch (IOException ioe) { System.out.println(ioe.getMessage()); return -1; } } COM: <s> causes motor to rotate backward </s>
funcom_train/6203439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveRowDown(int row) { MapRule mapruleNext = srx.getMappingRules().get(row + 1); MapRule maprule = srx.getMappingRules().get(row); srx.getMappingRules().remove(row + 1); srx.getMappingRules().add(row, mapruleNext); fireTableRowsUpdated(row, row + 1); } COM: <s> moves a mapping rule down an order </s>
funcom_train/32968353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPhrase( String phrase, String field, String language ) { if( phrase==null) return; // Split by any non-word characters String words[] = phrase.split("\\W"); int position = 0; for ( String rawWord : words ) { String word = rawWord.trim().toLowerCase(); if (word.length()>0 && !StopList.ignore( word, language )) { position++; addWord( word, position, field, language); } } } COM: <s> add a phrase to this menu data items word list </s>
funcom_train/44850369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long createCompletion(String inCompletion, Long inQuestionID, int inState) throws VException, SQLException { DomainObject lCompletion = getCompletionHome().create(); lCompletion.set(CompletionHome.KEY_COMPLETION, inCompletion); lCompletion.set(CompletionHome.KEY_QUESTION_ID, inQuestionID); lCompletion.set(CompletionHome.KEY_STATE, new Long(inState)); return lCompletion.insert(true); } COM: <s> creates a completion with specified state and returns its id </s>
funcom_train/36048177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "[" + this.getClass().getName() + ": type=" + getType() + (r != null ? (", rectangle=" + r) : "") + (pixels != null && pixels.length < 20 ? (", pixels=" + getStampAsString()) : "") + "]"; } COM: <s> get details of this pattern as a string </s>
funcom_train/19321686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == null) return false; ArrayType arrType = null; try { arrType = (ArrayType) obj; } catch (ClassCastException classcastexception) { return false; } if (arrType.dimension != dimension) { return false; } else { return openType.equals(arrType.openType); } } COM: <s> compares the specified code obj code parameter with this </s>
funcom_train/31486199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEncodeSecretData() throws Exception{ //Must test for the following parameters! //PGPDataOutputStream; FileOutputStream fos = new FileOutputStream(new File(testdir, "TestDSA1.out")); dsa.encodePublicData(new PGPWrapperDataOutputStream(fos)); fos.close(); assertTrue(true); } COM: <s> test method void encode secret data pgpdata output stream </s>
funcom_train/7383617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkTripleBuffer() { if (tripleBuffer != null) { if (tripleBuffer.getWidth() != getWidth() || tripleBuffer.getHeight() != getHeight()) { // Resizes the buffer (destroys existing and creates new) destroyTripleBuffer(); } } if (tripleBuffer == null) { createTripleBuffer(getWidth(), getHeight()); } } COM: <s> checks if the triple buffer exists and creates a new one if </s>
funcom_train/1805418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAttributes(String name, GoogleBaseAttributeType type) { Iterator<GoogleBaseAttribute> iter = attributes.iterator(); while (iter.hasNext()) { GoogleBaseAttribute attribute = iter.next(); if (hasNameAndType(attribute, name, type)) { iter.remove(); } } } COM: <s> removes all attributes with a certain name and </s>