__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/10597879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String mangle(String uri) { if (uri.length()==0 || uri.charAt(uri.length() - 1) == '/') { uri += defaultFilename; } uri = uri.replace('"', '\''); uri = uri.replace('?', '_'); uri = uri.replace(':', '_'); return uri; } COM: <s> mangle a uri </s>
funcom_train/6492107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isGIF(byte[] data) { // Indentifier "GIF8" on position 0 byte [] pattern = new byte [] {(byte) 0x47, (byte) 0x49, (byte) 0x46, (byte) 0x38}; return ImageUtil.compareHexValues(pattern, data, 0, true); } COM: <s> determines wheter the image is a gif </s>
funcom_train/21606187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSingletonFactory(String beanName, ObjectFactory singletonFactory) { Assert.notNull(singletonFactory, "Singleton factory must not be null"); synchronized (this.singletonObjects) { if (!this.singletonObjects.containsKey(beanName)) { this.singletonFactories.put(beanName, singletonFactory); this.earlySingletonObjects.remove(beanName); this.registeredSingletons.add(beanName); } } } COM: <s> add the given singleton factory for building the specified singleton </s>
funcom_train/6409912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFarthestPoint() { float max = Float.MIN_VALUE; int point = 0; if (distances != null) { for (int i = distances.length; --i >= 0;) { float val = distances[i]; if (val > max) { max = val; point = i; } } } return point; } COM: <s> returns the point that has the largest associated distance value </s>
funcom_train/41165795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoTestUserHistory entity) { EntityManagerHelper.log("saving CoTestUserHistory 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 test user history entity </s>
funcom_train/42194573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void validateSettings() throws BuildException { if (property == null || property.trim().length() == 0) { throw new BuildException("Specify resultProperty"); } if (operation == null || operation.trim().length() == 0) { throw new BuildException("Specify operation"); } if (arg1 == null) { throw new BuildException("Specify arg1"); } } COM: <s> validates settings and throws exception if they are not valid </s>
funcom_train/1910859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWorkingPath(String workingPath) { String absolutePath; // Make sure it's absolute before chaning the working path, so that it // can be resolved using the new workingPath absolutePath = getAbsoluteText(); this.workingPath = workingPath; setText(absolutePath); validate(); } COM: <s> make the path listed relative to a particular working path </s>
funcom_train/43906975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAvailable() { boolean available = true; // if these classes are here, then the runtine environment has // access to JAI and the JAI ImageI/O toolbox. try { Class.forName("javax.media.jai.JAI"); Class.forName("com.sun.media.jai.operator.ImageReadDescriptor"); } catch (ClassNotFoundException cnf) { available = false; } return available; } COM: <s> tells me if this plugin will work on not given the actual installation </s>
funcom_train/21850505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Object prop) { if (prop instanceof GradientProperty) { GradientProperty gp = (GradientProperty) prop; if (m_start_color == null) m_start_color = new ColorProperty(); if (m_end_color == null) m_end_color = new ColorProperty(); m_start_color.setValue(gp.m_start_color); m_end_color.setValue(gp.m_end_color); m_magnitude = gp.m_magnitude; m_direction = gp.m_direction; m_painter = null; } else { assert (false); } } COM: <s> sets this property to that of another gradient property </s>
funcom_train/50911645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMainIsotope() { double max = -1.0; int mainMass = -1; for (int i = 0; i < isotopeMasses.length; i++) { if (isotopeAbundances[i] > max) { max = isotopeAbundances[i]; mainMass = isotopeMasses[i]; } } return mainMass; } COM: <s> get the mass of the most abundant isotope </s>
funcom_train/10977651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isFilter() { if (filterSet) { return filter; } ValueBinding vb = getValueBinding("filter"); if (vb != null) { Boolean value = (Boolean) vb.getValue(getFacesContext()); if (null == value) { return filter; } return value.booleanValue(); } else { return filter; } } COM: <s> p return a flag indicating whether filtering should take place </s>
funcom_train/51539320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTempProperty(SecurityToken token, String key, String value) { if (token != null) { token.checkIfPermissionAllowed(Permissions.AMS); } else { MIDletSuite current = MIDletStateHandler.getMidletStateHandler().getMIDletSuite(); current.checkIfPermissionAllowed(Permissions.AMS); } properties.setProperty(key, value); //properties.put(key, value); } COM: <s> replace or add a property to the suite for this run only </s>
funcom_train/21324709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { // stolen from GPIndividual. It's a decent algorithm. int hash = this.getClass().hashCode(); hash = (hash << 1 | hash >>> 31); for (int x = 0; x < genome.length; x++) hash = (hash << 1 | hash >>> 31) ^ Float.floatToIntBits(genome[x]); return hash; } COM: <s> copied from float vector individual </s>
funcom_train/12155895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePatient(int id) throws UnknownPatientException, PatientRepositoryException { try { PreparedStatement statement = PREPARED_STATEMENTS[PREPARED_STATEMENT_INDEX_DELETE_PATIENT]; synchronized(statement) { statement.clearParameters(); statement.setInt(1, id); int rowsChanged = statement.executeUpdate(); if (rowsChanged < 1) // TODO: Display a translatable error message. throw new UnknownPatientException("Can't delete patient# " + id); } } catch (SQLException sqlex) { throw new PatientRepositoryException(sqlex.getMessage()); } } COM: <s> removes the patient with the specified id </s>
funcom_train/18467010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Element createDomTexts(TextContainer texts, String orientation, Document doc) { Element domTexts = doc.createElement(TEXTS); domTexts.setAttribute(ORIENTATION, orientation); for(Text text : texts.getTexts()) { Element domText = doc.createElement(TEXT); domTexts.appendChild(domText); domText.setAttribute(VALUE, text.getText()); Element domPos = doc.createElement(POSITION); domText.appendChild(domPos); domPos.setAttribute(X, ""+text.getPosX()); } return domTexts; } COM: <s> creates a dom element for the specified text containter </s>
funcom_train/33233461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getProcess() { if (process == null) {//GEN-END:|60-getter|0|60-preInit // write pre-init user code here process = new StringItem("Loading Cards:", null);//GEN-LINE:|60-getter|1|60-postInit // write post-init user code here }//GEN-BEGIN:|60-getter|2| return process; } COM: <s> returns an initiliazed instance of process component </s>
funcom_train/12838968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean viewInstanceExists(String tableName, ViewTypesEnum viewType) throws FacilitiesException { boolean viewInstanceFound = false; try { viewInstanceFound = StringUtils.isNotBlank(getViewInstanceValue(tableName, viewType, DatabaseConstants.TableFieldName_JV_VIEWINSTANCE_ID)); } catch (Exception e) { return false; } return viewInstanceFound; } COM: <s> determines whether the view type exists for the given table name </s>
funcom_train/46528168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeMessageByIndex(int i, String msg) { if(i > msgCnt) { return; } if(i == msgCnt) { msgCnt++; } try { if(i >= maxMsg) { increaseDepth(); } File theFile = getMessageByIndex(i); if(theFile.mkdirs()) { theFile.delete(); } theFile.createNewFile(); FileWriter writer = new FileWriter(theFile); writer.write(msg,0,msg.length()); writer.flush(); writer.close(); } catch(Exception e) { e.printStackTrace(); System.out.println(e); } } COM: <s> writes a message into the message represented by given index </s>
funcom_train/21686965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getDelayInput() { if (delayInput == null) {//GEN-END:|83-getter|0|83-preInit // write pre-init user code here delayInput = new TextField("Delay", "500", 32, TextField.NUMERIC);//GEN-LINE:|83-getter|1|83-postInit // write post-init user code here }//GEN-BEGIN:|83-getter|2| return delayInput; } COM: <s> returns an initiliazed instance of delay input component </s>
funcom_train/50328070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getHeader() { if (isExtended()) { // 11 bit header int val = 0; for (int i = 1; i <= 8; i++) val = val*16 + getHexDigit(i); return val; } else { // 11 bit header return getHexDigit(1)*256 + getHexDigit(2)*16 + getHexDigit(3); } } COM: <s> get the can header as an int </s>
funcom_train/11514537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(E obj) { // the validForUpdate flag is needed as the necessary previous() // method call re-enables remove and add if (validForUpdate == false) { throw new IllegalStateException("Cannot add to list until next() or previous() called"); } validForUpdate = false; iterator.add(obj); iterator.previous(); } COM: <s> adds a new element to the list between the next and previous elements </s>
funcom_train/23335224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean prefire() throws IllegalActionException { boolean result = false; // buffering? if (input.hasToken(0)) result = true; // flushing? if (!result) { if (_data != null) { for (int i = 0; i < flush.getWidth(); i++) { if (flush.hasToken(i)) { result = true; break; } } } } if (!result) return result; return super.prefire(); } COM: <s> return false if theres no instance waiting to be buffered or the flush </s>
funcom_train/3071820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Comparator makeExactMatchingComparator(){ return new Comparator(){ public int compare(Object obj0, Object obj1) { if(obj0==null || obj1==null){ if(obj0==obj1){ return 0; }else if(obj0==null){ return 1; }else{ return -1; } }else{ Resource res=null; String url=null; if(obj0 instanceof Resource){ res=(Resource)obj0; url=(String)obj1; }else if(obj1 instanceof Resource){ res=(Resource)obj1; url=(String)obj0; }else{ return -1;//not equals } String resURL=res.getUrl(); //System.out.println("\n*********Comparing: "+resURL+"\t"+url+"\n"); return resURL.compareTo(url); } } }; } COM: <s> construsts a comparator which performs an exact matche between </s>
funcom_train/32192882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ParseResult parse(GenericCLParser parser, String[] args, String progName, boolean infiniteLookahead) { if (infiniteLookahead) return parser.alternateParse(getFormatString(), getOptionStore(), getRuleStore(), args, progName); else return parser.parse(getFormatString(), getOptionStore(), getRuleStore(), args, progName); } COM: <s> parse the given command line arguments using the provided parser </s>
funcom_train/5864697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object addRichlet(String name, Class richletClass, Map params) { if (!Richlet.class.isAssignableFrom(richletClass)) throw new IllegalArgumentException("A richlet class, "+richletClass+", must implement "+Richlet.class.getName()); return addRichlet0(name, richletClass, params); } COM: <s> adds the definition of a richlet </s>
funcom_train/11647254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addGlobalElementType(TranscriptionConfiguration configuration, ElementDescriptor elementDescriptor) throws IntrospectionException { // need to create a global element declaration and a complex type // use the fully qualified class name as the type name GlobalElement element = new GlobalElement( elementDescriptor.getLocalName(), configuration.getSchemaTypeNamingStrategy().nameSchemaType(elementDescriptor)); addElement(element); addGlobalComplexType(configuration, elementDescriptor); } COM: <s> adds global top level element and type declarations matching the given descriptor </s>
funcom_train/34806614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DOM createEnvelope () { DOM lEnvelope = DOM.createDocument("soap:Envelope"); lEnvelope.setAttr("xmlns:soap", SOAP_NAMESPACE_URI); lEnvelope.addElem("soap:Header"); lEnvelope.addElem("soap:Body"); return lEnvelope; } // createEnvelope COM: <s> convenience method that creates a basic soap envelope element </s>
funcom_train/51207823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String loadEnc() throws Exception { System.out.println("LoadEnc()\n"); RecordStore rs = RecordStore.openRecordStore(RS.DAZIO, false); String encryptedData = new String(rs.enumerateRecords(null, null, false).nextRecord()); rs.closeRecordStore(); return encryptedData; } COM: <s> load encrypted data from the record store </s>
funcom_train/51246023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PreparedStatement createPreparedStatement() throws SQLException { PreparedStatementEditor pEditor = (PreparedStatementEditor) editor; return context.getConfigurations().getDatabaseConnectionManager().createPreparedStatement( pEditor.getSql(), pEditor.getArgs(), pEditor.getTypes()); } COM: <s> creates a prepared statement based on the values in the sql tab </s>
funcom_train/13246595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCell(int x, int y, SudokuCell cell) { if (validCellPos(x, y)) { board[x][y] = cell; } else { throw new ArrayIndexOutOfBoundsException( "Invalid coordinates: setCell(" + x + ", " + y + ")"); } } COM: <s> replaces the cell at the specified position with the provided sudoku cell </s>
funcom_train/33877589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchProfile(long rowId) throws SQLException { Cursor mCursor = mDb.query(true, DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TITLE, KEY_FREQ, KEY_START_DATE, KEY_END_DATE}, KEY_ROWID + "=" + rowId, null, null, null, null, null); if (mCursor != null) { mCursor.moveToFirst(); } return mCursor; } COM: <s> return a cursor positioned at the note that matches the given row id </s>
funcom_train/19543945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fail(String message, Throwable t) { LOGGER.log(Level.WARNING, "Failed image load: " + message, t); for (CachingImageLoader.CachingImageListener cachingImageListener : getListeners(null)) { cachingImageListener.imagedWouldNotLoad(message, t); } } COM: <s> call all of the listeners on a failure </s>
funcom_train/497093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startAgent() { if (classLoader != null) { try { Class c = classLoader.loadClass("cz.petrz.ddgp.agent.Agent"); agent = (AgentCoreItf) c.getConstructor( new Class[] { String[].class }).newInstance( new Object[] { args }); Runtime.getRuntime().addShutdownHook(new ShutDownHandler(agent)); agent.run(); } catch (Throwable e) { log.fatal("Cannot start Agent", e); } } else log.fatal("No classloader initialized"); } COM: <s> loads and starts agent class </s>
funcom_train/43893173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetFormattedErrorMessage() { final String exp = "12 / ] + 4"; try { FilterBuilder.parse(exp); fail("expected Exception"); } catch (ParseException pe) { String error = FilterBuilder.getFormattedErrorMessage(pe, exp); assertFalse("".equals(error)); // LOGGER.info(error); } } COM: <s> test of get formatted error message method of class </s>
funcom_train/7295074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shape(char[] source, int start, int length) throws ArabicShapingException { if ((options & LENGTH_MASK) == LENGTH_GROW_SHRINK) { throw new ArabicShapingException("Cannot shape in place with length option grow/shrink."); } shape(source, start, length, source, start, length); } COM: <s> convert a range of text in place </s>
funcom_train/871024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialise() throws XBRLException { try { if (factory == null) { factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); factory.setValidating(false); } if (builder == null) { builder = factory.newDocumentBuilder(); } } catch (Exception e) { logger.error("The fragment builder could not be constructed."); throw new XBRLException("The DOM builder could not be initialised.",e); } } COM: <s> initialise the document builder </s>
funcom_train/3414617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private E unlinkFirst() { Node<E> f = first; if (f == null) return null; Node<E> n = f.next; first = n; if (n == null) last = null; else n.prev = null; --count; notFull.signal(); return f.item; } COM: <s> removes and returns first element or null if empty </s>
funcom_train/20825898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getWheelCoordinates(final Point panelPoint) { int x = panelPoint.x - getOriginX() - GAP - (wheel.getSize() / 2); int y = panelPoint.y - getOriginY() - GAP - (wheel.getSize() / 2); return new Point(x, y); } COM: <s> translates panel coordinates to wheel coordinates </s>
funcom_train/27719870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCopyStream() throws Exception { System.out.println("testCopyStream"); byte[] testInBytes = {5, 8, -128, 127, 42}; InputStream in = new ByteArrayInputStream(testInBytes); ByteArrayOutputStream out = new ByteArrayOutputStream(); Streams.copy(in, out); assertTrue(Arrays.equals(testInBytes, out.toByteArray())); } COM: <s> test of copy method of class org </s>
funcom_train/45749958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addConditionRulePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Condition_conditionRule_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Condition_conditionRule_feature", "_UI_Condition_type"), URMLPackage.Literals.CONDITION__CONDITION_RULE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the condition rule feature </s>
funcom_train/25332789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetChromosomeDAO() throws Exception { DBDAOCollectionCoreFactory instance = new DBDAOCollectionCoreFactory(); DBCollectionSpecies sp = new DBCollectionSpecies(); instance.setSpecies(sp); DBChromosomeDAO result = instance.getChromosomeDAO(); assertNotNull(result); assertTrue(result.getFactory()==instance); assertTrue(result.getSpecies()==sp); } COM: <s> test of get chromosome dao method of class dbdaocollection core factory </s>
funcom_train/40696078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { if (!GData.isLoaded(defaultPackage)) { GData.loadGDataApi(GDataDemo.GDATA_API_KEY, new Runnable() { public void run() { onGDataLoad(); } }, defaultPackage); } else { onGDataLoad(); } } COM: <s> the entrypoint for this demo </s>
funcom_train/5421676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkCrypt(final String algorithm) throws GeneralSecurityException { String s = "message for testing"; byte[] encrypted = Enigma.encrypt(s.getBytes(), "secret", algorithm); byte[] decrypted = Enigma.decrypt(encrypted, "secret", algorithm); assertEquals(s, new String(decrypted)); } COM: <s> for symetric crypting you can use the same password for encrypting </s>
funcom_train/1567320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean verify(boolean[] assignment) { boolean verified = false; Iterator nums = literals.iterator(); while (nums.hasNext() && !verified) { Integer literal = (Integer) nums.next(); if (literal > 0) { verified = assignment[literal - 1]; } else { verified = !assignment[-1 * literal - 1]; } } return verified; } COM: <s> verifiy a clause for a specified assignment </s>
funcom_train/9994197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetThema() throws AssertionFailedException { System.out.println("getThema"); Termin instance = new Termin(); String expResult_1 = ""; String result_1 = instance.getThema(); assertEquals(expResult_1, result_1); fail("The test case is a prototype."); } COM: <s> test of test get thema method of class termin </s>
funcom_train/20400907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInterruptedStatus() { getHibernateTemplate().bulkUpdate("update TaskRun set status=? where (status=? or status=? or status=?)", new Object[] { Status.INTERRUPTED, Status.RUNNING, Status.INITIALISING, Status.CANCELLING }); getHibernateTemplate().clear(); // remove everything from session cache } COM: <s> updates the status of any tasks not considered complete as interrupted </s>
funcom_train/34422066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getItemValueInteger(String aName) { try { aName = aName.toLowerCase(); Vector v = (Vector) getItemValue(aName); if (v.size() == 0) return 0; String sValue = v.firstElement().toString(); return new Double(sValue).intValue(); } catch (NumberFormatException e) { return 0; } catch (ClassCastException e) { return 0; } } COM: <s> returns the value of an item with a single numeric value </s>
funcom_train/35844118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPackage() { Object target = getTarget(); if (Model.getFacade().isANamespace(target)) { Object ns = target; Object ownedElem = Model.getModelManagementFactory() .createPackage(); Model.getCoreHelper().addOwnedElement(ns, ownedElem); TargetManager.getInstance().setTarget(ownedElem); } } COM: <s> create a new package within the namespace </s>
funcom_train/20845131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resolveTypes(Schema s) { Element e = s.getElement(name); if (e != null) { Type t = e.getType(); type = t; } else { return; } Iterator it = children(); while (it.hasNext()) { ParameterValue child = (ParameterValue) it.next(); if (child.hasChildren()) { child.resolveType((ComplexType) type, s); } } } COM: <s> resolve the types based on the given xml schema </s>
funcom_train/32631899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetProfileDocument() { System.out.println("-> testGetProfileDocument"); String profile = "some_profile_name"; String profileKey = "some_Profile_Key"; DProfileDocument pDoc = getDatabase().getProfileDocument(profile, profileKey); assertNotNull("Document should note be null.", pDoc); } COM: <s> tests creation or retrieval of profile documents </s>
funcom_train/24461057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initialize(Trigger t, AbstractPE firstFilter, AbstractPE sinkFilter){ this.firstFilter = firstFilter; this.sinkFilter = sinkFilter; this.parentPEs = firstFilter.parentPEs; this.buffers = firstFilter.buffers; this.childPEs = sinkFilter.childPEs; this.view = sinkFilter.view; t.setProcessingElement(firstFilter); setTrigger(t); } COM: <s> initialize should be called by a subclass </s>
funcom_train/20044668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _setValue() { boolean result = true; double cellValue = 0; log.println("setValue() ..."); oObj.setValue(222.333) ; cellValue = (double) oObj.getValue() ; result &= (cellValue == 222.333); tRes.tested("setValue()", result); } // end setValue() COM: <s> sets a value and then gets it </s>
funcom_train/18593024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireActionPerformed(String cmd, boolean select) { if (select) selectAll(); ActionEvent e = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, cmd); Iterator iter = listeners.iterator(); while (iter.hasNext()) { ((ActionListener)iter.next()).actionPerformed(e); } } COM: <s> on normal fire enter select all text </s>
funcom_train/38552335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMin( String min ) { Cube42NullParameterException.checkNull(min, "min", "setMin", this); try { this.min = Double.parseDouble(min); } catch (NumberFormatException e) { Logger.error(PropertiesSystemCodes.IMPROPER_VALUE_FORMAT, new Object[] {min, this.getName(), "Double"}); this.min = DEFAULT_DOUBLE_VALUE; } } COM: <s> sets the min value </s>
funcom_train/18600072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User findUserByUsername(String username) { String queryTemplate = "from org.geonetwork.gaap.domain.user.User where username = ?"; List<User> users = this.getHibernateTemplate().find(queryTemplate, username); if (!users.isEmpty()) { return users.get(0); } else { return null; } } COM: <s> find a user by username </s>
funcom_train/19776698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DoubleDouble pow(int exp) { if (exp == 0.0) return valueOf(1.0); DoubleDouble r = new DoubleDouble(this); DoubleDouble s = valueOf(1.0); int n = Math.abs(exp); if (n > 1) { /* Use binary exponentiation */ while (n > 0) { if (n % 2 == 1) { s.selfMultiply(r); } n /= 2; if (n > 0) r = r.sqr(); } } else { s = r; } /* Compute the reciprocal if n is negative. */ if (exp < 0) return s.reciprocal(); return s; } COM: <s> computes the value of this number raised to an integral power </s>
funcom_train/438017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propertyChange(PropertyChangeEvent event) { if (event.getPropertyName().equals("width")) { TableColumn source = (TableColumn)event.getSource(); StylableSpreadsheet styleableSpreadsheet = (StylableSpreadsheet) spreadsheet.getExtension(StyleExtension.NAME); if (styleableSpreadsheet.getColumnWidth(source.getModelIndex()) != source.getWidth()) { styleableSpreadsheet.setColumnWidth( source.getModelIndex(), source.getWidth()); uiController.setWorkbookModified(spreadsheet.getWorkbook()); } } } COM: <s> stores the width of the column that was resized </s>
funcom_train/8409821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StrBuilder appendWithSeparators(Collection coll, String separator) { if (coll != null && coll.size() > 0) { separator = (separator == null ? "" : separator); Iterator it = coll.iterator(); while (it.hasNext()) { append(it.next()); if (it.hasNext()) { append(separator); } } } return this; } COM: <s> appends a collection placing separators between each value but </s>
funcom_train/25309849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getRecordsWithConverterExecution(DataSet dataset) { createConverterObject(dataset.getDescription(), dataset.getId()); queryDatasetRequestUrl(DATASET_URL + "/records", "?start=2&limit=5", 5); deleteConverters(dataset.getId()); } COM: <s> execute a query on the dataset with a converter attached to it </s>
funcom_train/26036343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isReady() { if (isComplete()) return false; if (checkReadyNeeded) { isReady = false; for (Iterator<ConsumerChoicePointFrame> i = generatingCPs.iterator(); i.hasNext(); ) { if ( i.next().isReady() ) { isReady = true; break; } } checkReadyNeeded = false; return isReady; } else { return isReady; } } COM: <s> return true if the generator is ready to be scheduled i </s>
funcom_train/29372488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getChkRR() { if (chkRR == null) { chkRR = new JCheckBox(); chkRR.setText("RR"); chkRR.setSelected(dc.getBooleanSetting(DisplayConfiguration.MAP_RANGE_RINGS)); chkRR.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { showRRpressed(); } }); } return chkRR; } COM: <s> this method initializes chk rr </s>
funcom_train/17053785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getTag(byte[] tag, int t) { if (state == -1) { throw new RuntimeException("wrong order of operations"); } else if (state == 0) { finish(false); } System.arraycopy(T, 0, tag, 0, (t < block_size) ? t : block_size); } COM: <s> get the complete cmac tag of the whole message provided </s>
funcom_train/28968400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GridBuilder2 adjustSizeHintChar(final RCPControl rcpControl, final int widthHintChar, final int heightHintChar) { if (rcpControl instanceof RCPLabeledControl) { final RCPHyperlinkLabel label = ((RCPLabeledControl) rcpControl).getRCPHyperlink(); adjustSizeHintChar(label, -1, heightHintChar ); } return adjustSizeHintChar(rcpControl.getSWTControl(), widthHintChar, heightHintChar ); } COM: <s> adjusts the horizontal and vertical b size hints b of </s>
funcom_train/32356002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkDeleteFile() { boolean valid = false; if (treeController.getSelectedFile() == null) { JOptionPane.showMessageDialog(null, "Please select a file"); } else { // yes response mathces 0 ,and no response matches 1 final int response = JOptionPane.showConfirmDialog(null, "Are you sure you want to delete the selected file?", "Delete file", JOptionPane.YES_NO_OPTION); if (response == 0) { valid = true; } } return valid; } COM: <s> verifies if a file was selected and displays are you sure message box </s>
funcom_train/36558456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void compute(ProcessorArmingCollection collection) { PostEventCondition pec = (PostEventCondition)collection.get(0); long[] e = pec.getTriggerEvents(); for (int i=0; i<e.length; i++) { System.out.println("ProcessPostEvent: " + name + " " + e[i]); } } COM: <s> the calculate method </s>
funcom_train/1405301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void firePropertyChanged(String propertyName, Object oldValue, Object newValue) { if (!BurdeeUtils.isNullSafeEquals(oldValue, newValue)) { PropertyChangeEvent evt = new PropertyChangeEvent(this, propertyName, oldValue, newValue); synchronized(listeners) { for (BurdeeListener listener : listeners) { listener.propertyChange(evt); } } } } COM: <s> fires a property change event to all of the </s>
funcom_train/3332366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaxCallDepth() { if (mMaxCallDepth == -1) { IPreferenceStore settings = getDefault().getPreferenceStore(); try { mMaxCallDepth = settings.getInt( CallersConstants.PREF_MAX_CALL_DEPTH); } catch (Exception e) { logError("Error getting sash orientation", e); } } return mMaxCallDepth; } COM: <s> returns the maximum tree level allowed </s>
funcom_train/32947586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setArraySize( int arraySize ) throws PropertyVetoException { if ( arraySize > 0 ) { this.arraySize = arraySize; } else { throw new PropertyVetoException( "array size must be > 0", new PropertyChangeEvent( this, "arraySize", new Integer( this.arraySize ), new Integer( arraySize ) ) ); } } COM: <s> sets the array size </s>
funcom_train/4227704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setTimestamp(String timestamp) { if (isVoid(timestamp)) { throw new WLLException("Error: User: Null timestamp in token."); } long timestampLong; try { timestampLong = Long.parseLong(timestamp); } catch (Exception e) { throw new WLLException("Error: User: Invalid timestamp: " + timestamp); } this.timestamp = new Date(timestampLong * 1000); } COM: <s> sets the unix timestamp </s>
funcom_train/3392704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String nameToPath(String name, String suffix) throws IOException { if (!DeclarationMaker.isJavaIdentifier(name.replace('.', '_'))) { bark.aptWarning("IllegalFileName", name); throw new IOException(); } return name.replace('.', File.separatorChar) + suffix; } COM: <s> converts the canonical name of a top level type or package to a </s>
funcom_train/9877811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onSelected(IFramework framework) { this.framework = framework; this.displayMenu = framework.getDisplayMenu(); setData(framework.getData()); //update scale if it comes from the display menu if(yRangeMode == 0) { //display mode this.maxValue = framework.getDisplayMenu().getMaxRatioScale(); this.minValue = framework.getDisplayMenu().getMinRatioScale(); } refreshGraph(); } COM: <s> updates data mode and some the viewer attributes </s>
funcom_train/11005351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendChild(Record newChild) { synchronized(changingChildRecordsLock) { // Copy over, and pop the child in at the end Record[] nc = new Record[(_children.length + 1)]; System.arraycopy(_children, 0, nc, 0, _children.length); // Switch the arrays nc[_children.length] = newChild; _children = nc; } } COM: <s> adds a child record at the very end </s>
funcom_train/6289962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getItemsCorrespondingToSelected(Vector items) { Vector correspondingToSelected = new Vector(); for (int i = 0; i < size(); i++) { if (isSelected(i)) { correspondingToSelected.addElement(items.elementAt(i)); } } return correspondingToSelected; } COM: <s> gets elements from vector items that have the same index as items that </s>
funcom_train/14001314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawTrajectories(Graphics g) { if (g == null) return; Iterator<Trajectory> iter = all_traj.iterator(); // Iterate over all the trajectories while (iter.hasNext()) { Trajectory curr_traj = iter.next(); // if the trajectory to_display value is true if (curr_traj.to_display) { curr_traj.drawStatic(g, this); } } } COM: <s> draws each of the trajectories in code all traj code </s>
funcom_train/7292414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int handleGetExtendedYear() { int year; if (newestStamp(ERA, YEAR, UNSET) <= getStamp(EXTENDED_YEAR)) { year = internalGet(EXTENDED_YEAR, 1); // Default to year 1 } else { int cycle = internalGet(ERA, 1) - 1; // 0-based cycle year = cycle * 60 + internalGet(YEAR, 1); } return year; } COM: <s> implement abstract calendar method to return the extended year </s>
funcom_train/4598702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertActiveAccount(WitsUser user) throws AccountDisabledException { AccountStatus authStatus = dao.getAccountStatus(user.getLoginId()); if (AccountStatus.ACTIVE != authStatus) { // account is not active audit("auth.accountInactive", user); // user will be notified that account is diabled, but not if provided username/password combination is // correct or not. throw new AccountDisabledException(); } } COM: <s> check if the targeted account is active or not </s>
funcom_train/5302167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object produceDataset(Map params) { DefaultPieDataset ds = null; try { if (this.itValues!=null) { ds = new DefaultPieDataset(); while(itValues.hasNext()){ StatPair pair = (StatPair)itValues.next(); ds.setValue(pair.getColumnValue(),pair.getDocs()); } }else{ ds = new DefaultPieDataset(); int i=0; while (i<4) { ds.setValue("i="+(i+1),++i*20); } } } catch (Exception e) { throw new RuntimeException(e); } return ds; } COM: <s> produces a dataset that provides data for a graphic chart </s>
funcom_train/11792489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DiffAAIDType copyAAID(DiffAAIDType diffAAID) throws MalformedURIException { logger.debug("copyAAID started"); DiffAAIDType newAAID = new DiffAAIDType(); newAAID.setName(new URI(diffAAID.getName())); newAAID.setVersion(diffAAID.getVersion()); newAAID.setBaseVersion(diffAAID.getBaseVersion()); logger.debug("copyAAID finished"); return newAAID; } COM: <s> copies the contents of the differential aads aaid </s>
funcom_train/13648054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImageIcon grayImage(ImageIcon icon, int brightness) { Image image = icon.getImage(); ImageFilter filter = new GrayFilter(true, brightness); FilteredImageSource filteredSrc = new FilteredImageSource(image.getSource(), filter); image = Toolkit.getDefaultToolkit().createImage(filteredSrc); return (new ImageIcon(image)); } COM: <s> turns the passed icon into a grayed out and returns it </s>
funcom_train/9992977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onBeforeTabSelected(SourcesTabEvents sender, int tabIndex) { // return if currently in add mode and tabIndex > 0 Logger.debug(this, "mode=" + mode + ", tabIndex=" + tabIndex); if (mode.equals(MODE_ADD) && tabIndex > 0) return false; return true; } COM: <s> fires before tab is selected </s>
funcom_train/25331977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConsequences() { VariationMapping instance = new VariationMapping(); List<VariationType> list = new ArrayList<VariationType>(); list.add(new VariationType()); assertTrue(instance.getConsequences().isEmpty()); instance.setConsequences(list); assertFalse(instance.getConsequences().isEmpty()); assertSame(instance.getConsequences(),list); } COM: <s> test of get consequences method of class variation mapping </s>
funcom_train/3050307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object unproxyAndReassociate(Object maybeProxy) throws HibernateException { if ( maybeProxy instanceof ElementWrapper ) { maybeProxy = ( (ElementWrapper) maybeProxy ).getElement(); } if ( maybeProxy instanceof HibernateProxy ) { HibernateProxy proxy = (HibernateProxy) maybeProxy; LazyInitializer li = proxy.getHibernateLazyInitializer(); reassociateProxy(li, proxy); return li.getImplementation(); //initialize + unwrap the object } else { return maybeProxy; } } COM: <s> possibly unproxy the given reference and reassociate it with the current session </s>
funcom_train/25791567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(E value) { this.values.add(value); if (this.size == this.depths.length) { int[] temp = new int[2 * this.depths.length]; System.arraycopy(this.depths, 0, temp, 0, this.depths.length); this.depths = temp; } this.size++; this.depths[size - 1] = 0; } COM: <s> add a new value </s>
funcom_train/24606907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startAboutSection(int classType, String id) { generator.startAboutSectionCB(classType); out.println(); String s = "<" + T_ONTO_PREFIX + Generator.CLASS_TOKEN[classType] + T_SPACE + T_RDF_ABOUT + "=\"" + id + "\">"; out.println(s); } COM: <s> implementation of writer start about section </s>
funcom_train/45494859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseClicked(MouseEvent e) { // topic clicked if(e.getSource().equals(currentTopic)) { if(e.getClickCount() == 2) { String newTopic = Dialogs.showAddTextFieldDialog(Modes.CHANGE_COUNCIL_TOPIC, Model.getTopic()); if(newTopic != null) Context.getInstance().getTikaraModel().getActiveCouncil().setTopic(newTopic); } } } COM: <s> gets called when the user clicks the mouse </s>
funcom_train/3836939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemChangeRange() { if (jMenuItemChangeRange == null) { jMenuItemChangeRange = new JMenuItem(); jMenuItemChangeRange.setText("set start-stop"); jMenuItemChangeRange .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { getJDialogStartStop().show(); } }); } return jMenuItemChangeRange; } COM: <s> this method initializes j menu item change range </s>
funcom_train/11364408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testSimpleComponentLookup() throws Exception { BlueprintURLContext bpURLc = new BlueprintURLContext (bundle, new Hashtable<String, String>()); SimpleComponent sc = (SimpleComponent) bpURLc.lookup("blueprint:comp/comp1"); assertNotNull (sc); String msg = sc.getIdMessage(); assertEquals ("comp1 message wrong", "comp1_message", msg); } COM: <s> check that we can directly address a blueprint component </s>
funcom_train/20624298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { try { stmt.close(); if (sups_stmt != null) { sups_stmt.close(); eqs_stmt.close(); status_stmt.close(); rcons_stmt.close(); } server = null; stmt = null; } catch (SQLException e) { e.printStackTrace(); } } COM: <s> close prepared statements </s>
funcom_train/23949360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane createOutputPane(){ JEditorPane output = new JEditorPane( "text/html", "" ); JScrollPane scroll = new JScrollPane( output, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED ); output.setEditable( false ); return scroll; } COM: <s> creates the main output window </s>
funcom_train/18951003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writer__setDefaults() { _setFileNameRoot( "GeneratedFile" ); _setFileNameSuffix( ".java" ); _setOutputFolder( "." ); _setBackupFolder( ".jostraca" ); _setBackupPrefix( "-" ); _setBackupSuffix( "-backup.txt" ); _backup( "true".equals( "false" ) ); } COM: <s> set defaults from configuration property set </s>
funcom_train/34565052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean zip() { final String[] zips = { "zip", "docx", "xslx", "pptx", "odt", "ods", "odp", "thmx" }; final String suf = path.toLowerCase().replaceAll(".*\\.", ""); for(final String z : zips) if(suf.equals(z)) return true; return false; } COM: <s> matches the current file against various file suffixes </s>
funcom_train/9548892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void update() { final TreeViewer viewer = getTreeViewer(); if (viewer != null) { final Control control = viewer.getControl(); if (control != null && !control.isDisposed()) { if (viewer.getContentProvider() != null) { getSite().getShell().getDisplay().asyncExec(new Runnable() { public void run() { control.setRedraw(false); viewer.setInput(input); viewer.expandAll(); control.setRedraw(true); }}); } } } } COM: <s> updates the tree viewer in order to show the current content </s>
funcom_train/22951678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void prepareData(Classifier cls) { cls.resetLearningData(); Random rndGenerator = new Random(System.nanoTime()); int rnd; for(int i=0;i<cls.getMaxLearningVectors();i++) { rnd = rndGenerator.nextInt(learning_vectors); //choose with repetition cls.storeLearningVector(inputVect[rnd],target[rnd]); } } COM: <s> pass data to classifier cls from input vect chosen by selection with repetition </s>
funcom_train/375444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testQuotesTwice() { ConfigString string = new ConfigString("'${A.A}' and '@{a.${b}}'", variables, properties); assertTrue("sub failed in expand", string.expand("", variables, properties)); assertEquals("'${A.A}' and '@{a.${b}}'", string.toString()); string.reset(); // Reintialize } COM: <s> test quotes twice </s>
funcom_train/29388652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setId( String newId ) { try { oneArgsArray[ 0 ] = debugger.evaluate( "\"" + newId + "\"" ); Variable var = modelNode.invokeMethod( "setId", "(Ljava/lang/String;)V", oneArgsArray ); } catch ( Exception e ) { e.printStackTrace(); } } COM: <s> sets the id attribute </s>
funcom_train/17942719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { showSplash(); getContentPane().removeAll(); appletRegister.registerNewApplet(this); config = readConfig(); if (config.isDebugMode()) LeanLogger.setCurrentLogLevel(LeanLogger.DEBUG); kafenioPanel = new KafenioPanel(config); getContentPane().setLayout(new BorderLayout()); getContentPane().setBackground(config.getBgcolor()); getContentPane().add(kafenioPanel, BorderLayout.CENTER); validate(); splash.destroy(); } COM: <s> initializes the applet </s>
funcom_train/3422025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object descObj) { if(!(descObj instanceof XMLSchemaDescription)) return false; XMLSchemaDescription desc = (XMLSchemaDescription)descObj; if (fNamespace != null) return fNamespace.equals(desc.getTargetNamespace()); else // fNamespace == null return desc.getTargetNamespace() == null; } COM: <s> compares this grammar with the given grammar </s>
funcom_train/14229953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPrivateData(CallId call, String address, String terminal, Object data) { if (!(data instanceof Serializable)) throw new PlatformException("setPrivateData data is not serializable through remote proxy"); try { this.getRemote().setPrivateData(call, address, terminal, (Serializable)data); } catch (RemoteException re) { throw new PlatformException(re.getMessage()); } } COM: <s> send set private data through remote proxy </s>
funcom_train/45623492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUpdateablePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AspNetCompilerType_updateable_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AspNetCompilerType_updateable_feature", "_UI_AspNetCompilerType_type"), MSBPackage.eINSTANCE.getAspNetCompilerType_Updateable(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the updateable feature </s>
funcom_train/12895928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getExportFilename(String file) { String fullPath = getFullPath(file); _log.info("Export path " + fullPath); String fileDate = Helper.getDateString("yyMMdd-HHmm"); String realExportFilename = fullPath + "/" + EXPORT_NAME + "-" + fileDate + EXPORT_EXT; return realExportFilename; } COM: <s> return a filename that includes the date in the filename </s>