__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/51162770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelected(JComboBox jcb, Object item, boolean b) { AbstractButton bound = getBound(jcb, item); selecting = true; if (b) jcb.setSelectedItem(item); selecting = false; if (bound != null) bound.setSelected(b); } COM: <s> sets the selected item in the code jcombo box code to the item </s>
funcom_train/23843892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(String name, Object value) { XMLAttribute a = new XMLAttribute(name, value.toString()); attributes.add( (Object) a); if (debug) System.out.println("myXML.Attribute.add("+name+","+value+")"); } COM: <s> add a named attribute to this element </s>
funcom_train/32824290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private APIType getType(Attributes attributes) { APIType type = APIType.UNKNOWN; String typeString = attributes.getValue(TYPE); if (typeString.equalsIgnoreCase(TYPE_OPTIONAL)) { type = APIType.OPTIONAL; } else if (typeString.equalsIgnoreCase(TYPE_PROFILE)) { type = APIType.PROFILE; } else if (typeString.equalsIgnoreCase(TYPE_CONFIGURATION)) { type = APIType.CONFIGURATION; } return type; } COM: <s> return the integer type of the value specified </s>
funcom_train/36631895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void requestScanProgress(String progressId) { browser.getStatus(progressId, new AsyncCallback<ProgressStatus>() { public void onFailure(Throwable caught) { Application.fireErrorEvent("Failed to get Scan progress", caught); } public void onSuccess(ProgressStatus result) { Map<String, Object> args = new HashMap<String, Object>(); args.put(MSG_PROGRESS_UPDATED, result); messageBus.postMessage(MSG_PROGRESS_UPDATED, args); } }); } COM: <s> on reply sends a message to all listeners about the progress status </s>
funcom_train/39378848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExpandAndCollapse() { MockRequest mockRequest = mockContext.getMockRequest(); mockRequest.setParameter(Tree.EXPAND_TREE_NODE_PARAM, testIds); assertExpandOrCollapse(tree, testIds, false);//test for expansion assertExpandOrCollapse(tree, testIds, true);//should reverse expand and collapse } COM: <s> test expand and collapse of nodes </s>
funcom_train/8439016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdShowExpences() { if (cmdShowExpences == null) {//GEN-END:|34-getter|0|34-preInit // write pre-init user code here cmdShowExpences = new Command("\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C", Command.OK, 0);//GEN-LINE:|34-getter|1|34-postInit // write post-init user code here }//GEN-BEGIN:|34-getter|2| return cmdShowExpences; } COM: <s> returns an initiliazed instance of cmd show expences component </s>
funcom_train/10616756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGeneralSecurityException06() { GeneralSecurityException tE = new GeneralSecurityException(null, null); assertNull("getMessage() must return null", tE.getMessage()); assertNull("getCause() must return null", tE.getCause()); } COM: <s> test for code general security exception string throwable code </s>
funcom_train/23827270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createDescriptionContent(Composite page) { Label label = new Label(page, SWT.NONE); label.setText("All downloads are stored in the incoming folder.\n" + "When download are converted to another format, e.g. MP3,\n" + "they are moved to the library folder.\n"); label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 3, 1)); } COM: <s> create the descriptive labels </s>
funcom_train/3340050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireKeystroke(int key_) { Component currentFocus; synchronized (_windowList) { Window sourcewin = getTopWindow(); /* Get the (non-Container) component within the source window * that generated the keystroke. */ currentFocus = sourcewin.getCurrentFocus(); while (currentFocus instanceof Container) { currentFocus = ((Container) currentFocus).getCurrentFocus(); } } fireKeystroke(key_, currentFocus); } COM: <s> processes a keystroke that was pressed in the currently displayed </s>
funcom_train/3112045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkInputValues(ConfigurationPanel panel) { DialogStatus status = new DialogStatus(); panel.checkValues(status); if (!status.isSuccessful()) { JOptionPane.showMessageDialog(this, status.getErrorMessage(), "Incorrect Input", JOptionPane.ERROR_MESSAGE); return false; } return true; } COM: <s> asks the currently selected panel to check its input values returns </s>
funcom_train/29881929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JButton createZoomWidthPageButton() { JButton tJButton = createToolBarButton("V221FitVisible.png", "Zoom Width (Ctrl I)"); tJButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) {mOpenPCLViewer.actionZoomWidth();} }); return tJButton; } COM: <s> zoom width toolbar button </s>
funcom_train/29313393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParameters(double m, double s){ double lower, upper, width; //Correct for invalid scale if (s < 0) s = 1; location = m; scale = s; c = SQRT2PI * scale; upper = location + 4 * scale; lower = location - 4 * scale; width = (upper - lower) / 100; setDomain(lower, upper, width, CONTINUOUS); } COM: <s> this method sets the parameters and defines the default domain </s>
funcom_train/2557541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeAttribute(String name, String value, String prefix) throws Exception{ if(last != Tag.START) { throw new NodeException("Start element required"); } write(' '); write(name, prefix); write('='); write('"'); escape(value); write('"'); } COM: <s> this is used to write a name value attribute pair </s>
funcom_train/46761964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VisitModel getVisit(final long visitId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return PatientData.getVisit(visitId, chain, call); }}; return (VisitModel) call(method, call); } COM: <s> same transaction return the single visit model for the primary key </s>
funcom_train/23634228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NgramLM read(String fileName) throws IOException { // X.Yao, 2010-07-22, make it able to read gzip-compressed file FileInputStream fin = new FileInputStream(fileName); String file = fileName.toLowerCase(); if (file.endsWith(".gz") || file.endsWith(".gzip")) return read(new GZIPInputStream(fin)); else return read(fin); } COM: <s> read a language model from a file </s>
funcom_train/32830098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getCastedValue(DataType castType) { try { return castType.typeCast(value); } catch (TypeCastException e) { throw new UnitilsException("Unable to convert \"" + value + "\" to " + castType.toString() + ". Column name: " + name + ", current type: " + type.toString(), e); } } COM: <s> gets the value casted to the given type </s>
funcom_train/32759254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayCurves(BasicGraphData crvHor, BasicGraphData crvVer, BasicGraphData crvDia) { displayCurveWithAttrs(Data.ANGLE.HOR, crvHor); displayCurveWithAttrs(Data.ANGLE.VER, crvVer); displayCurveWithAttrs(Data.ANGLE.DIA, crvDia); } COM: <s> displays the given curves on the plots </s>
funcom_train/37143784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFirstDisplayedDay(Date date) { anchor.setTime(date); Date oldDate = getFirstDisplayedDay(); cal.setTime(anchor.getTime()); CalendarUtils.startOfMonth(cal); firstDisplayedDay = cal.getTime(); firePropertyChange("firstDisplayedDay", oldDate, getFirstDisplayedDay() ); } COM: <s> set the first displayed date </s>
funcom_train/164923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReplace() { System.out.println("replace"); Path instance = new Path("a/b/c"); instance = instance.replace(1, "d"); assertEquals(instance, new Path("a/d/c")); instance = instance.replace(2, "e"); assertEquals(instance, new Path("a/d/e")); } COM: <s> test of replace method of class org </s>
funcom_train/15609232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CuratedExon getExonForPositionOnAxis(int positionOnAxis) { GeometricAlignment myAlign = this.getOnlyGeometricAlignmentToOnlyAxis(); if (myAlign == null) { return null; } return (CuratedExon) this.getSubFeatureAtPositionOnAxis( myAlign.getAxis(), positionOnAxis); } COM: <s> get the exon for a position </s>
funcom_train/45237687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ConfigTreeNode getDropNode(DropTargetEvent event) { ConfigTreeNode node = null; if (event.item != null) { if (TreeItem.class.isAssignableFrom(event.item.getClass())) { TreeItem item = (TreeItem) event.item; if (item.getData() instanceof ConfigTreeNode) { node = (ConfigTreeNode) item.getData(); } } } return node; } COM: <s> the node onto which the drop was performed </s>
funcom_train/26068566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Decoset fetchDecoset(long id) { final Cursor c = mCtx.getContentResolver().query( Uri.withAppendedPath(CONTENT_URI, "decosets/" + String.valueOf(id) ), null, null, null, null); if(c != null) { c.moveToFirst(); final Decoset decoset = fetchDecoset(c); c.close(); return decoset; } return null; } COM: <s> fetch a specific decoset by id </s>
funcom_train/37515226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String textBefore( Token tok ) throws TokenStreamException { try { StringBuffer result = (StringBuffer) textBuffers.removeFirst(); Token idx = (Token) indexTokens.removeFirst(); while (idx != tok) { result.append((StringBuffer) textBuffers.removeFirst()); idx = (Token) indexTokens.removeFirst(); } return result.toString(); } catch (NoSuchElementException e) { throw new TokenStreamException( "no index token " + tok.getText() + " found" ); } } COM: <s> returns the text appearing in the original source </s>
funcom_train/8439360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getDailyBudget() { if (dailyBudget == null) {//GEN-END:|193-getter|0|193-preInit // write pre-init user code here dailyBudget = new StringItem("\u0411\u044E\u0434\u0436\u0435\u0442 \u043D\u0430 \u0434\u0435\u043D\u044C:", null);//GEN-LINE:|193-getter|1|193-postInit // write post-init user code here }//GEN-BEGIN:|193-getter|2| return dailyBudget; } COM: <s> returns an initiliazed instance of daily budget component </s>
funcom_train/11752011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeConnection(Connection conn) { if (conn == null) throw new IllegalArgumentException(); if (conn.getSource() == this) { this.sourceConnections.remove(conn); firePropertyChange(PROP_SOURCE_CONN, null, conn); } else if (conn.getTarget() == this) { this.targetConnections.remove(conn); firePropertyChange(PROP_TARGET_CONN, null, conn); } } COM: <s> remove a connection from the model element </s>
funcom_train/14661443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Evaluator getEvaluator(Symbol expr, Context context) { // TODO: implementing this method. I'm not sure how to do so - // evaluate Symbols with a constant double value to a RealVector? throw new UnsupportedOperationException("Not implemented yet. " + "Use RealType or ComplexType as your default Type."); } COM: <s> throws an code unsupported operation exception code because this </s>
funcom_train/4208208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImageIcon getEmoticonImage(String key) { final Emoticon emoticon = getEmoticon(key); if (emoticon != null) { ImageIcon icon = imageMap.get(key); if (icon == null) { URL url = getEmoticonURL(emoticon); icon = new ImageIcon(url); imageMap.put(key, icon); } return imageMap.get(key); } return null; } COM: <s> returns the icon that is mapped to a given key </s>
funcom_train/10277447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flushCache() { if (engine == null) engine = owner.getEngine(); Enumeration cacheKeys = engine.getContext().getAttributeNames(); while (cacheKeys.hasMoreElements()) { String key = (String) cacheKeys.nextElement(); if (key.startsWith(owner.getComponentId())) engine.getContext().setAttribute(key, null); } } COM: <s> flushes message cache </s>
funcom_train/31539729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testContract() { // prepare request Request request = new Request("contract test"); assertTrue(request.hasId()); // setting again an id should result in a ContractViolation try { request.setId("4712"); assertTrue("ContractViolation expected!", false); } catch (ContractViolation e) { cat.debug("ContractViolation provocated", e); } } COM: <s> method test contract creates a request with an id </s>
funcom_train/31874495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JMenu createFontMenu() { CommandMenu menu = new CommandMenu("Font", this.editor); String fonts[] = GraphicsEnvironment .getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); for (int i = 0; i < fonts.length; i++) menu.add (new ChangeAttributeCommand(fonts[i], "FontName", fonts[i], this.editor)); return menu; } COM: <s> creates the fonts menus </s>
funcom_train/1974252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processSyncWaitOperation(Element element) { String message = element.attributeValue("message"); Collection sourceAddressCollection = element.elements("source"); Collection<String> addresses = new Vector<String>(); for (Iterator i = sourceAddressCollection.iterator(); i.hasNext();) { Element sourceAddressElement = (Element) i.next(); String sourceAddress = sourceAddressElement.attributeValue("address"); addresses.add(sourceAddress); } getReconfigurator().processSyncWaitCommand(message, addresses); } COM: <s> parses a sync wait operation </s>
funcom_train/45226245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawNewScreen(Graphics g,int left,int top){ if (fullScreen) g.drawImage(newScreen, left, top, Graphics.TOP|Graphics.LEFT); else g.drawRegion(newScreen, 0, contentTop, width, contentHeight, Sprite.TRANS_NONE, left, top+contentTop, Graphics.TOP | Graphics.LEFT); } COM: <s> new screen drawing method </s>
funcom_train/24120866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputStream out) throws IOException { int size = this.getSize(); WMFConstants.writeLittleEndian(out, size); WMFConstants.writeLittleEndian(out, WMFConstants.WMF_RECORD_FILLREGION); WMFConstants.writeLittleEndian(out, region); WMFConstants.writeLittleEndian(out, brush); } COM: <s> writes the content of the fillregion record to a stream </s>
funcom_train/8284871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveAttendToDeleted(Item classID, Item userID) { delAttendsTable.save(new Item[] {classID, userID}, new Item[] {classID, userID}, DBSQLAccessor.AND); attendsTable.delete(new Item[] {classID, userID}, DBSQLAccessor.AND); } COM: <s> moves an attendance relationship to the deleted table </s>
funcom_train/3158478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean fireProcessStarted(String processDescription, int minProgressValue, int maxProgressValue) { if (_processListeningEnabled && _progressListenerList != null) { return _progressListenerList.fireProcessStarted(processDescription, minProgressValue, maxProgressValue); } return true; } COM: <s> notifies all registered progress listeners the the write process started </s>
funcom_train/15601089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean unLock(int lockID){ //If it's already unlocked just tell them they unlocked it. They don't need to know. if (this.lockID == GCTerminalInput.UNLOCKED) return true; //If it they unlock it return false. if (this.lockID != lockID) return false; //Unlock it prompting should be false already so don't worry about that. this.lockID = GCTerminalInput.UNLOCKED; return true; } COM: <s> b purpose b try and unlock the input buffer </s>
funcom_train/20896122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetUserName() { System.out.println("getUserName"); User instance = new User(); String expResult = ""; String result = instance.getUserName(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get user name method of class it </s>
funcom_train/17717971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TextField getTxt_postDate() { if (txt_postDate == null) { txt_postDate = new TextField(); txt_postDate.setText(CommonUtility.parseFromDate(new java.util.Date(), "yyyy-MM-dd")); txt_postDate.setBounds(new Rectangle(122, 520, 200, 27)); } return txt_postDate; } COM: <s> this method initializes txt post date </s>
funcom_train/44885724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int graphIdAlloc ( String graphName ) { DBIDInt result = null; int dbid = 0; PreparedStatement ps=null; try { ps = m_sql.getPreparedSQLStatement("insertGraph",GRAPH_TABLE); ps.setString(1,graphName); ps.executeUpdate(); dbid = getInsertID(GRAPH_TABLE); } catch (SQLException e) { throw new RDFRDBException("Failed to get last inserted ID: " + e); }finally { if(ps!=null) { m_sql.returnPreparedSQLStatement(ps); } } return dbid; } COM: <s> allocate an identifier for a new graph </s>
funcom_train/40360975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String preferredMimeType(Set<String> mimeTypes) { if (mimeTypes.size() < 1) { throw new IllegalArgumentException("mimeTypes must have at least 1 entry"); } String[] mta = mimeTypes.toArray(new String[mimeTypes.size()]); Arrays.sort(mta); return mta[0]; } COM: <s> returns lexically first provided mime type </s>
funcom_train/28750558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNumofpins(String newVal) { if ((newVal != null && this.numofpins != null && (newVal.compareTo(this.numofpins) == 0)) || (newVal == null && this.numofpins == null && numofpins_is_initialized)) { return; } this.numofpins = newVal; numofpins_is_modified = true; numofpins_is_initialized = true; } COM: <s> setter method for numofpins </s>
funcom_train/27709958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init(boolean grow) { this.setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); c.insets = insets; c.fill = grow ? c.BOTH : c.NONE; c.weightx = 1.0; c.weighty = 1.0; c.anchor = c.CENTER; add(contents, c); } COM: <s> put together the container </s>
funcom_train/50724267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IPath chooseDirectoryLocation(String filterPath, String title, String message) { DirectoryDialog dialog = new DirectoryDialog(getControl().getShell()); dialog.setFilterPath(filterPath); dialog.setText(title); dialog.setMessage(message); String res = dialog.open(); return res != null ? new Path(res) : null; } COM: <s> open a choose directory dialog </s>
funcom_train/39189372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String proposeContentType( HTTPRequestWrapper params ) { //return ( params.isSvgSupported() ? "text/xml; charset=UTF-8" : "text/html; charset=UTF-8" ); return ( params.isSvgSupported() ? "application/xhtml+xml; charset=UTF-8" : "text/html; charset=UTF-8" ); } COM: <s> returns an xml content type depending on svg capabilities </s>
funcom_train/21995184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void interrupt() throws RpcException { try { authorize(Scanner.INTERRUPT); getBus().interrupt(); } catch (JRecSecurityException e) { throw new RpcException("security-problem interrupting scanner", e); } catch (BusException e) { throw new RpcException("bus-problem interrupting scanner", e); } } COM: <s> interrupt the scanner if running </s>
funcom_train/28351061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void filterGraphRawData() { Vector cdV = GP.getAllCurveData(); if ( cdV.size() == 0 ) { return; } for ( int i = 0; i < cdV.size(); i++ ) { filterCurveData( (CurveData) cdV.get( i ) ); } GP.refreshGraphJPanel(); } COM: <s> executes filtering data that currently displayed on the graph panel </s>
funcom_train/10208901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ String text = "SUMO Aggregated Way/Lane Dump\n Includes lane data: " + isLaneDataIncluded() + "\n Number of intervals: " + numIntervals() + "\n Belongs to current map: " + belongsToCurrentMap() + "\n Was imported automatically: " + isAutomaticImport() + "\n ...from URL: " + dataURL; return text; } COM: <s> a brief summary of this dataset includes the main properties </s>
funcom_train/17641426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int scanGo(int[] input) { int maxProceed = 0; int maxSofar = 0; for(int i: input){ // scan to find a possible max // if maxProceed <= 0, then start from 0 again (no need to retain the previous part) maxProceed = max(maxProceed + i, 0); // record the max so far maxSofar = max(maxSofar, maxProceed); } return maxSofar; } COM: <s> complexity o n </s>
funcom_train/27952113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeLineListener(final LineListener listener) { try { getClip().removeLineListener(listener); } catch (IOException e) { LOG.warn("Remvoing line listener failed", e); } catch (LineUnavailableException e) { LOG.warn("Remvoing line listener failed", e); } catch (UnsupportedAudioFileException e) { LOG.warn("Remvoing line listener failed", e); } } COM: <s> remove a line listener </s>
funcom_train/20883767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endBatch() { runTimer.stop(); if (metrics) { runTimer.show(getRunTitle() + " run"); threadTimer.show(getRunTitle() + " thread"); getAudioPlayer().showMetrics(); long totalMemory = Runtime.getRuntime().totalMemory(); System.out.println ("Memory Use : " + (totalMemory - Runtime.getRuntime().freeMemory()) / 1024 + "k of " + totalMemory / 1024 + "k"); } } COM: <s> ends a batch of utterances </s>
funcom_train/15623511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFunctionToTrash(String functionName, String schemaName, long stepId) throws M4CompilerError { this.addDatabaseObjectToTrash( functionName, schemaName, edu.udo.cs.miningmart.m4.core.Step.DBT_TYPE_FUNCTION, stepId); } COM: <s> if an operator creates a function in the database it b must b </s>
funcom_train/16676322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FreeValue addStringValue(String key, String value) { if (this.type != OptionType.TEXTFIELD && type != OptionType.UNKNOWN) { throw new IllegalStateException(I18n.getString("Option.exception.freeValuesOnlyBeAddedToTextfield")); //$NON-NLS-1$ } FreeValue val = new FreeValue(key, value, value); addValue(val); return val; } COM: <s> adds a user chooseable value to this option </s>
funcom_train/23216910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAgentNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AgentRef_agentName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AgentRef_agentName_feature", "_UI_AgentRef_type"), ContractPackage.Literals.AGENT_REF__AGENT_NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the agent name feature </s>
funcom_train/3416757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object readUnshared() throws IOException, ClassNotFoundException { // if nested read, passHandle contains handle of enclosing object int outerHandle = passHandle; try { Object obj = readObject0(true); handles.markDependency(outerHandle, passHandle); ClassNotFoundException ex = handles.lookupException(passHandle); if (ex != null) { throw ex; } if (depth == 0) { vlist.doCallbacks(); } return obj; } finally { passHandle = outerHandle; if (closed && depth == 0) { clear(); } } } COM: <s> reads an unshared object from the object input stream </s>
funcom_train/44623047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dependsOn(@NonNull JavaFileObject a, @NonNull JavaFileObject b) { if (a.equals(b)) return; Set<JavaFileObject> t = dependsOnMap.get(b); if (t == null) dependsOnMap.put(b, t = new HashSet<JavaFileObject>()); t.add(a); } COM: <s> record that item a needs to be recompiled if b changes </s>
funcom_train/9350866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* * private void requestData() { // Request library information. * msg.append(MessageType.REQUEST_DATA); uli.requestInfo(); * * // Display sorted books within the given due date period. msg.append(MessageType.SIMPLE, * uli.createReport(sortOption, withinDays)); } COM: <s> requests info from the libraries </s>
funcom_train/5403377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void eventListClicked() { QuicklistItem item = (QuicklistItem)lstQuicklist.getSelectedValue(); if( item == null ) { txtName.setText( "" ); intCurrent = new Integer( 0 ); } else { txtName.setText( item.getName() ); intCurrent = item.getID(); } } COM: <s> populates the name field when an item is clicked in the list </s>
funcom_train/41164349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoEditorReviewerPairSt2 entity) { EntityManagerHelper.log("deleting CoEditorReviewerPairSt2 instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoEditorReviewerPairSt2.class, entity.getEditorReviewerPairStudentId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co editor reviewer pair st2 entity </s>
funcom_train/18288259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IActionDelegate findActionDelegate(IDevice device) { IActionDelegate delegate = null; DeviceEditorConfigElement element = DeviceEditorRegistry.findEditorElement(device); if (element != null) { try { delegate = element.getActionDelegate(); } catch (CoreException e) { EclipseMECorePlugin.log(IStatus.WARNING, "Error retrieving editor delegate", e); } } return delegate; } COM: <s> return the action delegate for the specified device or code null code </s>
funcom_train/49469563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VendorId getVendorByName(String name) throws Exception, RaciException { Db db = dbRO(); try { _logger.info("Asset : getVendorByName "+name); checkUserCanAccess(db); return DbVendors.getVendorByName(db, name); } catch (Exception e) { store(e); throw e; } finally { db.safeClose(); } } COM: <s> get vendor by name </s>
funcom_train/4927259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { try { Access.init(this); } catch (AccessException e) { Error.out(e); } initialize(getParameter("args").split(" ")); // set layout getContentPane().setBackground(Color.BLACK); getContentPane().setLayout(new BorderLayout()); // add panel getContentPane().add(panel, BorderLayout.CENTER); } COM: <s> inits the applet </s>
funcom_train/17904927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertAfter() { int tabIndex = tabPane.getSelectedIndex(); if (tabIndex == 0) { DatabaseTableColumn column = new DatabaseTableColumn(table); column.setNewColumn(true); descriptionTable.addColumn(column); } else if (tabIndex == 1) { TableColumnConstraint constraint = new TableColumnConstraint(-1); constraint.setNewConstraint(true); constraintsTable.addConstraint(constraint); } } COM: <s> inserts a row after the selected row on the currently selected table </s>
funcom_train/803069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float predict(IAtomContainer mol, IAtom atom) throws Exception { return generalPredict(mol, atom, true, true, -1, -1, new StringBuffer(), false, true, null, 6, false, null, 6, false, true); } COM: <s> does a prediction </s>
funcom_train/13274702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCameraPath(List<Camera> cameraPath) { if (this.cameraPath != cameraPath) { List<Camera> oldCameraPath = this.cameraPath; this.cameraPath = cameraPath; this.propertyChangeSupport.firePropertyChange(Property.CAMERA_PATH.name(), oldCameraPath, cameraPath); this.home.getEnvironment().setVideoCameraPath(this.cameraPath); } } COM: <s> sets the camera locations of the video </s>
funcom_train/46521810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File makeOsArchDirectory(File directory) { Environment environment = Environment.getEnvironment(); String arch = environment.getSystemArchitecture(); String os = environment.getOperatingSystem(); File archDirectory = new File(directory, arch); File osDirectory = new File(archDirectory, os); return osDirectory; } COM: <s> appends system architecture and operating system name to </s>
funcom_train/11731130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TokenStream tokenStream(String fieldName, Reader reader) { if (indexingConfig != null) { Analyzer propertyAnalyzer = indexingConfig.getPropertyAnalyzer(fieldName); if (propertyAnalyzer != null) { return propertyAnalyzer.tokenStream(fieldName, reader); } } return defaultAnalyzer.tokenStream(fieldName, reader); } COM: <s> creates a token stream which tokenizes all the text in the provided </s>
funcom_train/47415233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout(5, 10)); jContentPane.add(getArgumentsPanel(), BorderLayout.EAST); jContentPane.add(getPortsPanel(), BorderLayout.CENTER); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/43540192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test() { IUIContext ui2 = getUI(); java.lang.String PROJECT_NAME = "importTest"; //$NON-NLS-1$ IProjectHelper projectHelper = EclipseHelperFactory.getProjectHelper(); IPath path = new Path("resources/testfiles/ProjectHelperImportFromArchiveTest/import.zip"); //$NON-NLS-1$ projectHelper.importExistingProjectFromArchive(ui2, PlatformActivator.getDefault(), path, PROJECT_NAME); } COM: <s> import a project from a zip file </s>
funcom_train/35043853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Address sender, FragmentationTable table) throws IllegalArgumentException { synchronized(frag_tables) { FragmentationTable healthCheck=frag_tables.get(sender); if(healthCheck == null) { frag_tables.put(sender, table); } else { throw new IllegalArgumentException("Sender <" + sender + "> already exists in the fragementation list"); } } } COM: <s> adds a fragmentation table for this particular sender </s>
funcom_train/3156085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GeoPos inverse(Point2D mapPoint, GeoPos geoPoint) { if (geoPoint == null) { geoPoint = new GeoPos(); } final double lat = mapPoint.getX() / _scaleX; final double lon = mapPoint.getY() / _scaleY; geoPoint.setLocation((float) lat, (float) lon); return geoPoint; } COM: <s> inverse project map co ordinates into geographical co ordinates </s>
funcom_train/43470726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String hierarchyString() throws ZXException { String hierarchyString; if (this.parent == null) { hierarchyString = '/' + getBo().getPKValue().getStringValue() + '/'; } else { hierarchyString = this.parent.hierarchyString() + '/' + getBo().getPKValue().getStringValue() + '/'; } return hierarchyString; } COM: <s> return the hierarchy of this tree node in the form of concatenated </s>
funcom_train/48712977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void postChanged(Node node, String undoName, String redoName) { Node saved = nodes.get(node.getKey()); if (!node.equals(saved)) { if (saved == null) { saved = node; } else { nodes.put(node.getKey(), node); } manager.postEdit(saved, undoName, redoName); undoManager.updateCmdUI(); } } COM: <s> post a change to undo repository </s>
funcom_train/43421734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean existsDayBefore(Day day) { Iterator iterator = days.values().iterator(); int index = 0; while (iterator.hasNext()) { Day indexedDay = (Day) iterator.next(); if (day.equals(indexedDay)) break; if (indexedDay.getDate().before(day.getDate())) index++; } return (index != 0); } COM: <s> finds out if there is any day in plan before specified day </s>
funcom_train/29706711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void startTaskResolving( Object taskObject ) { if ( taskObject != null && taskObject instanceof Task ) { Task task = (Task) taskObject; currentTask = task; // currentTask.resetStatusOfSubtasks(); currentSubTask = findOptimalTask( currentTask ); _interface.startResolvingTask( currentSubTask ); resolvingTaskListModel.redrawList( currentSubTask ); } } COM: <s> initiates resolving of specified task </s>
funcom_train/45880898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String appendOrderToExample(T example) { String clause=""; if (example instanceof Sortable) { Sortable criteria = (Sortable) example; //for search list ordering if(!StringUtil.isEmpty(criteria.getOrderOption()) && !StringUtil.isEmpty(criteria.getOrderFlow())){ clause="ORDER BY "+ criteria.getOrderOption() +" "+ criteria.getOrderFlow() +""; } } return clause; } COM: <s> override this method to append order clause to find by example </s>
funcom_train/43326342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void saveDplot(String filename) throws IOException { PrintfStream outfile = new PrintfStream(filename); if (data==null) return; int c = data.length; int r = data[0].length; for (int i=0; i<c; i++) for (int j=0; j<r; j++) { outfile.printf("%d ",i+1); outfile.printf("%d ",j+1); outfile.printf("%f\n", data[i][j]); } outfile.close(); } COM: <s> saves in dplot asgl format to a new text file </s>
funcom_train/41593602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addContextConductionIndPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_POCDMT000040EntryRelationship_contextConductionInd_feature"), getString("_UI_PropertyDescriptor_description", "_UI_POCDMT000040EntryRelationship_contextConductionInd_feature", "_UI_POCDMT000040EntryRelationship_type"), V3Package.eINSTANCE.getPOCDMT000040EntryRelationship_ContextConductionInd(), true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the context conduction ind feature </s>
funcom_train/31683215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getCreationDate() { Date date = null; PropertyValue prop = getProp("DAV:creationdate"); if (prop != null) { Text pcdata = (Text) prop.value.getFirstChild(); if (pcdata != null) { String dateString = pcdata.getData(); try { date = (new SimpleISO8601DateFormat()).parse(dateString); } catch (ParseException exc) { System.err.println("Invalid date format for creationdate in " + getResource()); } } } return date; } COM: <s> the date the resource was created </s>
funcom_train/34838474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void debug_dump(Model m, String filename) { Model mod=null; if (m==null) mod=glue_model; else mod=m; try { FileWriter fout=new FileWriter(new File(filename)); mod.write(fout); } catch (java.io.IOException e) { log.error("Error dumping model to rdf file "+filename); } } COM: <s> dumps the content of the glue repository in an rdf file </s>
funcom_train/25557636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getDefaultFormat() { DateFormat df = DateFormat.getDateInstance( DateFormat.DEFAULT, Locales.getCurrent()); if (df instanceof SimpleDateFormat) { final String fmt = ((SimpleDateFormat)df).toPattern(); if (fmt != null && !"M/d/yy h:mm a".equals(fmt)) return fmt; //note: JVM use "M/d/yy h:mm a" if not found! } return "yyyy/MM/dd"; } COM: <s> returns the default format which is used when outputing </s>
funcom_train/7752100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setItemTotalNum(Session session, Page page) { Criteria crit = session.createCriteria(page.getModelClazz()); // add constraints crit=getConstraintsOrder(crit, page.getConstrains(), null); // row count crit.setProjection(Projections.rowCount()); // get total number Integer itemTotalNum = (Integer) crit.uniqueResult(); page.setTotalItemNum(itemTotalNum); } COM: <s> note do this in a different criteria </s>
funcom_train/5322409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void set(double newval) { if (value != newval) { try { Iterator i = Stats.this.owner.getListeners( StatChangeChannelListener.class); while(i.hasNext()) { ((StatChangeChannelListener) (i.next())).statChanged(Stats.this.owner, name, newval-value); } } catch (EnumerationFailedException e) { // Fallthrough, if no listeners } value = newval; } } COM: <s> gives the stat a new value </s>
funcom_train/13958274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static enum TagMissingBehavior { /** * Top tries to behave like head-insertion by maintaining the same * ordering as head would (first added, first printed). If an Ajax * response, top would push to the front of the response. */ Top, /** * Inline just renders the content at the current location in the * response. */ Inline, /** * Skip does not render the content at all and silently ignores the * missing tag. */ Skip, /** * Like skip, no content will be rendered into the response, but a * warning will be printed onto the console. */ SkipAndWarn } COM: <s> tag missing behavior specifies several ways the response rewriter should </s>
funcom_train/34519946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateTarget(InstructionHandle oldh, InstructionHandle newh){ for (int i=0;i<handles.length;i++){ if (handles[i]==oldh){ if (oldh!=null) oldh.removeTargeter(this); if (newh!=null) newh.addTargeter(this); handles[i] = newh; return; } } } COM: <s> updates the first instance of oldh if found </s>
funcom_train/46789640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addItem(PDOutlineItem newItem) { int newCount = getCount() + 1; setCount(newCount); PDOutlineItem first = getFirst(); if (first == null) { setFirst(newItem); } PDOutlineItem last = getLast(); if (last != null) { last.setNext(newItem); newItem.setPrev(last); } setLast(newItem); newItem.setParent(this); } COM: <s> add a new </s>
funcom_train/6453902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private InputStream openContentStream(String containerName) { try { String logginConfigContents = Config.get().getTemplate(PluginTemplates.LOGGING_CONFIGURATION); //buffer.toString(); return new ByteArrayInputStream(logginConfigContents.getBytes()); } catch (Exception e) { e.printStackTrace(); return null; } } COM: <s> we will initialize file contents with a sample text </s>
funcom_train/22636484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updatePosition(int px, int py) { final int left = view.getOffsetLeft() + x * tileSize + px; final int top = view.getOffsetTop() + y * tileSize + py; final int right = left + tileSize; final int bottom = top + tileSize; image.layout(left, top, right, bottom); } COM: <s> update the position of this game piece with the current location plus the </s>
funcom_train/27973026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendCommand(String command) { // Send the command output.println(command); if (command.startsWith("start")){ sim.addConsoleText(command); di = new DataInterpreter(sim,this); di.start(); } // Return the received reply sim.addConsoleText(receiveCommand()); } COM: <s> sending commands to the controller </s>
funcom_train/7422449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String writeVariableSettingsToYAWL(String s) { s += String.format("\t\t\t\t\t\t<name>%s</name>\n", getName()); s += String.format("\t\t\t\t\t\t<type>%s</type>\n", getType()); s += String.format("\t\t\t\t\t\t<namespace>%s</namespace>\n", getNamespace()); return s; } COM: <s> serializes the variable settings to xml </s>
funcom_train/10344748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadProperties(String configFile) throws IOException { logger.info("Loading properties from " + configFile); FileInputStream fis = new FileInputStream(configFile); if (properties == null) { properties = new Properties(); } properties.load(fis); if (logger.isDebugEnabled()) { logger.debug("Application properties: " + properties); } } COM: <s> the method code load properties code loads the properties specified in the </s>
funcom_train/39913638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void submitAndTime() { state = next != null ? ActorState.WAITING : ActorState.IDLE; final List<Message> copy = new ArrayList<Message>(messages); messages.clear(); // register pulse only if there was an explicite request for that if (nextSet) { Long prev = wakeup; wakeup = next; controller.deliverAndPulse(this, copy, prev, next); } else { controller.deliverAndPulse(this, copy, null, null); } } COM: <s> submit the messages and or time the next wakeup </s>
funcom_train/593182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void restoreActionBean(HttpServletRequest request) { Stack<ActionBean> stack = getActionBeanStack(request, false); if (stack != null && !stack.empty()) { request.setAttribute(StripesConstants.REQ_ATTR_ACTION_BEAN, stack.pop()); } } COM: <s> restores the previous value of the action bean attribute in the request </s>
funcom_train/3374342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getNextNonliteralIndex(int index, int direction) { int max = getFormattedTextField().getDocument().getLength(); while (index >= 0 && index < max) { if (isLiteral(index)) { index += direction; } else { return index; } } return (direction == -1) ? 0 : max; } COM: <s> returns the index of the next non literal character starting at </s>
funcom_train/21954810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createMailPropertiesList(VariableBundle mainProperties) { mailPropertiesList = new ArrayList(); // Initialize Profile Map StringTokenizer tokens = new StringTokenizer(mainProperties.getProperty("UserProfile.mailHeaders.fields", "From:FromPersonal:ReplyTo:ReplyToPersonal:Organization"), ":"); while (tokens.hasMoreTokens()) { mailPropertiesList.add(tokens.nextToken()); } } COM: <s> this creates the profile map that well use to create new </s>
funcom_train/7685884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CacheEntry getContactInfo(Context context, String numberOrEmail) { if (Mms.isEmailAddress(numberOrEmail)) { return getContactInfoForEmailAddress(context, numberOrEmail, true /* allow query */); } else { return getContactInfoForPhoneNumber(context, numberOrEmail, true /* allow query */); } } COM: <s> returns the caller info in cache entry </s>
funcom_train/1505002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle union(int x, int y, int w, int h) { int right = Math.max(this.x + width, x + w); int bottom = Math.max(this.y + height, y + h); this.x = Math.min(this.x, x); this.y = Math.min(this.y, y); this.width = right - this.x; this.height = bottom - this.y; return this; } COM: <s> updates this rectangles dimensions to the minimum size which can hold both </s>
funcom_train/31125473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buildGUI() { buildPanels(); if (showStatusPanel) add(xyPanel); if (showConnectPanel) add(connectPanel); if (showControlPanel) add(controlPanel); if (showCommandPanel) add(commandPanel); if (showReadingsPanel) add(readingsPanel); if (showLastMovePanel) add(lastMovePanel); if (showParticlePanel) add(particlePanel); add(mapPanel); } COM: <s> build the gui used by mcltest but deprecated </s>
funcom_train/28750695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setItemclassname(String newVal) { if ((newVal != null && this.itemclassname != null && (newVal.compareTo(this.itemclassname) == 0)) || (newVal == null && this.itemclassname == null && itemclassname_is_initialized)) { return; } this.itemclassname = newVal; itemclassname_is_modified = true; itemclassname_is_initialized = true; } COM: <s> setter method for itemclassname </s>
funcom_train/46359367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long selectMaxFromUsers() { try { // get all users Query query = em.createQuery("select count(c.user_id) from Users c where c.deleted = 'false'"); List<?> ll = query.getResultList(); log.info("selectMaxFromUsers" + ll.get(0)); return (Long) ll.get(0); } catch (Exception ex2) { log.error("[selectMaxFromUsers] ", ex2); } return null; } COM: <s> returns the maximum </s>
funcom_train/1557417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addChangeableCoordParentNumberToUpdateList(GeoElement number, ArrayList<GeoElement> updateGeos, ArrayList<GeoElement> tempMoveObjectList){ if (updateGeos != null) { // add number to update list updateGeos.add(number); } else { // update number right now if (tempMoveObjectList == null) tempMoveObjectList = new ArrayList<GeoElement>(); tempMoveObjectList.add(number); updateCascade(tempMoveObjectList, getTempSet() ); } } COM: <s> add changeable coord parent number to update list </s>