__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/33723325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAsText() { try { String pathString = Path.getPathString(this.path); if (pathString == null) return ""; return pathString; } catch (Exception ex) { ExceptionUtil.getInstance().handleException("Can't call getAsText ", ex); return ""; } } COM: <s> gets the property value as text </s>
funcom_train/8260280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void extractEventId(ExternalContext context) { FlowExecutorArgumentExtractor extractor = new RequestParameterFlowExecutorArgumentHandler(); try { eventId = extractor.extractEventId(context); } catch(FlowExecutorArgumentExtractionException e) { if(LOG.isDebugEnabled()) { LOG .debug("no eventId present! Assuming the launch or refresh of flow!"); } } } COM: <s> extracts the flow execution event id from the external context </s>
funcom_train/12625558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getLogFile() throws IOException{ int data = 0; StringBuffer buffer = new StringBuffer(); openLogFile(); while((data = logReader.read()) != -1){ buffer.append((char)data); } closeLogFile(); return buffer.toString(); } COM: <s> this method gets log file content </s>
funcom_train/4142721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void dump(File dumpFile) throws IOException, BadSpecial { if (binBuffer == null) { throw new BadSpecial("Binary SqlFile buffer is currently empty"); } FileOutputStream fos = new FileOutputStream(dumpFile); fos.write(binBuffer); int len = binBuffer.length; binBuffer = null; fos.flush(); fos.close(); stdprintln("Saved " + len + " bytes to '" + dumpFile + "'"); } COM: <s> binary file dump </s>
funcom_train/27806841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lista_valueChanged(ListSelectionEvent e) { setClassification.setEnabled(true); int index = list.getSelectedIndex(); if (index != -1) { PCMember pcm = reviewers.get(index); int classification = rc.getClassification(sessionID, pcm.getId() .toString()); if (classification == -1) { actualVote.setText("There are no classification"); } else actualVote.setText(Integer.toString(classification)); } } COM: <s> when a reviewer is selected this method see their actual classification </s>
funcom_train/43567625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doFlatten(Element grammar) throws Exception { final Match match = new Match(); descendantWalker(grammar, new WalkerListener() { public void onElement(Element element) throws Exception { if((element.getLocalName() == Constants.DIV || element.getLocalName() == Constants.GRAMMAR) && element.getNamespaceURI() == Constants.RNG_NS) { match.bool = true; replaceByChildren(element); } } }); if(!match.bool) return; doFlatten(grammar); } COM: <s> replace all grammar and div elements by their children </s>
funcom_train/13261276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getState() { if (state == STATE_FINAL || state == STATE_READY) { return state; } boolean flag = false; ListIterator<NetNode> nodeList = nodes.listIterator(); NetNode node; while (nodeList.hasNext()) { node = nodeList.next(); if (node.isRunning()) { flag = true; } } if (flag) { return state; } else { state = STATE_FINAL; return STATE_FINAL; } } COM: <s> gets the network state see state constants </s>
funcom_train/36656313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStartDate(String startDate) { SimpleDateFormat sdf = new SimpleDateFormat(defaultFormat); try { start = sdf.parse(startDate); } catch (ParseException ex) { Logger.getLogger(Event.class.getName()).log(Level.SEVERE, null, ex); } } COM: <s> sets the start date and time for this event </s>
funcom_train/2947951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean loadDefinition(String name){ boolean success=false; Connection conn=null; try{ conn = ArtDBCP.getConnection(); String sql = "SELECT RULE_NAME, SHORT_DESCRIPTION " + " FROM ART_RULES " + " WHERE RULE_NAME = ?"; PreparedStatement ps = conn.prepareStatement(sql); ps.setString(1,name); ResultSet rs=ps.executeQuery(); if(rs.next()){ ruleName=rs.getString("RULE_NAME"); description=rs.getString("SHORT_DESCRIPTION"); } rs.close(); ps.close(); success=true; } catch(Exception e){ logger.error("Error",e); } finally { try { if (conn != null){ conn.close(); } } catch(Exception e) { logger.error("Error",e); } } return success; } COM: <s> populate the rule object with rule definition of the given rule name </s>
funcom_train/46997100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String Contents() { String Result; int j, jEnd; Result = ""; for( j = 1, jEnd = _OrderedBlockNames.size() ; j <= jEnd ; j ++ ) Result = Result + _BlockNamesToContents.get(_OrderedBlockNames.elementAt(j - 1)); return Result; } COM: <s> returns the concatenation of he generated blocks in proper order </s>
funcom_train/48249137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadModels(String index, Vector model){ String temp; Scanner s; try { s = new Scanner(new File(index)); while(s.hasNext()){ s.next(); temp = s.next(); loadModel(temp,model); } } catch (FileNotFoundException ex) { System.err.println(ex.getMessage()); } } COM: <s> reads the binary models saved in hmmanalyzer </s>
funcom_train/45050151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getCSVLine(String [] items) { StringBuffer result = new StringBuffer(items.length * 10); for (int i = 0; i < items.length; i++) { result.append(items[i]); if (i + 1 < items.length) { result.append(CSV_SEPARATOR); } } return result.toString(); } COM: <s> create a line with a comma except for the last item </s>
funcom_train/35121602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printStringArray(String[][] printArray) { for (int i = 0; i < printArray.length; i++) { for (int j = 0; j < printArray[i].length; j++) { if (j == 0) { System.out.print(printArray[i][j]); } else { } } } } COM: <s> this method prints the data which is in the table </s>
funcom_train/27951862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setContextData(final Resource context) { this.source = context; try { uri = new URI(destination); } catch (Exception e) { exceptions.add(e); } try { url = new URL(context.getURL(), destination); } catch (Exception e) { exceptions.add(e); } } COM: <s> sets the data about the links </s>
funcom_train/31902084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getVerticalAlignment( ) { String align = (String) fElement.getAttributes().getAttribute(HTML.Attribute.ALIGN); if( align != null ) { align = align.toLowerCase(); if( align.equals(TOP) || align.equals(TEXTTOP) ) return 0.0f; else if( align.equals(this.CENTER) || align.equals(MIDDLE) || align.equals(ABSMIDDLE) ) return 0.5f; } return 1.0f; // default alignment is bottom } COM: <s> returns the images vertical alignment </s>
funcom_train/5608269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Scope getScopeSymtab() { if (this.isScope()) { return this; } if (getParent() == null) { Indexer.idx.reportFailedAssertion("No binding scope found for " + this.toShortString()); return this; } return getParent().getScopeSymtab(); } COM: <s> find the enclosing scope defining symbol table </s>
funcom_train/8426256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkState() { boolean result = false; if (emptyStringAllowed) { result = true; } if (comboField == null) { result = false; } String txt = comboField.getText(); result = (txt.trim().length() > 0) || emptyStringAllowed; // call hook for subclasses result = result && doCheckState(); if (result) { clearErrorMessage(); } else { showErrorMessage(errorMessage); } return result; } COM: <s> checks whether the text input field contains a valid value or not </s>
funcom_train/12835957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAllSuccessTrue() { _support = new DispatcherSupport(DispatcherSupport.ALL_SUCCESS, 2, _mainDispatcher); _support.success(null); assertNull(_mainResult); _support.success(null); assertNotNull(_mainResult); assertEquals(new Boolean(true), _mainResult); } COM: <s> tests all success mode when all clients respponded with success </s>
funcom_train/41399891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void layoutFrame(JComponent component) { Dimension dimension = component.getPreferredSize(); Insets insets = getInsets(); component.setBounds(insets.left, insets.top, dimension.width, dimension.height); setSize(dimension.width + insets.left + insets.right, dimension.height + insets.top + insets.bottom); } COM: <s> were managing the layout ourselves since were using abolute layout </s>
funcom_train/45741003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommandWriter () { if (backCommandWriter == null) {//GEN-END:|56-getter|0|56-preInit // write pre-init user code here backCommandWriter = new Command ("Back", Command.BACK, 0);//GEN-LINE:|56-getter|1|56-postInit // write post-init user code here }//GEN-BEGIN:|56-getter|2| return backCommandWriter; } COM: <s> returns an initiliazed instance of back command writer component </s>
funcom_train/46859738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMnuitmNew() { if (mnuitmNew == null) { mnuitmNew = new JMenuItem(); mnuitmNew.setText("New project..."); mnuitmNew.setIcon(new ImageIcon(getClass().getResource("/resources/icons/new.png"))); mnuitmNew.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { NewProject(); } }); } return mnuitmNew; } COM: <s> this method initializes mnuitm new </s>
funcom_train/9086748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Equipments entity) { EntityManagerHelper.log("deleting Equipments instance", Level.INFO, null); try { entity = getEntityManager().getReference(Equipments.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent equipments entity </s>
funcom_train/51337327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_correctRejectionAllZero() { /* * isNull, length, get, copy, search, iterator, recode. */ try { new Op(0f,0f,0f,0f,0f,0f,0f); fail("Expecting: "+IllegalArgumentException.class); } catch(IllegalArgumentException ex) { log.info("Ignoring expected exception: "+ex); } } COM: <s> correct rejection test when all rates are zero </s>
funcom_train/25646222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeCached(String sql) { PreparedStatement pstmt = statementCache.remove(sql); if (null != pstmt) { logger.finer("Closing cached statement: " + sql + ";"); try { pstmt.close(); } catch (SQLException e) { logger.log(Level.WARNING, "Unclean closing of " + sql + ";", e); } } } COM: <s> closes and removes the given sql statament from the cache </s>
funcom_train/27824708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ChangeEvent getEntityAssociationEvent(Entity superEntity,Entity subEntity) { if ((superEntity instanceof Property) && (subEntity instanceof Property)) return new AddSubProperty(m_oimodelerViewable.getActiveOIModel(),null,(Property)subEntity,(Property)superEntity); else return null; } COM: <s> returns the event for associating entities </s>
funcom_train/22563075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IGoal activate(final ServiceContext ctx) throws SystemException, PortalException { if (goal == null) { goal = GoalFactory.createEntity(ctx); goal.setTitle(getTitle()); goal.setMotivation(""); goal.setCompetenceMapId(this.profile.getCompetenceMapId()); goal.setTarget(levels.get(0)); PortletUtils.setOwnership(goal.getBaseModelEntity(), ctx); goal.save(); } active = true; return goal; } COM: <s> makes this profile the active goal </s>
funcom_train/28178765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List assignedRole ( String userId ) { List assignedRole = new ArrayList(); String role; //store the role ref for(int i = 0;i<getUA().size();i++){ if(((UAType) getUA().get(i)).getUserRef().compareTo(userId) == 0){ role=((UAType) getUA().get(i)).getRoleRef(); assignedRole.add(findRoleById(role)); } } return assignedRole; } COM: <s> this function returns the set of roles assigned to a given user </s>
funcom_train/45622766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBuildAssemblyNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SGenType_buildAssemblyName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SGenType_buildAssemblyName_feature", "_UI_SGenType_type"), MSBPackage.eINSTANCE.getSGenType_BuildAssemblyName(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the build assembly name feature </s>
funcom_train/31143693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fixState ( Object object ) { object = WrapperFactory.singleton ().unwrap (object); if ( object instanceof ServiceDelegate ) { ServiceDelegate delegate = (ServiceDelegate) object; if ( delegate.proxyIsInitialized () ) { ServiceProxy txProxy = delegate.getServiceProxy (); txProxy.setServiceDelegate ( (ServiceDelegate) WrapperFactory.singleton (). unwrap ( JDOFactory.singleton ().findReadOnly (delegate) ) ); } } } COM: <s> called when the pm for a transactional object is closed </s>
funcom_train/51100926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateClass(Writer out, ObjEntity entity) throws Exception { if (false == VERSION_1_1.equals(versionString)) { throw new IllegalStateException( "Illegal Version in generateClass(Writer,ObjEntity): " + versionString); } classGenerationInfo.setObjEntity(entity); classTemplate.merge(velCtxt, out); } COM: <s> generates java code for the obj entity </s>
funcom_train/26416171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFlush_lineBreakNotDone() throws Exception { ByteArrayOutputStream os = new ByteArrayOutputStream(); ReportWriter writer = new ReportWriter(os); String oldSep = ReportWriter.getLineSep(); try { writer.lineSep = "\n\r"; String test1 = "Hello, "+ReportWriter.getLineSep()+ "I am line two"+"\n"; writer.write(test1); try { writer.flush(); fail("should have thrown"); } catch (IOException ex) { // } } finally { writer.lineSep = oldSep; } } COM: <s> see that flush throws when buffer is not empty </s>
funcom_train/12338636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if ((o == null) || (!(o instanceof Edge))) { return false; } if (o == this) { return true; } Edge e = (Edge) o; return ((begin == e.begin) && (end == e.end)) || ((begin == e.end) && (end == e.begin)); } COM: <s> edge isnt oriented </s>
funcom_train/14378732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVelocity(Vector3D v, long time) { if (velocity != v) { velocity.setTo(v); } if (v.x == 0 && v.y == 0 && v.z == 0) { velocityMovement.set(0, 0); } else { velocityMovement.set(1, time); } } COM: <s> sets the velocity </s>
funcom_train/36995222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IVVector getCopy( ScriptCopier copier ) { Frame c = new Frame(size()); for( int i = 0; i<top; i++ ) { FlashObject fo = (FlashObject) objects[i]; c.setElementAt(fo.getCopy(copier), i); } c.setName(name); return c; } COM: <s> creates a copy of this frame </s>
funcom_train/21306050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemEman() { if (jMenuItemEman == null) { jMenuItemEman = new JMenuItem(); jMenuItemEman.setText("Txartela eman"); jMenuItemEman.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { txart_eman.setVisible(true); } }); } return jMenuItemEman; } COM: <s> this method initializes j menu item eman </s>
funcom_train/23715819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(Link startLink) { try { toParseLinks.put(startLink.getLink(), startLink); Collection<Page> extractedPages = doParsing(); Collection<Page> processedPages = doProcessing(extractedPages); doPublishing(processedPages); } catch (Exception ex) { LOG.error(ex.getMessage(), ex); } } COM: <s> execute the crawling process on the target site starting from the given link </s>
funcom_train/5014123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processCalendarEvent(final ActionEvent event) { if (log.isDebugEnabled()) { log.debug("Processing action event " + event); } UICalendar uiCal = (UICalendar) event.getComponent(); setDate(uiCal.getCurrentDate()); if (log.isDebugEnabled()) { log.debug("New model date is " + getDate()); } } COM: <s> action listener method </s>
funcom_train/3378705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encode(DerOutputStream out) throws IOException { DerOutputStream tmp = new DerOutputStream(); policyIdentifier.encode(tmp); if (!policyQualifiers.isEmpty()) { DerOutputStream tmp2 = new DerOutputStream(); for (PolicyQualifierInfo pq : policyQualifiers) { tmp2.write(pq.getEncoded()); } tmp.write(DerValue.tag_Sequence, tmp2); } out.write(DerValue.tag_Sequence, tmp); } COM: <s> write the policy information to the der output stream </s>
funcom_train/8900330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getInstance() throws IOException { /* Check if the header has already been read */ if (instanceSet == null) { readHeader(); } /* Check if any attributes have been declared */ if (instanceSet.numAttributes() == 0) { errms(resource.getString("getInstanceTXT")); } /* Check if end of file reached */ getFirstToken(); if (tokenizer.ttype == StreamTokenizer.TT_EOF) { return false; } /* Read the next instance from the file */ return getInstanceAux(); } COM: <s> reads a single instance using the tokenizer and appends it </s>
funcom_train/2294728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNameForXml() { String result; switch (getId()) { case 3: // xml strong result = VALUE_STRONG; break; case 4: // xml weak result = VALUE_WEAK; break; case 5: // jsp strong result = VALUE_STRONG; break; case 6: // jsp weak result = VALUE_WEAK; break; default: result = getName(); } return result; } COM: <s> returns the type name for xml output </s>
funcom_train/18524889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JRadioButton getVerBtn() { if (verBtn == null) { try { verBtn = new JRadioButton(); verBtn.setName("verBtn"); verBtn.setFont(ChartConstants.TEXT_FONT); verBtn.setSelected(true); verBtn.setText("Vertikal"); } catch (Throwable exc) { handleException(exc); } } return verBtn; } COM: <s> return the ver btn property value </s>
funcom_train/7993824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWifToNative() { // get wiki source syntax String originalSyntax = Util.getAsString(this.getWikiSyntaxExample()); // turn wif example to wiki syntax (via xslt) String transformedSyntax = this.rep.syntaxConverter().toWikiSyntax( this.getWikiSyntaxExample_asWIF()); // remove some evil whitespace transformedSyntax = XMLUtil.removeTransfWhiteSpaces(transformedSyntax); Assert.assertEquals(originalSyntax, transformedSyntax); } COM: <s> load example as native load example as wif transform wif to native </s>
funcom_train/31208252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getResultSetConcurrency() throws SQLException { try { if(Trace.isDetailed()) Trace.trace(getId()); checkClosed(); int result=ResultSet.CONCUR_READ_ONLY; if(Trace.isDetailed()) Trace.traceResult(result); return result; } catch(Throwable e) { throw convertThrowable(e); } } COM: <s> gets the resultset concurrency created by this object </s>
funcom_train/1239174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStopClasses(String text) { if (text != null) { StringTokenizer tokenizer = new StringTokenizer(text, " ,+"); if (stopClasses == null) { stopClasses = new ArrayList(); } while (tokenizer.hasMoreTokens()) { stopClasses.add(tokenizer.nextToken()); } } } COM: <s> add a list of classes fully qualified that will stop the traversal </s>
funcom_train/31930696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String normalizeFileName() { String path; try { path = m_chooserFile.getCanonicalPath(); } catch (Exception e) { path = m_chooserFile.getAbsolutePath(); } if (!path.endsWith(fileExtension())) { path += fileExtension(); } return path; } COM: <s> massage the filename to conform to the standard return the result </s>
funcom_train/3167319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toStringForm() { String result = ""; if (this.getFraction() > 1) result = "1/" + this.getFraction(); if (this.getSides() == 100 ) { result += "d%"; } else { result += "d" + this.getSides(); } return result; } COM: <s> converts the die object into a d20 string form </s>
funcom_train/5375724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasMoreTokens() { int length = string.length(); if (position < length) { if (returnDelimiters) return true; // there is at least one character and even if // it is a delimiter it is a token // otherwise find a character which is not a delimiter for (int i = position; i < length; i++) if (delimiters.indexOf(string.charAt(i), 0) == -1) return true; } return false; } COM: <s> returns true if unprocessed tokens remain </s>
funcom_train/45257800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateCategoryCheckState() { ICategory[] enabledCategories = getEnabledCategories(); ICategory[] partiallyEnabledCategories = getPartialCategories(); Object[] allChecked = new Object[enabledCategories.length + partiallyEnabledCategories.length]; System.arraycopy(enabledCategories, 0, allChecked, 0, enabledCategories.length); System.arraycopy(partiallyEnabledCategories, 0, allChecked, enabledCategories.length, partiallyEnabledCategories.length); categoryViewer.setCheckedElements(allChecked); categoryViewer.setGrayedElements(partiallyEnabledCategories); } COM: <s> updates the check and grey state of the categories in the category viewer </s>
funcom_train/17788268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void list(PrintStream out) { out.println("-- CBD prameters --"); if (MCTPrecision != null) { out.print("Precision={"); for (int i = 0; i < MCTPrecision.length-1; i++) out.print(MCTPrecision[i]+","); out.println(MCTPrecision[MCTPrecision.length-1]+"}"); } if (MCTSigned != null) { out.print("Sign={"); for (int i = 0; i < MCTSigned.length-1; i++) out.print(MCTSigned[i]+","); out.println(MCTSigned[MCTSigned.length-1]+"}"); } out.flush(); } COM: <s> prints this cbd parameters fields to the specified output stream </s>
funcom_train/50198210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JComponent putComponent(Object key, JComponent component) { if (key == null) { throw new IllegalArgumentException("key must not be null"); } Bridge bridge = null; for (Docking docking : dockings) { bridge = docking.getBridge(key); if (bridge != null) { break; } } if (bridge == null) { Docking docking = dockings.get(0); bridge = createBridge(); docking.slice(docking.getRoot(), bridge); } JComponent old = bridge.setBridged(key, component); if (old != null) { dismissComponent(old); } return old; } COM: <s> associate a component with the given key </s>
funcom_train/50926547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CMLElement deref(CMLElement element, IdTypes idType) { String ref = element.getAttributeValue("ref"); if (ref == null) throw new RuntimeException("must have ref to deref!"); String [] split = ref.split(":"); String prefix = split[0]; String id = split[1]; String namespace = element.getNamespaceURI(prefix); return getResourceByID(namespace, id, idType); } COM: <s> dereferences an element returning a new object not modifying the argument </s>
funcom_train/7309492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isInFrame(JComponent c) { for (Container p = c.getParent(); p != null; p = p.getParent()) { if (p instanceof JFrame || p instanceof JInternalFrame) { return true; } else if (p instanceof JDialog) { return false; } } return false; } COM: <s> checks and ansers if the top level container of </s>
funcom_train/12836847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (get(JasConstants.AGENT_DISPLAY_NAME) != null) { return "(locator :type " + getType() + " :address " + getAddress() + " :agent-handle " + get(JasConstants.AGENT_DISPLAY_NAME) + ")"; } else { return "(locator :type " + getType() + " :address " + getAddress() + ")"; } } COM: <s> returns human readable string </s>
funcom_train/32749808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update( final DataAdaptor adaptor ) { super.update( adaptor ); final List<AcceleratorNode> nodes = getNodesOfType( RfGap.s_strType, true ); _gaps = new ArrayList<RfGap>( nodes.size() ); for ( final AcceleratorNode node : nodes ) { _gaps.add( (RfGap)node ); } processGaps(); } COM: <s> collect all of the enclosed rf gaps for convenience </s>
funcom_train/35279124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initKeys() { inputManager.addMapping("Shoot", new KeyTrigger(KeyInput.KEY_SPACE), // trigger 1: spacebar new MouseButtonTrigger(MouseInput.BUTTON_LEFT)); // trigger 2: left-button click inputManager.addListener(actionListener, "Shoot"); } COM: <s> declaring the shoot action and mapping to its triggers </s>
funcom_train/50864727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MalfunctionPanel getMalfunctionPanel(Malfunction malfunction) { MalfunctionPanel result = null; Iterator<MalfunctionPanel> i = malfunctionPanels.iterator(); while (i.hasNext()) { MalfunctionPanel panel = i.next(); if (panel.getMalfunction() == malfunction) result = panel; } return result; } COM: <s> gets an existing malfunction panel for a given malfunction </s>
funcom_train/11589708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private UIData getParentUIData() { if (_parentUIData == null) { UIComponent parent = getParent(); if (!(parent instanceof UIData)) { throw new IllegalStateException("UIColumns component must be a child of a UIData component"); } _parentUIData = (UIData) parent; } return _parentUIData; } COM: <s> return the uidata this component is nested within </s>
funcom_train/10952540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleLogging(Exception e) { if (logCategory != null) { if (categoryLogger == null) { // init category logger categoryLogger = LoggerFactory.getLogger(logCategory); } doLog(categoryLogger, e); } else { doLog(LOG, e); } } COM: <s> handles the logging of the exception </s>
funcom_train/31031378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clearForm() { txtAconum.setText(""); txtAconum.setEnabled(true); txtAyearno.setText(""); txtAyearno.setEnabled(true); txtAstdate.setText(""); txtAstdate.setEnabled(true); txtAendate.setText(""); txtAendate.setEnabled(true); /* Unset field values */ aconum = null; ayearno = null; astdate = null; aendate = null; btnSubmit.setText("Create"); this.setTitle("Create an account year"); this.mode = ValueConstants.CREATE_MODE; btnSubmit.setVisible(true); btnSubmit.setEnabled(false); btnDelete.setVisible(false); chkCreateAccYear.setSelected(false); lblStatus.setText(""); setLabelColorToBlack(); } COM: <s> this method clears all the fields of account year </s>
funcom_train/22530237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addRolesXML(StringBuffer data, Hashtable rolesTree) { data.append("<roles>"); Iterator it = rolesTree.values().iterator(); while (it.hasNext()) { Role role = (Role) it.next(); // We are only interested in top level roles // as object refs handle subroles. // This should be refactored. if (role.isTopLevel()) { addRoleXML(data, role); } } data.append("</roles>"); } COM: <s> adds the roles xml </s>
funcom_train/46884867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int count(final int value) { int max = indexer.getPositionCount(); int count = 0; tbw.rewind(); tbb.rewind(); for (int i = 0; i < max; i++) { if (tbw.get() == value) { count++; } if (tbb.get() == value) { count++; } } return count; } COM: <s> count the number of occurences of a specific value </s>
funcom_train/32831116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDifference_notEqualsInnerDifferentSize() { Difference result = reflectionComparator.getDifference(arrayInnerA, arrayInnerDifferentSize); Difference difference = getInnerDifference("inner", result); assertSame(arrayA, difference.getLeftValue()); assertSame(arrayDifferentSize, difference.getRightValue()); } COM: <s> tests for objects with inner arrays that have a different size </s>
funcom_train/4921245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLinkProcessWithoutWorkName() { // Record this.record_basicMetaData((Indexed) null); this.record_issue("Must provide work name for linked process 0 (key=<indexed>)"); // Attempt to load this.loadManagedObjectType(false, new Init<Indexed>() { @Override public void init(ManagedObjectSourceContext<Indexed> context, InitUtil util) { context.linkProcess(0, null, "TASK"); } }); } COM: <s> ensures issue if link process without a </s>
funcom_train/8711111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceWith(Scope newScope) { if (childScopes != null) { for (Scope kid : childScopes) { newScope.addChildScope(kid); // sets kid's parent } childScopes.clear(); childScopes = null; } if (symbolTable != null && !symbolTable.isEmpty()) { joinScopes(this, newScope); } } COM: <s> used by the parser not intended for typical use </s>
funcom_train/44627919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testHarness6() { helpFailure("endpos for token 0 expected:<2> but was:<1>", "A",new Enum<?>[]{IDENTIFIER,EOF},new int[]{0,2,3,4},0); } COM: <s> this tests that the test harness fails if wrong end position is given </s>
funcom_train/5228332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XmlSchema schemaForNamespace(String uri) { for (Iterator iter = schemas.entrySet().iterator(); iter.hasNext(); ) { Map.Entry entry = (Map.Entry) iter.next(); if (((SchemaKey) entry.getKey()).getNamespace().equals(uri)) { return (XmlSchema) entry.getValue(); } } return null; } COM: <s> return the schema from this collection for a particular target namespace </s>
funcom_train/3467109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateBody(com.liantis.xcoder.io.Printer printer) throws java.io.IOException { // @BEGINPROTECT _3C6A48C60021 printer.beginUserCode("//", this.getId()); printer.println("// add individual code here"); printer.endUserCode(); // @ENDPROTECT } COM: <s> generates the implementation of the method </s>
funcom_train/48476870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addRowContextClickHandler(com.smartgwt.client.widgets.grid.events.RowContextClickHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.grid.events.RowContextClickEvent.getType()) == 0) setupRowContextClickEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.grid.events.RowContextClickEvent.getType()); } COM: <s> add a row context click handler </s>
funcom_train/5265177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPropertyBytes(String key, byte[] bs) { String val = new String(Base64.encodeBase64(bs, true)); StringTokenizer st = new StringTokenizer(val, "\n"); int row=0; while (st.hasMoreTokens()) { String line = st.nextToken(); assert line.indexOf('\r')==line.length()-1; line = line.substring(0, line.length()-1); // remove the '\r' setProperty(key+"."+Integer.toString(row, 36), line); row++; } } COM: <s> set a byte array value </s>
funcom_train/39378067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getDataObjectClass() { String className = null; if (classField.getValueObject() != null) { className = classField.getValue(); } else { className = getContext().getRequestParameter(FO_CLASS); } try { return ClickUtils.classForName(className); } catch (Exception e) { throw new RuntimeException(e); } } COM: <s> return the class of the form tt data object tt </s>
funcom_train/43245345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNOKOneZip() { System.out.println("setNOKOneZip"); String nOKOneZip = ""; EmergencyContactObject instance = new EmergencyContactObject(); instance.setNOKOneZip(nOKOneZip); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set nokone zip method of class org </s>
funcom_train/9867058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ASTRewrite removeNodes() { ASTRewrite fRewriter = ASTRewrite.create(this.javaCompilationUnit .getAST()); for (ASTNode node : this.selectedNodes) { if ((node instanceof SimpleType) || (node instanceof ParameterizedType)) { fRewriter.remove(node, null); } else { ASTNode repl = fRewriter.createStringPlaceholder("", ASTNode.EMPTY_STATEMENT); fRewriter .setTargetSourceRangeComputer(new AJDTTargetSourceRangeComputer()); fRewriter.replace(node, repl, null); } } return fRewriter; } COM: <s> removes all the selected nodes from the java ast </s>
funcom_train/16221921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCollectionType( Class collectionType ) { if( collectionType != null ) { if( !Collection.class.isAssignableFrom( collectionType ) ) { throw new JSONException( "The configured collectionType is not a Collection: " + collectionType.getName() ); } this.collectionType = collectionType; } else { collectionType = DEFAULT_COLLECTION_TYPE; } } COM: <s> sets the current collection type used for collection transformations </s>
funcom_train/3155441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createBitmaskExpression() throws ProcessorException { if (_bitMaskExpression.equalsIgnoreCase("")) { // no bitmask set _logger.info(ProcessorConstants.LOG_MSG_NO_BITMASK); _logger.info(ProcessorConstants.LOG_MSG_PROCESS_ALL); _bitMaskTerm = null; } else { _bitMaskTerm = ProcessorUtils.createBitmaskTerm(_bitMaskExpression, _inputProduct); } } COM: <s> creates a bitmask expression from the bitmask string passed in from the request </s>
funcom_train/12781714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void foreach(IntSetAction action) { if (action == null) { throw new IllegalArgumentException("null action"); } sparsePart.foreach(action); if (densePart != null) { for (int b = densePart.nextSetBit(0); b != -1; b = densePart.nextSetBit(b + 1)) { action.act(b); } } } COM: <s> invoke an action on each element of the set </s>
funcom_train/17156452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disconnect() { // synchronized (handlerLock) { try { if (logger.isLoggable(Level.FINER)) { logger.log(Level.FINER, "discconect connection"); } asyncMsgChannel.close(); readHandler = new ClosedReadHandler(); writeHandler = new ClosedWriteHandler(); } catch (IOException e) { logger.logThrow(Level.FINE, e, "IO Exception while disconecting the connection for session {0}", clientSession); } // } } COM: <s> method to disconnect the connection </s>
funcom_train/25275069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onMessage(Message message) { if (message instanceof TextMessage) { TextMessage txtMsg = (TextMessage) message; try { jdkLogger.info("Subscriber.onMessage(): " + txtMsg.getText()); } catch (JMSException e) { e.printStackTrace(); } } } COM: <s> just log a note when a message is received </s>
funcom_train/44211137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getID (String query) { // Write table. try { stmt = (org.gjt.mm.mysql.Statement)connection.createStatement(); ResultSet rs = stmt.executeQuery(query); stmt.close(); while (rs.next()) { Integer integer = (Integer)rs.getObject(1); int trackid = integer.intValue(); return trackid; } } catch (SQLException e) { info.Infofield.setText("Failed to execute the query:\n" + query); System.out.println(e); } return 0; } COM: <s> method get id </s>
funcom_train/39881093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPropertyIgnoreCase(String key) { String res = getProperty(key); if (res != null) { return res; } for (Enumeration<?> e = propertyNames(); e.hasMoreElements();) { String pname = (String) e.nextElement(); if (Util.equalsIgnoreCase(key, pname)) { return getProperty(pname); } } return null; } COM: <s> searches for the property with the specified key in the </s>
funcom_train/4207263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireUserHasJoined(final ChatRoom room, final String userid) { SwingUtilities.invokeLater(new Runnable() { @SuppressWarnings("unchecked") public void run() { final Iterator iter = new HashSet(chatRoomListeners).iterator(); while (iter.hasNext()) { ((ChatRoomListener)iter.next()).userHasJoined(room, userid); } } }); } COM: <s> notifies users that a user has joined a code chat room code </s>
funcom_train/47270930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseEntered(MouseEvent me) { // process events only from this components if(me.getSource() == this && this.isEnabled() && this.isRepeatEnabled()) { if(this.pressed && !this.timer.isRunning()) { this.modifiers = me.getModifiers(); this.timer.setInitialDelay(this.delay); this.timer.start(); } } } COM: <s> handle mouse entered events </s>
funcom_train/43526287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSourceLinePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ImplicitCall_sourceLine_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ImplicitCall_sourceLine_feature", "_UI_ImplicitCall_type"), CallGraphPackage.Literals.IMPLICIT_CALL__SOURCE_LINE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the source line feature </s>
funcom_train/1058769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addChildSelection(TreeItem item) { TreeItem[] items = item.getItems(); if ((items != null) && (items.length > 0)) { for (int i = 0; i < items.length; i++) { items[i].setChecked(true); addChildSelection(items[i]); elementsToImport.add((Element) items[i].getData()); } } } COM: <s> recursive call that check item childrens in the tree </s>
funcom_train/6298139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unbind() { int row = getSelectedRow(); if (row > -1) { try { Org.omg.CosNaming.NameComponent[] ncs = new Org.omg.CosNaming.NameComponent[1]; ncs[0] = new Org.omg.CosNaming.NameComponent((String) getValueAt(row, 0), (String) getValueAt(row, 1)); current.unbind(ncs); update(); } catch (Exception e) { } } } COM: <s> unbind a name and remove it from the table </s>
funcom_train/16380329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateTasksPerPageType_Min(int tasksPerPageType, DiagnosticChain diagnostics, Map<Object, Object> context) { boolean result = tasksPerPageType >= TASKS_PER_PAGE_TYPE__MIN__VALUE; if (!result && diagnostics != null) reportMinViolation(CTEPackage.Literals.TASKS_PER_PAGE_TYPE, new Integer(tasksPerPageType), new Integer(TASKS_PER_PAGE_TYPE__MIN__VALUE), true, diagnostics, context); return result; } COM: <s> validates the min constraint of em tasks per page type em </s>
funcom_train/31292055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getHighestCount(final Collection<EventStrategy> col) { int max = 0; for (EventStrategy strategy : col) { final int count = strategy.getCount(); if (count > max) { max = count; } } if (LOGGER.isDebugEnabled()) { LOGGER.debug("highest count for event strategies is " + max); } return max; } COM: <s> find the highest count of all strategies </s>
funcom_train/43410142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ParentReference getFolderParentReferenceByItsReference(Reference spaceref) { ParentReference parent = new ParentReference(); parent.setStore(STORE); parent.setPath(spaceref.getPath()); parent.setUuid(spaceref.getUuid()); parent.setAssociationType(Constants.ASSOC_CONTAINS); return parent; } COM: <s> gets parent reference of a node by its own reference </s>
funcom_train/3455234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPredecessorList(ArrayList NewPredecessors) { if(null == NewPredecessors) throw new NullPointerException("vPredecessor must not be null!"); Iterator it = NewPredecessors.iterator(); while (it.hasNext()) { addPredecessor((PeriodInTime)it.next()); } } COM: <s> registers a predecessor list </s>
funcom_train/47802193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSameEntry(DNSEntry entry) { return this.getKey().equals(entry.getKey()) && this.getRecordType().equals(entry.getRecordType()) && ((DNSRecordClass.CLASS_ANY == entry.getRecordClass()) || this.getRecordClass().equals(entry.getRecordClass())); } COM: <s> check if two entries have exactly the same name type and class </s>
funcom_train/12813542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validPanel(int screen_number) { switch( screen_number ) { case 0: return this.validSaadaDirPanel(); case 1: return this.validDatabaseConnectPanel(); case 2: return this.validDatabaseReaderPanel(); case 3: return this.validWebRootPanel(); case 4: return this.validNewAttPanel(); case 5: return this.validSysAndUnitPanel(); } return false; } COM: <s> valid the content of the panel the panel screen number </s>
funcom_train/3443526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLowValue(int lowValue) { int high; if ((lowValue + model.getExtent()) > getMaximum()) { high = getMaximum(); } else { high = getHighValue(); } int extent = high-lowValue; model.setRangeProperties(lowValue,extent, getMinimum(),getMaximum(),true); } COM: <s> sets the low value shown by this range slider </s>
funcom_train/171343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Subroutine getSubroutine(InstructionHandle leader){ Subroutine ret = (Subroutine) subroutines.get(leader); if (ret == null){ throw new AssertionViolatedException("Subroutine requested for an InstructionHandle that is not a leader of a subroutine."); } if (ret == TOPLEVEL){ throw new AssertionViolatedException("TOPLEVEL special subroutine requested; use getTopLevel()."); } return ret; } COM: <s> returns the subroutine object associated with the given </s>
funcom_train/41164533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoActivity entity) { EntityManagerHelper.log("deleting CoActivity instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoActivity.class, entity.getActivityId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co activity entity </s>
funcom_train/3740162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean mayDelUser(User who, User user, Group group) throws GroupManagerException, HibernateException { HibernateUtil.currentSession(); if (who.isSystemAdmin() || who.isSystemAdmin()) return true; if (UserIsManager(who, group)) { return true; } return false; } COM: <s> check whether the user may delete another user from the group </s>
funcom_train/12933078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getAD_Workflow_ID(int AD_Menu_ID){ int AD_Workflow_ID=0; String sql = "SELECT AD_Workflow_ID FROM AD_Menu " + "WHERE AD_Menu_ID=? AND Action='F'"; try { PreparedStatement pstmt = DB.prepareStatement(sql); pstmt.setInt(1, AD_Menu_ID); ResultSet rs = pstmt.executeQuery(); while (rs.next()) AD_Workflow_ID= rs.getInt(1); rs.close(); pstmt.close(); } catch (SQLException e) { e.printStackTrace(); } return AD_Workflow_ID; }//getAD_Workflow_ID COM: <s> retrieve the ad workflow id from database using ad menu id </s>
funcom_train/3471933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeMask(AWTEventMask mask) { if (mask != null && eventMasks.containsKey(mask)) { long longValue = mask.getLongValue(); eventMasks.remove(mask); mask.removeEventMaskListener(this); if (! eventMasks.containsValue("" + longValue)) { this.longValue &= ~ longValue; } fireEventMaskChange(new EventMaskEvent(env, this)); } } COM: <s> removes a event mask from this event mask </s>
funcom_train/20691161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRegisteredUser() throws Exception { Long userID = null; try { ObjectManager.current().startWrite(); try { User user = User.createNonDuplicatedUser("Bourimi", "Mohamed"); userID = user.getID(); UserRegistry.current().put(user); } finally { ObjectManager.current().endWrite(); } login("Bourimi", "Mohamed"); } finally { ObjectManager.current().startWrite(); try { User u = getUser(userID); if (u != null) u.delete(); } finally { ObjectManager.current().endWrite(); } } } COM: <s> tests the evaluation of the entered username and password </s>
funcom_train/35895162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getTimeWithZoneStr(Date date){ SimpleDateFormat sDF = new SimpleDateFormat("yyyy-MM-dd&HH:mm:ss.SZ"); String dateStr = sDF.format(date).replace('&', 'T'); dateStr = dateStr.substring(0,dateStr.length()-2)+":"+dateStr.substring(dateStr.length()-2); return dateStr; } COM: <s> get time with zone str </s>
funcom_train/28016602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(final GeometryCollection _geometries, final ShapeType _type) throws IOException { handler_ = _type.getShapeHandler(fact_); writeHeaders(_geometries,_type); //lp_ = shapeBuffer_.position(); for (int i = 0, ii = _geometries.getNumGeometries(); i < ii; i++) { final Geometry g = _geometries.getGeometryN(i); writeGeometry(g); } close(); } COM: <s> bulk write method for writing a collection of hopefully like geometries </s>
funcom_train/7880877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sw(String bin) { /* * @var int addr - the address to operate on given by regEFFADDR or * effAddr() */ // get operands indexed = true; int r1 = Integer.parseInt(bin.substring(8, 11), 2); int addr = regEFFADDR; // store to memory location if (addr >= 0 && addr <= 65536) { setMem(addr, r1); } else { // report invalid memory location error } indexed = false; } COM: <s> description store word br </s>