__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/11363813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matches (String dir, String fil) { boolean match = false; if (!directory.equals(dir)) { match = false; } else if (filename != null) { match = (filename.equals(fil)); } else { match = filenamePattern.matcher(fil).matches(); } return match; } COM: <s> match this path object against a specific directory file pair </s>
funcom_train/41441275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractProfileCmpSlee10Wrapper getProfileCmpSlee10Wrapper() { if (profileCmpSlee10Wrapper == null) { try { profileCmpSlee10Wrapper = (AbstractProfileCmpSlee10Wrapper) profileTable.getProfileSpecificationComponent().getProfileCmpSlee10WrapperClass().getConstructor(ProfileObjectImpl.class).newInstance(this); } catch (Throwable e) { throw new SLEEException(e.getMessage(),e); } } return profileCmpSlee10Wrapper; } COM: <s> retrieves the profile cmp slee 1 </s>
funcom_train/4154594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed( final MouseEvent me ) { try { if ( me.getButton() == MouseEvent.BUTTON1 ) // left button remotePlayer.setControlKeyState( Player.KEY_INDEX_FIRE, true ); else if ( me.getButton() == MouseEvent.BUTTON3 ) // right button remotePlayer.setControlKeyState( Player.KEY_INDEX_ROPE, true ); } catch ( RemoteException re ) { } } COM: <s> to handle mouse pressed events implementing mouse listener interface </s>
funcom_train/24160782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBotonCancelar() { if (botonCancelar == null) { botonCancelar = new JButton(); botonCancelar.setBounds(new Rectangle(144, 226, 122, 43)); botonCancelar.setFont(new Font("Comic Sans MS", Font.BOLD, 14)); botonCancelar.setText("CANCELAR"); botonCancelar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { exitMode = 1; setVisible(false); } }); } return botonCancelar; } COM: <s> this method initializes boton cancelar </s>
funcom_train/50289464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sameService(Object other) { if (other instanceof JrapURLParser) { JrapURLParser otherParser = (JrapURLParser) other; if (this == otherParser) { return true; } return (equalObjects(srvcID, otherParser.srvcID) && Arrays.equals(groups, otherParser.groups) && Arrays.equals(locators, otherParser.locators) && equalObjects(knownAttrList, otherParser.knownAttrList)); } return false; } COM: <s> tell if two jrap urlparsers refer to the same logical service </s>
funcom_train/38315669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doEndTag() throws JspTagException { String val = null; PrivateMessage m = (PrivateMessage) pageContext.getAttribute("currentMessage"); val = String.valueOf(m.getSender().getId()); JspWriter out = pageContext.getOut(); try { out.write(val); } catch (IOException e) { throw new JspTagException("Error writing to page"); } return EVAL_PAGE; } COM: <s> get the next message in line and print out its sender id </s>
funcom_train/20504277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertSeatingPlan(long id, String name) { String sql = "insert into Seating_Plan (id, name) values (?, ?)"; Object[] args = new Object[] { new Long(id), name }; jdbcTemplate.update(sql, args); } COM: <s> inserts a new seating plan record to the seating plan table </s>
funcom_train/51187493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); this.setLocation((int)dim.getWidth()/2 - 200, (int)dim.getHeight()/2 - 150); this.setSize(422, 273); this.setContentPane(getJContentPane()); this.setTitle("Multicast Messenger M3 - Setting"); this.setIconImage(new ImageIcon("./Images/Setting.png").getImage()); } COM: <s> this method initializes this </s>
funcom_train/34889751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFont(int size) { font = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, size); if (2 * font.stringWidth(posLongestPos) > this.width) { numOfLinesInPosition = 2; } else { numOfLinesInPosition = 1; } rightCommandsWidth = this.setCommandWidth(rightCommands); leftCommandsWidth = this.setCommandWidth(leftCommands); } COM: <s> set new size of font </s>
funcom_train/13440337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveContentCalendar(Document newDoc, Element item, PContentCalendar contDate) { saveContentTimeList(newDoc, item, contDate); saveCalendarTimetables(newDoc, item, contDate); saveCalendarPeriodical(newDoc, item, contDate); } COM: <s> saves the content of a calendar </s>
funcom_train/2807795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List randomExpansion(int maxDepth, int depth) { if (depth >= maxDepth) { return randomSettle(maxDepth, depth); } double n = (double) subparsers.size(); int i = (int) (n * Math.random()); Parser j = (Parser) subparsers.get(i); return j.randomExpansion(maxDepth, depth++); } COM: <s> create a random collection of elements that correspond to </s>
funcom_train/14093257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEvaluateEndsString4() { String leftside = "ABC"; String rightside = "ab"; int operation = Operator.Operation.ENDSWITH; boolean ignoreCase = true; boolean expectedReturn = false; boolean actualReturn = Operator.evaluate(leftside, rightside, operation, ignoreCase); assertEquals("return value", expectedReturn, actualReturn); } COM: <s> test endswith ignorecase false </s>
funcom_train/3118207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayCurrentPattern() { fillPatternInfoPane(); setTitle(currentPattern.getName() + " - Damask - Pattern Browser"); backButton.setEnabled(canGoBack()); forwardButton.setEnabled(canGoForward()); // Scroll to the top final JScrollBar verticalBar = patternScrollPane.getVerticalScrollBar(); verticalBar.setValue(verticalBar.getMinimum()); } COM: <s> displays the current pattern </s>
funcom_train/3598106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDominanceSimple() { try { List results = engine.search(nom, "($w word)($n np):$n^$w"); results.remove(0); // remove list of vars Collections.sort(results, new SearchResultIDComparator()); assertTrue(results.size()==6); NOMElement r1 = (NOMElement)((List)results.get(5)).get(0); NOMElement r2 = (NOMElement)((List)results.get(5)).get(1); assertTrue(r1.getID().equals("w_8")); assertTrue(r2.getID().equals("np_3")); } catch (Throwable ex) { ex.printStackTrace(); fail("Simple dominance test failed!"); } } COM: <s> check a simple one level dominance is ok </s>
funcom_train/16356272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createContents() { shell = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL); final FillLayout fillLayout = new FillLayout(); fillLayout.marginHeight = 5; fillLayout.marginWidth = 5; shell.setLayout(fillLayout); shell.setSize(450, 600); attributes = WindowAttributes.getAttributes("null"); attributes.initScreen(shell); attributes.centre(); attributes.apply(shell); shell.setText(LanguageLibrary.getString("Bug.DialogTitle")); shell.setImage(IconReader.load("bomb")); } COM: <s> create contents of the dialog </s>
funcom_train/48152607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillBoxPlot(Graphics g, double x, double r, int y){ g.fillRect(getXGraph(x - r), y - 3, getXGraph(x + r) - getXGraph(x - r), 6); g.drawLine(getXGraph(x), y - 6, getXGraph(x), y + 6); } COM: <s> the following method fills a symmetric horizontal boxplot centered at </s>
funcom_train/33963113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String append(String resource1, String resource2) { resource1 = resource1 == null ? "" : resource1.trim(); resource2 = resource2 == null ? "" : resource2.trim(); resource1 = resource1.endsWith("/") ? resource1 : resource1+"/"; resource2 = resource2.startsWith("/") ? resource2.substring(1) : resource2; return resource1 + resource2; } COM: <s> append code resource1 code to code resource2 code making sure theres no </s>
funcom_train/46858158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToggleButton getBtnCreateSchool() { if (btnCreateSchool == null) { btnCreateSchool = new JToggleButton(); btnCreateSchool.setText("School"); btnCreateSchool.setIcon(new ImageIcon(getClass().getResource("/resources/icons/school.png"))); btnCreateSchool.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { getMapDisplay().setTool(ToolType.School); } }); } return btnCreateSchool; } COM: <s> this method initializes btn create school </s>
funcom_train/9156847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Query like(int docNum) throws IOException { if (fieldNames == null) { // gather list of valid fields from lucene TODO: only indexed fields Collection fields = ir.getFieldNames(); fieldNames = (String[]) fields.toArray(new String[fields.size()]); } return createQuery(retrieveTerms(docNum)); } COM: <s> return a query that will return docs like the passed lucene document id </s>
funcom_train/2806896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getTotalShipping() { double tempShipping = 0.0; Iterator i = iterator(); while (i.hasNext()) { tempShipping += ((ShoppingCartItem) i.next()).getItemShipping(); } tempShipping += OrderReadHelper.calcOrderAdjustments(this.getAdjustments(), getSubTotal(), false, false, true); return tempShipping; } COM: <s> returns the shipping amount from the cart object </s>
funcom_train/25714743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean create(Object entity, Serializable id) { try { if(!isMapped(entity)) { return false; } searchInterceptor.create(new IndexObjectDto(entity, id)); return true; } catch (IndexObjectException e) { //LogFactory.getLog(getClass()).error("Error al indexar. Entidad: "+entity+" - id:"+id,e); return false; } } COM: <s> object create insertion event </s>
funcom_train/810621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUnitCvRefPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CVParamType_unitCvRef_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CVParamType_unitCvRef_feature", "_UI_CVParamType_type"), MzmlPackage.Literals.CV_PARAM_TYPE__UNIT_CV_REF, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the unit cv ref feature </s>
funcom_train/41446110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object obj) { if (obj == this) return 0; if (!(obj instanceof Alarm)) throw new ClassCastException("Not a javax.slee.management.Alarm: " + obj); Alarm that = (Alarm)obj; // compare alarm identifiers return this.alarmID.compareTo(that.alarmID); } COM: <s> compare this alarm with the specified object for order </s>
funcom_train/32779969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startCreatingEntities() { if (started) { sendWarning("SourceOld already started!", "Source : " + getName() + " Method: startCreatingEntities()", "the source has already started to create entities", "dont call this method more than once on a single object"); } started = true; for (int i = 0; i < getRemainingServiceCapacity(); i++) { getStartEvent().schedule(createDummyEntity(), new TimeSpan(0)); } } COM: <s> the source starts with creating entities if this method is not called previously </s>
funcom_train/15867504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setArgumentValue(String arg, Object value) throws MoiseException { // get the arguments if (spec.hasArguments() && spec.getArguments().containsKey(arg)) { args.put(arg, value); } else { throw new MoiseException("the goal "+spec+" has not the "+arg+" argument."); } } COM: <s> set an arguments value for this instance goal </s>
funcom_train/31208273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSearchable(int column) throws SQLException { try { if(Trace.isDetailed()) Trace.trace(getId(),column); // checkColumnIndex already calls checkClosed rs.checkColumnIndex(column); return true; } catch(Throwable e) { throw convertThrowable(e); } } COM: <s> checks if this column is searchable </s>
funcom_train/51274345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cookie_getCookies() throws Exception { driver.get(executionpath + "/test/test.html"); executeNewScript("b:setCookie('cookie-01','cookie-value-01')"); String value = executeNewScript("b:getCookieNames() = 'cookie-01'"); Assert.assertEquals("true", value); value = executeNewScript("b:getCookieNames() = 'non-existing-cookie'"); Assert.assertEquals("false", value); } COM: <s> test the b get cookie names function </s>
funcom_train/20885847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Validator getForObjectType(Class<?> objectType, String[] constraints) { if (!hasValidatorFor(objectType)) { return null; } Class<? extends Validator> validatorType = getValidatorType(objectType); return getForValidatorType(validatorType, objectType, constraints); } COM: <s> returns a code validator code for the given object type and constraints </s>
funcom_train/1942439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void iconifyAll(boolean iconify) { if(iconify){ CDIInternalFrame[] fs = getAllShownFramesWithinDesktop(); for(int i = fs.length -1; i >=0;i--){ addIconifiedFrame(fs[i]); } }else{ for(Iterator it = btn2frames.keySet().iterator(); it.hasNext();){ List fs = (List)btn2frames.get(it.next()); for(Iterator itt = fs.iterator(); itt.hasNext();){ CDIInternalFrame f = (CDIInternalFrame)itt.next(); f.setVisible(true); } fs.clear(); } controlPanel.removeAllIcons(); btn2frames.clear(); icon2button .clear(); icon2button2 .clear(); } } COM: <s> iconify all shown frames within main window or deiconfiy all iconfied </s>
funcom_train/43095260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Collection filterWithActivator(Collection c, Object/*MMessage*/a) { Iterator it = c.iterator(); ArrayList v = new ArrayList(); while (it.hasNext()) { Object m = /* (MMessage) */it.next(); if (Model.getFacade().getActivator(m) == a) { v.add(m); } } return v; } COM: <s> finds the messages in collection c that has message a as activator </s>
funcom_train/51098505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void refreshView(DataNode node) { this.node = node; if (node == null) { getView().setVisible(false); return; } refreshLocalDataSources(); for (int i = 0; i < bindings.length; i++) { bindings[i].updateView(); } showDataSourceSubview(getFactoryName()); } COM: <s> reinitializes widgets to display selected data node </s>
funcom_train/32351124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getRootObject() { Object root = getState().get(stateKey(true) + ROOT); if(root == null) { // create one and save it try { root = rootObjectClass.newInstance(); getState().put(stateKey(true) + ROOT, root); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } } return root; } COM: <s> returns the root object for this module </s>
funcom_train/31874922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateLocation() { if (fLocator != null && fParent != null) { this.offsetX = fLocator.getOffset().x; this.offsetY = fLocator.getOffset().y; final Point p = fLocator.locate(fParent); p.x -= fOriginX; p.y -= fOriginY; if (p.x != 0 || p.y != 0) { willChange(); basicMoveBy(p.x, p.y); changed(); } } } COM: <s> updates the location relative to the connected figure </s>
funcom_train/51032051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createStandardShell() { styledShell = ShellFactory.createShell(parentShell, getShellStyle(SWT.NONE)); FillLayout fillLayout = new FillLayout(); fillLayout.marginHeight = 0; fillLayout.marginWidth = 0; styledShell.setLayout(fillLayout); if (true == Constants.isOSX) { getUIFunctions().createMainMenu(styledShell); } Utils.setShellIcon(styledShell); content = new Composite(styledShell, SWT.DOUBLE_BUFFERED); content.setBackgroundMode(SWT.INHERIT_DEFAULT); alpha = 255; } COM: <s> creates a pop up shell with standard dialog style and trim </s>
funcom_train/31069572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDoubleProperty(String name) throws PropertyNotFoundException { double d; try { String value = (String) getStringProperty(name); d = org.embedlet.lang.Double.parseDouble(value); } catch (Exception ex) { throw new PropertyNotFoundException(ex, name); } return d; } COM: <s> retrieve the double property keyed by name throw an exception if not found </s>
funcom_train/20042901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _selectItemsPos() { requiredMethod("addItems()") ; requiredMethod("setMultipleMode()") ; boolean result = true ; oObj.selectItemsPos(new short[] {0, 2}, true) ; tRes.tested("selectItemsPos()", result) ; } COM: <s> just selects some items </s>
funcom_train/35036224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NewsAccount getAccount() { if (newsAccount == null) { newsAccount = new NewsAccount(); newsAccount.setHost(props.getProperty(PROPS_HOST)); newsAccount .setPort(Integer.parseInt(props.getProperty(PROPS_PORT))); newsAccount.setUsername(props.getProperty(PROPS_USERNAME)); newsAccount.setPassword(props.getProperty(PROPS_PASSWORD)); newsAccount.setSecure(Boolean.parseBoolean(props .getProperty(PROPS_SECURE))); } return newsAccount; } COM: <s> returns the news account configured </s>
funcom_train/20364932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean arraysContainSame(String[] array1, String[] array2) { if ( array1.length!=array2.length ) { fail("String arrays not of same length."); } for ( int i=0;i<array1.length;i++) { if ( !StringUtils.equals(array1[i], array2[i]) ) { return false; } } return true; } COM: <s> compare two string arrays </s>
funcom_train/26554720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkSession(String targetSessionID) throws SQIFault { logger.info("LocalSQI.checkSession(" + targetSessionID + ")"); if (!sessionInfos.containsKey(targetSessionID)) { throw new SQIFault(SQIFault.NO_SUCH_SESSION, targetSessionID); } logger.info("LocalSQI.checkSession(" + targetSessionID + ") : SESSION IS VALID"); } COM: <s> this method checks wheter a session id exists </s>
funcom_train/10628485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFlipBitNegativeInside5() { String as = "-18446744073709551615"; String res = "-18446744073709551616"; int number = 0; BigInteger aNumber = new BigInteger(as); BigInteger result = aNumber.flipBit(number); assertEquals(res, result.toString()); } COM: <s> flip bit 0 in the negative number of length 2 </s>
funcom_train/51296230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void editPeriod(ComplexShift t) throws ErrorHandler { String s; try { s = "UPDATE complex_shift_handler SET period_type = " + t.getType() + " , group_id = " + t.getGroupId() + " WHERE id = " + t.getId(); dba.executeQuery(s); } catch (SQLException e) { throw new ErrorHandler(e.getMessage() + ":"); } } COM: <s> save changes into db for period specified </s>
funcom_train/48263282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContentLength(int length) { boolean keepAlive = isKeepAlive(); if(keepAlive) { response.set("Connection", "keep-alive"); } else { response.set("Connection", "close"); } response.set("Content-Length", length); } COM: <s> this is used to set the content length for the response </s>
funcom_train/46776398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setHolding(boolean holding) throws IOException { if (holding == this.holding || !instantClose) return false; this.holding = holding; if (!holding) { for (int i = 0; i < containedDbs.length; i++) { if (containedDbs[i] != null && using[i] == 0) { containedDbs[i].close(); containedDbs[i] = null; } } } return true; } COM: <s> when set to true tells underlying databases to remain open whether or </s>
funcom_train/31652047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerListener( PluginListener listener ) { try { listener.initializing(); String[] f = listener.getFacilities(); if ( f==null || f.length==0 ) { listeners.add( new ListenerRecord( listener ) ); } else { listeners.add( new ListenerRecord( listener, f ) ); } } catch ( PluginException e ) { SM.warning("Plugin listener failed intialize", e); } } COM: <s> add a listener to the managers set of registered listeners </s>
funcom_train/46715434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBytes(byte[] withBytes) { //Compute the minimum length of buffer needed. length = withBytes.length; //Grow if necessary. if (length > maxLength) { maxLength = length; bytes = new byte[maxLength]; } //Copy bytes from provided. for (int i = 0; i < length; ++i) bytes[i] = withBytes[i]; } COM: <s> sets the bytes of the buffer to the provided bytes </s>
funcom_train/50066668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getSend() { if (Send == null) {//GEN-END:|48-getter|0|48-preInit // write pre-init user code here Send = new Command("Send", Command.OK, 0);//GEN-LINE:|48-getter|1|48-postInit // write post-init user code here }//GEN-BEGIN:|48-getter|2| return Send; } COM: <s> returns an initiliazed instance of send component </s>
funcom_train/25099470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEndPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FeatureLink_end_feature"), getString("_UI_PropertyDescriptor_description", "_UI_FeatureLink_end_feature", "_UI_FeatureLink_type"), FeaturemodelingPackage.Literals.FEATURE_LINK__END, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the end feature </s>
funcom_train/10773140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAllRuntimeTest1s() { OpenJPAEntityManager pm = getPM(); OpenJPAQuery q = pm.createQuery("SELECT o FROM RuntimeTest1 o"); Collection c = q.getResultList(); assertEquals(3, c.size()); endEm(pm); } COM: <s> tests that we can get all three objects via an extent </s>
funcom_train/23233926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getRequiredResourceNamesWithHashes(int amount) { Set<String> requiredResourcesWithHashes = new HashSet<String>(); for (Map.Entry<String, Integer> entry : getRequiredResourcesPerItem().entrySet()) { requiredResourcesWithHashes.add(Grammar.quantityplnoun(amount * entry.getValue(), entry.getKey())); } return Grammar.enumerateCollection(requiredResourcesWithHashes); } COM: <s> gets a nicely formulated string that describes the amounts and names </s>
funcom_train/17492695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runUntilDone() { runUntilFinished(); try { SwingUtilities.invokeAndWait(new Runnable() { public void run() { pauseButton.doClick(); } }); } catch (InterruptedException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } } COM: <s> invoked when the run until is done </s>
funcom_train/28373224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToolBar getJToolBarButtons() { if (jToolBarButtons == null) { jToolBarButtons = new JToolBar(); } jToolBarButtons.setPreferredSize(new Dimension(240, 35)); jToolBarButtons.setFloatable(false); jToolBarButtons.setRollover(true); jToolBarButtons.add(getJButtonCreate()); jToolBarButtons.addSeparator(new Dimension(20, 35)); jToolBarButtons.add(getJButtonCancel()); return jToolBarButtons; } COM: <s> this method initializes j tool bar buttons </s>
funcom_train/8044113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User addUser(String login, String password, String name, String email, boolean authorized, UserLevel level) throws DuplicatedIdentifierException { if (this.users.containsKey(login)) { throw new DuplicatedIdentifierException(login); } String hashedPswd = SecurityUtil.generateHash(password); User newUser = new User(name, email, login, hashedPswd, authorized, level); this.userDAO.addUser(newUser); this.users.put(login, newUser); return newUser; } COM: <s> adds a new user to this manager </s>
funcom_train/29553357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component add(String name, Component component) { name = name.intern(); super.add(name, component); // Let layout manager do its job // component.setBackground(getBackground()); // use same background // color. if (!names.contains(name)) { // if name isn't already present names.addElement(name); // but record our part nCards++; if (isShowing()) { // already showing? better rebuild! computeTabs(); repaint(); } } return component; } COM: <s> add a card component to the tab panel with a given name </s>
funcom_train/16911152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void resortPriorities() { Collections.sort(componentList, new Comparator<WorkspaceComponent>() { public int compare(WorkspaceComponent c1, WorkspaceComponent c2) { return Integer.valueOf(c1.getUpdatePriority()).compareTo( Integer.valueOf(c2.getUpdatePriority())); } }); } COM: <s> resort the components according to update priorities </s>
funcom_train/3374231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDot(int dot, Position.Bias dotBias) { if (dotBias == null) { throw new IllegalArgumentException("null bias"); } NavigationFilter filter = component.getNavigationFilter(); if (filter != null) { filter.setDot(getFilterBypass(), dot, dotBias); } else { handleSetDot(dot, dotBias); } } COM: <s> sets the caret position and mark to the specified position with the </s>
funcom_train/29017948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearAll (boolean all) { checkWidget (); int /*long*/ hwnd = parent.handle; int /*long*/ hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle); if (hItem == 0) return; TVITEM tvItem = new TVITEM (); tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_PARAM; parent.clearAll (hItem, tvItem, all); } COM: <s> clears all the items in the receiver </s>
funcom_train/26096651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Type getDomain() { if (domain != null && domain.eIsProxy()) { InternalEObject oldDomain = (InternalEObject)domain; domain = (Type)eResolveProxy(oldDomain); if (domain != oldDomain) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, MCRL2Package.FUNCTION_TYPE__DOMAIN, oldDomain, domain)); } } return domain; } COM: <s> returns the value of the em b domain b em reference </s>
funcom_train/25567461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBooleanValues(final String True, final String False) { DefaultTableCellRenderer renderer = new DefaultTableCellRenderer(){ protected void setValue(Object value){//!! setText( (value == null) ? "" : ( ((Boolean)value).booleanValue() ? True : False) ); } }; renderer.setHorizontalAlignment(javax.swing.JLabel.CENTER); setDefaultRenderer(Boolean.class, renderer); setDefaultEditor(Boolean.class, //new DefaultCellEditor(True, False) createEditor(new Object[]{True, False}, Boolean.class) ); } COM: <s> installs boolean cell editor and the approapriate renderer </s>
funcom_train/29968044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void jButtonDestinationDirActionPerformed(java.awt.event.ActionEvent evt) { jFileChooser.setCurrentDirectory(new File( configPanel.jTextFieldDestinationDir.getText())); if (JFileChooser.APPROVE_OPTION == jFileChooser.showOpenDialog(this)) { choosenDestinationDir = jFileChooser.getSelectedFile(); configPanel.jTextFieldDestinationDir.setText(choosenDestinationDir .getAbsolutePath()); } } COM: <s> handles button to show up file chooser for destination directory </s>
funcom_train/22029344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doAction() { synchronized (Lock) { try { if (postfix != null) tref.setThing(compute(postfix)); } catch (VisADException exc) { evalError("Could not store final value in variable"); } catch (RemoteException exc) { evalError("Could not store final value in variable (remote)"); } computing = false; Lock.notifyAll(); } } COM: <s> recompute this variable </s>
funcom_train/43526332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLocalIdPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Advice_localId_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Advice_localId_feature", "_UI_Advice_type"), CallGraphPackage.Literals.ADVICE__LOCAL_ID, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the local id feature </s>
funcom_train/32979233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getPluginHashState(String pluginName, String varName, double defValue) { /* getPluginState */ Object obj= getPluginHashState(pluginName, varName); if(obj==null || !(obj instanceof Double)) return(defValue); double value= ((Float)obj).floatValue(); return(value); } /* getPluginHashState */ COM: <s> get plugin hash state get double state value from maeplugin hash state storage </s>
funcom_train/2501117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void forwardToErrorPage(Request request, Response response, LoginConfig config) { RequestDispatcher disp = context.getServletContext().getRequestDispatcher(config.getErrorPage()); try { disp.forward(request.getRequest(), response.getResponse()); } catch (Exception e) { throw new AuthenticatorException("Unexpected error forwarding to error page", e); } } COM: <s> called to forward to the error page </s>
funcom_train/8039308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDeserializationSimple() throws Exception { Object obj = SerializationTestHelper.deserializeStream( "witness/serialization/simple.bin"); assertTrue(obj instanceof LoggingEvent); LoggingEvent event = (LoggingEvent) obj; assertEquals("Hello, world.", event.getMessage()); assertEquals(Level.INFO, event.getLevel()); } COM: <s> deserialize a simple logging event </s>
funcom_train/41209447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renderM3G(Graphics g, boolean depth, int arguments, Callback c) { Graphics3D g3d = Graphics3D.getInstance(); g3d.bindTarget(g.getGraphics(), depth, arguments); try { c.paintM3G(g3d); } finally { g3d.releaseTarget(); } } COM: <s> binds the graphics3 d object to the current graphics context and invokes </s>
funcom_train/19273608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize() { if (this.model != null) { synchronized (this.model) { int count = this.model.getElementCount(); for (int i = 0; i < count; i++) { this.syncAccess.addItem(this.model.getElementAsString(i)); } } this.model.addListener(this); } } COM: <s> this method initializes the list after it has been creation or the model </s>
funcom_train/23705172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void recieve(long sourceId, SignalType signalType, int amount) { setSenderStamp(sourceId, getCs()); boolean doNotSummate = false; if(getArp() > 0){//TODO add more logic cannot summate signals during ap or rp doNotSummate = true; } if(doNotSummate){ return; } mp = amount; } COM: <s> todo len k must be put into consideration by the connector when sending </s>
funcom_train/48406512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsOptionalPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BreakdownElement_isOptional_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BreakdownElement_isOptional_feature", "_UI_BreakdownElement_type"), SpemxtcompletePackage.eINSTANCE.getBreakdownElement_IsOptional(), true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is optional feature </s>
funcom_train/38315650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doEndTag() throws JspTagException { String val = null; JLCPUser user = (JLCPUser) pageContext.getAttribute("currentBuddy"); val = user.getEmailAddress(); JspWriter out = pageContext.getOut(); try { out.write(val); } catch (IOException e) { throw new JspTagException("Error writing to page"); } return EVAL_PAGE; } COM: <s> get the user from the parent tag and print out the users email </s>
funcom_train/45050411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkExceptionIsThrown(SQLCallArgument argument, Class exceptionType) { try { argument.getValueAsObject(); fail("No exception of type {" + exceptionType.getName() + "} was thrown but was expected"); } catch (RuntimeException runTimeException) { assertTrue(exceptionType.isInstance(runTimeException.getCause())); } } COM: <s> check that the correct exception was thrown </s>
funcom_train/40324757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addScopeNoteToConcept(String concept_uri, String lang, String scopeNote) { repository.RemoveResourceTypeFromRepository(concept_uri, "http://www.w3.org/2004/02/skos/core#scopeNote", lang); repository.AddResourceToRepository(concept_uri, "http://www.w3.org/2004/02/skos/core#scopeNote", scopeNote, lang); } COM: <s> adds a scope note short note for searching to concept </s>
funcom_train/1117701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addComboBoxAndRemoveButton() { addGroupComboBox(); //adds an additional group box and places it in the correct position in the GUI addRemoveButton();//add an additional remove button and places it in the correct position in the GUI gridBagYCount++;//increments the position in the GUI where we are adding boxes and buttons jPanel1.updateUI(); } COM: <s> this method adds a group combo box paired with a remove </s>
funcom_train/48527146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void readFields(Object o, Class c) throws IOException, ClassNotFoundException { reader.readStartTag("default"); reader.step(); while (! reader.isEndTag()) { readField(o, c); reader.step(); } reader.assertEndTag("default"); } COM: <s> method which initiates the default field reading mechanism for the given </s>
funcom_train/44339031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() throws Exception { checkRegistered(); if(!isStarted) { isStarted = true; // register as a listener for timer notifications NotificationFilterSupport filter = new NotificationFilterSupport(); filter.enableType(TIMER_NOTIFICATION_TYPE); mbeanServer.addNotificationListener(timer.getObjectName(), this, filter, this); if(startTask != null) executeTask(startTask); } } COM: <s> executes the start task if any </s>
funcom_train/36534425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getMapID(String mapName) { int mapID = 0; try { String selectStatement = "SELECT MapID FROM map WHERE Name=?"; PreparedStatement pstmt = con.prepareStatement(selectStatement); pstmt.setString(1, mapName); ResultSet results = pstmt.executeQuery(); while (results.next()) { mapID = results.getInt(1); } results.close(); pstmt.close(); } catch (SQLException sqle) { System.out.println(sqle); } return mapID; } COM: <s> get the my sql assigned map id from the maps name </s>
funcom_train/26279596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName() { try { MetaProperty mp=(MetaProperty)get(This, ".name", null, FROM_CACHE_ONLY); return mp.getValue().getData().getInfo(); } catch(AccessControlException x) { } catch(UnknownKeyException x) { } return null; } COM: <s> convenience function name is actually stored as a property </s>
funcom_train/28150703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public void replace(int offset, int length, String string, AttributeSet attrs) throws BadLocationException { if (length > 0) this.remove(offset, length); if (string != null && string.length() > 0) this.insertString(offset, string, styleNormal); } COM: <s> this method is called by swing to replace text in this document </s>
funcom_train/45922929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("VM_UsersSOAP".equals(portName)) { setVM_UsersSOAPEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/25145640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayAliases() { // set column aliases int colCount = this.columnCount(); for (int i = 0; i < colCount; ++i) { String colLabel = this.columnLabel(i); $("#alias-" + colLabel, this.fixedRowsTable).val($or(this.aliases.$get(colLabel + ":" + colLabel), "")); } } COM: <s> display the column aliases in the input boxes </s>
funcom_train/1539077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int signum( ) { int t = 0; byte[] u = val; for (int i = 0; i < u.length; i++ ) { if ( u[i] < 0 ) { return -1; } if ( u[i] > 0 ) { t = 1; } } return t; //return EVSIGN(this); } COM: <s> exp vector signum </s>
funcom_train/51204885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void formWindowActivated(java.awt.event.WindowEvent evt)//GEN-FIRST:event_formWindowActivated {//GEN-HEADEREND:event_formWindowActivated Component selectedPanel = tabbedConversationPane.getSelectedComponent(); if (selectedPanel instanceof ChatPanel) ((ChatPanel)selectedPanel).setHasUnreadMessages(false); }//GEN-LAST:event_formWindowActivated COM: <s> when the chat window gains focus update the unread status </s>
funcom_train/18900357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Graph graph, boolean withReifications) { if (graph.dependsOn(this.graph)) { delete(triplesOf(graph)); } else { deleteIterator(GraphUtil.findAll(graph), false); } if (withReifications) { deleteReifications(this.graph, graph); } manager.notifyDeleteGraph(graph); } COM: <s> delete all triples from the given graph optionally including reifications </s>
funcom_train/3763859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { if ((m_plugin != null) && (m_info != null)) { m_plugin.addInformation(m_info); } } catch (RpException e) { Logger.getRootLogger().debug(e.getMessage(), e); } } COM: <s> execute the process of adding the information by the specified plugin </s>
funcom_train/33015953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleRemovePlayers() { while (true) { int idx = this.gamePlayers.getSelectedIndex(); if (idx > -1) { Object selObj = this.gamePlayerModel.elementAt(idx); this.gamePlayerModel.remove(idx); this.availablePlayerModel.addElement(selObj); sortList(this.availablePlayerModel); } else { break; } } } COM: <s> remove selected player s from the game access list </s>
funcom_train/26396998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String generateHierarchyToc(PluginInfo info) { StringWriter w = new StringWriter(); try { writePluginInfo(info, null, w, 0, " "); } catch (IOException e) { e.printStackTrace(); } return w.getBuffer().toString(); } COM: <s> method that generates the hierarchical toc </s>
funcom_train/29723886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextFieldConfigPath() { if (jTextFieldConfigPath == null) { jTextFieldConfigPath = new JTextField(); jTextFieldConfigPath.setEditable(false); jTextFieldConfigPath.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); } return jTextFieldConfigPath; } COM: <s> this method initializes j text field config path </s>
funcom_train/4861322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireObjectChanged(RescueObject o, int property, int timestep, Object source) { ObjectChangedEvent event = new ObjectChangedEvent(o,property,timestep,source); synchronized(LOCK) { if (listeners==null) listeners = new HashSet<MemoryListener>(); for (Iterator it = listeners.iterator();it.hasNext();) { ((MemoryListener)it.next()).objectChanged(event); } } } COM: <s> notify listeners that an object has been changed </s>
funcom_train/12561939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSeed(byte[] b, int off, int len) { int j = 0; if ((len <= 0) || (b.length < (off + len))) return; for (int i = 0; i < seed.length; i++, j++) { if (j == len) j = 0; seed[i] = b[off + j]; } } COM: <s> set the random number seed </s>
funcom_train/20828546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void openQueryFile(File file){ try{ QueryEditor editor = new HighlightingEditor(file); addAllListeners(editor); addTab(editor.getName(), (JComponent)editor); setSelectedComponent((JComponent)editor); for(Iterator it=openSaveListeners.iterator(); it.hasNext();){ ((OpenSaveListener)it.next()).fileOpened(file); } } catch(IOException e){ ErrorReporter.reportError(this, "Could not open file.", e); } } COM: <s> opens the specified query file </s>
funcom_train/15918349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Expr flattenTuple(Tuple expr) { List<Stmt> stmts = new ArrayList<Stmt>(); List<Expr> args = new ArrayList<Expr>(); for (Expr e : expr.arguments()) { Expr primary = getPrimaryAndStatements(e, stmts); args.add(primary); } return toFlatExpr(expr.position(), stmts, expr.arguments(args)); } COM: <s> flatten a tuple expression </s>
funcom_train/7757007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { try { StructuredTextDocument doc = (StructuredTextDocument) getDocument(MimeMediaType.XMLUTF8); return doc.toString(); } catch(Throwable e) { if(e instanceof Error) { throw (Error) e; } else if(e instanceof RuntimeException) { throw (RuntimeException) e; } else { throw new UndeclaredThrowableException(e); } } } COM: <s> return a string representaion of this route response doc </s>
funcom_train/34451406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addGuardExpressionPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_MActivityEdge_guardExpression_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MActivityEdge_guardExpression_feature", "_UI_MActivityEdge_type"), M3ActionsPackage.Literals.MACTIVITY_EDGE__GUARD_EXPRESSION, true, true, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the guard expression feature </s>
funcom_train/32138284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getFile() { LogManager.logDebug("Start ExportDataSetAction.getFile", this); String path = null; FileDialog dialog= new FileDialog(fWindow.getShell(), SWT.SAVE); dialog.setText(Localization.getString("ExportDataSetAction.NewFile")); path = dialog.open(); if(null == path) return null; LogManager.logDebug("End ExportDataSetAction.getFile", this); return new File(path); } COM: <s> this method will display a dialog box for the user to select a </s>
funcom_train/15896550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LineNumberReader openStream(String fileName) { FileInputStream fis = null; InputStreamReader isr = null; LineNumberReader lnr = null; try { fis = new FileInputStream(fileName); isr = new InputStreamReader(fis); lnr = new LineNumberReader(isr); } catch (IOException ioe) { ioe.printStackTrace(); } return lnr; } COM: <s> open stream for reading a file </s>
funcom_train/34633293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRightLocked(final MergeEntry entry) { if (entry == null) throw new ArgumentNullException("entry"); entry.setLockedFlag(true); if (entry == this.getLastEntry()) { this.markNextEntryForLock = true; } else { int index = this.getIndex(entry); this.getEntry(index + 1).setLockedFlag(true); } } COM: <s> mark the entry and the next one as looked </s>
funcom_train/18623790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getDatasetSubset(InvDataset ds) throws Exception { String datasetSubsetUrl; if (ds instanceof InvCatalogRef) { //return referenced catalog datasetSubsetUrl = ((InvCatalogRef)ds).getURI().toString(); } else { //subset current catalog String catalogUrl = ds.getCatalogUrl().split("#")[0]; datasetSubsetUrl = catalogUrl + "?dataset=" + ds.getID(); } return Xml.loadFile(new URL(datasetSubsetUrl)); } COM: <s> return a catalog having the specified dataset as the top dataset </s>
funcom_train/12652744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetLongValueArrayCharacteristicNotFound() { int[] unique = getThreeUniqueIntegers(); CharacteristicCode[] set = new CharacteristicCode[] {new CharacteristicCode(unique[0]), new CharacteristicCode(unique[1])}; long result = OntologyUtils.getLongValue(set, new CharacteristicCode(unique[2])); assert result == 0l : "Set " + Arrays.toString(set) + " returned long value of " + result + " for element " + unique[2]; } COM: <s> test get long value with array and element not found </s>
funcom_train/41594851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBorderPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_StrucDocTable_border_feature"), getString("_UI_PropertyDescriptor_description", "_UI_StrucDocTable_border_feature", "_UI_StrucDocTable_type"), V3Package.eINSTANCE.getStrucDocTable_Border(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the border feature </s>
funcom_train/1095411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAttachment(Map aAttributes) { // BPELG-64 attachments // try // { // getAdmin().addVariableAttachment(getPidAsLong(), getPath(), new // AeWebServiceAttachment(getContent(), aAttributes)); // } // catch (AeException ex) // { // setError(ex); // } } COM: <s> adds an attachment to the process variable </s>
funcom_train/18095870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFormattedTextField getJTextField1() { if (jTextFieldQuestionPoints == null) { jTextFieldQuestionPoints = new JFormattedTextField(); HelperPanel.makeTextFieldNumberTextfield(jTextFieldQuestionPoints, 100); jTextFieldQuestionPoints.setText(Msg.getConfSetting("QUESTION_DEF_POINTS")); jTextFieldQuestionPoints.setToolTipText(Msg.getMsg("PANEL_NEW_QUESTION_ROOT_QUESTION_POINTS_TOOLTIP")); } return jTextFieldQuestionPoints; } COM: <s> this method initializes j text field1 </s>