__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/3097540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(LibraryProcessorFactory lpf) { if (lpf != null) { LibraryProcessor lpL[] = lpf.createProcessors(); if (lpL != null) { for (int i = 0; i < lpL.length; ++i) { add(lpL[i]); } } } } COM: <s> adds a generic library processor factory to the mix </s>
funcom_train/35442938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object arg0) { if (this.b == ((Triple)arg0).b) { if(this.x < ((Triple)arg0).x ) { return -1; } if(this.x == ((Triple)arg0).x ) { return 0; } if(this.x > ((Triple)arg0).x ) { return 1; } } if (this.b < ((Triple)arg0).b) return -1; return 1; } COM: <s> comparator in order to sort the triples </s>
funcom_train/1748115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean parseFileFormat(String asFileFormat) { boolean result = true; if (asFileFormat==null) return result; if (asFileFormat.trim().length()==0 || !(asFileFormat.equalsIgnoreCase(Config.DEFAULT_CSV_FORMAT)|asFileFormat.equalsIgnoreCase(Config.DEFAULT_XML_FORMAT))) { result = false; } return result; } COM: <s> method to parser file format parameters from files config file </s>
funcom_train/9042865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hist(Object params, double amin, double amax, int n) { double adiff = (amax - amin) / (n + 1); GammaPolyaParams gpp = (GammaPolyaParams) params; double a = amin; for (int i = 0; i < n; i++) { a += adiff; double pa = logpdf(a, params); System.out.println(a + "\t" + pa); } } COM: <s> print a histogram of the likelihood </s>
funcom_train/4054709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(IAction action) { TicketManager manager = ManagerFactory.getInstance().getTicketManager(); SafeSaveDialog dialog = new SafeSaveDialog (window.getShell()); dialog.setFileName("Ticket.xml"); dialog.open(); if( dialog.getFileName().length()>0 ) { String FileName = dialog.getFilterPath() + "/" + dialog.getFileName(); manager.SaveTicket(FileName); } } COM: <s> the action has been activated </s>
funcom_train/10194259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void performValidation(PersistentEntry entry, boolean verbose) throws RuleException { if (entry.getValue() == null) { throw new RuleException("Field [" + entry.getColumn().getColumnName() + "] is required but contains no data") .setFieldName(entry.getColumn().getColumnName()); } } COM: <s> asserts that persistent entry contains data </s>
funcom_train/22092936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while (true) { try { synchronized (this) { while (_runnable == null) { wait(); _log.fine( _sI+" running" ); } } try { _runnable.run(); } catch (Throwable thw) { } synchronized (this) { _runnable = null; } ThreadPool.this.release( _sI ); } catch (InterruptedException e) { _log.throwing( "ThreadPool.RunThread", "run", e ); } } } COM: <s> the run threads run method </s>
funcom_train/12155782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFullPath() { logger.debug("Entering getFullPath()."); String fullPath = this.fullPath; if (logger.isDebugEnabled()) { logger.debug("Exiting getFullPath(); RV = " + (fullPath != null ? "\"" + fullPath + "\"" : null) + "."); } return fullPath; } COM: <s> gets the path of the dicom image </s>
funcom_train/46635931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IBlinkingCellResolver getBlinkResolver() { return new BlinkingCellResolver() { private String[] configLabels = new String[1]; public String[] resolve(Object oldValue, Object newValue) { double old = ((Double) oldValue).doubleValue(); double latest = ((Double) newValue).doubleValue(); configLabels[0] = (latest > old ? BLINK_UP_CONFIG_LABEL : BLINK_DOWN_CONFIG_LABEL); return configLabels; }; }; } COM: <s> the blinking resolver decides how the cell should blink </s>
funcom_train/13668386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj instanceof RawData) { RawData other = (RawData) obj; if (other.byteArray.length == byteArray.length) { for (int i = 0; i < byteArray.length; ++i) { if (other.byteArray[i] != byteArray[i]) { return false; } } return true; } } return false; } COM: <s> defines equality between two raw data objects </s>
funcom_train/3718260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void decorateConstructor(GeneratedMethod constructor, String className) { constructor.addToDescription("Default constructor for Conformance_HL7_" + className + ". Has the"); constructor.addToDescription("following functions:"); constructor.addToDescription("<ul><li>Instantiating all required Conformance Classes in the structure"); constructor.addToDescription(" <li>Instantiating the underlying HAPI Message object"); constructor.addToDescription(" <li>Populating any constant values"); constructor.addToDescription("</ul>"); } COM: <s> adds comments to a generated constructor </s>
funcom_train/25132108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rewireCellValue(PropertyTable table, int row, String valueS) { if (table.getColumnCount() == 2) { table.getModel().setValueAt(valueS, row, 1); } else { table.getModel().setValueAt(valueS, row, 2); } } COM: <s> make sure that the cell value will be appropirately rewired to an </s>
funcom_train/43225246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Formatter makeFormatter(OutputStream out) { Formatter formatter; if ("html".equalsIgnoreCase(outputFormat)) { formatter = new HtmlFormatter(out); } else if ("latex".equalsIgnoreCase(outputFormat)) { formatter = new LatexFormatter(out); } else { return null; } for (String style : styles) { formatter.useStyle(style); } return formatter; } COM: <s> makes a formatter for the requested output format </s>
funcom_train/21848576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void adjustCaret(int percentFromWindowTop) { JTextComponent c = component; if (c != null) { Rectangle bounds = getExtentBounds(); bounds.y += (percentFromWindowTop * bounds.height) / 100 - (percentFromWindowTop * lineHeight) / 100; try { int offset = ((BaseTextUI) c.getUI()).getPosFromY(bounds.y); if (offset >= 0) { caretSetDot(offset, null, SCROLL_SMALLEST); } } catch (BadLocationException e) { } } } COM: <s> set the dot according to the currently visible screen window </s>
funcom_train/3077327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addArgumentsToList(ListIterator list) { for (int i = 0; i < arguments.size(); i++) { Argument arg = (Argument) arguments.elementAt(i); String[] s = arg.getParts(); if (s != null) { for (int j = 0; j < s.length; j++) { list.add(s[j]); } } } } COM: <s> append all the arguments to the tail of a supplied list </s>
funcom_train/34451293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIncomingPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_MActivityNode_incoming_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_MActivityNode_incoming_feature", "_UI_MActivityNode_type"), M3ActionsPackage.Literals.MACTIVITY_NODE__INCOMING, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the incoming feature </s>
funcom_train/624748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInheritedFeatures() throws Exception { UmlFacade ummf = new UmlFacade(new EveRepository()); try { MofClassifier modelElement = (MofClassifier) ummf.getClassifier(MODEL_ELEMENT); TypedProperty attr = modelElement.getAttribute("name", false); MofClassifier name = (MofClassifier) attr.getType(); assertNotNull(name); } catch (Exception e) { fail( "[TestUmlTypeDescriptor].testInheritedAssociation(): unexpected exception: \n " + e.getMessage()); } } COM: <s> tests access of inherited features </s>
funcom_train/47017768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ChoiceGroup getChoWords() { if (choWords == null) {//GEN-END:|127-getter|0|127-preInit // write pre-init user code here choWords = new ChoiceGroup(getLocalizedString("Words"), getWordListShowType());//GEN-LINE:|127-getter|1|127-postInit // write post-init user code here }//GEN-BEGIN:|127-getter|2| return choWords; } COM: <s> returns an initiliazed instance of cho words component </s>
funcom_train/11643639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetActiveExecutorExternal() { ExecutorService exec = Executors.newSingleThreadExecutor(); try { BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl( exec); init.start(); assertSame("Wrong executor", exec, init.getActiveExecutor()); checkInitialize(init); } finally { exec.shutdown(); } } COM: <s> tests whether an external executor is correctly detected </s>
funcom_train/16855263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createDatabase(final VoidCallback callback) { db.transaction(new TransactionCallback() { public void onTransactionFailure(SQLError error) { callback.onFailure(new DataServiceException(error)); } public void onTransactionStart(final SQLTransaction tx) { tx.executeSql(CREATE_TABLE_QUERY, null); } public void onTransactionSuccess() { callback.onSuccess(); } }); } COM: <s> creates the cached local database </s>
funcom_train/26383775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroy(Log log) { // Detach the message area from the status log. if (logWriter != null) { log.detach(logWriter); logReader.stop(); try { logWriter.close(); } catch (IOException ioe) { ioe.printStackTrace(); } } } // destroy COM: <s> destroys the user interface </s>
funcom_train/3832514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected StyleSheetURL createStyleSheetURL( Element element ) throws XMLParsingException { // required: <Format> String format = XMLTools.getRequiredStringValue( "Format", wmsNS, element ); // required: <OnlineResource> URL onlineResource = createOnlineResource( XMLTools.getRequiredChildByName( "OnlineResource", wmsNS, element ) ); return new StyleSheetURL_Impl( format, onlineResource ); } COM: <s> creates a tt style sheet url tt instance according to the contents of </s>
funcom_train/4237285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToString() { System.out.println("toString"); OrdenPlatilloPK instance = new OrdenPlatilloPK(5, 6); String expResult = "data.OrdenPlatilloPK[idPlatillo=5, idOrden=6]"; String result = instance.toString(); assertEquals(expResult, result); } COM: <s> test of to string method of class data </s>
funcom_train/8096527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Kernel getKernel() { PrecomputedKernelMatrixKernel pc = new PrecomputedKernelMatrixKernel(); // load kernel matrix try { pc.setKernelMatrix( new Matrix( new InputStreamReader(ClassLoader.getSystemResourceAsStream( "weka/classifiers/data/test.matrix")))); } catch (Exception e) { e.printStackTrace(); } return pc; } COM: <s> creates a default precomputed kernel matrix kernell </s>
funcom_train/11514969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAsEqual(T existingObj, T newObj) { checkLocked(); Integer position = map.get(existingObj); if (position == null) { throw new IllegalArgumentException(existingObj + " not known to " + this); } Integer result = map.put(newObj, position); return (result == null); } COM: <s> adds a new item which compares as equal to the given existing item </s>
funcom_train/48525452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addTimer(long timeoutMsec, char timeoutID) { /* * We schedule a GlacierTimeoutMessage with the ID of the * requested timer. This message will be delivered if the * pires and it has not been removed in the meantime. */ CancellableTask timer = endpoint.scheduleMessage(new AggregationTimeoutMessage(timeoutID, getLocalNodeHandle()), timeoutMsec); timers.put(new Integer(timeoutID), timer); } COM: <s> schedule a timer event </s>
funcom_train/18243725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ICollectionAssembly getRightInputAssembly() throws AssemblerException { // Find the input right assembly: ICollectionAssembly ret = null; try { ret = this.inputCollection.getRightAssembly(); } catch (DataStoreException dsx) { String message = ResourceUtil.getResource(TigrAssemblerResultsAnalysis.class, "text.caught_datastore_exception"); throw new AssemblerException(message); } return ret; } COM: <s> utility method to find the former right assembly </s>
funcom_train/43409360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OrderStockNormalLevelBrowsePanel getJInnerOrderStockNormalLevelPanel() { if (jInnerOrderStockNormalLevelPanel == null) { CommonTableModel tableModel = new CommonTableModel( TableModels.ORDER_STOCK_COLUMNS, TableModels.ORDER_STOCK_METHODS); OrderStockNormalLevelPanelFilterManager mgr = new OrderStockNormalLevelPanelFilterManager(); tableModel.setList(mgr.getList()); jInnerOrderStockNormalLevelPanel = new OrderStockNormalLevelBrowsePanel( mgr, tableModel); } return jInnerOrderStockNormalLevelPanel; } COM: <s> this method initializes j inner order stock panel </s>
funcom_train/180080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void normalizeAndPrint(String s, boolean isAttValue) { int len = (s != null) ? s.length() : 0; for (int i = 0; i < len; i++) { char c = s.charAt(i); normalizeAndPrint(c, isAttValue); } } // normalizeAndPrint(String,boolean) COM: <s> normalizes and prints the given string </s>
funcom_train/45499969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { //Build Graph NetworkFlowModel nfo = new NetworkFlowModel(); res.setNetworkFlowModel( nfo ); //ZToGraphConverter.convertBuildingPlan( project.getBuildingPlan(), nfo ); //Run graph algo on the last CA instance if possible ConcreteAssignment concreteAssignment; if( runNumber < 0 ) concreteAssignment = assignment.createConcreteAssignment( 400 ); else concreteAssignment = concreteAssignments[runNumber]; //ZToGraphConverter.convertConcreteAssignment( concreteAssignment, nfo ); res = null; } COM: <s> runs a graph algorithm </s>
funcom_train/8164695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringList identifierList(ModuleElementType type) { StringList identifierList = new StringList(); ModuleElementList elementList = this.moduleElementList(type); for (int elementIndex = 0; elementIndex < elementList.size(); elementIndex++) { String identifier = elementList.getIdentifier(elementIndex); identifierList.add(identifier); } return identifierList; } COM: <s> determines a list of the identifiers of all elements of a given type </s>
funcom_train/31208293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Statement createStatement() throws SQLException { try { if(Trace.isEnabled()) Trace.trace(getId()); checkClosed(); jdbcStatement stat=new jdbcStatement(adapter,this); if(Trace.isEnabled()) Trace.traceResult(stat.getId()); return stat; } catch(Throwable e) { throw convertThrowable(e); } } COM: <s> creates a new statement </s>
funcom_train/15620463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initCasePrintObject(long caseId) { if (this.casePrintObject == null) { if (this.verbosity != null) { // this.casePrintObject = new Print(caseId, this.verbosity.intValue()); this.casePrintObject = Print.getGlobalPrintObject(); this.casePrintObject.setMinimumVerbosityLevel(this.verbosity); } else { //this.casePrintObject = new Print(caseId); this.casePrintObject = Print.getGlobalPrintObject(); } } } COM: <s> initializes the code case code dependent code print code class of </s>
funcom_train/12628514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExecuteWithSource() throws Exception { System.out.println("Executing testExecuteWithSource..."); String fileName = "testscript.bsh"; URL resource = mojo.getClass().getClassLoader().getResource(fileName); mojo.setProject(new MavenProject()); mojo.setSource(resource.getFile()); try { mojo.execute(); } catch(Throwable t) { t.printStackTrace(); fail(); } } COM: <s> test method for bean shell mojo </s>
funcom_train/5806807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LocationDef getDef(String defName) throws IOException, MarshalException, ValidationException { if (defName == null) { throw new IllegalArgumentException("Cannot take null parameters."); } this.updateFromFile(); LocationDef def = (LocationDef) m_defsMap.get(defName); return def; } COM: <s> cant be null </s>
funcom_train/32778819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { // this allows us to use start() in loops for multiple experiment runs // in other words, this is a shortcut for the lazy programmer if (_status == STOPPED) proceed(); // here's what start was supposed to be at first // a shortcut for startig an Experiment at TimeInstant(0) else { // now prepare connected model to start simulation start(new TimeInstant(0)); } } COM: <s> starts the simulation with default start time 0 </s>
funcom_train/3121993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAttribute(String strKey) { if (mapAttributes == null) { return (null); } else { if (KEY_SIZE.equals(strKey)) { updateSize(); } String str = (String) mapAttributes.get(strKey); return (HtmlCodec.decode(str)); } } // of method COM: <s> get an attribute as a string </s>
funcom_train/37483158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MaintenanceItem item(String itemName) throws Exception { for (int i = 0; i < list.size(); i++) { MaintenanceItem findItem = (MaintenanceItem) list.get(i); if (findItem.getItemName().equals(itemName)) { return findItem; } } Exception e = new Exception("The specified item" + itemName + " could not be found."); throw e; } COM: <s> gets the item with the specified name from the collection </s>
funcom_train/51070782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleAlarmEvent() { //prints out the time try{ writeFile.write("Time: " + now_us() + "\n"); writeFile.flush(); }catch(IOException e) { BUG("IOEXCEPTION: " + e); } //dispatch DbIterateByGuidReq DbIterateByGuidReq req = new DbIterateByGuidReq(ostore.db.impl.GenericStorageManager.ZERO_GUID, null, 1000, null, true, appId, null, my_sink, 1); dispatch(req); } COM: <s> code handle alarm event code prints out the time and dispatches </s>
funcom_train/45571579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActive(boolean flag) { this.active = flag; this.removeAll(); if (flag) { this.add(areaScrollPane); this.statusText.setCaretPosition(GuiBeanManager.getInstance() .getStatusText().getTextLength()); } else { // JLabel label1 = new JLabel("tes"); // JLabel label2 = new JLabel("test"); // label1.setVisible(false); // label2.setVisible(false); // this.add(label1); // this.add(label2); this.add(logo); logo.setAlignmentX(CENTER_ALIGNMENT); logo.setAlignmentY(CENTER_ALIGNMENT); } this.revalidate(); this.repaint(); } COM: <s> sets the active </s>
funcom_train/48588292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AclFeed getAclList(CalendarEntry calEntry, String domainName) throws ServiceException, IOException, Exception { prepareCalendarService(domainName, null); Link link = calEntry.getLink(AclNamespace.LINK_REL_ACCESS_CONTROL_LIST, Link.Type.ATOM); if (link != null) { return service.getFeed(new URL(link.getHref()), AclFeed.class); } return null; } COM: <s> prints the access control lists for each of the users calendars </s>
funcom_train/42393226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPrimary(TransformationNode tn) { field.addDrawable(tn); if (tn instanceof Tank) { tanks.add((Tank) tn); this.addFollowed(((Tank) tn).getTNHead()); this.addFrontal(((Tank) tn).getText3D()); } else if (tn instanceof Bullet) { bullets.add((Bullet) tn); } else if (tn instanceof Track) { tracks.add((Track) tn); } else if (tn instanceof Explosion) { explosions.add((Explosion) tn); } } COM: <s> primaries are children of field like tanks and bullets </s>
funcom_train/11106614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int generateContactId() { int last = 0; Iterator values = contacts.values().iterator(); while (values.hasNext()) { Contact value = (Contact) values.next(); if (value.getId() > last) { last = value.getId(); } } return last + 1; } COM: <s> p return the next available code id code for a </s>
funcom_train/19600147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringEntity setStringEntity(String text, String charset) { ClientLogger.requestInfo(POST, charset, "String - [Text, XML, JSON, Properties ...]", text); StringEntity entity = null; try { entity = new StringEntity(text, charset); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } entity.setChunked(true); setEntity(entity); return entity; } COM: <s> sets the string entity by a chartset </s>
funcom_train/4926724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNumberOfPlayersPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Draw_numberOfPlayers_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Draw_numberOfPlayers_feature", "_UI_Draw_type"), DomainPackage.Literals.DRAW__NUMBER_OF_PLAYERS, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the number of players feature </s>
funcom_train/26414369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sendFrame(ModbusMessage msg) { if (debug >= 4) { System.out.println("Modbus: Sending Frame"); System.out.println("Transaction ID: " + msg.transID); System.out.println("Frame Length: " + msg.length); System.out.println(ByteUtils.toHex(msg.buff,msg.length)); } return transport.sendFrame(msg); } COM: <s> method to send a modbus frame via the transport media </s>
funcom_train/15480709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setResizable(boolean newResizable) { boolean oldResizable = resizable; if (oldResizable == newResizable) { return; } resizable = newResizable; firePropertyChange("resizable", oldResizable, newResizable); //$NON-NLS-1$ if (resizable) { resize(); } else { if (userFont != null) { super.setFont(userFont); } else { super.setFont(FontHelper.getDefaultFont()); } } } COM: <s> sets the resizable text font setting </s>
funcom_train/44851510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void start_propertyDef( String inName, Attributes inAttributes ) { currentPropertyDef = new PropertyDefImpl(); for ( int i = 0; i < inAttributes.getLength(); i++ ) { try { currentPropertyDef.set(inAttributes.getQName(i), inAttributes.getValue(i).intern()); } catch ( Exception exc ) { DefaultExceptionWriter.printOut(this, exc, true); } } objectDef.addPropertyDef(currentPropertyDef); } COM: <s> handles the start of the property def tag </s>
funcom_train/10298861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isXinerama () { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice[] gds = ge.getScreenDevices(); if (gds.length == 1) { return false; } else { for (int i=0; i<gds.length; i++) { GraphicsConfiguration loopgc = gds[i].getDefaultConfiguration(); Rectangle bounds = loopgc.getBounds(); if (bounds.x != 0 || bounds.y !=0) { return true; } } } return false; } COM: <s> internal method to test for xinerama mode </s>
funcom_train/6203133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char convertToSymbol(String escapeSequence) { Character c = m_escMap.get(escapeSequence); if (c == null) { try { Integer i = new Integer(escapeSequence); return (char) i.intValue(); } catch (NumberFormatException e) { // Unconvertable Entity return 0; } } else return c.charValue(); } COM: <s> converts xml entity to plaintext character </s>
funcom_train/34283776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean startGettingPhoto(String photoURL) { URL uri; if (photoURL == null) return false; settings = new MeetupSettings(this); rpc = new SvrCallRun(this, settings.Host, settings.UserName, settings.UserPassword); try { uri = new URL(SvrCall.expandUrl(photoURL, null)); } catch (Exception e) { return false; } rpc.gethttp(uri, mRunGetPhoto, mPhotoData); return true; } COM: <s> request photo data </s>
funcom_train/3361087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAll(AccessibleRelation[] relations) { if (relations.length != 0) { if (this.relations == null) { this.relations = new Vector(relations.length); } for (int i = 0; i < relations.length; i++) { add(relations[i]); } } } COM: <s> adds all of the relations to the existing relation set </s>
funcom_train/37008950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IDBID getReifiedStatementID(com.hp.hpl.mesa.rdf.jena.model.Statement s, ModelRDB m) throws RDFException { StatementStatus ss = getStatementStatus(s.getSubject(), s.getPredicate(), s.getObject(), m); if (ss != null) { return ss.reificationID; } return null; } COM: <s> return the resource id corresponding to a reified version of a statement </s>
funcom_train/3713707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public int manageAndStoreSpectrum (Spectrum sp, Processor processor, boolean display) { // int index = -1; // if (sp != null) { //// ModelManager mm = new ModelManager (sp, this); // ModelManager mm = null; // ManagedSpectrum msp = new ManagedSpectrum (sp, mm, processor); // index = server.storeManagedSpectrum (msp); // // if (display) { // addSpectrum (msp); // } // // } // return index; // } COM: <s> overloaded version of code manage and store spectrum code </s>
funcom_train/46982314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MenuFileHolder parseXML(String filePath) throws IOException, ParserConfigurationException, SAXException{ File file = new File(filePath); SAXMenuConfigParser handler; SAXParserFactory parserFactory = SAXParserFactory.newInstance(); handler = new SAXMenuConfigParser(); SAXParser saxParser = parserFactory.newSAXParser(); saxParser.parse(file, handler); return handler.getInformation(); } COM: <s> parsers in the specified file and returns a menu config object </s>
funcom_train/4135838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addHowPublishedPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MiscBibTexEntry_howPublished_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MiscBibTexEntry_howPublished_feature", "_UI_MiscBibTexEntry_type"), BibtexPackage.Literals.MISC_BIB_TEX_ENTRY__HOW_PUBLISHED, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the how published feature </s>
funcom_train/27752020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List getAllHTTPReceivers() throws XException { List returnSet = new Vector(); if (mIsServletEngine) { List systems; Configuration config; try { config = Configuration.getInstance(); systems = config.getSections(Constants.CHAPTER_SYSTEM); } catch (XException e) { return null; } String system = null; for (Iterator it = systems.iterator(); it.hasNext();) { system = (String) it.next(); if (isHTTPReceiver(system)) { returnSet.add(system); } } } return returnSet; } COM: <s> returns a list of all httpreceivers found in the </s>
funcom_train/11297290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIfWithArithmeticExpression() throws Exception { Expression e = JEXL.createExpression("if ((x * 2) + 1 == 5) true;"); JexlContext jc = new MapContext(); jc.set("x", new Integer(2)); Object o = e.evaluate(jc); assertEquals("Result is not true", Boolean.TRUE, o); } COM: <s> test the if statement evaluates arithmetic expressions correctly </s>
funcom_train/17671038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSectionNumber(String i) { sectionNumbers = ""; if(sectionNumberChecker.isEmpty()) { sectionNumberChecker.add(i); } else if(!sectionNumberChecker.contains(i)) { sectionNumberChecker.add(i); } for(int j = 0; j < sectionNumberChecker.size(); j++) { if(j != sectionNumberChecker.size()-1) { sectionNumbers += sectionNumberChecker.get(j) + ", "; } else { sectionNumbers += sectionNumberChecker.get(j); } } } COM: <s> add a new section number reference for the declared </s>
funcom_train/6330657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addVariable(String name, NodeList tree) { if (name == null) { throw new IllegalArgumentException("variable name must not be null !"); } if (tree == null) { throw new IllegalArgumentException("variable value must not be null !"); } variables.put(name, tree); } COM: <s> add a new variable to the hashtable </s>
funcom_train/39986780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int sqlExecution(String pSQL) throws SQLException { int result = -1; //obtain a Statement object (cached or newly created): Statement mStat = mSCache.getStatement(); try { result = mStat.executeUpdate(pSQL); } catch (SQLException e) { throw e; }finally{ //release resources: mSCache.releaseStatement(mStat); } //return the amount of changed rows: return result; } COM: <s> b dml b insert update and delete sql operations </s>
funcom_train/30004995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Duration getSumOfEta(TestBase test) { Duration sum = new Duration(0); if (test instanceof TestCase) { sum.add(((TestCase)test).getEta()); } else if (test instanceof TestSequence){ for (TestBase b : ((TestSequence)test).getChildren()) { sum.add(getSumOfEta(b)); } } return sum; } COM: <s> returns the sum eta of the element tt test tt and their </s>
funcom_train/28870481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToVector(int vecnum, int anAddress) { //This is currently a hack - it should be changed to make it //more generic //0 -> transmit //1 -> receive //2 -> red //3 -> yellow //4 -> green synchronized (vSync) { publicNumbers[vecnum].add(anAddress); } } COM: <s> a monitor can add data using this function </s>
funcom_train/25980103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void contextualize(org.apache.avalon.framework.context.Context ctx) throws ContextException { //System.out.println("contextualize called id="+this.toString()); if (ctx==null) throw new ContextException("DBPrismAction requires context object."); else this.context = ctx; } COM: <s> contextualize this class </s>
funcom_train/31251787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void returnDbConnections(String sid) { RegistryBundle bundle; bundle = (RegistryBundle)_wer.getProperty("app_reg_bundle"); if (bundle != null) bundle.returnAllDbConnections(sid); bundle = (RegistryBundle)_wer.getProperty("cs_reg_bundle"); if (bundle != null) bundle.returnAllDbConnections(sid); // return the external connections too if (_usedExtBundles != null) { Iterator bit = _usedExtBundles.iterator(); while (bit.hasNext()) { bundle = (RegistryBundle)bit.next(); bundle.returnAllDbConnections(sid); } _usedExtBundles = null; } } COM: <s> if the programmer is a good programmer s he will </s>
funcom_train/16937168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addResourceParams(ResourceParams resourceParameters) { synchronized (resourceParams) { if (resourceParams.containsKey(resourceParameters.getName())) { return; } resourceParameters.setNamingResources(this); resourceParams.put(resourceParameters.getName(), resourceParameters); } support.firePropertyChange("resourceParams", null, resourceParameters); } COM: <s> add resource parameters for this web application </s>
funcom_train/12735310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClearCache() { XCache cache = new XCache(); cache.put(CACHE_KEY, CACHE_VALUE); assertEquals("Cache should contain only one element", 1, cache.usedEntries()); cache.clear(); assertEquals("Cache should be empty.", 0, cache.usedEntries()); Collection allValues = cache.getAll(); assertNotNull(allValues); assertEquals(0, allValues.size()); } COM: <s> here we test cache clear operation </s>
funcom_train/17001549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isChangedInRecent(long timeRange) { Calendar now = Calendar.getInstance(); // the last change time is the latest time for (int i=stateChangeTimes.size()-1; i>=0; i--) { Calendar changeTime = (Calendar)stateChangeTimes.get(i); if (changeTime != null) { if (now.getTimeInMillis() - changeTime.getTimeInMillis() <= timeRange) return true; else return false; } } return false; } COM: <s> check if the station has changed its state recently within time range </s>
funcom_train/17007514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSecurityToken(SignedSecurityToken sst, SecretKey key, Properties props, boolean doNotDecryptPayloadBeforeDelivery, PublicKey rootCAPubKey) { this.signedSecurityToken = sst; this.secretKey = key; this.securityProps = props; this.deliverWithoutDecryption = doNotDecryptPayloadBeforeDelivery; this.rootCAPublicKey = rootCAPubKey; } COM: <s> sets the security token for recieving events over a secure topic br </s>
funcom_train/50836368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createStartPanel(String path) { JPanel panel = new JPanel(); byte[] buffer = Resources.getResourceAsByteArray(path); ImageIcon chess_icon = new ImageIcon(buffer); JLabel label = new JLabel(); label.setIcon(chess_icon); panel.add(label); return panel; } COM: <s> return a new created jpanel for the tabbed pane while </s>
funcom_train/50505404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Icon getIcon() { if(this.isPkField()) { return ch.orcasys.beanfactory.plugins.ejbdoclet.Icons.ICON_PKFIELD; } else if(isPersistent()) { return ch.orcasys.beanfactory.plugins.ejbdoclet.Icons.ICON_PERSISTENTFIELD; } else { return BrowserIcons.ICON_PROPERTY; } } COM: <s> gets the icon attribute of the abean object </s>
funcom_train/24291754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String exportToSpreadSheet(UserInfoInterface userInfo, String asSheetName, String asXmlRowIdentifier, String asXmlColumnIdentifier, String asXmlValueIdentifier, String asXml, OutputStream psOut) { return exportToSpreadSheet(this, userInfo, asSheetName, asXmlRowIdentifier, asXmlColumnIdentifier, asXmlValueIdentifier, asXml, psOut); } COM: <s> exports a given content to excel to a given output stream </s>
funcom_train/3596631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List getElements(NOntology ontology) { ArrayList elements = new ArrayList(); Document doc = Document.getInstance(); NOMElement element = doc.getCorpus().getRootWithColour(ontology.getName()); while (element.hasNextElement()) { element = element.getNextElement(); elements.add(element); } return elements; } COM: <s> returns a list with the elements in an ontology </s>
funcom_train/17342996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTimeout(int t) { int[] n = new int[fsTimeout.length + 1]; for (int i=0; i < fsTimeout.length; i++) { n[i] = fsTimeout[i]; } n[n.length - 1] = t; fsTimeout = n; } COM: <s> adds a timeout to the end of the current list of timeouts in </s>
funcom_train/46058063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NewBGController createNewBGController(UserRequest ureq, WindowControl wControl, UserActivityLogger ual, boolean minMaxEnabled, BGContext bgContext,boolean bulkMode, String csvGroupNames){ if (bgContext == null) throw new AssertException("Group context must not be null"); NewBGController retVal = new NewBGController(ureq, wControl, minMaxEnabled, bgContext, bulkMode, csvGroupNames); retVal.setUserActivityLogger(ual); return retVal; } COM: <s> create controller for mass creation of business groups bulkmode with </s>
funcom_train/1707831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void list(Class clazz) { Session session = HibernateHelper.getSharedInstance().getCurrentSession(); session.beginTransaction(); List list = session.createCriteria(clazz).list(); System.out.println(clazz.getName() + ":"); for (Object o : list) { System.out.println(o); } session.getTransaction().commit(); } COM: <s> outputs each each item with its associated class </s>
funcom_train/31689787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFullRef() { if( this.m_sFullRefCache==null ) { String sTable = m_sTable; if(hasTableAlias() == true) { sTable = m_sTableAlias; } m_sFullRefCache= sTable + "." + m_sColumn; } return this.m_sFullRefCache; } COM: <s> returns the full string representation of this column reference </s>
funcom_train/35838773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setShowSmallIcons(PCSession session, String sViewID, Vector vtPositions, boolean bShow) throws SQLException { // DBConnection dbcon = getDatabaseManager().requestConnection(session.getModelName()) ; // // boolean successful = DBViewNode.setShowSmallIcons(dbcon, sViewID, vtPositions, bShow); // // getDatabaseManager().releaseConnection(session.getModelName(),dbcon); return true; } COM: <s> set showing small icons for the given node position objects </s>
funcom_train/43897026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Filter not() { // Just makes sure that we are not creating unnecessary new filters // by popping off sub filter if current filter is NOT //HACK: not sure what should be returned by this method //HACK: assuming it is the result of each method if (filterType == super.LOGIC_NOT) { return (Filter) children.get(0); } else { return super.not(); } } COM: <s> implements a logical not with this filter and returns the merged filter </s>
funcom_train/805395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean rename(String newName){ File newFile=new File(getPathWithoutFilename()+File.separator + newName); if (getFile().canRead()==false){ int a=0; logger.debug("Cannot read old file: " + getFile().getAbsolutePath()); return false; } if (getFile().renameTo(newFile)==true){ setFile(newFile); return true; } else{ logger.debug("Could not rename file to: " + newName); return false; } } COM: <s> rename the file </s>
funcom_train/29939201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void launchProcess () { try { toplevelProcess = Runtime.getRuntime().exec(UiConfig.OCAML_TOPLEVEL_COMMAND); processInputStream = toplevelProcess.getInputStream(); processOutputStream = toplevelProcess.getOutputStream(); } catch (IOException e) { e.printStackTrace(); } } COM: <s> launches the process </s>
funcom_train/11379161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { if (stopRequested) { return; } stopRequested = true; running = false; if (server != null) server.stop(); if (triggerThread != null) triggerThread.interrupt(); if (blockFixer != null) blockFixer.running = false; if (blockFixerThread != null) blockFixerThread.interrupt(); if (purgeThread != null) purgeThread.interrupt(); } COM: <s> stop all raid node threads and wait for all to finish </s>
funcom_train/48960536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void saveConfiguration(UUID project, String groupId, String artifactId, DefaultConnectionDetails connectionDetails) { SonarConfiguration sonarConfiguration = new SonarConfiguration(); sonarConfiguration.setResource(groupId + ":" + artifactId); sonarConfiguration.setProject(dao.getReference(DefaultProject.class, project)); sonarConfiguration.setConnectionDetails(connectionDetails); dao.create(sonarConfiguration); } COM: <s> creates a new sonar configuration object and saves it to the database </s>
funcom_train/8249957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private User createUser(String userId) { //Store the new User User user = new User(); user.setUserId(userId); try { userManager.storeUser(user); } catch (WebicalException e) { throw new WebicalWebAplicationException("Could not store userinformation for user: " + userId); } //Retrieve the persisted User user = getUser(userId); if(user == null) { throw new WebicalWebAplicationException("User was not persisted correctly for userID: " + userId); } return user; } COM: <s> creates a user and retrieves the persisted copy </s>
funcom_train/11012965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRandBetweenSameValues() { evaluator.clearAllCachedResultValues(); formulaCell.setCellFormula("RANDBETWEEN(1,1)"); evaluator.evaluateFormulaCell(formulaCell); assertEquals(1, formulaCell.getNumericCellValue(), 0); evaluator.clearAllCachedResultValues(); formulaCell.setCellFormula("RANDBETWEEN(-1,-1)"); evaluator.evaluateFormulaCell(formulaCell); assertEquals(-1, formulaCell.getNumericCellValue(), 0); } COM: <s> check where values are the same </s>
funcom_train/32968951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton5() { if (jButton5 == null) { jButton5 = new JButton(); jButton5.setToolTipText("Options"); jButton5.setRolloverIcon(new ImageIcon(getClass().getResource("/buttons1/options2.gif"))); jButton5.setPressedIcon(new ImageIcon(getClass().getResource("/buttons1/options3.gif"))); jButton5.setIcon(new ImageIcon(getClass().getResource("/buttons1/options1.gif"))); jButton5.setDoubleBuffered(true); jButton5.setBounds(new java.awt.Rectangle(186,36,34,34)); jButton5.setBorderPainted(false); } return jButton5; } COM: <s> this method initializes j button5 </s>
funcom_train/4122493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasManOfWar() { Iterator<Unit> it = getPlayer().getUnitIterator(); while (it.hasNext()) { Unit unit = it.next(); if ("model.unit.manOWar".equals(unit.getType().getId())) { return true; } } return false; } COM: <s> checks if this player has a single man of war </s>
funcom_train/20045754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get(Object key) { Object val = super.get(key); if (val == null && DebugIsActive) { System.out.print("Have been asked for key \""+key.toString()); System.out.println("\" which is not part of params."); } return val; } COM: <s> wraper around get with some debug output </s>
funcom_train/31480296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isStar() { SList _sl = (SList)this.getSList(); if (_sl.isList()) { // If this is an instance of a sub-element of a tag... int _i = (TAG_TOPLEVEL == this.tagtype) ? 1 : 0; return (TAG_STAR == classifyTag(_sl.item(_i))); } return false; } COM: <s> check to see if this is a simple all permission tag </s>
funcom_train/25792021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createActions() { ActionList actions = new ActionList(); ActionList colorActions = createColorActions(); ActionList layoutActions = createLayoutActions(); ActionList filterActions = createFilterActions(); // Filter actions should be executed first, layout actions last actions.add(filterActions); actions.add(colorActions); actions.add(layoutActions); m_visualization.putAction(ACTIONS_ID, actions); } COM: <s> sets up the actions for the visualization </s>
funcom_train/23720838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean beginTransaction() { EntityTransaction transaction = this.entityManagerSource.getEntityManager().getTransaction(); if (transaction.isActive()) { // don't try to start a nested transaction, we are just part of the running one return false; } else { transaction.begin(); return true; } } COM: <s> starts a new transaction unless one is already running </s>
funcom_train/3447127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ToggleSelection(int sel) { BooleanColumn selection = renderer.getSelection(); if (sel != -1) { if (selection.isSelectedIndex(sel)) { selection.removeSelectionInterval(sel, sel); } else { selection.addSelectionInterval(sel, sel); } } } COM: <s> toggle the selection of the specified item </s>
funcom_train/25011024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawBottomLeft(final GL2 gl) { if (listMap.get(GemfireBorderSprite.BOTTOM_LEFT) != null) { gl.glPushMatrix(); gl.glColor4fv(super.getColor()); // move to bottom-left corner of sprite gl.glTranslated( super.getPosition().getX(), super.getPosition().getY(), 0d ); gl.glCallList(listMap.get(GemfireBorderSprite.BOTTOM_LEFT)); gl.glPopMatrix(); } } COM: <s> renders the bottom left corner </s>
funcom_train/51412351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDefinition(boolean showVisibility, boolean showFullClassName) { String result = ""; if(showVisibility) { if(isPrivate()) result += "private "; else if(isProtected()) result += "protected "; else if(isPrivate()) result += "public "; } if(isStatic()) result += "static "; if(isFinal()) result += "final "; if(showFullClassName) result += getClassName(); else result += getShortClassName(); result += " " + getFieldName(); return result; } COM: <s> gets the definition of the field </s>
funcom_train/43143633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getInsertScript(DbType dbType) { NodeList rootNode = (NodeList) read("/unikey/insert/db", XPathConstants.NODESET); String nodeValue = getNodeValue(rootNode, dbType.getName()); if (nodeValue == null) { throw new UnsupportedDbException(dbType.getName() + " is not supported."); } return nodeValue; } COM: <s> to retrive the sql script for updating records in the table </s>
funcom_train/5857132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getUserReadyActivities(String _userName) throws HeroException { log.debug("getUserReadyActivities: user="+_userName); Collection role=getUserRoles(_userName); ArrayList result=new ArrayList(); for (Iterator i=role.iterator();i.hasNext();) { String roleName=(String)i.next(); Collection c=getRoleReadyActivities(roleName); result.addAll(c); } return (Collection)result; } COM: <s> this method obtain all user activities from this project ready state </s>
funcom_train/44822880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scheduleTask(ITask task) throws TaskException { // Throw out dups if (!tasksQueue.contains(task)) { tasksQueue.add(task); // If not started yet, start up try { if (!isStarted()) { start(); } } catch (Exception x) { throw new TaskException( "Failed to start scheduling thread on service: " + name, x); } } } COM: <s> schedule a task to be run at some later point depending on the </s>
funcom_train/28998716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getEventIdString(IContentItem contentItem) { Properties props = (Properties) propertyRegistry.get(contentItem.getKey()); String idString = NO_ID; if ((props == null) || (props.get("id") == null)) { return idString; } else { return (String) props.get("id"); } } COM: <s> gets the event info id string that corresponds to a given content item </s>
funcom_train/32758179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append("#Raw waveform data in the form (time, value) for each sample."); buffer.append("\n#Time is in units of turns and is relative to cycle start."); buffer.append("\n\nTimestamp: " + timestamp); buffer.append("\nWaveforms: " + waveforms.length); buffer.append("\n\n"); for ( int index = 0 ; index < waveforms.length ; index++ ) { buffer.append( waveforms[index] ); buffer.append('\n'); } return buffer.toString(); } COM: <s> override to string to create a string representation of the raw waveform snapshot </s>
funcom_train/12306791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isTocSelected(int toc) { TocData tocData = new TocData(context, request, response); String href = tocData.getTocHref(toc); String[] books = request.getParameterValues("scope"); //$NON-NLS-1$ if (books == null) return false; for (int i = 0; i < books.length; i++) { if (books[i].equals(href)) { return true; } } return false; } COM: <s> returns true if book is within a search scope </s>