__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/3402241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URLConnection openConnection() throws IOException { assert url!=null : uri+" doesn't have the corresponding URL"; if (url == null) { throw new WebServiceException("URI="+uri+" doesn't have the corresponding URL"); } if(proxy!=null) return url.openConnection(proxy); else return url.openConnection(); } COM: <s> tries to open </s>
funcom_train/327686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getRequiredHistory() { long longestTime = 0; long rt; longestObserver = null; for (int i = 0; i < countObservers(); i++) { if ((rt = pamObservers.get(i).getRequiredDataHistory(this, null)) > 0) { if (rt > longestTime) { longestObserver = pamObservers.get(i); } longestTime = Math.max(longestTime, rt); } } totalCalls++; return longestTime; } COM: <s> goes through all observers and works out which requires data </s>
funcom_train/18357857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMissExec() { Mission aMission = initMission(); MissionExecution missExec = startMission(aMission); MissionPlan aPlan = aMission.getMissionPlan(); RoutePlan rtPlan = aPlan.getRoutePlan(); ExtraVehicularActivityPlan evaPlan = rtPlan.getEvaPlanByName("EVA1"); EVAExecution evaExec = startEVA(aMission,evaPlan); EVAExecution evaExec2 = missExec.findExecutingEVAForSuitID(5); assertTrue(evaExec2 == evaExec); } COM: <s> this should test setting up mission execution </s>
funcom_train/19258865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float colorCompBlue(float angle) { // Convert angle to degrees. angle *= 180/(float)Math.PI; float value = 0; if (angle <= 45) value = 125.93F/255*(float)Math.exp(0.0081904*angle); else { float angle2 = angle*angle; value = -7.7665E-4F*angle*angle2 + 0.11107F*angle2 - 3.3282F*angle + 178.90F; value /= 255; } if (value > 1) value = 1; if (value < 0) value = 0; return value; } COM: <s> returns the blue component of a simple sky color model that transitions </s>
funcom_train/21993505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFiles(CoFile files[]) { if (files == null) origfiles = new CoFile[0]; else origfiles = files; this.files = CoSort.listSplit( CoSort.listOrder( CoSort.listFilter(origfiles, filterS), orderI)); setEnabled((this.files.length > 0)); model.fireTableDataChanged(); } COM: <s> sets files to be denoted by this component </s>
funcom_train/45452612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConclusion() throws Exception { String testConclusion = "Conclusion"; Template testTemplate = new Template(testOrg, testTemplateName); assertNotNull("Unable to create template", testTemplate); testTemplate.setConclusion(testConclusion); assertEquals("Conclusion inconsistent:", testConclusion, testTemplate.getConclusion()); } COM: <s> test survey template conclusion accessors </s>
funcom_train/44572949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setRefinementLinks() { JmlSourceMethod self = (JmlSourceMethod) delegee.getMethod(); if (refinedDecl == null) { // has NOT already been set // compute and then set the refined method JmlSourceClass ownerClass = (JmlSourceClass) self.owner(); JmlSourceMethod refinedSrc = ownerClass.lookupRefinedMethod(self); if (refinedSrc != null) { JmlMemberDeclaration refinedMethod = refinedSrc.getAST(); refinedDecl = refinedMethod; refinedMethod.setRefiningMember(this); } } } COM: <s> calculates and returns the method refined by this </s>
funcom_train/8806251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getNumberOfLines(int startLine, int offset, int length) throws BadLocationException { if (length == 0) return 1; int target= offset + length; Line l= (Line) fLines.get(startLine); if (l.delimiter == null) return 1; if (l.offset + l.length > target) return 1; if (l.offset + l.length == target) return 2; return getLineNumberOfOffset(target) - startLine + 1; } COM: <s> returns the number of lines covered by the specified text range </s>
funcom_train/5260724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSourceOfPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Directive_sourceOf_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Directive_sourceOf_feature", "_UI_Directive_type"), BmmPackage.Literals.DIRECTIVE__SOURCE_OF, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the source of feature </s>
funcom_train/43910243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean addFeature(String table) throws Exception { FeatureWriter writer = ds.getFeatureWriter(table, Transaction.AUTO_COMMIT); Feature feature; while (writer.hasNext()) { feature = (Feature) writer.next(); } feature = (Feature) writer.next(); feature.setAttribute(0, "test"); //feature.setAttribute(1, val); writer.write(); String id = feature.getID(); return id != null; } COM: <s> adds a feature so we have something to read </s>
funcom_train/46696035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreate_Properties() { System.out.println("create"); Properties props = PropertiesFactory.newInstance().create(); PropertiesFactory instance = PropertiesFactory.newInstance(); PropertiesInternal result = instance.create(props); assertNotNull(result); assertTrue(result instanceof PropertiesInternal); assertEquals(0,result.get().size()); } COM: <s> test of create method of class propertis factory </s>
funcom_train/37063789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset(int maxSize){ //check that we have enough space to store datas if(maxSize > datasArray.length){ datasArray = new int[maxSize]; keysArray = new int[maxSize]; datasNext = new int[maxSize]; } //intialize keyFirst with -1 in every cell System.arraycopy(initArray, 0, keyFirst, 0, initArray.length); //initialize the number of entries with 0 cursor = 0; } COM: <s> resets this code vm address hash map code to manage at most </s>
funcom_train/9701657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initGenerator() throws IOException{ // Create the file in some other way String dirname = System.getProperty("java.io.tmpdir"); //$NON-NLS-1$ Random rand = new Random(); jetTemplateFile = new File(dirname+File.separator+"jetTemplate"+rand.nextInt()+".javajet"); //$NON-NLS-1$ //$NON-NLS-2$ writer = new BufferedWriter(new FileWriter(jetTemplateFile)); contents=new StringBuffer(); imports = new Vector<String>(); } COM: <s> initialize the internal structure </s>
funcom_train/12924706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPixelSize(final int size) { if ((size != IDX_SIZE) && (size != RGB5_SIZE) && (size != RGB8_SIZE)) { throw new IllegalArgumentException( "Pixel size must be either 8, 16 or 24."); } pixelSize = size; } COM: <s> sets the size of the pixel in bits 8 16 or 32 </s>
funcom_train/32018913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMenuItem getJMenuGestionDesTags() { if (jMenuGestionDesTags == null) { jMenuGestionDesTags = new JMenuItem("Gestion des tags",new ImageIcon(getClass().getResource("/Icon/tag.png"))); jMenuGestionDesTags.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T, InputEvent.CTRL_MASK)); } return jMenuGestionDesTags; } COM: <s> this method initializes j menu gestion des tags </s>
funcom_train/4135847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNotePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BibTexEntry_note_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BibTexEntry_note_feature", "_UI_BibTexEntry_type"), BibtexPackage.Literals.BIB_TEX_ENTRY__NOTE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the note feature </s>
funcom_train/9884422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Experiment copy() { int[] columns = new int[this.columns.length]; System.arraycopy(this.columns, 0, columns, 0, this.columns.length); return new Experiment(matrix.copy(), columns, getRowMappingArrayCopy()); } COM: <s> returns clone of this code experiment code </s>
funcom_train/40225583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEmptyRelatedMany() throws Exception { final Marshaler marshaler = getMarshaler(); Assert.assertTrue(marshaler != null); final Account e = getEntityBeanFactory().getEntityCopy(Account.class); Assert.assertTrue(e != null); e.setAddresses(null); final Model m = marshaler.marshalEntity(e, MarshalOptions.UNCONSTRAINED_MARSHALING); Assert.assertTrue(m != null); final IModelProperty mp = m.get("addresses"); Assert.assertTrue(mp != null); } COM: <s> test to ensure that a related many property is created in the the </s>
funcom_train/15400363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DICOMImage set(int index,DICOMImage di) { if ((index<0)||(index>(imageArray.length-1))) { String errorString="Index out of bounds for DICOMImageSet: "+index+" (Maximum: "+imageArray.length; throw (new IllegalArgumentException(errorString)); } imageArray[index]=di; return (di); } COM: <s> sets an image at a specific index </s>
funcom_train/24642511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Predicate p, int type){ if(type == RbnSignature.R_PREDICATE) if(this.sPredicates.contains(p)) throw new IllegalArgumentException("Predicate '" + p + "' is already an S predicate."); else this.rPredicates.add(p); else if(type == RbnSignature.S_PREDICATE) if(this.rPredicates.contains(p)) throw new IllegalArgumentException("Predicate '" + p + "' is already an R predicate."); else this.sPredicates.add(p); else throw new IllegalArgumentException("Type of predicate unknown."); super.add(p); } COM: <s> adds the given predicate to this signature </s>
funcom_train/39024073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToString() { System.out.println("toString"); Pair instance = new Pair(); String expResult = ""; String result = instance.toString(); //assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. //fail("The test case is a prototype."); } COM: <s> test of to string method of class pair </s>
funcom_train/15677754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point2D focus2() { double a, b, theta; if (r1 > r2) { a = r1; b = r2; theta = this.theta; } else { a = r2; b = r1; theta = this.theta+PI/2; } return Point2D.createPolar(xc, yc, sqrt(a * a - b * b), theta); } COM: <s> returns the second focus </s>
funcom_train/30279371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove() { if(LOG.isTraceEnabled()) { LOG.trace("Entering remove ..."); } //remove scheduled quartz timer try { if (isSheduledQuartzTimer) { BPTimeEventGenerator.remove(threadX.getProcessX().getId() + ";" + getId()); } } catch (Exception ignore) { } threadX.getProcessX().removeTimerTaskX(getId()); this.threadX.removeTimerTaskX(this); //this.threadX = null; } COM: <s> incapsulate all cleanup logic </s>
funcom_train/39896411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public KnownSymbolicValue goalValue() { double[] goalValueDistribution = goalValuesDistribution(); int mostFrequent = -1; double mostFrequentFrequency = -1; for (int gav = 0; gav < goalValueDistribution.length; gav++) if (goalValueDistribution[gav] > mostFrequentFrequency) { mostFrequent = gav; mostFrequentFrequency = goalValueDistribution[gav]; } return new KnownSymbolicValue(mostFrequent); } COM: <s> returns the symbolic value associated to this node </s>
funcom_train/10196102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LinkedHashMap newDataAssemblyMap() { LinkedHashMap dataAssemblyMap = new LinkedHashMap(metaAssembly.length); for (int i = 0; i < metaAssembly.length; i++) { dataAssemblyMap.put(metaAssembly[i].getPathString(), new ArrayList()); } return dataAssemblyMap; } COM: <s> creates new data assembly map which has link path as a key </s>
funcom_train/3102540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Button createAutoInsertButton(final Composite parent, final String label) { Assertion.valid(parent); Assertion.nonEmpty(label); final Button button= new Button(parent, SWT.CHECK); button.setText(label); button.setLayoutData(new GridData()); button.addSelectionListener(new SelectionAdapter() { public final void widgetDefaultSelected(final SelectionEvent event) { widgetSelected(event); } public final void widgetSelected(final SelectionEvent event) { Assertion.valid(event); handleSettingsChanged(); } }); return button; } COM: <s> creates the auto insert button of the dialog </s>
funcom_train/365753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonRediscover() { if (jButtonRediscover == null) { try { jButtonRediscover = new JButton(); jButtonRediscover.setText("Rediscover Nodes"); // Generated jButtonRediscover.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { Logic.setStop(false); logic.reDiscoverNodes(); } }); } catch (java.lang.Throwable e) { // TODO: Something } } return jButtonRediscover; } COM: <s> this method initializes j button rediscover </s>
funcom_train/8076044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCindex(int cIndex) { if (m_Instances.numAttributes() > 0) { m_cIndex = cIndex; if (m_Instances.attribute(m_cIndex).isNumeric()) { setNumeric(); } else { if (m_Instances.attribute(m_cIndex).numValues() > m_colorList.size()) { extendColourMap(); } setNominal(); } } } COM: <s> set the index of the attribute to display coloured labels for </s>
funcom_train/13598597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveProcessDefinition( ProcessDefinition processDefinition ) { try { session.save(processDefinition); } catch (Exception e) { e.printStackTrace(); log.error(e); jbpmSession.handleException(); throw new JbpmException("couldn't save process definition '" + processDefinition + "'", e); } } COM: <s> saves the process definitions </s>
funcom_train/6237505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveOrientationDependingDividerLocation() { int dividerLoc = _splitPane.getDividerLocation(); if(_splitPane.getOrientation() == JSplitPane.VERTICAL_SPLIT){ Preferences.userRoot().putInt(PREFS_KEY_SPLIT_DIVIDER_LOC, dividerLoc); }else{ Preferences.userRoot().putInt(PREFS_KEY_SPLIT_DIVIDER_LOC_HORIZONTAL, dividerLoc); } } COM: <s> save the location of the divider depending on the orientation </s>
funcom_train/23899461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Combo getTextControl(Composite parent) { if (phpExecutableControl == null) { assertCompositeNotNull(parent); fModifyListener = new ModifyListener() { public void modifyText(ModifyEvent e) { doModifyText(e); } }; phpExecutableControl = new Combo(parent, SWT.READ_ONLY); phpExecutableControl.setItems(preparePHPExecutableEntryList()); setPhpExecutable(phpExecutable); phpExecutableControl.setFont(parent.getFont()); phpExecutableControl.addModifyListener(fModifyListener); phpExecutableControl.setEnabled(isEnabled()); } return phpExecutableControl; } COM: <s> creates or returns the created text control </s>
funcom_train/39040963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean SortByDuration(){ boolean foundSomething = false; for(int i=0;i<Spells.length-1;i++) { if( Spells[i].Duration > Spells[i+1].Duration ) { foundSomething = true; Spell tmpSpell = Spells[i+1]; Spells[i+1] = Spells[i]; Spells[i] = tmpSpell; break; } } return foundSomething; } COM: <s> simple bubble sort based on the spell duration </s>
funcom_train/4085844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCellWidget( Vec2i loc, Widget widget ) { assert 0 <= loc.x && loc.x < width : "The x coordinate must be a valid cell coordinate."; assert 0 <= loc.y && loc.y < height : "The y coordinate must be a valid cell coordinate."; cells[loc.x][loc.y].addCellWidget(widget); } COM: <s> adds a the widget to draw at a specific cell </s>
funcom_train/38385767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetFont() { assertEquals("Wrong font of super style.", new Font("Serif", Font.ITALIC, 16), fSuperStyle.getFont()); assertEquals("Wrong font of inherited style.", new Font("Dialog", Font.BOLD + Font.ITALIC, 10), fStyle.getFont()); } COM: <s> tests the get font method of redstyle </s>
funcom_train/49791010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertNotEqual(String message, Object a, Object b) { if (a == null) { assertNotNull(message + ", expected not equal: '" + a + "' and: '" + b + "'", b); } else { assertFalse(message + ", expected not equal: '" + a + "' and: '" + b + "'", a.equals(b)); } } COM: <s> assert that the two elements are not the same </s>
funcom_train/28726767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveTestStorage(final Text txt) { try { project.setPersistentProperty(new QualifiedName( "ca.ucalgary.cpsc.ebe.fitClipse", "project.testStorage"), txt.getText()); } catch (final CoreException e) { MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Error", "Error in saving project properties for TestStorage"); e.printStackTrace(); } } COM: <s> save test storage </s>
funcom_train/1471645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUpdate() { Integer id = new Integer(1); TbbsAd tbbsAd = adService.load(id); tbbsAd.setTitle("更新"); adService.update(tbbsAd); //更新 TbbsAd result = adService.load(id); assertEquals("更新",result.getTitle()); } COM: <s> run the void update tbbs ad method test </s>
funcom_train/1748229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ISVNClientAdapter getSVNAdapter(User user) { ISVNClientAdapter userSVN = adapters.get(user); if (userSVN == null) { userSVN = SVNClientAdapterFactory.createSVNClient(SVN_CLIENT_TYPE); userSVN.setUsername(user.getUserId().toString()); userSVN.setPassword(Encryptor.decrypt(user.getPassword2(), user .getUserName())); adapters.put(user, userSVN); } return userSVN; } COM: <s> do not call dispose for svnadapter after use </s>
funcom_train/27761967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws SQLException { if (closed) { throw new SQLException(CLOSE_RESOURCE_ERROR); } while (activeCount > 0) { GenericConnection conn = (GenericConnection) getConnection(); conn.getConnection().close(); activeCount--; } //Mark this data source as having been closed and release our driver closed = true; driver = null; } COM: <s> close all connections that have been created by this data source </s>
funcom_train/16759301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void simpleUpdate() { // Let the programmable sound update itself. AudioSystem.getSystem().update(); // Move the skybox into position sb.getLocalTranslation().set(cam.getLocation().x, cam.getLocation().y, cam.getLocation().z); } COM: <s> called every frame for updating </s>
funcom_train/33660114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processIncomingMessage(){ Message msg; synchronized(messages){ msg = messages.remove(0); } String target = null; int type = 0; int mask = 0; try { target = msg.getTarget(); type = msg.getType(); if(target.equals(MessageTypes.SENDTOALL)){ for(NotifiableEntity entry : listeners){ mask = entry.getSense(); if((mask & type) == type){entry.update(msg);} } }else{ for(NotifiableEntity entry : listeners){ mask = entry.getSense(); if(entry.getId().equals(target) && (mask & type) == type){ entry.update(msg); } } } } catch (RemoteException e) { e.printStackTrace(); } } COM: <s> process the incoming message remove the first message from </s>
funcom_train/1502862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Contact getUpdatedContact(Contact contact) throws IOException { GoogleUrl url = new GoogleUrl(contact.getSelfLink()); Contact newContactsEntry = super.executeGet(url, contact.etag, false, Contact.class); if (newContactsEntry == null) { return contact; } else { return newContactsEntry; } } COM: <s> returns the updated version of </s>
funcom_train/5459743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URI getTypeUri() { Set<URI> types = new HashSet<URI>(ontologyDAO.getDataSourceSubclasses()); Collection nodes = configurationRdfContainer.getAll(RDF.type); for (Object nodeObject : nodes) { if (nodeObject instanceof URI) { if (types.contains(nodeObject)) { return (URI)nodeObject; } } } return null; } COM: <s> returns the uri of the type of this data source </s>
funcom_train/48153376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e){ if (e.getSource() == timer){ if (trial < n){ Card card = hand.getCard(trial); card.setFaceUp(true); record[2 * trial + 1] = card.getValue(); record[2 * trial + 2] = card.getSuit(); //playnote(card.getCardNumber()); trial++; } else{ timer.stop(); super.doExperiment(); record[0] = getTime(); recordTable.addRecord(record); } } else super.actionPerformed(e); } COM: <s> this method handles the timer events associated with the step process </s>
funcom_train/31224051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getNodeText(Node n) { NodeList childNodes = n.getChildNodes(); for(int i = 0; i < childNodes.getLength(); ++i) { if( childNodes.item(i).getNodeType() == Node.TEXT_NODE ) { return childNodes.item(i).getNodeValue(); } } return null; } COM: <s> quickly method to get the text to an xml node </s>
funcom_train/8351452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("UpdateServiceHttpPort".equals(portName)) { setUpdateServiceHttpPortEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/20659512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPopupMenu getJpmGames() { if (jpmGames == null) { try { jpmGames = new JPopupMenu(); jpmGames.setLabel("- Modify Games -"); jpmGames.addSeparator(); jpmGames.add(getJmiGamesAdd()); jpmGames.add(getJmiGamesEdit()); jpmGames.add(getJmiGamesRemove()); } catch (java.lang.Throwable e) { l.severe("Unexpected error occured. Something wrong with GamesPopupMenu..."); e.printStackTrace(); } } return jpmGames; } COM: <s> this method initializes j popup menu </s>
funcom_train/40220989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void click() { if (pressedLabel == null || pressedLoc == null) { return; } instruction += pressedLoc.toString() + " "; numClicks++; if (numClicks >= noClicksForInstruction) { numClicks = 0; clearHighlights(); runner.perform( instruction ); instruction = ""; } else if (runner.getGame().getBoard().getPieceAt(pressedLoc) != null){ highlightPieceMoves(); } } COM: <s> performs actions required by the board when it is clicked </s>
funcom_train/34890858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopProgressBar() { try { if (leaveProgressBar) { leaveProgressBar = false; return; } NonstopProgress.doProgress = false; if (nonstop != null) { nonstop.join(100); } } catch (InterruptedException ex) { ex.printStackTrace(); } finally { nonstop = null; setProgressInterval(0, 0); progressBar.setMinimum(0); progressBar.setMaximum(0); progressBar.setValue(0); barcount = 0; progressBar.setValue(0); } } COM: <s> stops the progress bar and resets it </s>
funcom_train/33860924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getRemoveUnneededBracketjPanel() { if (removeUnneededBracketjPanel == null) { GridBagConstraints gridBagConstraints612 = new GridBagConstraints(); gridBagConstraints612.fill = GridBagConstraints.BOTH; gridBagConstraints612.weighty = 1.0; gridBagConstraints612.weightx = 1.0; removeUnneededBracketjPanel = new JPanel(); removeUnneededBracketjPanel.setBackground(Color.GRAY); removeUnneededBracketjPanel.setLayout(new GridBagLayout()); removeUnneededBracketjPanel.add(getSingleOperationsPane1(), gridBagConstraints612); } return removeUnneededBracketjPanel; } COM: <s> this method initializes remove unneeded bracketj panel </s>
funcom_train/15616337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModelAndView handleJAMWikiRequest(HttpServletRequest request, HttpServletResponse response, ModelAndView next, WikiPageInfo pageInfo) throws ServletException, IOException { File file = this.retrieveFile(request); if (file == null) { this.streamFileFromDatabase(request, response); } else { this.streamFileFromFileSystem(file, response); } return null; } COM: <s> handle image requests returning the binary image data </s>
funcom_train/10625530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIllegalBlockSizeException01() { IllegalBlockSizeException tE = new IllegalBlockSizeException(); assertNull("getMessage() must return null.", tE.getMessage()); assertNull("getCause() must return null", tE.getCause()); } COM: <s> test for code illegal block size exception code constructor </s>
funcom_train/3814002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dumpInfo() { logger.info("Max CI Units " + numCIUnits); logger.info("Unit table size " + unitTable.length); if (logger.isLoggable(Level.FINER)) { for (int i = 0; i < unitTable.length; i++) { logger.finer(String.valueOf(i) + ' ' + unitTable[i]); } } } COM: <s> dumps out info about this pool </s>
funcom_train/37739776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int maxKeyLength () throws IOException { if (dbConnection == null) { throw new IllegalStateException ("No connection set"); } final int defaultMaxKeyLength = 50; try { // Request keylength value from database schema int kLength = JDBCUtil.getTableColumnSize (dbConnection, dbTableName, mapColumnName, defaultMaxKeyLength); return kLength; } catch (SQLException exc) { throw new PersistentMapSQLException(exc); } } COM: <s> retrieves the information about the maximum string length of key </s>
funcom_train/14088694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSentDate(Date d) throws IOException { String chunkId = "0039"; removeEntry(chunkId, IMessage.PT_SYSTIME); this.createHeaderEntry(this.rootNode, "__substg1.0_" + chunkId, INode.PT_SYSTIME, INode.createPtSysDate(d)); } COM: <s> sets the sent date of the msg file </s>
funcom_train/20504281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean verifyBookingOfSeat(long seatId, long bookingId) { String sql = "select count(*) from Seat_Status where Seat_id = ? and Booking_id = ?"; Object[] args = new Object[] { new Long(seatId), new Long(bookingId) }; return jdbcTemplate.queryForInt(sql, args) > 0; } COM: <s> verifies that given seat is booked with the given booking </s>
funcom_train/14598542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getExclusionCode(String host, String path) { String[][] xpath = (String[][]) table.get(host.toLowerCase()); if (xpath == null) return NOT_KNOWN; if (encountered(xpath[0], path)) return ALLOWED; if (encountered(xpath[1], path)) return DISALLOWED; return ALLOWED; } COM: <s> get the exclusion code for the url specified by the given host and </s>
funcom_train/13531965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public KaCoMaData getKaCoMaData(String nimi){ String kaco; if (nimi == null) { nimi = KACOMA; } KaCoMaData data; try { kaco = getProperty(nimi +".dataclass",null); data = (KaCoMaData)getClass(kaco); return data; } catch (MissingResourceException me) { } return null; } COM: <s> load kacoma data class according to setting in </s>
funcom_train/37556409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText () { checkWidget (); if ((style & SWT.SEPARATOR) != 0) return ""; int length = OS.GetWindowTextLength (handle); if (length == 0) return ""; TCHAR buffer = new TCHAR (getCodePage (), length + 1); OS.GetWindowText (handle, buffer, length + 1); return buffer.toString (0, length); } COM: <s> returns the receivers text which will be an empty </s>
funcom_train/22370910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JComboBox getComboBoxEditor(TextTagAttribute attribute) { JComponent c = controls.get(attribute).getEditor(); if (c instanceof JComboBox) { return (JComboBox) c; } else { throw new IllegalArgumentException(StringUtils.getString(attribute.toString(), " editor is not a JComboBox")); } } COM: <s> combo box editor for attribute </s>
funcom_train/2885050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TestListener listen(String suiteName) throws RemoteException, SmartFrogException { TestListenerFactory listenerFactory = getTestListenerFactory(); TestListener newlistener = listenerFactory.listen(this, getHostname(), sfDeployedProcessName(), suiteName, System.currentTimeMillis()); //now export the listener newlistener = exportTestListener(newlistener); return newlistener; } COM: <s> create a new listener from the current factory </s>
funcom_train/37541850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFundamental() { int fundamental = -1; boolean isFound = false; for (int i = 0; i < cells.length && !isFound; i++) { if (cells[i].isActive() && !cells[i].isFreezed()) { fundamental = i; isFound = true; } } return fundamental; } COM: <s> return the index of the fundamental cell supposedly 1 1 </s>
funcom_train/23263930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WFSDataSource getDataSource(int code){ WFSDataSource ds = null; if (dataSources != null && !dataSources.isEmpty()) { Iterator it = dataSources.iterator(); while (it.hasNext()) { WFSDataSource f = (WFSDataSource) it.next(); if (f.getCode() == code){ ds = f; break; } } } return ds; } COM: <s> search for a single data source by a identifier code </s>
funcom_train/44624032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitJmlStatementDecls(JmlTree.JmlStatementDecls tree) { boolean prevAllowJML = jmlresolve.setAllowJML(true); JmlToken prevClauseType = currentClauseType; currentClauseType = tree.token; for (JCTree.JCStatement s : tree.list) { attribStat(s,env); } currentClauseType = prevClauseType; jmlresolve.setAllowJML(prevAllowJML); } COM: <s> this handles jml declarations method and ghost fields methods types </s>
funcom_train/43326842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final static public String one2Three(char x) throws IllegalArgumentException { int pos3; int pos1; char y = Character.toUpperCase(x); if (y=='B') y='N'; if (y=='Z') y='E'; pos1 = oneLetter.indexOf(x); if (pos1 == -1) throw new IllegalArgumentException("'"+ String.valueOf(x)+ "is not a valid amino acid"); pos3=pos1*4; return threeLetter.substring(pos3,pos3+3); } COM: <s> convert your 1 letter code into 3 letter code </s>
funcom_train/12560773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int createDisplayId() { int id; do { lastLocalDisplayId++; // [high 8 bits: isolate id][low 24 bits: display id]] id = ((isolateId & 0xff)<<24) | (lastLocalDisplayId & 0x00ffffff); } while (findDisplayById(id) != null); return id; } COM: <s> creates an display id that is unique across all isolates </s>
funcom_train/15453197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getActivities(User user) { String query = "from activity in class org.cesar.resc.profileManagement.api.Activity where activity.user = :user"; Query hibernateQuery = this.session.createQuery(query); hibernateQuery.setEntity("user", user); return new LinkedHashSet(hibernateQuery.list()); } COM: <s> get the activies from a given user </s>
funcom_train/50304946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void joinConference(int confNo) throws IOException, RpcFailure { addMember(confNo, getMyPerson().getNo(), 100, getMyPerson().noOfConfs+1, false, false, false); membership = getMyMembershipList(false); // XXX } COM: <s> adds a conference with priority 100 at the last position of the currently </s>
funcom_train/50342296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initComponents() { // title this node setUserObject("Roster"); // add every roster entry List<RosterEntry> list = Roster.instance().matchingList(null, null, null, null, null, null, null ); for (RosterEntry r : list) { add(new DefaultMutableTreeNode(r.getId())); } } COM: <s> initialize the connection to the roster </s>
funcom_train/19142730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List findAll() { Session session = HibernateUtil.currentSession(); Transaction tx = null; List charts = null; try { tx = session.beginTransaction(); charts = session.find("from Chart"); tx.commit(); return charts; } catch (HibernateException e) { HibernateUtil.handleHibernateException(tx, e); } finally { HibernateUtil.closeSession(); } return charts; } COM: <s> returns all charts </s>
funcom_train/16292487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copy(int channel, int sourceIndex, int destIndex, int length) { float[] data=getChannel(channel); int bufferCount=getSampleCount(); if (sourceIndex+length>bufferCount || destIndex+length>bufferCount || sourceIndex<0 || destIndex<0 || length<0) { throw new IndexOutOfBoundsException("parameters exceed buffer size"); } System.arraycopy(data, sourceIndex, data, destIndex, length); } COM: <s> copies data inside a channel </s>
funcom_train/4357874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disconnect() { boolean connect = isConnected(); closeSocket(); if (connect) { if (log.isDebugEnabled()) log.debug(sm.getString("IDataSender.disconnect", getAddress().getHostAddress(), new Integer(getPort()), new Long(0))); } } COM: <s> disconnect and close socket </s>
funcom_train/598449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setCrc() { int crc = ZrtpCrc32.zrtpGenerateCksum(buffer, offset,length-ZrtpPacketBase.CRC_SIZE); // convert and store CRC in crc field of ZRTP packet. crc = ZrtpCrc32.zrtpEndCksum(crc); setIntegerAt(crc, length - ZrtpPacketBase.CRC_SIZE); } COM: <s> set zrtp crc in this packet </s>
funcom_train/14025714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSourceRow(int row) { if (_indexList == null) { return row; } if ((row >= 0) && (row < _indexList.size())) { return (_indexList.get(row)).intValue(); } // Requested row is out of range, so we return the same value // used to indicate an "empty selection" --- -1. return -1; } COM: <s> this is the key dependency method given a row in the dependent table </s>
funcom_train/44871415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getAxisWidthPanel() { if (axisWidthPanel == null) { axisWidthLabel = new JLabel(); axisWidthLabel.setText("Width "); axisWidthPanel = new JPanel(); axisWidthPanel.setLayout(new BoxLayout(getAxisWidthPanel(), BoxLayout.X_AXIS)); axisWidthPanel.add(axisWidthLabel, null); axisWidthPanel.add(getAxisLineWidthComboBox(), null); } return axisWidthPanel; } COM: <s> this method initializes axis width panel </s>
funcom_train/10628488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructorPrime2() { int bitLen = 2; Random rnd = new Random(); BigInteger aNumber = new BigInteger(bitLen, 80, rnd); assertTrue("incorrect bitLength", aNumber.bitLength() == bitLen); int num = aNumber.intValue(); assertTrue("incorrect value", num == 2 || num == 3); } COM: <s> create a prime number of 2 bits length </s>
funcom_train/4443929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showMessage(TwitterStatus status) { TwitterStatusDialog tss = new TwitterStatusDialog(tableViewer .getControl().getShell(), status.getImage()); String message; message = status.getScreenName() + " wrote on " + status.getMessageDate().toString() + "\n \n" + status.getMessage(); tss.setMessage(message); tss.open(); } COM: <s> show a twitter message in a twitter status dialog </s>
funcom_train/20947161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String generateNextID() { if (mCurrentID < 0) { try { mCurrentID = RadLexIDFactory.getNumericID(getHighestID()) + 1; } catch (NumberFormatException e) { mCurrentID = 0; } catch (ClassCastException e) { mCurrentID = 0; } } else { mCurrentID++; } return RadLexIDFactory.sPrefix + mCurrentID; } COM: <s> generates the next available rid </s>
funcom_train/10504890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResolvedResource getBuiltArtifact(Artifact artifact) { if (!this.built) { throw new IllegalStateException("build in directory `" + this.dir + "' has not yet successfully completed"); } return new ResolvedResource( new BuiltFileResource(this.dir, artifact), this.mr.getRevision()); } COM: <s> get a built artifact </s>
funcom_train/40731328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setHorizontalScrollBarProxy(IScrollBarProxy scroll) { checkWidget(); if (getHorizontalBar() != null) { return; } hScroll = scroll; hScroll.addSelectionListener(new SelectionListener() { public void widgetSelected(SelectionEvent e) { onScrollSelection(); } public void widgetDefaultSelected(SelectionEvent e) { } }); } COM: <s> sets the external horizontal scrollbar </s>
funcom_train/42875277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object apply(List<Object> args, LispInterpreter interp) throws WrongArgumentCountException, LispException { checkArgs("eval", args, 2); LispEvaluator ev = interp.getEvaluator(); return ev.eval(args.get(0), (LispEnv) args.get(1), interp); } COM: <s> processes i eval i expression </s>
funcom_train/365676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonStop() { if (jButtonStop == null) { try { jButtonStop = new JButton(); jButtonStop.setText("Stop Iteration"); // Generated jButtonStop.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { Logic.setStop(true); } }); } catch (java.lang.Throwable e) { // TODO: Something } } return jButtonStop; } COM: <s> this method initializes j button stop </s>
funcom_train/20827066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isUsed() { String defaultName = getDefaultName(getId()); boolean used = ! getName().equals(defaultName); for (int i = 0; !used && i < levels.size(); i++) { if (levels.get(i).isActive()) { used = true; } } return used; } COM: <s> indicates whether this submaster is in use </s>
funcom_train/13372111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean searchFeedVector(String title) { boolean isExists = false; for (int i = 0; i < feedsVector.size(); i++) { String titleName = (String) feedsVector.elementAt(i); if (titleName.equals(title)) { isExists = true; break; } } return isExists; } COM: <s> check whether the name is currently in use </s>
funcom_train/18751026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doSaveGraph(Graph graph, File file) { try { AspectGraph saveGraph = AspectGraph.getFactory().fromPlainGraph(graph); graphLoader.marshalGraph(saveGraph, file); } catch (IOException exc) { showErrorDialog("Error while saving to " + file, exc); } } COM: <s> saves the contents of a given j model to a given file </s>
funcom_train/13490778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Term cloneAndRenameVars(Term original) { if (original instanceof ConstantTerm) { // a.kozlenkov@city.ac.uk: Why do we need to create a new constant term? return original; //clone((ConstantTerm) original); } if (original instanceof VariableTerm) { return cloneAndRenameVars((VariableTerm) original); } if (original instanceof ComplexTerm) { return cloneAndRenameVars((ComplexTerm) original); } return original; } COM: <s> clone a term and rename all variables </s>
funcom_train/3562792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeVolumeClean(Integer volumeID) throws DbException { NVPair[] parms; parms = new NVPair[1]; parms[0] = new NVPair("volumeID", volumeID.toString()); simpleRequest(REMOVE_VOLUME_CLEAN_PAGE, "Cannot remove volume", parms); } COM: <s> removes a volume in a clean way </s>
funcom_train/14227655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void terminalConnectionCreated(final CallId id, final String address, final String terminal, final int cause) { // define action block EventHandler eh = new EventHandler() { public void process(Object o) { // Force the creation of the Terminal Connection final GenericProvider provider = (GenericProvider) o; final CallMgr callMgr = provider.getCallMgr(); callMgr.getLazyTermConn(id, address, terminal); } }; // dispatch for processing this.getEventPool().put(eh); } COM: <s> receive and queue up a terminal connection created notification event </s>
funcom_train/25119619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getLastElementLength() { LevelState lvlState = getLevelState(); int len = lvlState.getCurrentTag().length(); String prefix = lvlState.getCurrentPrefix(); if ((prefix != null) && !prefix.equals("")) { len += prefix.length() + 1; } return len; } COM: <s> get the tag length prefix name of the last opened level </s>
funcom_train/19431158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndexOf(final Card card) { int index = -1; if (cards.contains(card)) { int currIndex = 0; while (index == -1 && currIndex < cards.size()) { if (get(currIndex).getSuit() == card.getSuit() && get(currIndex).getRank() == card.getRank()) { index = currIndex; } currIndex++; } } return index; } COM: <s> gets the index of a card in the card list </s>
funcom_train/47731981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsElementNamed(String name) { Iterator it = alElements.iterator(); while (it.hasNext()) { IEditableElement element = (IEditableElement) it.next(); if (element instanceof Competence) { Competence comp = (Competence) element; if (comp.getName().equals(name)) return true; } if (element instanceof ActionPattern) { ActionPattern ap = (ActionPattern) element; if (ap.getName().equals(name)) return true; } } return false; } COM: <s> do we contain an element with the name given </s>
funcom_train/10802967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ClassLoader getClassLoader() { if (_cl != null) return _cl; if (classpath != null) _cl = new AntClassLoader(getProject(), classpath, useParent); else _cl = new AntClassLoader(getProject().getCoreLoader(), getProject(), new Path(getProject()), useParent); _cl.setIsolated(isolate); return _cl; } COM: <s> return the classloader to use </s>
funcom_train/37147260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getToolTipText(Object item) { if (item instanceof Task && hasAutoFixOptions((Task)item)) { return "<html><body>" + GanttLanguage.getInstance().getText("datafilter.quickFixOptions") + "</body></html>"; } return null; } COM: <s> tooltips for filter tree </s>
funcom_train/39487661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleTag(Tag tag) { String text; if(tag.name().equals("@config")){ int end; String option, description = ""; text = tag.text().trim(); try { Matcher matcher = Pattern.compile("\\S+").matcher(text); if(matcher.find()) { end = matcher.end(); option = text.substring(0, end); if(text.length() > end) description = text.substring(end); handleOption(option, description); } else { throw new IllegalStateException(); } } catch(IllegalStateException ex) { // If there is nothing following the @config option, then // don't do anything } } } COM: <s> handle a tag </s>
funcom_train/12674537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ignoreChildren() { if (getType() == TokenTypes.IDENT) { setMeaningfulness(false); } SymTabAST child = (SymTabAST) getFirstChild(); while (child != null) { child.ignoreChildren(); child = (SymTabAST) child.getNextSibling(); } } COM: <s> sets meaningfulness for this node and its children </s>
funcom_train/36201800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCheckResult(Date date, Check check, boolean result) { Collection<Pair<Check, Boolean>> pairCollection = checkResults.get(date); if (pairCollection == null) { pairCollection = new LinkedList<Pair<Check, Boolean>>(); checkResults.put(date, pairCollection); } pairCollection.add(new Pair<Check, Boolean>(check, result)); } COM: <s> adds the result of a check to this status </s>
funcom_train/8969682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getExpectedProperty( String propertyName ) { try { ORProperty property = propertiesProvider.getProperty( propertyName ); if( property == null ) { throw new IllegalStateException( "No property, " + propertyName + ", defined" ); } return property.getValue(); } catch( ProviderException pe ) { throw new RuntimeException( "Unexpected Exception getting property, " + propertyName, pe ); } } COM: <s> gets a property that must be defined </s>
funcom_train/50396051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResourcesType addReservationReference(ResourcesType resources) throws Exception{ String resID="<u6rr:ReservationReference xmlns:u6rr=\"http://www.unicore.eu/unicore/xnjs\">"+getReservationReference()+"</u6rr:ReservationReference>"; XmlObject o=XmlObject.Factory.parse(resID); ResourcesDocument rd=ResourcesDocument.Factory.newInstance(); rd.setResources(resources); WSUtilities.append(o, rd); return rd.getResources(); } COM: <s> add the reservation reference to the resources </s>
funcom_train/1791608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Token on() throws Exception { self(); final Object[] list = expected.toArray(); int i = 0; while (i < list.length) { final Token item = (Token) list[i++]; final boolean accept = item.accept(); if (accept) try { final long size = size(); if (size > 1) exit(); reset(); final Token t = item.clone(); return t.on(); } catch (final CloneNotSupportedException e) { throw new RuntimeException(e); } } return self(); } COM: <s> handles the current char </s>
funcom_train/41164035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(ToThemes entity) { EntityManagerHelper.log("saving ToThemes instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved to themes entity </s>