__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/13391369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroy() throws IOException { // Prep all the sub-stores to be destroyed for(Iterator i = subStores.iterator(); i.hasNext();) { SubStore subStore = (SubStore)i.next(); subStore.prepareDestroy(); } log.deletePersistentStore(); FileSystem.destroy(storeLocation, true); } COM: <s> destroy the store </s>
funcom_train/38382475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UIDocument getCurrentDocument() { UIInternalFrame internalFrame = (UIInternalFrame) desktop.getSelectedFrame(); if (internalFrame == null) { JInternalFrame[] frames = desktop.getAllFrames(); if (frames.length > 0) { try { frames[0].setSelected(true); internalFrame = (UIInternalFrame) frames[0]; } catch (PropertyVetoException e) { return null; } } } if (internalFrame == null) return null; return internalFrame.getDocument(); } COM: <s> returns the currently selected document </s>
funcom_train/32070337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addRequestEvents(Collection<RequestEvent> requestEvents) { boolean addOk = getRequestEvents().addAll(requestEvents); if (addOk) { for(RequestEvent requestEvent : requestEvents) { requestEvent.setRequest((Request)this); } } else { if (logger.isWarnEnabled()) { logger.warn("add returned false"); } } return addOk; } COM: <s> add the passed request events collection to the request collection </s>
funcom_train/6262601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validate(Field field, boolean valid) { if (field instanceof KeywordField) { Object value = ((KeywordField) field).getActualValue(); if (value instanceof Keyword) { // field value is keyword return true; } else { // field value isn't keyword field.addError(getError()); return false; } } else { // field is not KeywordField return false; } } COM: <s> validates keyword field </s>
funcom_train/20044648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _getFormula() { boolean result = true; String formula = ""; log.println("getFormula()"); oObj.setFormula("=2+2"); formula = (String) oObj.getFormula(); result &= formula.endsWith("2+2"); tRes.tested("getFormula()", result); } // end getFormula() COM: <s> sets a formula and then gets it </s>
funcom_train/45692221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addReversePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PartWithSample_reverse_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PartWithSample_reverse_feature", "_UI_PartWithSample_type"), EsxPackage.Literals.PART_WITH_SAMPLE__REVERSE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the reverse feature </s>
funcom_train/3927278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char charAt( int charOffset ) { int line = lineNumberArray[ tokenScannerOffset ]; int lineOffset = lineOffsetArray[ tokenScannerOffset ]; if ( lineOffset < 0 ) { lineOffset += 65536; } int byteOffset = lineIdx[ line ]; return( (char)fileData[ byteOffset + lineOffset + charOffset ] ); } COM: <s> get the character at a particular offset in the current token </s>
funcom_train/3391678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printClassInfo(ClassDoc cd) { print(configuration.getText("doclet.in", Util.getTypeName(configuration, cd, false), getPackageLink(cd.containingPackage(), Util.getPackageName(cd.containingPackage()), false))); } COM: <s> print the classkind class interface exception error of the class </s>
funcom_train/41283360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void warning(String msg) { System.out.println("********* WARNING *********"); System.out.println("[" + getClass().getName()+"]:\n" + msg) ; System.out.println("***************************"); } COM: <s> emit the given string as a warning to whoever it is appropriate </s>
funcom_train/14356917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOrientation(int orientation) { if (!(orientation == HORIZONTAL || orientation == VERTICAL)) { throw new IllegalArgumentException( "orientation must be one of: " + "VERTICAL, HORIZONTAL"); } if (this.orientation != orientation) { int oldOrientation = this.orientation; this.orientation = orientation; firePropertyChange( ORIENTATION_CHANGED_KEY, oldOrientation, this.orientation); } } COM: <s> sets the orientation of the bar </s>
funcom_train/10907793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isValidPropertyName(String propertyName) { int propId = FOPropertyMapping.getPropertyId( findBasePropertyName(propertyName)); int subpropId = FOPropertyMapping.getSubPropertyId( findSubPropertyName(propertyName)); return !(propId == -1 || (subpropId == -1 && findSubPropertyName(propertyName) != null)); } COM: <s> validates a property name </s>
funcom_train/50141791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void configure(Element config) throws ConfigurationException { super.configure(config); Attribute formatAttr = config.getAttribute("format"); try { if (formatAttr != null) { format = new SimpleDateFormat(formatAttr.getValue()); } } catch (Exception e) { throw new ConfigurationException("Invalid date format: " + e); } } COM: <s> configures the date variable by reading its optional format attribute </s>
funcom_train/18336419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect(){ try{ System.out.println("dbURL: "+dbURL+", dbUser: "+dbUser+", dbPassword: "+dbPassword); connection = DriverManager.getConnection(dbURL, dbUser, dbPassword); // statement = connection.createStatement(); } catch (SQLException e){ e.printStackTrace(); } } COM: <s> connects to the database </s>
funcom_train/34627523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TexCommentScanner getTexCommentScanner() { if (commentScanner == null) { commentScanner = new TexCommentScanner(colorManager); commentScanner.setDefaultReturnToken( new Token( new TextAttribute( colorManager.getColor(ColorManager.COMMENT), null, colorManager.getStyle(ColorManager.COMMENT_STYLE)))); } return commentScanner; } COM: <s> defines a comment scanner and sets the default color for it </s>
funcom_train/12160641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handlecolorButtonChange() { // If you cancel out of the ColorButton's dialog, you // get null back, so the RGB conversion will give null. String value = Convertors.RGBToHex(colorButton.getColor()); if (value != null) { setValue(value); } } COM: <s> handles changes from the color button </s>
funcom_train/4814222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDirection() { int hunterDirection = hunter.getDirection(); for (int i = 0; i < Directional.DIRECTIONS.length; i++) { int direction = Directional.DIRECTIONS[i]; if (direction == hunterDirection) { // The hunter's direction is one of the allowed values - success return; } } fail("The hunter has an invalid direction: " + hunterDirection); } COM: <s> tests that the hunters direction is one of the allowed values </s>
funcom_train/18897394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private QuollEmailAddress makeQuollEmailAddress(Address address) { // Set address and personal name seperately if possible if (address instanceof InternetAddress) { InternetAddress internetAddress = (InternetAddress) address; QuollEmailAddress result = new QuollEmailAddress(internetAddress. getAddress()); result.setPersonalName(internetAddress.getPersonal()); return result; } else { return new QuollEmailAddress(address.toString()); } } COM: <s> make a quoll email address from a javax </s>
funcom_train/20748312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllLinks(long id) throws SamosirException { try { deleteAllLinksStmt.setLong(1, id); deleteAllLinksStmt.setLong(2, id); deleteAllLinksStmt.executeUpdate(); fireLinkRemoved(id); } catch (Exception e) { throw new SamosirException("Error deleting all links", e); } } COM: <s> delete all the links associated with this given item </s>
funcom_train/26645987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T filter(FilterItem<T> filterItem, Map<String, Object> params) { T ret; try { ret = filterItem.callNextFilter(params); } catch(RuntimeException e) { AuditMessage msg = createExceptionAuditMessage(params,e); if( msg==null ) throw e; fillAuditMessage(params,msg,null); msg.setOutcomeIndicator(AuditEvent.OutcomeIndicator.SERIOUS_FAILURE); log(msg); throw e; } AuditMessage msg = createAuditMessage(params,ret); if( msg!=null ) { fillAuditMessage(params,msg,ret); log(msg); } return ret; } COM: <s> create the filter message etc </s>
funcom_train/26336333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(String table, String field) { String cmp_tab; String cmp_fld; for (int i = 0;i<getRowCount();i++) { cmp_tab = getValueAt(i, 0).toString().trim(); cmp_fld = getValueAt(i, 1).toString().trim(); if ((table.equals(cmp_tab)) && (field.equals(cmp_fld)) ) return true; } return false; } COM: <s> returns true if field is in this model </s>
funcom_train/29792767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete() throws DataAccessException { String sql = "DELETE from Attendance WHERE ID = " + this.getClassID(); TeachingDBMS.executeSQL(sql); this.tb.deleteAllElements(this.lectures_attended); this.tb.deleteAllElements(this.practicals_attended); this.tb.deleteAllElements(this.tutorials_attended); this.tb.delete(); } COM: <s> method to delete a class member </s>
funcom_train/34983312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIdx(Integer newVal) { if ((newVal != null && this.idx != null && (newVal.compareTo(this.idx) == 0)) || (newVal == null && this.idx == null && idx_is_initialized)) { return; } this.idx = newVal; idx_is_modified = true; idx_is_initialized = true; } COM: <s> setter method for idx </s>
funcom_train/21609373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void trigger(SignalIF signal) { Class type = signal.getClass(); Vector vec = (Vector)signalTbl.get(type); if (vec == null) return; for (int i = 0; i < vec.size(); i++) { SinkIF s = (SinkIF)vec.elementAt(i); s.enqueue_lossy(signal); } } COM: <s> send the given signal to all registered sinks </s>
funcom_train/5347960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void assertInstanceof(String msg, Class expected, Object actual) { if (!instanceofCheck(expected, actual.getClass())) fail(formatComparison(INSTANCE_OF, msg, expected.getName(), actual.getClass().getName())); } COM: <s> asserts that actual is an instance of the class expected </s>
funcom_train/25212309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void execute(Switch onceMore) throws HelpingException { do { Token token = getToken(context); if (token == null) { return; } else if (observersCommand != null) { observersCommand.update(token); } try { token.visit(this, null); } catch (Exception e) { handleException(token, context, e, typesetter); } } while (onceMore.isOn()); } COM: <s> this method contains the main execution loop </s>
funcom_train/35405715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParseGnuGoBoard() throws IOException { this.testParseGnuGoBoard((short) 7); this.testParseGnuGoBoard((short) 9); this.testParseGnuGoBoard((short) 11); this.testParseGnuGoBoard((short) 13); this.testParseGnuGoBoard((short) 15); this.testParseGnuGoBoard((short) 17); this.testParseGnuGoBoard((short) 19); } COM: <s> test parse gnu go board </s>
funcom_train/43214659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testThrowExceptionIfAnyNull_Object() throws Exception { TestUtil.printTitle("AssertionUtilTest:testThrowExceptionIfAnyNull_Object"); Object o = null; try { AssertionUtil.assertNoNullValues(o); fail("Should have throw npe."); } catch (AssertionFailedException npe) { // expected } o = new Object(); AssertionUtil.assertNoNullValues(o); } COM: <s> test of throw exception if any null method of class assertion util </s>
funcom_train/12192511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addEntriesRecursive(List list) { // Recurse down to all nested groups adding their entries to the list. List groups = getGroupList(); if (groups != null) { for (int i = 0; i < groups.size(); i++) { GroupImpl group = (GroupImpl) groups.get(i); group.addEntriesRecursive(list); } } addEntries(list); } COM: <s> add the entries from this group and the nested groups to the list </s>
funcom_train/18807678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getLastMillisecond(final Calendar calendar) { final int year = this.day.getYear(); final int month = this.day.getMonth() - 1; final int day = this.day.getDayOfMonth(); calendar.set(year, month, day, this.hour, 59, 59); calendar.set(Calendar.MILLISECOND, 999); return calendar.getTime().getTime(); } COM: <s> returns the last millisecond of the hour </s>
funcom_train/20846576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addFault(String faultName) { if (isReadOnly) { Log.error("Can not add fault. Action was already added, no changes allowed!"); System.exit(0); } if (faultName == null) return false; if (faultNames == null) { faultNames = new Vector(); faultNames.addElement(faultName); return true; } if (faultNames.contains(faultName)) return false; faultNames.addElement(faultName); return true; } COM: <s> add a new fault to this action </s>
funcom_train/17656467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String profile_getFBMLJaxb(Integer userId) throws FacebookException, IOException { Object obj = this.callMethodJaxb(FacebookMethod.PROFILE_GET_FBML, new Pair<String, CharSequence>("uid", Integer.toString(userId))); return ((JAXBElement<String>)obj).getValue(); } COM: <s> see profile get fbml integer </s>
funcom_train/22206759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getTopicsByIdentity(String identity) { ArrayList ret = new ArrayList(); Iterator it = m_tm.getTopics().iterator(); while (it.hasNext()) { Topic t = (Topic) it.next(); if (t.getSubjectIndicators().contains(identity)) { ret.add(t); } } return ret; } COM: <s> returns the topic s found in the topic map with the specified identity </s>
funcom_train/19296523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setSelectedData() { int[] index = getScrollPaneTable_Nu().getIntSelectionIndex(); SymbolTable sTable = scope.getSymbolTable(this); namData = new JSCSArray("PlotResidsNames", sTable.get(nameResids) .getJSCSArray().selRowsIf(index)); residData = sTable.get(resids).getJSCNArray().selColsIf(index); } COM: <s> gets selected resids and builds matrices </s>
funcom_train/49995296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAxisRange(String type, List<Double> range, String color) { this.axisTypes.add(type); this.axisLabels.add(new ArrayList<String>()); this.axisMaxRange.add(range); this.axisColor.add(color); } COM: <s> add a label with given label range </s>
funcom_train/49331401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMotor(ThrustCurveMotor motor) { // Iterate from last to first, as this is most likely to hit early when loading files for (int i = motorSets.size() - 1; i >= 0; i--) { ThrustCurveMotorSet set = motorSets.get(i); if (set.matches(motor)) { set.addMotor(motor); return; } } ThrustCurveMotorSet newSet = new ThrustCurveMotorSet(); newSet.addMotor(motor); motorSets.add(newSet); } COM: <s> add a motor to the database </s>
funcom_train/35947202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(InputStream in) throws IOException, SAXException { try { _xmlReader.setInput(in); parseAll(); } catch (XMLStreamException e) { if (e.getNestedException() instanceof IOException) throw (IOException)e.getNestedException(); throw new SAXException(e.getMessage()); } finally { _xmlReader.reset(); } } COM: <s> parses an xml document from the specified input stream </s>
funcom_train/16915820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ServerPort getMainPort() { Iterator iterator = getServerPorts().iterator(); while (iterator.hasNext()) { ServerPort port = (ServerPort) iterator.next(); // Return only an HTTP port from the selected Service if (port.getProtocol().toLowerCase().equals("http") && port.getId().indexOf('/') < 0) return port; } return null; } COM: <s> return the port number </s>
funcom_train/5774361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getInDateShort() { if (inDateShort == null) { inDateShort = new JTextField(); inDateShort.setBounds(new java.awt.Rectangle(92,17,181,25)); inDateShort.setEditable(true); } return inDateShort; } COM: <s> this method initializes in date short </s>
funcom_train/3290988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addLocalObserver(String type,MMBaseObserver obs) { MMObjectBuilder bul=getMMObject(type); if (bul!=null) { return bul.addLocalObserver(obs); } else { log.error("addLocalObserver(): ERROR: Can't find builder : "+type); return false; } } COM: <s> adds a local observer to a specified builder </s>
funcom_train/9371711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getFloat(String property, float def) { Object value = super.get(property); if (value == null) { return def; } if (value instanceof Float) { return ((Float)value).floatValue(); } throw new TypeException(property, value, "float"); } COM: <s> returns the value of a float property or the default if the property </s>
funcom_train/1985730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSelectedFontSize() { int fontSize = 1; String fontSizeString = getFontSizeTextField().getText(); while (true) { try { fontSize = Integer.parseInt(fontSizeString); break; } catch (NumberFormatException e) { fontSizeString = (String) getFontSizeList().getSelectedValue(); getFontSizeTextField().setText(fontSizeString); } } return fontSize; } COM: <s> get the size of the selected font </s>
funcom_train/20789540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CShape contains(double x, double y) { CShape res = null; reset(); while(hasNext()) { CShape s = nextShape(); if(s.contains(x, y) != null) { if(res == null) res = s; else if(s.isAbove(res)) res = s; } } return res; } COM: <s> returns the topmost cshape containing the point x y </s>
funcom_train/17535728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSubjectData(SubjectInterface linked) { Tag t=new Tag(linked.getTagIdentifier(),linked.getIndicator1(),linked.getIndicator2()); for(int i=0;i<linked.getData().size();i++) { t.addField(linked.getData().elementAt(i)); } /** * TODO SBAGLIATO, verificare come sono i link 4-- */ String ta=t.toString(); setField("1",ta); } COM: <s> 1 one linking data </s>
funcom_train/2807221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void destroyThreadPool() { Debug.logInfo("Destroying thread pool...", module); Iterator it = pool.iterator(); while (it.hasNext()) { JobInvoker ji = (JobInvoker) it.next(); ji.stop(); } pool.clear(); } COM: <s> stops all threads in the thread pool and clears </s>
funcom_train/36828522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sQLDeleteAirport(String airportLoc) { boolean worked; System.out.println("Deleting airport"); try { Statement s = conn.createStatement(); s.executeUpdate("DELETE FROM airport" + " WHERE airportLoc = '" + airportLoc + "'"); worked = true; } catch (Exception e) { worked = false; System.err.println("Failed to delete airport: " + airportLoc); } return worked; } COM: <s> deletes the airport specified by the parameter airport loc from the database </s>
funcom_train/34282567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getMarkedOccurrences() { List list = new ArrayList(markedOccurrences.size()); for (Iterator i=markedOccurrences.iterator(); i.hasNext(); ) { HighlightInfo info = (HighlightInfo)i.next(); int start = info.getStartOffset(); int end = info.getEndOffset() + 1; // HACK DocumentRange range = new DocumentRangeImpl(start, end); list.add(range); } return list; } COM: <s> returns a list of marked occurrences in the text area </s>
funcom_train/9566582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTotalWidth(float columnWidth[]) throws DocumentException { if (columnWidth.length != getNumberOfColumns()) throw new DocumentException("Wrong number of columns."); totalWidth = 0; for (int k = 0; k < columnWidth.length; ++k) totalWidth += columnWidth[k]; setWidths(columnWidth); } COM: <s> sets the full width of the table from the absolute column width </s>
funcom_train/19107668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getSongInsertDate(Song pNodeSong) { try { String strInsertDate = pNodeSong.getElement().getAttributeValue("insertdate"); return strInsertDate == null ? null : sDateFormat.parse(strInsertDate); } catch (Exception e) { e.printStackTrace(); return null; } } COM: <s> gets the inset date </s>
funcom_train/33133696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextData put(CharBuffer cb) { final int space = cb.remaining(); final int toDrop = length > space ? space : length; int r = toDrop; for (int i = 0; r > 0; i++) { final String s = data[i]; final int l = s.length(); // length of the stirng final int c = l < r ? l : r; // bytes to copy for this string cb.put(s, 0, c); r -= c; } return this.drop(toDrop); } COM: <s> put data to character buffer </s>
funcom_train/3117032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String contentsToString() { StringBuffer sb = new StringBuffer(); sb.append(text); if (text.equals("") && (strokes != null)) { sb.append(" (sketch)"); } if (image != null) { sb.append(" (image)"); } return sb.toString(); } COM: <s> returns a string version of the contents of this piece of content </s>
funcom_train/13490774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TmpClause cloneAndRenameVarsInBody(TmpClause original) { List negLit = original.getNegativeLiterals(); List clonedNegLiterals = new ArrayList(negLit); for (ListIterator it = clonedNegLiterals.listIterator(); it.hasNext();) { it.set(cloneAndRenameVars((Fact) it.next())); } original.negativeLiterals = clonedNegLiterals; return original; } COM: <s> clone the body in a clause and rename all variables </s>
funcom_train/26531599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String extractFromPos(List<String> rawDefect, int pos) { if (pos < 0 || pos >= rawDefect.size()) return null; String result = rawDefect.get(pos); if (result == null) return null; result = result.trim(); if (result.length() == 0) return null; dataWasSuccessfullyExtractedForTheCurrentDefect = true; return result; } COM: <s> extract data from a specific clipboard column </s>
funcom_train/20238785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isMaxQuantQuantitationWithoutSign() { boolean lMaxQuantQuantitation = false; for(int i = 0;i<iRoverSources.size(); i ++){ RoverSource lRoverSource = iRoverSources.get(i); if(lRoverSource == RoverSource.MAX_QUANT_NO_SIGN){ lMaxQuantQuantitation = true; } } return lMaxQuantQuantitation; } COM: <s> is the loaded data from max quant without sign a and sign b </s>
funcom_train/28929523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getListString(List<? extends Object> list) { StringBuilder sb = new StringBuilder(); for (Object s : list) { if (s != list.get(0)) sb.append(" "); sb.append(s.toString()); } return sb.toString(); } COM: <s> list to string </s>
funcom_train/16489247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void synchronize() { int sc = list.getSelectedIndices().length; if (sc != 1) { bUp.setEnabled(false); bDown.setEnabled(false); return; } bDelete.setEnabled(sc > 0); int si = list.getSelectedIndex(); bUp.setEnabled(si > 0); bDown.setEnabled(si < (list.getModel().getSize() - 1)); // this.bDelete.setEnabled(true); } COM: <s> synchronizes the list selection and the enable disable status of the </s>
funcom_train/5618628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commit() { if (closed) { throw zxJDBC.makeException(zxJDBC.ProgrammingError, "connection is closed"); } if (!this.supportsTransactions) { return; } try { this.connection.commit(); } catch (SQLException e) { throw zxJDBC.makeException(e); } } COM: <s> commit any pending transaction to the database </s>
funcom_train/12165266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean containsReservedCharacters(String filePath) { // test for the presence of any of the reserved characters. boolean reservedCharacterFound = false; for(int currentCharacter = 0; currentCharacter < RESERVED_CHARACTERS.length && !reservedCharacterFound; currentCharacter++) { if (filePath.indexOf( RESERVED_CHARACTERS[currentCharacter]) != -1) { reservedCharacterFound = true; } } return reservedCharacterFound; } COM: <s> returns true if the supplied policy source path contains any of </s>
funcom_train/27912961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExpectedJavaScriptPrompt(String message, String input) { try { getTestingEngine().setExpectedJavaScriptPrompt( new JavascriptPrompt[] { new JavascriptPrompt(message, input) }); } catch (ExpectedJavascriptPromptException e) { fail("You previously tell that prompt with message [" + e.getPromptMessage() + "] was expected, but nothing appeared."); } } COM: <s> tell that the given prompt boxe is expected </s>
funcom_train/5308435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StatisticalLineAndShapeRenderer)) { return false; } StatisticalLineAndShapeRenderer that = (StatisticalLineAndShapeRenderer) obj; if (!PaintUtilities.equal(this.errorIndicatorPaint, that.errorIndicatorPaint)) { return false; } return super.equals(obj); } COM: <s> tests this renderer for equality with an arbitrary object </s>
funcom_train/37503763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireCombatMessage(CombatMessageEvent event) { if (listenerList == null) return; Object[] listeners = listenerList.getListenerList(); for (int i = listeners.length-2; i>=0; i-=2) { if (listeners[i]==CombatListener.class) { ((saga.event.CombatListener)listeners[i+1]).combatMessage(event); } } } COM: <s> notifies all registered listeners about the event </s>
funcom_train/12556124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private V findHelper(AVLNode<K, V> node, K k) { if (node == null) return null; if (k.compareTo(node.key) < 0) { AVLLookup.increment(); return findHelper(node.left, k); } else if(k.compareTo(node.key)>0) { AVLLookup.increment(); return findHelper(node.right, k); } else { AVLLookup.increment(); return node.value; } } COM: <s> find helper method </s>
funcom_train/25056803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void spinOffExternalEntityImports() { if (dmaArgs.doExternalEntityImport()) { externalIdImporterThreads = new DmaThreads("EE Import", externalIdFiles, ExternalEntityImporter.class.getName(), this, MAX_EXTERNAL_ENTITY_IMPORT_THREADS, true, true); externalIdImporterThreads.execute(); } } COM: <s> spin of external entity imports in multiple threads if requested in dma args </s>
funcom_train/45259948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSeparator getJSeparatorDCMutM11() { if (jSeparatorDCMutM11 == null) { jSeparatorDCMutM11 = new JSeparator(); jSeparatorDCMutM11.setLocation(new Point(270, 159)); jSeparatorDCMutM11.setOrientation(SwingConstants.VERTICAL); jSeparatorDCMutM11.setSize(new Dimension(10, 26)); } return jSeparatorDCMutM11; } COM: <s> this method initializes j separator dcmut m11 </s>
funcom_train/18113500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void disableListeners(boolean disable) { disableListeners = disable; if (!disable) { MessageEvent e = new MessageEvent( this, getMessage(getMessageCount() - 1).getField( MessageConstants.MESSAGE_ID), getMessageCount() - 1); if (messageListeners == null) { return; } for (int i = 0; i < messageListeners.size(); i++) { ((MessageListener) messageListeners.elementAt(i)).messageAdded( e); } } } COM: <s> method for disabling any message listeners temporarely </s>
funcom_train/41164835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OpenResponse2 update(OpenResponse2 entity) { EntityManagerHelper.log("updating OpenResponse2 instance", Level.INFO, null); try { OpenResponse2 result = getEntityManager().merge(entity); EntityManagerHelper.log("update successful", Level.INFO, null); return result; } catch (RuntimeException re) { EntityManagerHelper.log("update failed", Level.SEVERE, re); throw re; } } COM: <s> persist a previously saved open response2 entity and return it or a copy </s>
funcom_train/41641116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAnchorPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_UIComponent_anchor_feature"), getString("_UI_PropertyDescriptor_description", "_UI_UIComponent_anchor_feature", "_UI_UIComponent_type"), CfcuiPackage.Literals.UI_COMPONENT__ANCHOR, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the anchor feature </s>
funcom_train/10237582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFirstDeliveredTime(int threadId, int time) { int deliveryTime = Integer.MAX_VALUE; boolean found = false; for (MessageElement item : queue) { if (item.getDeliveryTime() <= time && item.getRecipient() == threadId) { deliveryTime = item.getDeliveryTime(); found = true; } } if (found) { return deliveryTime; } else { return -1; } } COM: <s> return the time instant in which the first message to a thread is </s>
funcom_train/9921688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gotoAngle(float angle) { // in future, use modulo instead of while loop??? float difference = angle - this.angle; while(difference > 180) difference = difference - 360; // shortest path to goal angle while(difference < -180) difference = difference + 360; // shortest path to goal angle rotate(difference); } COM: <s> rotates the rcx robot to point in a certain direction </s>
funcom_train/2303938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MatchResult match(EvaluationCtx context) { try { return getTarget().match(context); } catch (ProcessingException pe) { // this means that we couldn't resolve the policy ArrayList code = new ArrayList(); code.add(Status.STATUS_PROCESSING_ERROR); Status status = new Status(code, "couldn't resolve policy ref"); return new MatchResult(MatchResult.INDETERMINATE, status); } } COM: <s> given the input context sees whether or not the request matches this </s>
funcom_train/50914693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finishMakingElement(Element parent) throws RuntimeException { double[] array = this.getXMLContent(); if (array == null) { LOG.warn("plane must not be empty"); } else if (array.length != 4) { LOG.warn("plane must have 4 double components"); } } COM: <s> check plane is ok </s>
funcom_train/47739249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean acceptsTarget() { int actType = ((Activity) userObject).getActivityType(); if (actType == XPDLConstants.ACTIVITY_TYPE_EVENT_START) { return false; } else if (actType == XPDLConstants.ACTIVITY_TYPE_EVENT_END) { // if (getReferencingActivities().size() < 1) { return true; // } // return false; } return true; } COM: <s> returns code true code if activity is a valid target for transition </s>
funcom_train/50926183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMolecule(CMLMolecule molecule) { List<Node> molecules = CMLUtil.getQueryNodes(rootFragment, CMLMolecule.NS, CMLConstants.CML_XPATH); if (molecules.size() == 0) { molecule.detach(); rootFragment.insertChild(molecule, 0); } else { rootFragment.replaceChild(molecules.get(0), molecule); } } COM: <s> set first molecule child of fragment </s>
funcom_train/48389916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addRecordNavigationClickHandler(com.smartgwt.client.widgets.tableview.events.RecordNavigationClickHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.tableview.events.RecordNavigationClickEvent.getType()) == 0) setupRecordNavigationClickEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.tableview.events.RecordNavigationClickEvent.getType()); } COM: <s> add a record navigation click handler </s>
funcom_train/39788967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String addUser(String userName, String remoteHost) { String token = userManager.add(userName); if (token != null) { messageStore.post(null, "User \"" + userName + "\" has joined the chat."); Log.log(Log.ACTION_AUTH, remoteHost, userName, null); } return token; } COM: <s> adds a user </s>
funcom_train/3155427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillPresetMap() { _presetMap.put(FlhMciConstants.PRESET_PARAM_VALUE_SET[0], getL2FlhPreset()); _presetMap.put(FlhMciConstants.PRESET_PARAM_VALUE_SET[1], getL1MciPreset()); _presetMap.put(FlhMciConstants.PRESET_PARAM_VALUE_SET[2], getL2MciPreset()); } COM: <s> fills the preset map with all presets supported by the manager </s>
funcom_train/7625515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ColorStateList withAlpha(int alpha) { int[] colors = new int[mColors.length]; int len = colors.length; for (int i = 0; i < len; i++) { colors[i] = (mColors[i] & 0xFFFFFF) | (alpha << 24); } return new ColorStateList(mStateSpecs, colors); } COM: <s> creates a new color state list that has the same states and </s>
funcom_train/16086277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String get(Namespace ns, String key, Locale l) { String res = null; try { XmlRBC control = controls.get(ns.getBundlePath()); if (control != null) res = ResourceBundle.getBundle(ns.getBaseName(), locale, control).getString(key); else res = missingResourceString; } catch (MissingResourceException e) { res = missingResourceString; } return res; } COM: <s> returns i18nsed value of key in specified language </s>
funcom_train/537098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAvailableAudioDevices() { String[] devs = this.soundSystem.getAvailableAudioPlaybackDevices(); for (String dev : devs) { assertNotNull(dev); LOG.info("Audio Playback Device: " + dev); } assertTrue( "This is a music playing program. Please run these tests on a music playing capable computer!", devs != null && devs.length > 0); } COM: <s> tests that we can list the audio devices </s>
funcom_train/3284730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean usrMayJoin (User u) { if (u==null) return false; if (!hasState(OPEN) && !u.hasRight (IUserStates.MAY_JOIN_LOCKED_GROUP) && !susers.contains (u)) return false; String uname = u.getName().toLowerCase(); if (banList != null && banList.contains(uname)) return false; return true; } COM: <s> check if the given user may join this group </s>
funcom_train/21637384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean findByEmailOrName(String email, String name) { Session session = HibernateUtil.getSession(); Criteria criteria = session.createCriteria(User.class); LogicalExpression expression = Expression.or(Expression.like("email", email), Expression.like("name", name)); List users = criteria.add(expression).list(); return (users.size() > 0); } COM: <s> finds user in database by e mail or name </s>
funcom_train/12901101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Button createButton(Composite parent, int id, String label, boolean defaultButton) { Button b = super.createButton(parent, id, label, defaultButton); if (id == IDialogConstants.OK_ID) { fOKButton = b; validateInput(); // Now safe to validate input } return b; } COM: <s> override so that we know the ok button </s>
funcom_train/45469352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Match getPatternByEngine(final String engine) { for (int i = 0; i < _patterns.size(); i++) { Match match = (Match) _patterns.get(i); if (match.getEngine() == null) { if (engine == null) { return match; } } else if (match.getEngine().equals(engine)) { return match; } } return null; } COM: <s> get expected result pattern of given database engine </s>
funcom_train/8343440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedNodes(final BaseDefaultMutableTreeNode... nodes) { TreeSelectionModel selmodel = theTree.getSelectionModel(); selmodel.clearSelection(); TreePath[] paths = new TreePath[nodes.length]; for (int loop = 0; loop < nodes.length; loop++) { paths[loop] = new TreePath(nodes[loop].getPath()); } selmodel.setSelectionPaths(paths); } COM: <s> set the current tree selection to be those nodes passed in </s>
funcom_train/2023050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addKeyListener(KeyListener listener) { // make sure it's not on the list removeKeyListener(listener); // add it textDriver.addKeyListener(listener); textUrl.addKeyListener(listener); textInitialDatabase.addKeyListener(listener); textUser.addKeyListener(listener); textPassword.addKeyListener(listener); textExcludes.addKeyListener(listener); } COM: <s> adds the keylistener for the buttons </s>
funcom_train/23777878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel layoutDuration() { JPanel jPanelDuration = new JPanel(); jPanelDuration.add(new JLabel("Duration Of Flight")); jTextFieldFlightTotal.setPreferredSize(new Dimension(40, 19)); jPanelDuration.add(jTextFieldFlightTotal); return jPanelDuration; } COM: <s> create a panel with duration of flight information </s>
funcom_train/16857521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPersonne (String nom,String prenom, String numTelF, String numTelM, String email, String adresse, String fax){ Objectify ofy = ObjectifyService.begin(); ContactComplet c = new ContactComplet(); c.setNom(nom); c.setPrenom(prenom); c.setAdresse(adresse); c.setEmail(email); c.setNumTelF(numTelF); c.setNumTelM(numTelM); c.setFax(fax); ofy.put(c); } COM: <s> adds a person to the db </s>
funcom_train/19356045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDefaultPrefix() { for (String prefix : prefixNamespaceMap.keySet()){ if (!prefix.equals("")){ // if the default has a blank entry then skip it final String ns = prefixNamespaceMap.get(prefix); if (ns.equals(defaultNamespace)){ return prefix; } } } return ""; } COM: <s> search for a prefix other than for the default namespace </s>
funcom_train/10873878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRange(final long min, final long max, final int shift) { final BytesRef minBytes = new BytesRef(BUF_SIZE_LONG), maxBytes = new BytesRef(BUF_SIZE_LONG); longToPrefixCoded(min, shift, minBytes); longToPrefixCoded(max, shift, maxBytes); addRange(minBytes, maxBytes); } COM: <s> overwrite this method if you like to receive the raw long range bounds </s>
funcom_train/4557808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLoginInvalidPassword() { repEng.newStep("291", "Login-Login with invalid password"); //1. Launch http://hobbes.ontometrics.com/magnetportal/ //2. Click the Manage You Assets link. //3. Click the Publish Magnet link in the Albums/Tracks page. //4. Click the cart icon. //5. Click Login button. //6. Fill in the valid User Name and invalid password. //7. Click Login button. // Login failed. } COM: <s> 291 login login with invalid password </s>
funcom_train/18098013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLayer() { Item parentItem = this.parent; int layer = 0; while (parentItem != null) { while (! (parentItem instanceof CommandItem) ) { //System.out.println("getLayer - skipping parent " + parentItem ); parentItem = parentItem.parent; if (parentItem == null) { //System.out.println("getLayer - returning because of null parent "); return layer; } } if (parentItem == null) { return layer; } parentItem = parentItem.parent; layer++; } return layer; } COM: <s> retrieves the layer to which this command item belongs </s>
funcom_train/15577262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedFiles(MediaFile[] selectedFiles) { try { listListener.disableNotification = true; this.imageList.setSelectedIndices(new int[0]); if (selectedFiles != null) { for (int i=0; i<selectedFiles.length; ++i) { this.imageList.setSelectedValue(selectedFiles[i], true); } } } finally { listListener.disableNotification = false; } } COM: <s> set the files in the list that are selected </s>
funcom_train/22285749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long tick(long tm, Object arg) { switch (pressed) { case LEFT: scrollToLeft(); break; case RIGHT: scrollToRight(); break; } if (scrollPos == 0 || scrollPos == getMaxScrollPos()) { return -1; } return (scrollSpeed <= 0) ? -1 : System.currentTimeMillis() + Math.max(50, 1000/scrollSpeed); } COM: <s> auto repeat scrolling this is called by the master timer </s>
funcom_train/1549971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set entrySet() { CompositeSet<Map.Entry<K, V>> entries = new CompositeSet<Map.Entry<K, V>>(); for (int i = this.composite.length - 1; i >= 0; --i) { entries.addComposited(this.composite[i].entrySet()); } return entries; } COM: <s> returns a set view of the mappings contained in this map </s>
funcom_train/45334126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logHL7MessageError(Logger log, Message message, String description) { if (mesaLogger != null) { // Just log the description mesaLogger.writeString(description); } else { // Log the description and the HL7 message itself log.error(description); try { log.error(PipeParser.encode(message, new EncodingCharacters('|', "^~\\&"))); } catch (HL7Exception e) { log.error("Error reporting HL7 error", e); } } } COM: <s> logs an hl7 message and description to the error log </s>
funcom_train/45558297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addClientReferencePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_OwlsAssignOutputClient_clientReference_feature"), getString("_UI_PropertyDescriptor_description", "_UI_OwlsAssignOutputClient_clientReference_feature", "_UI_OwlsAssignOutputClient_type"), OwlsPackage.Literals.OWLS_ASSIGN_OUTPUT_CLIENT__CLIENT_REFERENCE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the client reference feature </s>
funcom_train/22791381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init() { //pack(); java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); setBounds((screenSize.width-getWidth())/2, (screenSize.height-getHeight())/2, getWidth(), getHeight()); } COM: <s> initialization by a child </s>
funcom_train/869246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SimpleLink getArcroleRef(String uri) throws XBRLException { List<SimpleLink> refs = getArcroleRefs(); for (SimpleLink ref: refs) { if (ref.getDataRootElement().getAttribute("arcroleURI").equals(uri)) return ref; } throw new XBRLException("The required arcroleRef is not part of the linkbase."); } COM: <s> retrieve an arcrole ref from a linkbase </s>
funcom_train/46379269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void darkstarStarted() { // save the current WFS URL try { saveWFSName(currentWFSName, LAST_WFS_FILE); } catch (IOException ioe) { logger.log(Level.WARNING, "Error saving WFS URL", ioe); } super.setStatus(Status.RUNNING); } COM: <s> called when darkstar starts up </s>
funcom_train/5509902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void uniqify() { EntityList newParts = new EntityList("PathSet"); // // Remove duplicates, but preserve order.. // HashSet set = new HashSet(); for (Iterator i = super.iterator(); i.hasNext();) { PathPart part = (PathPart) i.next(); if (!set.contains(part)) { newParts.add(part); set.add(part); } else Logger.getLogger().debug("Drop duplicate: " + part); } clear(); addAll(newParts); } COM: <s> make a unqiue set of contents removing duplicates </s>
funcom_train/13205389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String export(ComplexExpression expression) { StringBuilder buffer = new StringBuilder(); Iterator<Expression> it = expression.getSubexpressions().iterator(); if (expression.getOperator() == Operator.NOT) { buffer.append("naf "); } while (it.hasNext()) { buffer.append(export(it.next())); if (it.hasNext()) { buffer.append(" "); buffer.append(expression.getOperator()); buffer.append(" \n\t\t\t\t"); } } return buffer.toString(); } COM: <s> exports a complex expression to its stringrepresentaion in wsml </s>