__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/1355681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ResourceBundleReader getResourceBundleReaderForName(String name) { if (Logging.REPORT_LEVEL <= Logging.INFORMATION) { Logging.report(Logging.INFORMATION, LogChannels.LC_JSR238, classname + ": getResourceBundleReaderForName (" + name + ")"); } return AppResourceBundleReader.getInstance(name); } COM: <s> creates initialized instance of resource bundle reader for given name </s>
funcom_train/3923623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load( String url ) throws Exception { URL u; try { u = new URL( url ); } catch (MalformedURLException e) { url = "file:"+url; try { u = new URL( url ); } catch ( MalformedURLException e1 ) { throw e; } } InputStream in = u.openStream(); load( new InputStreamReader(in) ); } COM: <s> loads file content into the db </s>
funcom_train/16454249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPreference(String key, Object value) { if (value == null) { throw new IllegalArgumentException("value cannot be null"); } String oldValue = userPrefs.getProperty(key); String newValue = value.toString(); if (!newValue.equals(oldValue)) { userPrefs.setProperty(key, newValue); firePreferenceChangeEvents(key); } } COM: <s> sets the value to be associated with the passed key </s>
funcom_train/46437478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void disableFields(XComponent form) { form.findComponent(LOGIN_FIELD).setEnabled(false); form.findComponent(PASSWORD_FIELD).setEnabled(false); form.findComponent(OK_BUTTON).setVisible(false); form.findComponent(REMEMBER_CHECK_BOX).setVisible(false); } COM: <s> disables login fields </s>
funcom_train/9233023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSmallMapControlVisible(boolean on) { if (on) { execute("map.smallMapControl = new GSmallMapControl(); map.addControl(map.smallMapControl);"); } else { execute("if(map.smallMapControl) {map.removeControl(map.smallMapControl); delete map.smallMapControl;}"); } } COM: <s> shows hieds the small pan zoom map control </s>
funcom_train/9642054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addOntologyInformationToRDFStore(final File theFile) { Ontology ontology = DMManager.getInstance().getOntology(); if (ontology != null) { RDFTripleStore store = ontology.getTripleStore(); RDFStatement statement = new RDFStatement(ontology, OntologyConstants.DATASET_FILE_NAME_PROPERTY, theFile.getName()); store.addStatement(statement); RDFStatement absolutePathStatement = new RDFStatement(DMManager .getInstance().getOntology(), OntologyConstants.DATASET_FILE_ABSOLUTE_PATH_PROPERTY, theFile.getAbsolutePath()); store.addStatement(absolutePathStatement); } } COM: <s> adds the ontology information to rdf store </s>
funcom_train/41165654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoQuestionWeighted entity) { EntityManagerHelper.log("saving CoQuestionWeighted 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 co question weighted </s>
funcom_train/11708646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assignCheckedFromList(ArrayList aNotChecked) { Iterator iterC = aNotChecked.iterator(); while (iterC.hasNext()) { String typeName = (String) iterC.next(); // assign to list of types not to be initially checked noCheckSet.add(typeName); } } COM: <s> assign initially checked to the specified types pairing up down the lists </s>
funcom_train/24372484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MessageProducer createDestination() throws JMSException, NamingException { destination = (Destination) ctx.lookup(jmsDestination); if (logger.isTraceEnabled()) logger.trace("JMS Destination found"); MessageProducer producer = session.createProducer(destination); producer.setDeliveryMode(DeliveryMode.PERSISTENT); return producer; } COM: <s> creates a jms destination queue or topic using a jndi lookup </s>
funcom_train/34563243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean emptyOrderDecl() throws QueryException { if(!consumeWS2(EMPTYORDER)) return false; check(EMPTYORD); if(declGreat) error(DUPLORDEMP); final boolean order = consumeWS2(GREATEST); if(!order) check(LEAST); ctx.orderGreatest = order; declGreat = true; return true; } COM: <s> 15 parses an empty order decl </s>
funcom_train/2539395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void inverseRotateVect(Vector3D vec) { float vx = vec.x, vy = vec.y, vz = vec.z; vec.x = vx * m00 + vy * m10 + vz * m20; vec.y = vx * m01 + vy * m11 + vz * m21; vec.z = vx * m02 + vy * m12 + vz * m22; } COM: <s> code inverse rotate vect code rotates a given vector3 d by the rotation </s>
funcom_train/50483826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAction(String action) { if (action.equals("start")) { _action = START_TOMCAT; } else if (action.equals("stop")) { _action = STOP_TOMCAT; } else { throw new BuildException(getLocation()+"Unknown action '"+action+"'"); } } COM: <s> set the action you wish the servlet engine to perform </s>
funcom_train/3791573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printInputStream(InputStream is) { BufferedReader bure; try { bure = new BufferedReader(new InputStreamReader(is)); // iteration building the 3 lists String strRead = null; while ((strRead = bure.readLine()) != null) { System.out.println(strRead); } bure.close(); } catch (IOException e) { Debug.signal(Debug.B_DEBUG, this, e); } } COM: <s> print input stream </s>
funcom_train/41766461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTextPosition(int textPosition) { if (textPosition != this.LEFT && textPosition != this.RIGHT && textPosition != this.BOTTOM && textPosition != this.TOP) { throw new IllegalArgumentException("Text position can't be set to " + textPosition); } this.textPosition = textPosition; } COM: <s> sets the position of the text relative to the icon if exists </s>
funcom_train/15801674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector getAllFiles(String sBaseDir, boolean bSearchSubDirs) { Vector filesfound = new Vector(); FolderSearch s = new FolderSearch("*", sBaseDir); s.doSearch(bSearchSubDirs); filesfound.addAll(s.getFiles()); return convertToListedFiles(filesfound); } COM: <s> searches for all files in the applications basedir ignoring any filters </s>
funcom_train/45253584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setAllPinsVisible(boolean visible) { if (fastViewManager == null) return; Iterator iter = fastViewManager.getFastViews(null).iterator(); while (iter.hasNext()) { ViewPane pane = getPane((IViewReference) iter.next()); if (pane != null) { pane.setFast(visible); } } } COM: <s> sets the visibility of all fast view pins </s>
funcom_train/3741836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean mayReassignTask(User who, User user, Task task) throws Exception { try { sess = HibernateUtil.currentSession(); try { boolean retVal = tman.mayReassignTask(who, user, task); log.info("Sprawdzenie, czy uzytkownik moze przepisac task na innego uzytkownika"); return retVal; } catch (Exception e) { throw e; } finally { HibernateUtil.closeSession(); } } catch (HibernateException e) { return false; } } COM: <s> checks whether user reassign task to other user </s>
funcom_train/459503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(byte[] value) throws ATNAException { boolean exceptionToThrow = false ; if ( value == null ) { exceptionToThrow = true ; this.value = "".getBytes() ; } else { this.value = ((byte[]) value); } if ( exceptionToThrow ) throw new ATNAException( "setValue() : value is null" , this) ; } COM: <s> sets the value of the value property </s>
funcom_train/15607529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildGenomeVersionNumberVsFeatureSource(int genomeVersionId) { buildGenomeVersionNumberVsFeatureSource(genomeVersionId, new FilenameFilter() { public boolean accept(File dir, String name) { if (name.endsWith( LoaderConstants.GFF_FILE_EXTENSION )) { return true; } // Got extension. else return false; } // End method: accept }); } // End method COM: <s> builds a mapping of genome version id versus list of source feature </s>
funcom_train/43875513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void refreshModel() { model.setModel( ( List<T> ) (model.getFilters().values().contains( null ) ? Collections.emptyList() : loadData( combobox.getLabel(), model.getFilters() )) ); model.setSelectedIndex( DLComboboxModel.UNKNOWN ); combobox.fireModelChanges(); loaded = true; } COM: <s> loads data from the database and refreshes model </s>
funcom_train/5692680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XSDSchema parse(InputStream schemaStream) throws XOBParseException { this.parser.parse(schemaStream); Document doc = this.parser.getParsedDocument(); XMLElement schemaElement = new XMLElement(doc.getDocumentElement()); try { return new xob.xsd.XSDSchema(schemaElement); } catch (RuntimeException re) { throw new XOBParseException("Failed to parse schema!", re); } } COM: <s> parses the input stream and returns an xsdschema object </s>
funcom_train/17670575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateAttribLister() { NodeGeneric actNode = getCurrentNode(); AttributePrinter attrPrinter; if (actNode != null) { attrPrinter = new AttributePrinter(actNode); attribLister.setStyledDocument(attrPrinter.getStyledDocument()); return; } attribLister.setText(""); } COM: <s> update the textarea in the rightmost column with this nodes attributes </s>
funcom_train/25638045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildMethodsSummary(XMLNode node, Content memberSummaryTree) { MemberSummaryWriter writer = memberSummaryWriters[VisibleMemberMap.METHODS]; VisibleMemberMap visibleMemberMap = visibleMemberMaps[VisibleMemberMap.METHODS]; addSummary(writer, visibleMemberMap, true, memberSummaryTree); } COM: <s> build the method summary </s>
funcom_train/49608781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertIdentityCardType(String username,EntityManager em,IdentityCardType vo) throws Throwable { try { JPAMethods.persist(em, username, DefaultFieldsCallabacks.getInstance(), vo); } catch (Throwable ex) { Logger.error(null, ex.getMessage(), ex); throw ex; } finally { em.flush(); } } COM: <s> insert a identity card type </s>
funcom_train/3395596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClassDoc superclass() { if (isInterface() || isAnnotationType()) return null; if (tsym == env.syms.objectType.tsym) return null; ClassSymbol c = (ClassSymbol)env.types.supertype(type).tsym; if (c == null || c == tsym) c = (ClassSymbol)env.syms.objectType.tsym; return env.getClassDoc(c); } COM: <s> return the superclass of this class </s>
funcom_train/13101917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(String VLSFile) { System.err.println("before: " ) ; Display display = new Display(); Shell shell = new Shell(display); shell.setText("COMUS Unlimited Services Olap"); //shell.setText(VLSFile); createContents(shell,VLSFile); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } display.dispose(); //display = null; } COM: <s> runs the application </s>
funcom_train/45039183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runApplication(String className, String[] args) throws Exception { Class clazz = Class.forName(className, true, Thread.currentThread().getContextClassLoader()); Method main = clazz.getMethod("main", new Class[]{String[].class}); main.invoke(null, new Object[]{args}); } COM: <s> provides a hook for allowing this class to execute another classes main method </s>
funcom_train/8929003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load() { String keySource = "http://chiase.vn"; boolean isDAML = keySource.endsWith(".daml"); om = ModelFactory.createOntologyModel(isDAML ? OntModelSpec.DAML_MEM : OntModelSpec.OWL_MEM, null); om.getDocumentManager() .addAltEntry("http://chiase.vn", "file:/" + path); om.read(keySource); } COM: <s> load ontology tu file </s>
funcom_train/1662853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String shortenURI(String uri) { if (uri.startsWith("freenet:")) { uri = uri.substring("freenet:".length()); } if (uri.startsWith("SSK@")) { uri = uri.substring("SSK@".length()); } if (uri.startsWith("USK@")) { uri = uri.substring("USK@".length()); } if (uri.endsWith("/")) { uri = uri.substring(0, uri.length() - 1); } return uri; } COM: <s> shortens the given uri by removing scheme and key type prefixes </s>
funcom_train/35920878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int searchAvailability(String brand) { int availability = 0; Iterator<LaptopBrand> lbIterator= laptopBrandArrayList.iterator(); //iterates through all items, and if the item of the specified //item is found, its availability is returned while (lbIterator.hasNext()) { LaptopBrand laptopBrand = lbIterator.next(); if (laptopBrand.getName().equalsIgnoreCase(brand)) return laptopBrand.getAvailableItems(); } return availability; } COM: <s> search for the available number of items of the specified brand </s>
funcom_train/41502403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node addNode(String name, Node ref){ Node tmpNode; if (!nTable.containsKey(name)){ float rnd = ((float)Math.random()-0.5f)*0.3f; float rnd2 = ((float)Math.random()-0.5f)*0.3f; float rnd3 = ((float)Math.random()-0.5f)*0.3f; nTable.put(name,tmpNode=addNode(name, ref.pos.x+rnd,ref.pos.y+rnd2,ref.pos.z+rnd3)); nTableID.put(tmpNode.getId(), tmpNode); } else tmpNode=nTable.get(name); return tmpNode; } COM: <s> add a new node in proximity to an existing one </s>
funcom_train/25293958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCombineRgbScale() { if (isLiveOrCompiled()) { if (!this.getCapability(ALLOW_COMBINE_READ)) { throw new CapabilityNotSetException( Ding3dI18N.getString("TextureAttributes33")); } } return ((TextureAttributesRetained)this.retained).getCombineRgbScale(); } COM: <s> retrieves the scale factor for the rgb components of the output color </s>
funcom_train/23271568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setWindowIcon() { try { BufferedImage image = ImageIO.read(getClass().getResource("/ie/iqda/icons/iqda_16x16.png")); setIconImage(image); } catch (IOException error) { ErrorLog.instance().addEntry(error); } } COM: <s> sets the frames icon image </s>
funcom_train/40673915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int useFirstPossibleLiteral() { for (int i = 0; i < usedLiterals.length; i++) { if (usedLiterals[i] == false && disabledLiterals[i] == false) { usedLiterals[i] = true; return i; } } return Item.CANNOT_BE_USED; } COM: <s> we assume that no literal is used </s>
funcom_train/24039339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPnlTop() { if (pnlTop == null) { GridLayout gridLayout = new GridLayout(); gridLayout.setRows(2); gridLayout.setColumns(1); pnlTop = new JPanel(); pnlTop.setLayout(gridLayout); pnlTop.add(getPnlConn(), null); pnlTop.add(getPnlGnrl(), null); } return pnlTop; } COM: <s> this method initializes pnl top </s>
funcom_train/495118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String cleanup(String value) { String newValue = value.replaceAll("&", "&amp;"); newValue = newValue.replaceAll("\n", " "); newValue = newValue.replaceAll("\"", "&quot;"); newValue = newValue.replaceAll("\'", "&quot;"); return newValue; } COM: <s> some processing to make realistic attribute values </s>
funcom_train/20622701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Observable o, Object arg) { if (o == model){ if (arg != null) { if (arg.equals("subsetName")){ String name = model.getSubsetName(); getNameTxt().setText(name == null ? "" : name); } } else { updatePanelUI(); } } } COM: <s> this method is called whenever the observed object is changed </s>
funcom_train/40681684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(String key, String item) { assert key.matches("[a-zA-Z0-9]*") : "Illegal character in the key"; LOG.log(Level.DEBUG, "set ["+key+":"+item+"]", null); data.put(key, item); } COM: <s> inserts a new value into the dataset </s>
funcom_train/43890773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validate(Feature feature, FeatureType type, ValidationResults results) { if (feature != null) { Geometry layer = feature.getDefaultGeometry(); if (layer instanceof Polygon) { Polygon p = (Polygon) layer; if (p.getNumInteriorRing() != 0) { results.error(feature, "The generated result was had gaps."); return false; } return true; } results.error(feature, "The generated result was not of type polygon."); return false; } return true; } COM: <s> ensure polygon does not have gaps </s>
funcom_train/28699449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected float packing_density_diff_demerits( float preceding_packing_density ) { float diff_factor = line.get_paragraph().get_packing_diff_factor(); float packing_density = line.get_packing_density(); float packing_diff = Math.abs( packing_density - preceding_packing_density ); return packing_diff * packing_diff * packing_diff * diff_factor; } COM: <s> calculates and returns the demerits accruing due to differences in the packing </s>
funcom_train/20238001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdExitPrincipal() { if (cmdExitPrincipal == null) {//GEN-END:|58-getter|0|58-preInit // write pre-init user code here cmdExitPrincipal = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|58-getter|1|58-postInit // write post-init user code here }//GEN-BEGIN:|58-getter|2| return cmdExitPrincipal; } COM: <s> returns an initiliazed instance of cmd exit principal component </s>
funcom_train/49350028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getNextButton() { if (nextButton == null) { nextButton = new JButton(); nextButton.setText(resource.getString("next")); nextButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { NewGraphicWizardController controller = NewGraphicWizardController.instance(); controller.doNext(); } }); } return nextButton; } COM: <s> this method initializes next button </s>
funcom_train/35925586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void informCannotConnectToServer() { Alert alert = new Alert("Error", "Can't connect to the server", null, AlertType.ERROR); alert.setTimeout(5000); display.vibrate(500); display.setCurrent(alert, connectionForm); } COM: <s> method shows error alert when connection to the server fails </s>
funcom_train/2489548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void configure( ActionListener actionListener ){ int n = cmdNames.length; CmdButton cmdButton; setLayout( new GridLayout( 1,n ) ); for( int i=0; i<n; i++ ){ cmdButton = new CmdButton( cmdNames[i], actionListener); this.add( cmdButton ); } }//configure COM: <s> for each command name creates a button with listener action listener </s>
funcom_train/44987244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getVersion(){ String title = this.getClass().getPackage().getImplementationTitle(); String version = this.getClass().getPackage().getImplementationVersion(); if(title.equalsIgnoreCase("ili2sql") || version == null){ // didnt find Version, so we got the parents Version (I suppose?) or null return "?"; } // hack remove path in front of Version ??? version = version.substring(version.lastIndexOf(File.separatorChar)+1); return version; } COM: <s> returns the version of this or of the extend class package </s>
funcom_train/34282990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "[Token: " + (type==Token.NULL ? "<null token>" : "text: '" + (text==null ? "<null>" : getLexeme() + "'; " + "offset: " + offset + "; type: " + type + "; " + "isPaintable: " + isPaintable() + "; nextToken==null: " + (nextToken==null))) + "]"; } COM: <s> returns this token as a code string code which is useful for </s>
funcom_train/5593858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInfo() { System.out.println("testInfo"); sender.info(); assertEquals("INFO", bufferToString()); sender.info("server.chatservs.com"); assertEquals("INFO server.chatservs.com", bufferToString()); } COM: <s> test of info method of class net </s>
funcom_train/21099225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String replace(String s, String find, String replace) { int iNext =0; while(true) { int iFind = s.indexOf(find, iNext); if (iFind == -1) break; iNext = iFind+find.length(); s = s.substring(0, iFind) + replace + s.substring(iNext); } return s; } COM: <s> replace any occurance of string find with replace in s </s>
funcom_train/28427622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FunctionInfo getFunction(String name) { if (functions == null || functions.length == 0) { x.java.lang.System.err().println("No functions"); return null; } for (int i=0; i < functions.length; i++) { if (functions[i].getName().equals(name)) { return functions[i]; } } return null; } COM: <s> get the function info for a given function name looking through all the </s>
funcom_train/10357359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scanAtom(TokenStream tokens) throws AddressException { int start = position; nextChar(); while (moreCharacters()) { char ch = currentChar(); if (isAtom(ch)) { nextChar(); } else { break; } } // return the scanned part of the string. tokens.addToken(new AddressToken(addresses.substring(start, position), ATOM, start)); } COM: <s> scan an atom in an internet address using the rfc822 rules </s>
funcom_train/33606621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsValid() { System.out.println("isValid"); int[] pBad={0,4,3,0,1,2}; assertEquals(false,instance2.isValid(pBad)); assertEquals(true,instance2.isValid(p2)); } COM: <s> test of is valid method of class scio </s>
funcom_train/50119457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void switch_listen(String _id, boolean listen) { Vector data = (Vector) members.get(_id); if(data == null) return; data.removeElementAt(0); data.add(0, listen ? "Online" : "Offline"); members.remove(_id); members.put(_id, data); } COM: <s> switch listening on off on a line for a member </s>
funcom_train/37785162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemove() throws Exception { testValues.remove( 236 ); table.remove( new BigInteger("236")); assertTrue( "testRemove:byKey", compareValues()); String value = (String)testValues.get( 150 ); testValues.remove( value ); table.remove( new BigInteger("150"), value ); assertTrue( "testRemove:byKeyAndValue", compareValues() ); } COM: <s> test the two public remove methods in code jdbm table code </s>
funcom_train/18719388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanup_RoomMeeting() { try { String querystring = "delete from RoomMeeting where LastSimID is null or RunningSimID is null;"; ResultSet sqlresult = sqlstatement.executeQuery(querystring); } catch (SQLException sqle) { Error = true; ErrorDescription = "Error while deleting broken roommetings.\n" + sqle.getMessage(); System.err.println("SQL Error"); System.err.println(ErrorDescription); //sqle.printStackTrace(); } } COM: <s> deletes row in room meeting table with no </s>
funcom_train/39912005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetEh6() { System.out.println("setEh6"); TextField tf = null; Page1 instance = new Page1(); instance.setEh6(tf); // 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 eh6 method of class timesheetmanagement </s>
funcom_train/18348359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void convertPathIntoDirect(JoinContext.PathRelated context) { if (isFrozen()) throw new QueryOperandException("Query is frozen, you can't make changes to this query now"); if (userJoinContextList.contains(context)) { userJoinContextList.addAll(context.convertIntoDirectContexts()); userJoinContextList.remove(context); } } COM: <s> converts path related context provided into set of direct related contexts </s>
funcom_train/21883661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tabbedPaneChanged() { final int i = getSelectedIndex(tabbedPane); switch (i) { case 0: populateObjectViewPane(getContext()); break; case 1: populateCommandsPane(getContext()); break; case 2: populateGraphPane(getContext()); break; default: //System.out.println("Hey, that's not a valid tab!"); break; } } COM: <s> callback handler for the action method of button tabbed pane </s>
funcom_train/48934717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List findByNamedQuery(String queryName, Map<String, Object> namedParamsAndValues) { if (queryName == null || namedParamsAndValues == null) { throw new IllegalArgumentException(); } Query queryObject = entityManager.createNamedQuery(queryName); for (Map.Entry<String, ?> entry : namedParamsAndValues.entrySet()) { queryObject.setParameter(entry.getKey(), entry.getValue()); } return queryObject.getResultList(); } COM: <s> return the persistent entities returned from a named query with named parameters </s>
funcom_train/17818369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delete(int posistion) { if (posistion > data.length) return false; int[] newData = new int[data.length-1]; System.arraycopy(data,0,newData,0,posistion-1); System.arraycopy(data,posistion-1,newData,posistion,newData.length); data = newData; return true; } COM: <s> delete the value at the posistion specified reducing the array appropriatley </s>
funcom_train/43410103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanel getJAddPackagingMaterialTypePanel() { if (jAddPackagingMaterialTypePanel == null) { jAddPackagingMaterialTypePanel = new JPanel(); jAddPackagingMaterialTypePanel.setLayout(new BorderLayout()); jAddPackagingMaterialTypePanel.setToolTipText("Packaging Material Type"); jAddPackagingMaterialTypePanel.add(getJAddPackagingMaterialTypeInnerPanel(), java.awt.BorderLayout.CENTER); } return jAddPackagingMaterialTypePanel; } COM: <s> this method initializes j add packaging material type panel </s>
funcom_train/3319301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addNote(Note note) { // does the note have a parent, if so remove it from that parent if (note.getParent() != null) { Notesheet childParent = note.getParent(); childParent.removeNote(note); } // set the parent and the root note.setParent(this); // add the item to the Vector return notes.add(note); } COM: <s> adds a note to the list of notes </s>
funcom_train/16512580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ISystemBehaviour loadArchitectureFromXMLString(String xmlString) { SAXBuilder parser = new SAXBuilder(); Document doc = new Document(); try { StringReader reader = new StringReader(xmlString); doc = parser.build(reader); } catch (Exception e) { // this e should be handeled to the caller for error messages e.printStackTrace(); } return loadArchitecture(doc); } COM: <s> loads a system behaviour from a string representing a xml document </s>
funcom_train/5338865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private byte getMemoryByte() { int adr = ((HEIGHT - 1 - regY) & 0xff) * WIDTH + (regX & 0x1f8) + 7; int result = 0; for (int i = 0; i < 8; i++, adr--) { result <<= 1; if (adr >= 0) { result += 1 - screen[adr]; } } return (byte) result; } COM: <s> return the 8 horizontal pixels at the current position </s>
funcom_train/21021005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSize(int width, int height) { stackPanel.setSize("" + width, "" + height); // Substract 2 pixels for borders on stackPanel scrollSearchSavedPanel.setSize("" + (width - 2), ""+ (height - 2 - (NUMBER_OF_STACKS * STACK_HEIGHT))); } COM: <s> resizes all objects on the widget the panel and the tree </s>
funcom_train/42944388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void _delete() throws SQLException, DBException { StringBuffer sb = new StringBuffer(); sb.append("DELETE FROM ").append(this.getTableName()); sb.append(this.getWhereClause()); DBConnection.getDefaultConnection().executeUpdate(sb.toString()); } COM: <s> deletes the current record from the database table </s>
funcom_train/32061706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMoonIndex() { System.out.println("testGetMoonIndex"); int expectedmoonindex = 0; Game game = new Game(1, 1); Player colonyowner = new Player(true, game); Starsystem starsystem = new Starsystem("sys1", 20); Colony instance = new Colony(starsystem, 0, 0, colonyowner); assertEquals(expectedmoonindex, instance.getMoonIndex()); } COM: <s> test of get moon index of class colony </s>
funcom_train/18050888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public KeydbGroup getGroup(int id) throws KeydbException { passLock(); if (id != 0) { for(int i = 0; i < header.numGroups; ++i) { if (this.groupsIds[i] == id) { KeydbGroup group = new KeydbGroup(this); group.read(this.groupsOffsets[i], i); return group; }; }; throw new KeydbException(Config.getLocaleString(keys.KD_GROUP_NOT_FOUND)); } else { throw new KeydbException(Config.getLocaleString(keys.KD_CANT_GET_ROOT_GROUP)); } } COM: <s> get group by id </s>
funcom_train/21645326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColors(Color robotColor, Color gunColor, Color radarColor, Color bulletColor, Color scanColor) { if (peer != null) { peer.setCall(); peer.setBodyColor(robotColor); peer.setGunColor(gunColor); peer.setRadarColor(radarColor); peer.setBulletColor(bulletColor); peer.setScanColor(scanColor); } else { uninitializedException("setColors(Color, Color, Color, Color, Color)"); } } COM: <s> call this method to set the color of your robots body gun radar </s>
funcom_train/3121097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point2D normalize() { Rectangle2D r = getBounds2D(); translate((float) -r.getX(), (float) -r.getY()); flagDirty = true; return (new Point2D.Float((float) -r.getX(), (float) -r.getY())); } // of normalize COM: <s> force the top right bounds to be at 0 0 </s>
funcom_train/3153609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private URL createMapOverlapUrl() { URL ret = null; try { File beamHome = SystemUtils.getBeamHomeDir(); File noDescCoeff = new File(beamHome, "test/unit/org/esa/beam/processor/sst/sstTestMapRangeOverlap.coef"); assertEquals(true, noDescCoeff.exists()); ret = noDescCoeff.toURL(); } catch (MalformedURLException e) { fail("unable to create dual URL"); } return ret; } COM: <s> creates an url pointing to the coefficient test file with overlapping map ranges </s>
funcom_train/17714052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateAdvertiser(Advertiser advertiser) throws Exception { IAdvertiserDAO dao = null; boolean retValue = false; try { dao = AbstractJASSDAOFactory.getJASSDAO().getAdvertiserDAO(); retValue = dao.updateAdvertiser(advertiser); } catch (Exception ex) { logger.log(Level.SEVERE, null, ex); ex.printStackTrace(); throw ex; } finally { dao = null; } return retValue; } COM: <s> this operation will update advertiser object to the persistent </s>
funcom_train/44340904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ObjectWithBindInf getValue(Object obj, Object bindInf) { Object value = null; if (!Variable.isVariable(obj)) value = obj; else if (((Boolean) bindInf).booleanValue()) value = varsOfObj1.get(obj); else value = varsOfObj2.get(obj); if (value == null) return null; else return new ObjectWithBindInf(value, bindInf); } COM: <s> this method returns the value of the variable obj according to the current </s>
funcom_train/26210081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Component createToolbar() { toolbar = new JToolBar(); String[] toolKeys = tokenize(getResourceString("toolbar")); for (int i = 0; i < toolKeys.length; i++) { if (toolKeys[i].equals("-")) { toolbar.add(Box.createHorizontalStrut(5)); } else { toolbar.add(createTool(toolKeys[i])); } } toolbar.add(Box.createHorizontalGlue()); return toolbar; } COM: <s> create the toolbar </s>
funcom_train/33967728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadCacheItems() { String filePath = mCachePath + File.separatorChar + mCacheFileInfo; try { FileReader fileReader = new FileReader(filePath); BufferedReader bufReader = new BufferedReader(fileReader); String itemString = bufReader.readLine(); while (itemString != null) { buildCacheItemFromString(itemString); itemString = bufReader.readLine(); } } catch (IOException ioe) { ioe.printStackTrace(); } } COM: <s> load the cache items from the file system </s>
funcom_train/2628352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetE() { System.out.println("getE"); RowType instance = new RowType(); List expResult = new ArrayList(); /* Test 1 - e = null */ List result = instance.getE(); assertEquals(expResult, result); /* Test 2 - e != null */ instance.e = expResult; result = instance.getE(); assertEquals(expResult, result); } COM: <s> test of get e method of class row type </s>
funcom_train/25915942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onScanCompleted(final String path, final Uri uri) { Log.i(TAG, "MediaScannerConnectionClient.onScanCompleted: path " + path + ", uri " + uri); // Just run the "real" onScanCompleted() method in the UI thread: mHandler.post(new Runnable() { public void run() { LolcatActivity.this.onScanCompleted(path, uri); } }); } COM: <s> called when the media scanner has finished scanning a file </s>
funcom_train/19431310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLastTrick(final Trick trick) { lastTrickPanel.clearCards(); Player trickForeHand = trick.getForeHand(); lastTrickPanel.addCard(trickForeHand, trick.getFirstCard()); lastTrickPanel.addCard(trickForeHand.getLeftNeighbor(), trick.getSecondCard()); lastTrickPanel.addCard(trickForeHand.getRightNeighbor(), trick.getThirdCard()); } COM: <s> sets the last trick </s>
funcom_train/18880081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToggleButton getJToggleButtonOnOff() { if (jToggleButtonOnOff == null) { jToggleButtonOnOff = new JToggleButton(); jToggleButtonOnOff.setText("Run"); // Generated jToggleButtonOnOff.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { startStopSimulation(); } }); } return jToggleButtonOnOff; } COM: <s> this method initializes j toggle button on off </s>
funcom_train/48687752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnergyConsumption(double Pt_, double Pt_consume_, double Pr_consume_, double P_idle_, double P_off_) { Pt = Pt_; Pt_consume = Pt_consume_; Pr_consume = Pr_consume_; P_idle = P_idle_; P_off = P_off_; } COM: <s> set energy consumption </s>
funcom_train/8709111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getProperty(String name) throws PropertyException { if (name == null) { throw new IllegalArgumentException(Messages.format( Messages.MUST_NOT_BE_NULL, "name")); } // recognize and handle four pre-defined properties. if (JAXB_ENCODING.equals(name)) return getEncoding(); if (JAXB_FORMATTED_OUTPUT.equals(name)) return isFormattedOutput() ? Boolean.TRUE : Boolean.FALSE; if (JAXB_NO_NAMESPACE_SCHEMA_LOCATION.equals(name)) return getNoNSSchemaLocation(); if (JAXB_SCHEMA_LOCATION.equals(name)) return getSchemaLocation(); if (JAXB_FRAGMENT.equals(name)) return isFragment() ? Boolean.TRUE : Boolean.FALSE; throw new PropertyException(name); } COM: <s> default implementation of the get property method handles the four defined </s>
funcom_train/31125461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintFeatures(Graphics2D g2d) { g2d.setColor(colors[FEATURE_COLOR_INDEX]); for(lejos.geom.Point pt:model.getFeatures()) { Ellipse2D c = new Ellipse2D.Float(getX((pt.x - TARGET_SIZE/2)), getY((pt.y + TARGET_SIZE/2)), getDistance(TARGET_SIZE), getDistance(TARGET_SIZE)); g2d.fill(c); } } COM: <s> paint features detected </s>
funcom_train/4931720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getURL() { // Base movie URL String url = BASE_URL + this.movieID; // AutoPlay option if (autoPlayEnabled) { url += "&autoplay=1"; } // Related videos option if (relatedVideosEnabled) { url += "&rel=1"; } else { url += "&rel=0"; } return url; } COM: <s> get the full url of the video </s>
funcom_train/885201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JOptionPane createErrorComponent() { final JTextArea error = new JTextArea(); error.setEditable(false); error.setLineWrap(true); error.setWrapStyleWord(true); error.setText(message); error.setBackground(UIManager.getColor("Panel.background")); //$NON-NLS-1$ final JOptionPane errorOptionPane = new JOptionPane(); errorOptionPane.setMessage(error); errorOptionPane.setMessageType(JOptionPane.ERROR_MESSAGE); if (icon != null) { errorOptionPane.setIcon(icon); } return errorOptionPane; } COM: <s> creates the component with the error message </s>
funcom_train/35739512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInstJars(List pathList) { // Convert list into its corresponding String representation, String instJars = encodeInstJars(pathList); // and set the new value of environment variable INST_JARS. env.add(INST_JARS, new ShellObject<String>("Installed Jar Files", instJars)); } COM: <s> stores the string representation of the given list of paths in the environment </s>
funcom_train/20692746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPageOfRoomList(Element baseElement) { if (baseElement != null) { // title Element title = new Element("b"); title.addContent(getRessourceString("Pages")); baseElement.addContent(title); baseElement.addContent(XHTMLFactory.br()); // add an empty selection, will be filled if a page is selected Element select = new Element("select"); select.setAttribute("size", LIST_SIZE); select.setAttribute("name", "selectionPagesOfRoom"); select.setAttribute("multiple", "true"); baseElement.addContent(select); } } COM: <s> adds a selection to the give base element this selection contains all </s>
funcom_train/19066540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openPort() throws IOException, POP3Exception { socket = new Socket(servername, port); socket.setSoTimeout(RistrettoConfig.getInstance().getTimeout()); createStreams(); POP3Response response = in.readSingleLineResponse(); // try to find a timestamp Matcher matcher = timestampPattern.matcher(response.getMessage()); if (matcher.find()) { timestamp = matcher.group(1); } if( response.isOK() ) { state = AUTHORIZATION; } } COM: <s> opens a connection to the pop3 server </s>
funcom_train/47028149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void executeInstallCommand(boolean externals, boolean checkout) { IStructuredSelection sel = (IStructuredSelection) fPluginsList .getSelection(); if (sel != null) { RailsPluginDescriptor plugin = (RailsPluginDescriptor) sel .getFirstElement(); final IProject project = RailsPlugin.getSelectedOrOnlyRailsProject(); if (project != null) { RailsPluginsHelper.installPlugin(project, plugin, externals, checkout); } } } COM: <s> installs the selected plugin </s>
funcom_train/12147656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addResponse(String uri, Collection properties, Collection notfoundProperties, String displayname){ responses.put(uri, properties); errresponses.put(uri, notfoundProperties); if(format.equals(Literals.RDF)){ addRDFResponse(uri, properties.iterator(), displayname); } else if(format.equals(Literals.GXL)){ addGXLResponse(uri, properties.iterator(), displayname); } } COM: <s> add a response to the result and choose correct formatting </s>
funcom_train/49006726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void translateRequiredClasses( Code code ) { while( ! translationQueue.isEmpty() ) { ClassTranslator trans = translationQueue.removeFirst(); if( translated.contains( trans )) continue; System.out.println( trans.getJVMType() ); System.out.flush(); trans.translateImplementation( code ); translated.add( trans ); } } COM: <s> translate all required classes </s>
funcom_train/23874061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Classifier checkTypes(Classifier t1, Classifier t2) { try { //--- Compute the type --- Classifier type = null; if (t1.conformsTo(t2).booleanValue()) { type = t2; } else if (t2.conformsTo(t1).booleanValue()) { type = t1; } return type; } catch (Exception e) { e.printStackTrace(System.out); return null; } } COM: <s> check if two abstract types are compatible and compute the proper type </s>
funcom_train/26278841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(boolean resume) throws Exception{ localFileLength = 0; //out = new FileOutputStream(file, false); out = new RandomAccessFile(file, "rw"); if(resume){ localFileLength = (int)file.length(); out.seek(localFileLength); } else{ localFileLength = 0; out.setLength(0); } } COM: <s> initiates this download </s>
funcom_train/25597645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JComponent createView () { assert component == null; component = new SceneComponent (this); component.addAncestorListener (new AncestorListener() { public void ancestorAdded (AncestorEvent event) { repaintSatellite (); } public void ancestorRemoved (AncestorEvent event) { repaintSatellite (); } public void ancestorMoved (AncestorEvent event) { } }); return component; } COM: <s> creates a view </s>
funcom_train/3023893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExceptionTag(String value) { if ((value == null) || (value.length() == 0) || value.equals("@")) { exceptionTag = "exception"; } else if (value.charAt(0) == '@') { exceptionTag = value.substring(1); } else { exceptionTag = value; } } COM: <s> sets the exception tag attribute of the javadoc tags object </s>
funcom_train/27929496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeToFile(File file) throws Exception { OutputFormat format = new OutputFormat(); format.setEncoding("UTF-8"); format.setIndenting(true); FileWriter outfile = new FileWriter(file); XMLSerializer serializer = new XMLSerializer(outfile, format); Document document; DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); document = builder.newDocument(); document.appendChild(saveToNode(document)); serializer.serialize(document); outfile.close(); } COM: <s> saves a addresses collection to a file </s>
funcom_train/42698128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addInternalFrame(JInternalFrame frame, String groupName) { if(!fGroupMap.containsKey(frame)) { //if the frame is already added: ignore the request fGroupMap.put(frame, groupName); fDesktop.add(frame); frame.addComponentListener(fRelocater); }else{ System.out.println("Already added this frame"); } } COM: <s> add a internal frame with a given group name </s>
funcom_train/3702766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setTuple(Tuple newTuple) { if (getTupleType().equals(newTuple.getTupleType()) == false) { throw new IllegalArgumentException("Expecting tuple type \"" + getTupleType() + "\" for " + this.getClass()); } t = newTuple; } // of method COM: <s> set the underlying tuple data structure </s>
funcom_train/11719774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSame(Item item) throws RepositoryException { if (item == null) { return false; } else if (equals(item)) { return true; } else if (isNode() == item.isNode()) { return getPath().equals(item.getPath()); } else { return false; } } COM: <s> checks whether this instance represents the same repository item as </s>
funcom_train/49789411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLeftFormInference() throws Exception { Frame home = assertHasFrame(root, "Home"); InputForm left = assertHasInputForm(home, "form left"); // contents of left assertHasInputTextField(left, "a"); assertHasInputTextField(left, "b"); assertHasInputTextField(left, "c"); assertHasNoInputTextField(left, "d"); assertHasLabel(left, "e"); } COM: <s> because were connected by sync wires the left form will have </s>
funcom_train/50571966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { try { if (pw != null) { pw.close(); } // end if if (fw != null) { fw.close(); } // end if } // end try catch (IOException e) { writeWarningEntry("We were unable to close the log file properly."); } // end catch } // end close() COM: <s> closes the log file </s>
funcom_train/568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(OptimizerBoardPosition boardPosition) { // Ensure that a real board position has been passed. if (boardPosition == null) throw new NullPointerException(); // Double the size of the queue if it is full. if (count >= queue.length) { queue = Arrays.copyOf(queue, queue.length * 2); } // Add the new value at the correct position. siftUp(count, boardPosition); // One more board position has been stored => increase the counter. count++; } COM: <s> adds the specified board position into this priority queue </s>