__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/18077484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void zoom(int newX, int newY) { double tmp, x2=xToMath(newX), y2=yToMath(newY); if(x2<x1) { tmp=x1; x1=x2; x2=tmp;} if(y2<y1) { tmp=y1; y1=y2; y2=tmp;} automaticScale(x1,x2, y1,y2); } COM: <s> this method zooms in an rectangle </s>
funcom_train/21332335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setURL(String _stURL) { isHTMLSrc = null; stURL = (null==_stURL || 0==_stURL.length()) ? stAboutBlank : _stURL; if(isPeerReady()) { setDocumentReady(false); brPeer.acceptTargetURL(); } } COM: <s> sets the current document url </s>
funcom_train/4379561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateBoardFromPrefs() { RaptorPreferenceStore preferences = Raptor.getInstance() .getPreferences(); for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) { squares[i][j].clearCache(); } } for (PieceJailChessSquare pieceJailSquare : pieceJailSquares) { if (pieceJailSquare != null) { pieceJailSquare.setBackground(preferences .getColor(BOARD_PIECE_JAIL_BACKGROUND_COLOR)); pieceJailSquare.clearCache(); } } } COM: <s> updates only the board and piece jails from </s>
funcom_train/44576827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void accept(ICompilationUnit sourceUnit, AccessRestriction accessRestriction) { CompilationResult result = new CompilationResult(sourceUnit, 1, 1, this.compilerOptions.maxProblemsPerUnit); CompilationUnitDeclaration parsedUnit = this.getParser().dietParse(sourceUnit, result); lookupEnvironment.buildTypeBindings(parsedUnit, accessRestriction); lookupEnvironment.completeTypeBindings(parsedUnit, true); } COM: <s> add an additional compilation unit </s>
funcom_train/7632867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int readContent(InputStream is) { int nread = 0; log("Read content"); String lengthString = headers.get(requestHeaders[REQ_CONTENT_LENGTH]); int length = new Integer(lengthString).intValue(); // Read content length = readData(is, length); return length; } COM: <s> read content data from the input stream </s>
funcom_train/47320616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void AS3(int line) { TYPES type1 = pct.get(pct.size()-1); pct.remove(type1); TYPES type2 = pct.get(pct.size()-1); pct.remove(type2); //TODO if feio! if (type1 == null || type2 == null || type1.getType().equals(type2.getType()) && type1.getType().toLowerCase().equals("int")){ pushIntoPCT(TYPES.INTEGER); }else{ errorBank.addError(new SemanticException(line, "Trying to operate different types "+type1+" "+type2)); pushIntoPCT(type1); //we will do our best to prevent more errors } } COM: <s> this method verifies type compatibility for operations </s>
funcom_train/1562687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent ae) { JMenuItem mi = (JMenuItem) ae.getSource(); String name = mi.getName(); Object o = plugintable.get(name); if (o instanceof PlugLetIF) { PlugLetIF plugin = (PlugLetIF) plugintable.get(name); // plugin.execute(app.getGgbApi()); plugin.execute(); } else { Application .debug("No PlugLetIF called " + name + "in plugintable!"); }// if-else }// actionPerformed(ActionEvent) COM: <s> implementing action listener for menu items </s>
funcom_train/7597247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set inverseRoleList(Set roles) { Set set = new HashSet(); Iterator i = roles.iterator(); while(i.hasNext()) { Role r = (Role) i.next(); Role invR = r.getInverse(); if(invR == null) { System.err.println("Property " + r + " was supposed to be an ObjectProperty but it is not!"); } else set.add(invR); } return set; } COM: <s> for each role in the list finds an inverse role and </s>
funcom_train/17831508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ContactGroup getContactGroup(String groupName) { final Iterator groups = new ArrayList(contactGroups).iterator(); while (groups.hasNext()) { ContactGroup group = (ContactGroup)groups.next(); if (group.getGroupName().equals(groupName)) { return group; } } return null; } COM: <s> returns a contact group based on its name </s>
funcom_train/21999642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void graphAdvanceDecline() { Runnable runnable = new Runnable() { public void run() { Thread thread = Thread.currentThread(); GraphXYPlot graph = new AdvanceDeclineGraph(); if (!thread.isInterrupted()) { ChartModule chartModule = new ChartModule(desktop, null); chartModule.setTitle(Localization.getString("GRAPH")); chartModule.addMarketIndicator(graph); desktopManager.newFrame(chartModule); } } }; jobsManager.submitInterJob(ContinuousTrade.jobQueueInter, runnable, 0, "CommandManager", "graphAdvanceDecline"); } COM: <s> graph the advance decline market indicator </s>
funcom_train/20080009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCellStyle(int index, String style) { if (cellStyles == null) cellStyles = new String[values.length]; cellStyles[index] = style; if (isRendered()) { table.getView().setCellStyle(this, index, style); } } COM: <s> sets the style for a cell </s>
funcom_train/8717372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addGrammar(Grammar delegator, Grammar delegate) { if ( delegator.compositeTreeNode==null ) { delegator.compositeTreeNode = new CompositeGrammarTree(delegator); } delegator.compositeTreeNode.addChild(new CompositeGrammarTree(delegate)); /*// find delegator in tree so we can add a child to it CompositeGrammarTree t = delegateGrammarTreeRoot.findNode(delegator); t.addChild(); */ // make sure new grammar shares this composite delegate.composite = this; } COM: <s> add delegate grammar as child of delegator </s>
funcom_train/31907603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLocationLine(Element elt) { int hash = elt.hashCode() & 0x7FFFFFFF; int index = hash % table.length; for (Entry e = table[index]; e != null; e = e.next) { if ((e.hash == hash) && e.element.equals(elt)) { return e.locationLine; } } return 0; } COM: <s> returns the location in the source file of the end element </s>
funcom_train/20342410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand() { if (backCommand == null) {//GEN-END:|61-getter|0|61-preInit // write pre-init user code here backCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|61-getter|1|61-postInit // write post-init user code here }//GEN-BEGIN:|61-getter|2| return backCommand; } COM: <s> returns an initiliazed instance of back command component </s>
funcom_train/34618736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TaskList getTaskList() { DocumentationTaskFactory factory = new DocumentationTaskFactory( accessor); TaskQueryExecutor executor = new TaskQueryExecutor(accessor); TaskList taskList = new TaskList(); addAllCompulsoryTasks(taskList, executor, factory); removeAllFulfilledCompulsoryTasks(taskList, executor, factory); addAllOptionalTasks(taskList, executor, factory); removeAllFulfilledOptionalTasks(taskList, executor, factory); return taskList; } COM: <s> this method provides all open tasks from an ontology </s>
funcom_train/3915200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCopyFolder_SubFolder() { try { File folderSrc = FileSupport.getTempFolder("src"); File folderDest = FileSupport.getTempFolder("src/dest"); FileUtils.copyFolder(folderSrc, folderDest); // Shouldn't reach here fail("Should have thrown an Exception"); } catch(IOException ex) { assertTrue(true); } } COM: <s> dont copy to sub folder </s>
funcom_train/20043465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _isProxyEnabled() { boolean proxyEnabled = oObj.isProxyEnabled(); String proxyEnabledStr = (String)expectedProxies.get("proxyEnabled"); boolean expected = proxyEnabledStr != null && proxyEnabledStr.equalsIgnoreCase("true"); tRes.tested("isProxyEnabled()", proxyEnabled == expected); } COM: <s> calls code is proxy enabled code and verifies its result with </s>
funcom_train/9431932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setDisplayOnlyPhones(boolean displayOnlyPhones) { mDisplayPhones.setChecked(displayOnlyPhones); Editor editor = mPrefs.edit(); editor.putBoolean(Prefs.DISPLAY_ONLY_PHONES, displayOnlyPhones); editor.commit(); mAdapter.setChildDescripWithPhones(displayOnlyPhones); mAdapter.notifyDataSetChanged(); } COM: <s> assign a specific value to </s>
funcom_train/35739420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void showInstalledJars() { int maxNumWidth = (instJarList.size() + "").length(); for (int i = 0; i < instJarList.size(); i++) println(formatNumber(i, maxNumWidth) + " " + instJarList.get(i).toString()); } COM: <s> lists all intalled jars </s>
funcom_train/2026410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getAboutMenuItem() { if (aboutMenuItem == null) { aboutMenuItem = new JMenuItem(); aboutMenuItem.setText("About"); aboutMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new JDialog(MainWindow.this, "About", true).show(); } }); } return aboutMenuItem; } COM: <s> this method initializes j menu item </s>
funcom_train/35715535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ITypedRegion getPartition(int pos) { if (fCachedPartition == null || !contains(fCachedPartition, pos)) { Assert.isTrue(pos >= 0 && pos <= fDocument.getLength()); try { fCachedPartition= TextUtilities.getPartition(fDocument, fPartitioning, pos, false); } catch (BadLocationException e) { fCachedPartition= null; } } return fCachedPartition; } COM: <s> returns partition information about the region containing the </s>
funcom_train/37246807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public short addCPEntry(ConstantPoolEntry entry) { if (poolEntries.contains(entry)) { return (short)(poolEntries.indexOf(entry)+1); } poolEntries.add(entry); int index = poolEntries.size(); int step = entry.getUsedCPSpace(); for (int i=1; i<step; ++i) { //add dummy objects poolEntries.add(new Object()); } return (short)index; } COM: <s> add a constant pool entry if it already exists just return an index </s>
funcom_train/1773119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDimensions() { List<String> output = dataManager.getDimensionValues(TestUtil.getNewDataQuery()); assertTrue(output.size() > 0); for (int i = 0; i < output.size(); i++) { assertEquals(testDimensions[0][i], output.get(i)); } } COM: <s> ensure we can get a list of dimensions from a query </s>
funcom_train/40411585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetVideosByGenre() { System.out.println("getVideosByGenre"); String genre = "Action"; try { Collection<Catalogue> result = instance.getVideosByGenre(genre); assertEquals(result.size(), 0); } catch (CatalogueException ex) { ex.printStackTrace(); } } COM: <s> test of get videos by genre method of class usyd </s>
funcom_train/46280309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroy() { super.destroy(); //if we have had anything to do with creating an axis server if (axisServer != null) { //then we lock it synchronized(axisServer) { if (axisServer != null) { //clean it up axisServer.cleanup(); //and erase our history of it axisServer =null; storeEngine(getServletContext(),null); } } } } COM: <s> destroy method is called when the servlet is going away </s>
funcom_train/32613844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addElement(QueryElement el) { if (!elements.isEmpty()) { QueryElement element = (QueryElement) elements .get(elements.size() - 1); element.setNext(el); el.setPrevious(element); } el.setParent(this); if (el == null) { throw new NullPointerException("QueryElement el was null."); } elements.add(el); } COM: <s> add the given query element to the list of elements </s>
funcom_train/47808004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void Zip(String destinationS) throws IOException{ // Get the destination File destination = new File(destinationS); //If there is already a file.... if (destination.exists()){ logger.info("Replacing " + destination.getAbsolutePath()); destination.delete(); } // Zip the folder. Zipper.zip(this.unzipFolder, destination.getAbsolutePath()); //If public if (this.status == VisibilityStatus.PUBLIC){ //Set the status of the file changeFilePermissions(destination.getAbsolutePath(), this.status); } } COM: <s> zip the folder to the specified destination and change the status </s>
funcom_train/2582058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllSeries() { // deregister the collection as a change listener to each series in the // collection for (int i = 0; i < this.data.size(); i++) { TimeSeries series = (TimeSeries) this.data.get(i); series.removeChangeListener(this); } // remove all the series from the collection and notify listeners. this.data.clear(); fireDatasetChanged(); } COM: <s> removes all the series from the collection and sends a </s>
funcom_train/17204780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean definitelySame(TypeReference that) { if (VM.VerifyAssertions) VM._assert(that != null); if (this == that) return true; if (name != that.name) return false; RVMType mine = peekType(); RVMType theirs = that.peekType(); if (mine == null || theirs == null) return false; return mine == theirs; } COM: <s> do this and that definitely refer to the same type </s>
funcom_train/33858140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReflectionArrayCycle() throws Exception { Object[] objects = new Object[1]; objects[0] = objects; assertEquals( this.toBaseString(objects) + "[{" + this.toBaseString(objects) + "}]", ToStringBuilder.reflectionToString(objects)); this.validateEmptyToStringStyleRegistry(); } COM: <s> test an array element pointing to its container </s>
funcom_train/39062025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IExtensionAttribute_type_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IExtensionAttribute_type_feature", "_UI_IExtensionAttribute_type"), MarkingPackage.eINSTANCE.getIExtensionAttribute_Type(), false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the type feature </s>
funcom_train/18103441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void determineCategoryID() throws IOException { try { RecordEnumeration en = store.enumerateRecords(null, null, false); for (; en.hasNextElement();) { int ID = en.nextRecordId(); byte[] record = store.getRecord(ID); if (isCategoryRecord(record)) { categoryID = ID; return; } } throw new IOException("No category info in RecordStore " + store.getName()); } catch (RecordStoreException e) { throw new IOException(e.getMessage()); } } COM: <s> sets the local variable </s>
funcom_train/36782627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Path another) { if (this.path.startsWith(another.getPath())) { // it means this.path is the sub path // for example: // this: /abc/def.do; another: /abc/ return 1; } else if (another.getPath().startsWith(this.path)) { return -1; } return 0; } COM: <s> notice only 1 1 is the right compare result </s>
funcom_train/25289989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getDistanceGain(float[] distance, float[] gain) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_DISTANCE_GAIN_READ)) throw new CapabilityNotSetException(Ding3dI18N.getString("PointSound4")); ((PointSoundRetained)this.retained).getDistanceGain(distance,gain); } COM: <s> gets this sounds distance gain attenuation values in separate arrays </s>
funcom_train/10795433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Value getRegisteredRootVariable(Root<?> root) { Value var = _rootVariables.get(root); if (var != null) return var; SubqueryImpl<?> delegator = getDelegator(); return (delegator == null) ? null : getDelegatorParent().getRegisteredRootVariable(root); } COM: <s> gets the registered variable for the given root </s>
funcom_train/43391260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finishJob(Job pValue){ try{uplThread.addJob(pValue);} catch(Exception e){ pValue.setPubStatus(ActivityStateEnumeration.FAILED); /*@ToDo standard output is missing.........................................*/ } } COM: <s> uploading the result of a terminated job instance </s>
funcom_train/3361520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBindings(Bindings bindings, int scope) { if (scope == ScriptContext.GLOBAL_SCOPE) { context.setBindings(bindings, ScriptContext.GLOBAL_SCOPE);; } else if (scope == ScriptContext.ENGINE_SCOPE) { context.setBindings(bindings, ScriptContext.ENGINE_SCOPE);; } else { throw new IllegalArgumentException("Invalid scope value."); } } COM: <s> sets the code bindings code with the corresponding scope value in the </s>
funcom_train/39881194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean equals(URL url1, URL url2) { if (!sameFile(url1, url2)) { return false; } return Objects.equal(url1.getRef(), url2.getRef()) && Objects.equal(url1.getQuery(), url2.getQuery()); } COM: <s> compares two url objects whether they represent the same url </s>
funcom_train/37904052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sync() { DBBroker broker = null; try { broker = factory.getBrokerPool().get(XMLSecurityManager.SYSTEM_USER); broker.sync(Sync.MAJOR_SYNC); } catch (EXistException e) { LOG.warn(e.getMessage(), e); } finally { factory.getBrokerPool().release(broker); } return true; } COM: <s> the method code sync code </s>
funcom_train/35691502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDoctypeSystem() { if (this.doctypeSystem != null) { return this.doctypeSystem; } ValueBinding _vb = getValueBinding("doctypeSystem"); if (_vb != null) { return (String) _vb.getValue(getFacesContext()); } return null; } COM: <s> p indicates the uri reference to the dtd </s>
funcom_train/33143026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRecordType(RecordType aRecordType) { List tempRecordTypes = new ArrayList(Arrays.asList(recordTypes)); tempRecordTypes.add(aRecordType); recordTypes = (RecordType[]) tempRecordTypes.toArray( new RecordType[tempRecordTypes.size()]); } COM: <s> add a record type definition to this format </s>
funcom_train/2321675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExit() { Ghostscript gs = Ghostscript.getInstance(); //initialize try { gs.initialize(null); } catch (GhostscriptException e) { fail(e.getMessage()); } //exit try { gs.exit(); } catch (GhostscriptException e) { fail(e.getMessage()); } } COM: <s> test of exit method of class ghostscript </s>
funcom_train/44165956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Color getForegroundColor(Color background) { /* * Our eyes have different sensitivity towards * red, green and blue. We want a foreground * color with the inverse brightness. */ if (background.getRed() * 0.3 + background.getGreen() * 0.59 + background.getBlue() * 0.11 < 126) { return Color.WHITE; } else { return Color.BLACK; } } COM: <s> describe code get foreground color code method here </s>
funcom_train/44986996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean needToShowModel(Model model) { if (model == null){ return false; } if (model == getTransferDescription().INTERLIS){ return false; } if (!(model instanceof DataModel)){ return false; } if ((model instanceof SymbologyModel)){ return true; } Iterator iterator = model.iterator(); while (iterator.hasNext()) { Object object = iterator.next(); if (object instanceof Topic && needToShowTopic((Topic) object)){ return true; } } return false; } COM: <s> is it necessary to show model model def </s>
funcom_train/48416024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Repository repository, Object plugin) { if (plugin instanceof Feeder) { repository.put(((Feeder) plugin).getName(), plugin); } else { log.debug("Feeder Loader: " + plugin.getClass() + " not of Type " + getLoadClass()); } } COM: <s> add a plugin to the known plugin map </s>
funcom_train/49319554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void revertToPrevious() { try { super.setStartTime(fOldStartTime); super.setEndTime(fOldEndTime); fChangeSupport.fireVetoableChange(TimeLineNodeModel.NODE, 0, 1); } catch (DetailedPropertyVetoException ex) { // ignore it } catch (PropertyVetoException ex) { ex.printStackTrace(); } } COM: <s> revert the time line node to its previous position </s>
funcom_train/22655840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ImplementationLookup (Class<T> serviceClass) { this.serviceClass = serviceClass; this.serviceAnnotation = this.serviceClass.getAnnotation(Component.class); // Initialize the lookup strategies - order is important here. lookupStrategies = new ArrayDeque<ImplementationLookup<T>.LookupStrategy>(3); lookupStrategies.add(new SystemPropertyValueLookup()); lookupStrategies.add(new ComponentPropertyValueLookup()); lookupStrategies.add(new ServiceLoaderLookup()); } COM: <s> creates a new lookup class </s>
funcom_train/34079612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fid_run_free() { Routine rout = this.rout; rout.ref--; if (rout.ref != 0) { // Delete the routine out of the cache for (Routine p : r_list) { if (p == rout) { r_list.remove(p); break; } } // free(rout); } // free(run); } COM: <s> delete the filter </s>
funcom_train/13186222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLabelType(int type) { if ((type != NO_LABELS) && (type != VALUE_LABELS)) { throw new IllegalArgumentException( "MeterPlot.setLabelType(int): unrecognised type." ); } if (this.labelType != type) { this.labelType = type; notifyListeners(new PlotChangeEvent(this)); } } COM: <s> sets the label type either </s>
funcom_train/5260877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSupportedByPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DesiredResult_supportedBy_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DesiredResult_supportedBy_feature", "_UI_DesiredResult_type"), BmmPackage.Literals.DESIRED_RESULT__SUPPORTED_BY, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the supported by feature </s>
funcom_train/1522427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onNowPlayingMoreClick(View v) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Sessions.buildSessionsAtDirUri(System.currentTimeMillis())); intent.putExtra(Intent.EXTRA_TITLE, getString(R.string.title_now_playing)); startActivity(intent); } COM: <s> handle now playing more action </s>
funcom_train/36961180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getIndentation() { int start = getStart(); IDocument document = getDocument(); try { IRegion region = document.getLineInformationOfOffset(start); String lineContent = document.get(region.getOffset(), region .getLength()); IRubyScript compilationUnit = getRubyScript(); IRubyProject project = compilationUnit == null ? null : compilationUnit.getRubyProject(); return Strings.computeIndentUnits(lineContent, project); } catch (BadLocationException e) { return 0; } } COM: <s> returns the indentation level at the position of code completion </s>
funcom_train/44559872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DcObject query(DcObject base, String query, int[] matcherFieldIdx) { IServer server = getServer(); Region region = getRegion(server); task = server.getSearchTask(this, getSearchMode(server), region, query, base); task.setItemMode(itemMode); task.setMaximum(maximum); task.run(); return getMatchingItem(base, matcherFieldIdx); } COM: <s> queries for items and checks if they are similar to the supplied item </s>
funcom_train/33264795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setData(Object data) { if ( data != null ) { edit.setText(doubleToString((Double)data)); maskText.setText(doubleToString((Double)data)); } else { edit.setText("0.0"); maskText.setText("0.0"); } } COM: <s> sets the data floating point of the double control </s>
funcom_train/24473325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { Set<String> keys = this.eventDataMap.keySet(); LinkedList<String> keysToBeRemoved = new LinkedList<String>(); //Remove everthing leaving only the last one for (String key : keys) { MonitorEventData monitorEventData = this.eventDataMap.get(key); monitorEventData.removeAllEvents(); if(!key.equals(DEFAULT_MODEL_KEY)){ keysToBeRemoved.add(key); } } for (String key : keysToBeRemoved) { this.eventDataMap.remove(key); } } COM: <s> resets the graph and clear the monitoring table </s>
funcom_train/47587613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect(String hostname, int port) throws UnknownHostException, IOException { try { this._clientSocket = new Socket(hostname, port); } catch (ConnectException e) { System.out.println("run server first!"); ForumLogger.logIOException(); System.exit(1); } this._in = new BufferedReader(new InputStreamReader(this._clientSocket.getInputStream())); this._out = new PrintWriter(this._clientSocket.getOutputStream(), true); this._out.flush(); } COM: <s> makes a connection to chosen host name port </s>
funcom_train/40851949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InkInkSource getInkSource() { if(inkSource != null){ return inkSource; }else if(inkSourceRef != null){ return (InkInkSource) getInk().getDefinitions().get(inkSourceRef); }else if(hasParentContext()){ return getParentContext().getInkSource(); }else{ return null; } } COM: <s> returns the ink source which is given by this context </s>
funcom_train/16107157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void emptyElement(String uri, String localName, String qName, Attributes atts) throws SAXException { nsSupport.pushContext(); write('<'); writeName(uri, localName, qName, true); writeAttributes(atts); if (elementLevel == 1) { forceNSDecls(); } writeNSDecls(); write("/>"); super.startElement(uri, localName, qName, atts); super.endElement(uri, localName, qName); } COM: <s> write an empty element </s>
funcom_train/4745048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initCloudImages() { if (filterImagesData.getSelectedCloud() == null || filterImagesData.getSelectedCloud().isEmpty()) { List<Cloud> clouds = this.getClouds(); if (!clouds.isEmpty()) { filterImagesData.setSelectedCloud( clouds.get(0).getCloudName()); } } } COM: <s> initiates the cloud to retrieve cloud images from if </s>
funcom_train/13286540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItem() { if (jMenuItem == null) { jMenuItem = new JMenuItem(); jMenuItem.setText("Neue DVD"); jMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { _neueDVDFenster = new NeueDvdGui(_mainClass); } }); } return jMenuItem; } COM: <s> this method initializes j menu item </s>
funcom_train/31688242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHeader(String sName) { if (sName.equals("Depth")) { return this.getDepth(); } else if (sName.equals("Destination")) { return this.getDestination(); } else if (sName.equals("Overwrite")) { return this.getOverwrite() ? "T" : "F"; } else { return (String) this.m_mHeaders.get(sName); } } COM: <s> returns a header value for a given header name </s>
funcom_train/10258976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkServerLoginSettings() { String usernameSyncml = (String)syncmlValues.get(PARAM_USERNAME); String passwordSyncml = (String)syncmlValues.get(PARAM_PASSWORD); if ((usernameSyncml.length()<1)&&(passwordSyncml.length()<1)) { return false; } return true; } COM: <s> check if there is a valid username and password for syncmlserver </s>
funcom_train/49404475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean ensureBufferNotEmpty() { try { if (nextByte < numBytes) { return true; } nextByte = 0; numBytes = in.read(fileBuffer); atEof = (numBytes < 1); return !atEof; } catch (IOException e) { throw new PicardException("Exception reading InputStream", e); } } COM: <s> ensure that file buffer has at least one byte available in it </s>
funcom_train/2311496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeFile(String[] text, File file) throws IOException { synchronized (file) { if (!file.canRead()) throw new IOException("The file " + file.getAbsolutePath() + " cannot be read."); if (!file.canWrite()) throw new IOException("The file " + file.getAbsolutePath() + " cannot be written"); BufferedWriter fileWriter; fileWriter = new BufferedWriter(new FileWriter(file, true)); for(String s : text) fileWriter.write(s + FormatConstants.NEWLINE); fileWriter.flush(); fileWriter.close(); } } COM: <s> appends a text in a file </s>
funcom_train/26472111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void editingStopped(javax.swing.event.ChangeEvent e) { org.integralsource.monsoon.jfc.BooleanCellEditor $editor = (org.integralsource.monsoon.jfc.BooleanCellEditor)e.getSource(); $editor.getSelectionModel().setSelectionInterval($editor.getLastRow(), $editor.getLastRow()); } COM: <s> when editing has finished select the row that has been </s>
funcom_train/34580160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fromByteArray(byte[] stream) { SignedData data = parseStream(stream); eContent = (DEROctetString)data.getEncapContentInfo().getContent(); setCertificatesChain(parseCertificates(data.getCertificates())); // setCrls() // TODO: implements get CRL from ASN1Set setSigners(parseSigners(data.getSignerInfos(), getCertificatesChain())); } COM: <s> populates the current instance of cmssigned data with the array of bytes contents </s>
funcom_train/16520442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSuccMapable(ComponentInstance operator) { boolean succMapable = false; for (MapperDAGVertex succ : parentVertex.getSuccessors(true).keySet()) { if (succ == null) { return false; } else if (SpecialVertexManager.isSpecial(succ)) { succMapable |= succ.getInit().isSuccMapable( operator); } else { succMapable |= succ.getInit().isMapable( operator); } } return succMapable; } COM: <s> checks if the vertex first non special successor can be mapped on the </s>
funcom_train/22541698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean remove(Object o) { //You can't just look up o in tree, as tree is sorted by priority, which //isn't necessarily consistent with equals. for (Iterator<Node> iter=tree.iterator(); iter.hasNext(); ) { if (o.equals(iter.next().getData())) { iter.remove(); return true; } } return false; } COM: <s> removes the first occurence of o </s>
funcom_train/39994318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Version checkout(String processId, VersionId versionId, WorkingStatus ws) { // first find out the state of version Name then initialize // versionState StateName sn = this.vs.getStateName(processId, versionId); try { this.setStateName(sn); } catch (UnknownStateNameException e) { // TODO Auto-generated catch block e.printStackTrace(); } Version v = this.versionState.checkout(processId, versionId,ws); return v; } COM: <s> begin user doc </s>
funcom_train/34132394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBreakpoint( int lineNumber) { if (DEBUG) System.out.println( "InputPane.setBreakpoint( "+lineNumber+")"); Breakpoint breakpoint = breakpoints.getBreakpoint( getSourceLocation(), lineNumber+1); if ( breakpoint != null) { breakpoint.toggle(); updateMargins(); } else { // could not find breakpoint, creat a new one. addBreakpoint( new Breakpoint( location, lineNumber+1, true)); } editor.requestFocus(); view.update( this); } COM: <s> sets a breakpoint will create a new breakpoint if no breakpoint </s>
funcom_train/10584334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addResource() throws ServiceException, IOException, MetaDataException, RepositoryException { if (getLogger().isDebugEnabled()) getLogger().debug("Assets::addAsset() called"); Part file = getPart(PARAMETER_FILE); Document document = getNewDocument(); ResourceWrapper wrapper = new ResourceWrapper(document, getSourceResolver(), getLogger()); wrapper.write(file); } COM: <s> adds the ressource </s>
funcom_train/33282414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node getFirstUncleNode(final Node n) { if (n == root_ || n == null) { return null; } final Node parent = n.getParent(); if (parent == null) { return null; } final Node uncle = getEquivalentLogical(parent.jsxGet_nextSibling(), false); if (uncle != null) { return uncle; } return getFirstUncleNode(parent); } COM: <s> helper method to get the first uncle node in document order preorder </s>
funcom_train/35058764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point cross(final Point p) { if(p == null) throw new IllegalArgumentException("Argument \"p\" cannot be null."); return new Point(this.y * p.z - p.y * this.z, -(this.x * p.z - p.x * this.z), this.x * p.y - p.x * this.y); } COM: <s> creates a new tt point tt whose coordinates are the cross product of </s>
funcom_train/16490509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int calculateCorner(Window w, int x, int y) { Insets insets = w.getInsets(); int xPosition = this.calculatePosition(x - insets.left, w .getWidth() - insets.left - insets.right); int yPosition = this.calculatePosition(y - insets.top, w .getHeight() - insets.top - insets.bottom); if ((xPosition == -1) || (yPosition == -1)) { return -1; } return yPosition * 5 + xPosition; } COM: <s> returns the corner that contains the point code x code </s>
funcom_train/42273262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void calculateChunkInfo() { for( String chunk : m_chunkPaths ) { File chunkFile = new File( chunk ); m_chunkHashes.put( chunk, SHA1.getInstance().hash( chunkFile ) ); m_maxChunkSize = ( chunkFile.length() > m_maxChunkSize ) ? chunkFile.length() : m_maxChunkSize; } } COM: <s> calculate the hashes and maximum chunk size </s>
funcom_train/47569364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reportAPI(Map controllers, XMLWriter xml) { xml.tag("pocogese"); for (Iterator iter = controllers.keySet().iterator(); iter.hasNext();) { String key = (String) iter.next(); Controller pc = (Controller) controllers.get(key); this.reportAPI(pc, key, xml); } xml.end(); // pocogese } COM: <s> report the api of a set of controllers using the xmlwriter </s>
funcom_train/15955313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SubActivityState makeSubActivityState(String name, CompositeState container,StateMachine statemachine){ int liIndex = resizeVertexes(); DefaultSubActivityState lNew = new DefaultSubActivityState(name,liIndex,this,container, statemachine); fVertexes[liIndex] = lNew; container.addSubVertex(lNew); return lNew; } COM: <s> factorymethod that create sub activity states </s>
funcom_train/34526232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected InputStream readContent(String documentName) { String filePath = getDocumentPath(documentName); InputStream in = null; try { byte[] bytes = getByteArray(new BufferedInputStream( new FileInputStream(filePath))); in = new ByteArrayInputStream(bytes); } catch(Exception ex) { String msg = "Unable to read the PDF file '" + documentName + "'."; throw new DocumentException(msg, ex); } return in; } COM: <s> creates and returns an input stream </s>
funcom_train/44726897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void addExtensionPoint (ExtensionPoint extensionPoint) { if (extensionPoint == null) throw new NullPointerException("Invalid argument: extensionPoint"); String name = extensionPoint.getName(); if (name == null || name.length() == 0) throw new IllegalArgumentException("Invalid ExtensionPoint name:" + name); if (extensionPoints.containsKey(name)) throw new IllegalArgumentException("ExtensionPoint already exists in plugin:" + name); extensionPoints.put(name, extensionPoint); } COM: <s> adds an extension point to this plugin </s>
funcom_train/44940585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Cell getCell(Query query, String name) throws DataAccessException { Cell result = security.getRoot(); String sessionName = query.getSessionAttribute(name); try { Cell submit = cellHome.load(Integer.valueOf(sessionName)); if (security.check(submit, CellOperation.NAVIGATE)) { result = submit; } } catch (NumberFormatException e) { } return result; } COM: <s> returns a cell from context session attributes with specified name </s>
funcom_train/8487012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void apply(Goban goban) throws BadGobanStateException{ if(goban.getCase(line, column) != this.before){ throw new BadGobanStateException("Cannot apply this modification to the goban, since the before state is not right."); } else { goban.setCase(line, column, after); } } COM: <s> patches the given goban from em before em to em after em </s>
funcom_train/44385102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File getWorkspacePath(Properties p) { String workspaceValue = p.getProperty(EclipsePluginHelper.ECLIPSE_WORKSPACE_PATH_ATTR); if (workspaceValue == null) { String message = "The attribute " + EclipsePluginHelper.ECLIPSE_WORKSPACE_PATH_ATTR + " is not specified."; throw new BuildException(message); } ProjectRepository pr = ProjectRepository.getInstance(); return pr.resolveFile(workspaceValue); } COM: <s> get the workspace path from the plugin attribute </s>
funcom_train/12068414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Long parseLong(Attributes atts, String attribute ){ String value = atts.getValue( attribute ); if( value != null && value.length()>0 ){ try{ return Long.parseLong( value) ; }catch( NumberFormatException e){ // invalid boolean return null return null; } }else{ // invalid value , return null return null; } } COM: <s> parse attribute value as long </s>
funcom_train/34339636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getCantProducto1() { if (CantProducto1 == null) {//GEN-END:|43-getter|0|43-preInit // write pre-init user code here CantProducto1 = new TextField("Cantidad Producto1:", null, 5, TextField.ANY);//GEN-LINE:|43-getter|1|43-postInit // write post-init user code here }//GEN-BEGIN:|43-getter|2| return CantProducto1; } COM: <s> returns an initiliazed instance of cant producto1 component </s>
funcom_train/24532831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addInitMethod(CodeMethodRef methodRef) { if (!fBeanInitMethods.contains(methodRef)) fBeanInitMethods.add(methodRef) ; if (fDecleration.getModel() != null) { fDecleration.getModel().addMethodInitializingABean(methodRef); methodRef.setModel(fDecleration.getModel()) ; fDecleration.getModel().updateBeanNameChange(this); } } COM: <s> add a method where the bean is created </s>
funcom_train/1733452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupFilterListeners(){ sitesCB.addActionListener(this); variablesCB.addActionListener(this); DocumentListener l = new DocumentListener(){ public void changedUpdate(DocumentEvent e){ filterStreams(); } public void removeUpdate(DocumentEvent e){ filterStreams(); } public void insertUpdate(DocumentEvent e){ filterStreams(); } }; filterField.getDocument().addDocumentListener(l); } COM: <s> setup listeners for filter change events to update the streams list </s>
funcom_train/49325592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeCategoryListener(ValueChangeEvent changeEvent) { try { Category category = (Category) changeEvent.getNewValue(); if (category.getId() == null) category = null; currentContactList = categoryDelegate.getAllContacts(BeanUtil .getAddressBean().getCurrentAddressBook(), category); } catch (Exception e) { logger.error("Error in changeCategoryListener"); } } COM: <s> listener for changing category combo box </s>
funcom_train/18199813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ProjectManipulation getSelectedProjectFrame() { if (ossobookFrame.getDesktop().getSelectedFrame() instanceof ProjectManipulation) { return (ProjectManipulation) ossobookFrame.getDesktop().getSelectedFrame(); } else { for (JInternalFrame frame : ossobookFrame.getDesktop().getAllFrames()) { if (frame instanceof ProjectManipulation) { frame.moveToFront(); try { frame.setSelected(true); } catch (PropertyVetoException ex) { ex.printStackTrace(); } return (ProjectManipulation)frame; } } return null; } } COM: <s> get the currently active project window or if none is active the </s>
funcom_train/48338539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeObject(ObjectOutputStream out) throws IOException { out.defaultWriteObject(); if (Environment.getRootConcurrency().equals(concurrency)) { out.writeObject(null); } else { out.writeObject(concurrency); } if (Environment.root.protection.equals(protection)) { out.writeObject(null); } else { out.writeObject(protection); } } COM: <s> serialize this call wrapper </s>
funcom_train/22710374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValues(RGB rgb, int firstBoundary, int secondBoundary) { this.rgb = rgb; if (firstBoundary <= secondBoundary) { this.lowerBoundary = firstBoundary; this.upperBoundary = secondBoundary; } else { this.lowerBoundary = secondBoundary; this.upperBoundary = firstBoundary; } } COM: <s> sets all values of this rgbwith boundaries in a convenient way </s>
funcom_train/32057337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSaveAll() { System.out.println("testSaveAll"); UserProperties y=UserProperties.getInstance("tmpSaveAll"); y.setProperty("tk","tv"); UserProperties.saveAll(); UserProperties x=UserProperties.getInstance("tmpSaveAll"); assertEquals("tv",x.getProperty("tk")); } COM: <s> test of save all method of class user properties </s>
funcom_train/46921585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean doAuthenticate(HashMap userProps) throws Exception { String n = (String) userProps.get("username"); String p = (String) userProps.get("password"); // Check username/password with DB User u = new UserDAO().get(n); if (u!=null) { String pwd = u.getPassword(); // Authentication succeeded if (checkPassword(p, pwd)) { sLog.debug("Db authentication passed ... "); setAuthSucceeded(true); iExternalUid = u.getExternalUniqueId(); setUser(n); return true; } } return false; } COM: <s> perform actual authentication the user </s>
funcom_train/49317939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteFITSTable(int hduIndex) { FITSImage fitsImage = getFitsImage(); if (fitsImage != null && hduIndex > 0 && hduIndex < fitsImage.getNumHDUs()) { try { NavigatorFITSTable.deleteTable(fitsImage.getFits(), hduIndex); setSaveNeeded(true); } catch (Exception e) { DialogUtil.error(e); } } } COM: <s> deletes the fits table at the given hdu index </s>
funcom_train/9118318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append(this.queryGoals); buffer.append('('); buffer.append("#stack="); buffer.append(this.unifyStack.size()); buffer.append(')'); return buffer.toString(); } COM: <s> return string representation </s>
funcom_train/44657575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAuthorizingRoles(String roles) { // The ConfigAttributeEditor is named incorrectly, so you can't use it // to automatically convert the string to a ConfigAttributeDefinition. // So, we do it manually :-( ConfigAttributeEditor editor = new ConfigAttributeEditor(); editor.setAsText( roles ); this.roles = (ConfigAttributeDefinition) editor.getValue(); rolesString = roles; } COM: <s> set the roles to compare against the current users authenticated roles </s>
funcom_train/43245223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetEmpPhoneNumber() { System.out.println("setEmpPhoneNumber"); String empPhoneNumber = ""; EmploymentDataDG1Object instance = new EmploymentDataDG1Object(); instance.setEmpPhoneNumber(empPhoneNumber); // 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 emp phone number method of class org </s>
funcom_train/9829670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SchematicNode InList( String name ) { for (int j = 0; j < schematicNodeTable.size(); j++) { SchematicNode currNode = schematicNodeTable.elementAt(j); if ( name.equals(currNode.getNodeName() ) ) { return currNode; } } return null; } COM: <s> checks if a node already exists in the schematic node table </s>
funcom_train/50385718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSite(Site site) throws Exception { synchronized (sites) { String name = site.getPattern(); if (sites.containsKey(name)) { throw new Exception("Site already exists!"); } siteNames.add(name); sites.put(name, site); persistSiteList(); } synchronized (getChangeListeners()) { Iterator<ISiteListViewer> iterator = getChangeListeners().iterator(); while (iterator.hasNext()) { iterator.next().addSite(site); } } } COM: <s> add a site to the site list </s>
funcom_train/18730886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void insertLine(Vertex p1, Vertex p2) { Line line = new Line(p1, p2.minus(p1)); Project.getInstance().getActiveSpace().add(line); Project.getInstance().checkpoint(); Project.getInstance().changed(); } COM: <s> insert a line defined by p1 and p2 </s>
funcom_train/27853580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(Cookie cookie) { int idx = jar.indexOf(cookie); if (idx >= 0) { if (cookie.getMaxAge() > 0) jar.removeElementAt(idx); else jar.setElementAt(cookie,idx); } else if (cookie.getMaxAge() > 0) { jar.addElement(cookie); } } COM: <s> if not exist just add </s>