__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/19051388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeStyleSheet(WWEStyleSheet ss) { synchronized(this) { if (linkedStyleSheets != null) { int index = linkedStyleSheets.indexOf(ss); if (index != -1) { linkedStyleSheets.removeElementAt(index); unlinkStyleSheet(ss, index); if (index == 0 && linkedStyleSheets.size() == 0) { linkedStyleSheets = null; } } } } } COM: <s> removes the style sheet code ss code from those of the receiver </s>
funcom_train/43557849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean tryUpdatingStats(int recordId, byte[] data) throws IOException { boolean result = true; ByteArrayInputStream bin = new ByteArrayInputStream(data); DataInputStream din = new DataInputStream(bin); // check if saved entry is the same as current entry by comparing hash values if (din.readLong()!=getHash()) { result = false; } else { statistics = new Statistics(din); setRecordId(recordId); } din.close(); return result; } COM: <s> overwrites statistics of current entry with given data </s>
funcom_train/3447334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLinkShaper(LinkShaper shaper) { if (shaper == linkShaper) return; if (linkShaper != null) { linkShaper.init(null, null); } LinkShaper old = linkShaper; linkShaper = shaper; if (linkShaper != null) { linkShaper.init(this, nodeShapes); } firePropertyChange(PROPERTY_LINK_SHAPER, old, shaper); invalidate(); } COM: <s> sets the link shaper </s>
funcom_train/38509511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OID getListOID( String listName ) throws DBException { // navigate the classCriteria, then the method criteria. Recall // a method criteria requires two entries, the first being the // method name, then the value. return odb.findUniqueOID( new String[] { "tgibson.odb.examples.TWO.AddressListTwo" , "getListName" , listName } ); } COM: <s> given a list name return its oid or null if no such list </s>
funcom_train/18738267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testVerifyOrderOfProcessingIrrelevant1() { File testBase = new File(baseDir, "TestA"); runSourceAndBinaryTestcase(testBase, new String[] { "Z.java", "B.java" }, new String[] { "AspectAB.aj" }, false); // runClass("B"); } COM: <s> check the order doesnt make a difference </s>
funcom_train/10509853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireBuildFinished(Throwable exception) { BuildEvent event = new BuildEvent(this); event.setException(exception); BuildListener[] currListeners = listeners; for (int i = 0; i < currListeners.length; i++) { currListeners[i].buildFinished(event); } // Inform IH to clear the cache IntrospectionHelper.clearCache(); } COM: <s> send a quot build finished quot event to the build listeners </s>
funcom_train/7904063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setActiveTrack(long trackId){ // to be sure that no tracking will be in progress when we set a new track stopActiveTrack(); // set the track active ContentValues values = new ContentValues(); values.put(Schema.COL_ACTIVE, Schema.VAL_TRACK_ACTIVE); getContentResolver().update(TrackContentProvider.CONTENT_URI_TRACK, values, Schema.COL_ID + " = ?", new String[] {Long.toString(trackId)}); } COM: <s> sets the active track </s>
funcom_train/31406928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setVarietyCount() { // count number of ignores int cnt = 0; for (int i = 0; i < _set.length(); i++) { if (_set.charAt(i) == '.') cnt++; } _varietyCount = new Integer(_setCharacters.size() - cnt); } COM: <s> compute and set the value of variety count </s>
funcom_train/31816472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void popupAtCenterOfScreen() { // get the dimension of the screen Dimension d = getToolkit().getScreenSize(); // get the size of this window Dimension s = getSize(); int x = (int)(d.getWidth() - s.getWidth()) / 2; int y = (int)(d.getHeight() - s.getHeight()) / 2; // center in the screen this.setLocation(x,y); } COM: <s> centers this window in the screen </s>
funcom_train/32748560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disseminateVisitor(IProxyVisitor iVisitor) throws GenerationException { this.processVisitor(iVisitor); Iterator iterChild = this.childIterator(); while (iterChild.hasNext()) { ProxyNode pxyChild = (ProxyNode)iterChild.next(); pxyChild.disseminateVisitor(iVisitor); } } COM: <s> distributes the visitor object argument implementing the code </s>
funcom_train/38429440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayCard(Card card, Set set) { ImageIcon cardImage = card.getImageIcon(set); jLabelCardImage.setIcon(cardImage); cardDetail.setCard(card); cardDetail.setCardImage(cardImage); displayedCard = card; } //displayCard(Card, Set) COM: <s> display a card from disk </s>
funcom_train/47731741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadConfiguration() { // Load our initial dimensions from the configuration file WIDTH_BASE = 140; HEIGHT_BASE = 60; // Spacing factors between the nodes XSPACING_BASE = 4; YSPACING_BASE = 10; // Zoom level setZoomLevel(Double.parseDouble(Configuration.getByKey("environment/zoomLevelDefaultPercent").get(1).toString()) / 100); } COM: <s> reload attributes from the configuration database </s>
funcom_train/32740984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataDefinition getDataDefinition(String typeName) { // step 0 - reset common fields errorReaders = new HashMap<String, BufferedReader>(); // step 1 - parse the MDD URL u = getDataDefinitionURL(typeName, "mdd"); MDDParser parser = parse(typeName, u, false); return buildDataDefinition(typeName, u, parser, true, false); } COM: <s> gets the data definition for a given mdd type </s>
funcom_train/39367116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getIntArray(String key, int values[]) { PropertyDescription property = getTraceProperty(key); setBufferPosition(property); int count = property.getCount(); for(int i = 0; i < count; i++) { values[i] = _buffer.getInt(); } } COM: <s> gets a trace property value as an integer array </s>
funcom_train/4223525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteAllRecordsFromMainTables(Statement subStatment) throws SQLException, RepException { for (int i = subRepTables.size() - 1; i >= 0; i--) { RepTable repTable = (RepTable) subRepTables.get(i); subStatment.execute("delete from " + repTable.getSchemaQualifiedName()); } } COM: <s> delete records from all main tables </s>
funcom_train/3173577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Property getPropertyAt(int x, int y) { // calc path to node under mouse TreePath path = super.getPathForLocation(x, y); if ((path==null) || (path.getPathCount()==0)) return null; // done return (Property)path.getLastPathComponent(); } COM: <s> resolve property for location </s>
funcom_train/49789972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOperationCall() throws Exception { beginAtSitemapThenPage("Home"); String field = getLabelIDForText("target field"); assertLabeledFieldEquals(field, ""); // click the button assertButtonPresentWithText("do operation call"); clickButtonWithText("do operation call"); assertNoProblem(); // the value should have changed assertLabeledFieldEquals(field, "new value"); } COM: <s> we can execute an operation call </s>
funcom_train/6274684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean crosses(Span s) { int sstart = s.getStart(); //either s's start is in this or this' start is in s return !this.contains(s) && !s.contains(this) && (getStart() <= sstart && sstart < getEnd() || sstart <= getStart() && getStart() < s.getEnd()); } COM: <s> returns true is the specified span crosses this span </s>
funcom_train/2929204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkContraintsForAllElements (MetaEnvironment e, boolean secondTime) { List<Element> allElements = getAllElements (e); checkUniqueUIDs (allElements); checkUniqueQualifiedNames (allElements); Iterator<Element> it = allElements.iterator (); while (it.hasNext ()) { Element element = it.next (); checkContraints (element, secondTime); } } COM: <s> no event after constraintcheck for all elements is fired </s>
funcom_train/10514874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() throws BuildException { LocalProperties localProperties = LocalProperties.get(getProject()); localProperties.enterScope(); try { for (Iterator i = nestedTasks.iterator(); i.hasNext();) { Task nestedTask = (Task) i.next(); nestedTask.perform(); } } finally { localProperties.exitScope(); } } COM: <s> execute all nested tasks </s>
funcom_train/251807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFailsIfNoRequestConnectionFactoryIsSupplied(){ File file = new File( "src/test/java/com/ewansilver/raindrop/nio/handlers/missingRequestConnectionFactory.xml"); assertTrue(file.exists()); try { Raindrop raindrop = new Raindrop(file); fail("Should not have been able to reach this point."); } catch (StartupException e) { /* * We want to be here becuase we have not specified a * RequestConnectionFactory class to instantiate. */ } } COM: <s> ensure that if no request connection factory is supplied then the handler </s>
funcom_train/22222611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void PanSW( int percentage ) { double deltaX = (this.getWidth() * (double)percentage / 100.0f); double deltaY = (this.getHeight() * (double)percentage / 100.0f); this.minY -= deltaY; this.maxY -= deltaY; this.minX -= deltaX; this.maxX -= deltaX; } COM: <s> implements pan sw method </s>
funcom_train/33859928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getClodesFormTextField() { if (closedFormTextField == null) { closedFormTextField = new JTextField(); closedFormTextField.setBackground(new Color(255, 255, 102)); closedFormTextField.setHorizontalAlignment(JTextField.LEFT); closedFormTextField.setEditable(true); closedFormTextField.setFont(new Font("Serif", Font.BOLD, 14)); closedFormTextField.setText(""); } return closedFormTextField; } COM: <s> this method initializes clodes form text field </s>
funcom_train/43188968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Format connectTo(InputConnector inputConnector, Format useThisFormat) { Format format=canConnectTo(inputConnector,useThisFormat); // if (format==null) // return null; this.inputConnector=inputConnector; inputConnector.setOutputConnector(this); int bufferSize=Math.max(getSize(),inputConnector.getSize()); circularBuffer = new CircularBuffer(bufferSize); inputConnector.setCircularBuffer(circularBuffer); return null; } COM: <s> connects an input connector to this output connector </s>
funcom_train/10357639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateAddressSpec(TokenStream tokens) throws AddressException { // all addresses, even the simple ones, must have at least a local part. validateLocalPart(tokens); // now see if we have a domain portion to look at. AddressToken token = tokens.nextRealToken(); if (token.type == AT_SIGN) { validateDomain(tokens); } else { // put this back for termination tokens.pushToken(token); } } COM: <s> validate the addr spec portion of an address </s>
funcom_train/13750214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSpeed(int speed) throws OneWireIOException, OneWireException { try { //synchronized (conn) { // send startBreak command getDataOutputStream().writeByte(CMD_SETSPEED); // followed by the speed getDataOutputStream().writeInt(speed); getDataOutputStream().flush(); // check return value for success checkReturnValue(); //} } catch (IOException ioe) { throw new OneWireException(COMM_FAILED + ioe.getMessage()); } } COM: <s> sets the new speed of data transfer on the 1 wire network </s>
funcom_train/2022824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { String action; action = e.getActionCommand(); if (action.equals(ACTION_LOAD)) loadFile(); else if (action.equals(ACTION_SEARCH)) search(); else if (action.equals(ACTION_UNFOLD)) clear(); else if (action.equals(ACTION_GOTO)) gotoLine(); } COM: <s> invoked when an action occurs </s>
funcom_train/24089914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearJcr() { log.info("StorageBackingBean clearJcr()"); try { JcrDigitalObjectManagerImpl dodm = (JcrDigitalObjectManagerImpl) JcrDigitalObjectManagerImpl.getInstance(); log.info("StorageBackingBean clearJcr() remove all."); dodm.removeAll(); this.loadTree(); } catch (Exception e) { log.info("StorageBackingBean clearJcr() error: " + e.getMessage()); } } COM: <s> removes all jcr registry entries </s>
funcom_train/43384759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveConfig(Configuration config, String fileName, String fileEnd) { FileOutputStream fos = null; try { fos = new FileOutputStream(makeFileName(fileName, fileEnd)); ObjectOutputStream oos = new ObjectOutputStream(fos); oos.writeObject(config); oos.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } COM: <s> saves the actual code configuration code </s>
funcom_train/14227008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadCapabilities(String resName) { // If this fails, the Capabilities object will be left null, which will signal getProvider() to throw // an exception. Properties props = new Properties(); try { props.load(this.getClass().getResourceAsStream(resName)); this.setCapabilities(props); } catch (IOException ioe) { // don't set capabilities then... return; } } COM: <s> this method sets the providers capabilities values from a named property file </s>
funcom_train/16527787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createTitlePanel(){ String labelValue = "<html><body>" + "<p style='font-size:16;font-weight:bold;text-align:left;'>" + "Challenge Question" + "</body></html>"; JPanel titlePanel = new JPanel(); titlePanel.setLayout(new BorderLayout(0,0)); titlePanel.add(new JLabel(labelValue), BorderLayout.CENTER); return titlePanel; } COM: <s> creates the challenge question title panel </s>
funcom_train/4780330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AccessRule addAccessRuleForUser(Path path, String userName, String level) throws AppException { if (path == null) { throw new ValidatorException("application.error.pathmissing"); } Validator.validateUserName(userName); Validator.validateLevelOfAccess(level); User user = addUser(userName); setUnsavedChanges(); return addAccessRuleForUser(path, user, level); } COM: <s> adds a new access rule specifying user authorization </s>
funcom_train/37072012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readGenes(Reader reader) { checkStatus(); try { XMLReader parser = constructParser(); Log.getLogger(this.getClass()).debug("Now parsing"); parser.parse(new InputSource(reader)); } catch (SAXException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RuntimeException(e); } } COM: <s> processes a reader and populates our collection with any </s>
funcom_train/24628861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Context getContext(Graphics2D g, Toolkit tk, Context enclosing) { if (cx_==null) cx_ = createContext(tk); cx_.styleSheet = this; g.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING, java.awt.RenderingHints.VALUE_ANTIALIAS_ON); // default on for splash on OS X cx_.g = g; if (enclosing!=null) { cx_.signal = enclosing.signal; cx_.base_ = enclosing.base_; } return cx_; } COM: <s> return context matched to this style sheets context listeners </s>
funcom_train/19316727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRegionName(final FObj fobj) { final PdRegionName property = (PdRegionName) getProperty( FoProperty.REGION_NAME); if (property != null) { return property.getValue(); } if (fobj instanceof Region) { return ((Region) fobj).getDefaultRegionName(); } return null; } COM: <s> returns the region name property </s>
funcom_train/175288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setKeepAliveTime(long time, TimeUnit unit) { if (time < 0) throw new IllegalArgumentException(); if (time == 0 && allowsCoreThreadTimeOut()) throw new IllegalArgumentException("Core threads must have nonzero keep alive times"); this.keepAliveTime = unit.toNanos(time); } COM: <s> sets the time limit for which threads may remain idle before </s>
funcom_train/44790239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void marshall(Writer writer) { try { JAXBContext context = JAXBContext.newInstance(StyleLibrary.class, NamedStyle.class); Marshaller m = context.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); m.marshal(this, writer); } catch (JAXBException e) { e.printStackTrace(); } } COM: <s> save the library using the given writer </s>
funcom_train/50222835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getAtomicConnectors(Object modelSource) { Set ret = new HashSet(); ret.add(new AtomicConnectorDescriptor(FSMConstants.inConnectorName, AtomicConnectorDescriptor.directionInput, Object.class)); ret.add(new AtomicConnectorDescriptor(FSMConstants.outConnectorName, AtomicConnectorDescriptor.directionOutput, Object.class)); return ret; } COM: <s> harel state machines are always embedded into another formalism and have a </s>
funcom_train/40221811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean undo(ks.common.games.Solitaire game) { // VALIDATE: if (to.count() < numCards) return false; // We know the number of cards moved, so we select them, extract the // stack, and move them all back to the fromPile. to.select (numCards); Stack st = to.getSelected (); from.push (st); return true; } COM: <s> undo of a move column move </s>
funcom_train/7507626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean collectedAll() { EnumSet<CipherTextFlags> ctFlags = null; if ( requiresIV() ) { ctFlags = allCtFlags; } else { EnumSet<CipherTextFlags> initVector = EnumSet.of(CipherTextFlags.INITVECTOR); ctFlags = EnumSet.complementOf(initVector); } boolean result = progress.containsAll(ctFlags); return result; } COM: <s> return true if weve collected all the required pieces otherwise false </s>
funcom_train/31905199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void topTextChanged(String text) throws DOMException { text = "rect(" + text + ", " + getValue().getRight().getCssText() + ", " + getValue().getBottom().getCssText() + ", " + getValue().getLeft().getCssText() + ")"; textChanged(text); } COM: <s> called when the top value text has changed </s>
funcom_train/8358746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createInputPanel() { numericInputPanel = new NumericInputPanel(false, true, AbstractForm.createImageIcon("coins100.png")); numericInputPanel.addNumberInputListener(new NumericInputListener() { @Override public void numberChanged(double newNumber) { updateClientMoneyAndChange(numericInputPanel.getDecimalInput(), newNumber); } }); this.add(numericInputPanel, "wrap"); } COM: <s> creating panel with number input buttons clear buttons and image </s>
funcom_train/4558040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLetCaptchaWithValidData() { repEng.newStep("430", "Input valid data into Solve the operation below"); //1. Launch http://hobbes.ontometrics.com/magnetportal/ actionset.launchBrowserIfNeed(); action.logoutIfLogged(); //2. Goto Register page //3. Fill in this page with valid data //4. Click Register button //Should register user successfully. check.difficultToImplement("Impossible to check capthca, it was disabled"); } COM: <s> 430 register input valid data into solve the operation below </s>
funcom_train/10766416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QName getTypeName() { String typename = null; switch (getKind()) { case MESSAGE: typename = getAttribute("messageType", null); break; case SCHEMA: typename = getAttribute("type", null); break; case ELEMENT: typename = getAttribute("element", null); } if (typename == null) return null; return getNamespaceContext().derefQName(typename); } COM: <s> get the type name of this variable </s>
funcom_train/36660611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetObjectTimeoutNoReap() throws Exception { server.prepareAndCommit(tid); server.shutdown(); props.setProperty(DataStoreNetPackage + ".server.reap.delay", "10000"); server = getDataStoreServer(); tid = server.createTransaction(100); server.setBinding(tid, "dummy", oid); Thread.sleep(200); try { server.getBinding(tid, "dummy"); fail("Expected TransactionTimeoutException"); } catch (TransactionTimeoutException e) { System.err.println(e); } } COM: <s> test that the standard transaction timeout gets applied without the </s>
funcom_train/8805866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void performTypeSetup(ASTypeDeclaration type) { ASPackageDeclaration pkg = ((ASCompilationUnit) type.getParent()).getPackageDeclaration(); File dir = packageDirs.get(pkg); currentFile = new File(dir, type.getName().getName().toString() + ".hx"); try { currentFile.createNewFile(); } catch (IOException e) { // TODO do something } currentBuffer = new StringBuffer(); currentLinePosition = 0; } COM: <s> performs the necessary type setup </s>
funcom_train/947796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int submitBid(String pBidURL, Map pBidData,BidOptn pBidOpt) { BidSubmit lBid=new BidSubmit(); int lRetCde=lBid.submit(pBidURL,pBidData); if(lRetCde!=0){ System.out.println("Bid Submit for the project was unsuccesful."); } else{ pBidOpt.setProjBidMnth(); } return lRetCde; } COM: <s> description calls bid submit submit with all bid data </s>
funcom_train/24569640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setResult(ValidationResult newResult) { checkNotNull(newResult, "The new result must not be null."); if (newResult == pendingValue) { return; } if (hasPendingChange()) { timer.stop(); } pendingValue = newResult; timer.start(); } COM: <s> sets the given new value after this models delay </s>
funcom_train/13957214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exclude(ERXKey... keys) { for (ERXKey key : keys) { String keyPath = key.key(); int dotIndex = keyPath.indexOf('.'); if (dotIndex == -1) { _excludes.addObject(key); _includes.removeObjectForKey(key); } else { ERXKeyFilter subFilter = include(new ERXKey(keyPath.substring(0, dotIndex))); subFilter.exclude(new ERXKey(keyPath.substring(dotIndex + 1))); } } } COM: <s> excludes the given keys from this filter </s>
funcom_train/25705404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exitSave() throws StorageException { final List<FrostUploadItem> itemList = getItems(); try { FrostFilesStorage.inst().saveUploadFiles(itemList); } catch (final Throwable e) { logger.log(Level.SEVERE, "Error saving upload items", e); throw new StorageException("Error saving upload items"); } } COM: <s> saves the upload model to database </s>
funcom_train/8079038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (m_Instances == null) { return "No model built yet."; } try { StringBuffer text = new StringBuffer("Prototype Model"); for (int i = 0; i < m_Instances.numClasses(); i++) { text.append("\n\nClass " + m_Instances.classAttribute().value(i)); text.append(m_Prototypes[i]); } return text.toString(); } catch (Exception e) { return "Can't print Prototype classifier!"; } } COM: <s> returns a description of the classifier </s>
funcom_train/35322126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private E unlinkFirst(Node<E> f) { // assert f == first && f != null; final E element = f.item; final Node<E> next = f.next; f.item = null; f.next = null; // help GC first = next; if (next == null) last = null; else next.prev = null; size--; modCount++; return element; } COM: <s> unlinks non null first node f </s>
funcom_train/47839975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createComboTo() { GridData gridData4 = new GridData(); gridData4.widthHint = 70; comboTo = new Combo(top, SWT.NONE); comboTo.setLayoutData(gridData4); comboToViewer = new ComboViewer(comboTo); comboToViewer.setContentProvider(new AccountContentProvider()); comboToViewer.setLabelProvider(new AccountLabelProvider()); comboToViewer.setInput(Model.getInstance().getAccountRepository()); } COM: <s> this method initializes combo account </s>
funcom_train/1378101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getResourceValue(ResourceFacade resource) { if(resourceManager.isEmpty(resource)){ return null; } String resourceValue; try { InputStream resourceIS = resourceManager.getStream(resource); resourceValue = IOUtils.toString(resourceIS); } catch (Exception e) { LOG.error(e); resourceValue = null; } return resourceValue; } COM: <s> builds and returns the given resource value as a string </s>
funcom_train/28754439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHybstoptime(String newVal) { if ((newVal != null && this.hybstoptime != null && (newVal.compareTo(this.hybstoptime) == 0)) || (newVal == null && this.hybstoptime == null && hybstoptime_is_initialized)) { return; } this.hybstoptime = newVal; hybstoptime_is_modified = true; hybstoptime_is_initialized = true; } COM: <s> setter method for hybstoptime </s>
funcom_train/16937847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finishRequest() throws IOException { // If neither a reader or an is have been opened, do it to consume // request bytes, if any if ((reader == null) && (stream == null) && (getContentLength() != 0) && (getProtocol() != null) && (getProtocol().equals("HTTP/1.1"))) getInputStream(); super.finishRequest(); } COM: <s> perform whatever actions are required to flush and close the input </s>
funcom_train/39562828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTypeUri(OclAny a) { /** @todo implement this method for all metamodels */ Object object = Ocl.reconvert(null, a); if (object instanceof ServiceProfile) { return ( (ServiceProfile) object).getId(); } throw new OclException("This object does not have an type URI."); } COM: <s> gets a uri string representation of the type of a ocl any object </s>
funcom_train/32867516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void focusGained(FocusEvent fe) { if( fe.getComponent() instanceof Button ) { //Save the text of the button with the focus msButtonWithFocus = ((Button)fe.getComponent()).getLabel(); } else { // don't let focus stay on txtChatHistory // (only object with focus listener enabled) txtChatHistory.transferFocus(); } } COM: <s> focus listener requires focus gained and focus lost </s>
funcom_train/20109875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testContextFor_PassesContextAndRequestToConfigurator() { SakaiServiceContext context = factory.contextFor(portletRqst); assertSame(context, factory.getLastConfigureContextCall_ContextArg()); assertSame(portletRqst, factory.getLastConfigureContextCall_RequestArg()); } COM: <s> verifies that the factory passes the sakai service context </s>
funcom_train/47358599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isBiggerThan(FractionFunction other) { if(rootNode.equals(other.rootNode) == false) throw new IllegalArgumentException("Cannot compare functions with different roots"); Iterator<String> it = stateSpace.stateIterator(rootNode); while(it.hasNext()) { String s = it.next(); if(other.values.get(s).isPossiblyGreaterOrEqual(this.values.get(s))) return false; } return !other.belowFraction.isPossiblyGreaterOrEqual(this.belowFraction); } COM: <s> tests if this fraction function is guaranteed bigger than the argument </s>
funcom_train/44157995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MappingEntry getRemote(Serializable remoteKey) { if (remoteKey == null) { throw new IllegalArgumentException("Remote Key is null"); } MappingEntry found = null; for (MappingEntry entry : m_entries.values()) { if (entry.getRemoteKey() == null) { // Probably a legitimate case if it's new in the local db. continue; } if (remoteKey.equals(entry.getRemoteKey().getKey())) { found = entry; break; } } return found; } COM: <s> get an entry by remote key </s>
funcom_train/21335748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertMessageNotSended(int clientUID, Class clazz) { Set<Object> sendedMessages = messagesSendedToClietns.get(clientUID); if (sendedMessages == null) { return; } for (Object sMessage : sendedMessages) { if (clazz.equals(sMessage.getClass())) { fail("There are some wrong message that sended to client. Message class: " + clazz); } } } COM: <s> validate that no this class messages was sended </s>
funcom_train/9558556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String toString(Reader reader) throws RuntimeException { try { // Buffer if not already buffered reader = reader instanceof BufferedReader ? (BufferedReader) reader : new BufferedReader(reader); StringBuffer output = new StringBuffer(); while (true) { int c = reader.read(); if (c == -1) break; output.append((char) c); } return output.toString(); } catch (IOException ex) { throw new RuntimeException(ex); } finally { close(reader); } } COM: <s> use a bufferred reader to extract the contents of the given reader </s>
funcom_train/40312125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetColumnLabel_InvalidColumn3() { try { ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry); resMetaData.getColumnLabel(10); fail("SQLException is expected."); } catch(SQLException e) { //ensure the SQLException is thrown by getColumnLabel method. assertEquals("The sqlstate mismatches", "22003", e.getSQLState()); } } COM: <s> tests get column label with column index larger than the number of column </s>
funcom_train/50499456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void show(Container parent, String name) { synchronized (parent.getTreeLock()) { checkLayout(parent); Component next = (Component)tab.get(name); if ((next != null) && !next.visible){ int ncomponents = parent.getComponentCount(); for (int i = 0 ; i < ncomponents ; i++) { Component comp = parent.getComponent(i); if (comp.visible) { comp.hide(); break; } } next.show(); parent.validate(); } } } COM: <s> flips to the component that was added to this layout with the </s>
funcom_train/46759775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RefTreeModel getRefTree(final long refTreeId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return ReferenceData.getRefTree(refTreeId, chain, call); }}; return (RefTreeModel) call(method, call); } COM: <s> same transaction return the single ref tree model for the primary key </s>
funcom_train/12670973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetEat() { System.out.println("setEat"); int eat = 0; AntImpl instance = new AntImpl(); instance.setEat(eat); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set eat method of class engine </s>
funcom_train/41990562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double toRoll() { // This is a test for singularities double test = x*y + z*w; // Special case for north pole if (test > SINGULARITY_NORTH_POLE) return 0; // Special case for south pole if (test < SINGULARITY_SOUTH_POLE) return 0; return Math.atan2( 2*x*w - 2*y*z, 1 - 2*x*x - 2*z*z ); } COM: <s> returns the roll component of the quaternion if it is represented </s>
funcom_train/37519427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitUnaryPromoteExpression(/*@non_null@*/ JUnaryPromote self ) { JExpression expr = self.expr(); CType type = self.getType(); print("("); print("("); print(type); print(")("); expr.accept(this); print("))"); } COM: <s> prints a cast expression </s>
funcom_train/15552156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemClear() { if (jMenuItemClear == null) { jMenuItemClear = new JMenuItem(); jMenuItemClear.setText("Clear input..."); jMenuItemClear.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { main.clearInputText(); } }); } return jMenuItemClear; } COM: <s> this method initializes j menu item clear </s>
funcom_train/9887539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Properties getResponseProperties() { Properties props = new Properties(); int i = 1; String name; String value; while (true) { name = connection.getHeaderFieldKey(i); value = connection.getHeaderField(i); if (name == null) { break; } props.setProperty(name, value); i++; } return props; } COM: <s> returns the response properties </s>
funcom_train/4125762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isFree(BuildingType buildingType) { float value = owner.getFeatureContainer() .applyModifier(100f, "model.modifier.buildingPriceBonus", buildingType, getGame().getTurn()); return (value == 0f && canBuild(buildingType)); } COM: <s> returns code true code if a building of the given type can </s>
funcom_train/29324174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String next() { if (splitter.find()) { String f1, f2; f2 = splitter.group(2); if (f2 != null) { f1 = f2; } else { unquoter.reset(splitter.group(1)); f1 = unquoter.replaceAll("\""); } return f1; } else { return null; } } COM: <s> return the next field </s>
funcom_train/22799670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createDatabase(Statement stmt, SchemaSetupParams params) throws SQLException { print("Creating database " + params.getDatabase() + " ... "); stmt.executeUpdate("CREATE DATABASE "+ params.getDatabase() + " WITH ENCODING 'UTF8';" + "ALTER DATABASE " + params.getDatabase() + " SET TimeZone=GMT"); println("done"); } COM: <s> creates a blank database </s>
funcom_train/48268635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelection(Item selected) { if (!disableSelection) { for (int i = 0, n = currentSelections.size(); i < n; i++) { Item item = currentSelections.get(0); item.setSelection(false); currentSelections.remove(0); } addSelection(selected); } } COM: <s> sets the current selection to the specified </s>
funcom_train/33496580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CoXmlParserIF matchParser(String elementName, CoXmlContext context) throws CoXmlReadException { CoXmlParserIF match = buildDefaultParser(elementName, context); // Let the parser initialize from the last builder if(match != null) { match.initializeFrom(this); // The builder gets a change to reset any state it might have match.getBuilder().resetState(); if(!match.equals(this)) { match.getBuilder().initializeFrom(getBuilder()); } } return match; } COM: <s> match the correct parser for the element </s>
funcom_train/21323832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPeerAddress( Address a ) { if( a == null ) return; ContributionBox b = (ContributionBox)cache.remove(a.name); if( b != null ) cache.put( a.name, new ContributionBox( a, b.timeStamp, b.contribution )); else cache.put( a.name, new ContributionBox( a, null ) ); } COM: <s> adds a peer address to exchange information with </s>
funcom_train/8901696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setToken(String s, String newValue) throws IllegalArgumentException { for (int i = 0 ; i < tokens.length; i++ ) { if (tokens[i][0].compareTo(s) == 0) { tokens[i][1] = newValue; } } throw new IllegalArgumentException(this.resource.getString("InvalidSyntax")); } COM: <s> sets a token value </s>
funcom_train/12179966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSelectedUnit() { String sunit = super.getSelectedUnit(); // standard unit name if (sunit.equals(ResourceUnits.PIXEL.getUnit())){ sunit = FormatConstants.WIDTH_UNITS_VALUE_PIXELS; } else if (sunit.equals(ResourceUnits.PERCENT.getUnit())) { sunit = FormatConstants.WIDTH_UNITS_VALUE_PERCENT; } return sunit; } COM: <s> return the layout specific name for the selected unit </s>
funcom_train/8107868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeCashStore() throws IOException { // get the cash file from the environment property file; int numOfItems = cashLoader.getNumOfItems(); cStore.setStoreSize(numOfItems); for (int i = 0; i < numOfItems; i++) { CashStoreItem item = (CashStoreItem) cashLoader.getItem(i); cStore.addItem(i, item); } } COM: <s> this operation initializes the cash store </s>
funcom_train/5402731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void uncommentKey(String key) { BundleEntry entry = (BundleEntry) entries.get(key); if (entry != null) { BundleEntry newEntry = new BundleEntry( key, entry.getValue(), entry.getComment(), false); addEntry(newEntry); } } COM: <s> uncomments a bundle entry </s>
funcom_train/12839278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAllNullValuesToDefault() { java.util.Enumeration en = objectAttributeList.elements(); ObjectAttribute oa = null; while (en.hasMoreElements()) { oa = (ObjectAttribute) en.nextElement(); if (oa.getIsForeignKey() == false) { oa.setValueToDefaultIfValueIsNull(); } } } COM: <s> sets all non foreign key values to their default value </s>
funcom_train/27702192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws SQLException { System.out.println("ResultSetAdapter.updateCharacterStream(int columnIndex, java.io.Reader x, int length)"); if(dbResultSet != null) dbResultSet.updateCharacterStream(columnIndex, x, length); else throw(new SQLException("not implemented")); } COM: <s> updates the designated column with a character stream value </s>
funcom_train/29768889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doTestIdentityAdd(boolean setIdentityToNull, boolean useListener, boolean vetoe, ObjectState expectedState) { Customer customer = DatabaseMock.getNewMock().queryFirstIdentityCustomer(); if (setIdentityToNull) { ((IdentityCustomer) customer).setId(null); } doTestCustomerAdd(customer, useListener, vetoe, expectedState); } COM: <s> adds customer with identity </s>
funcom_train/45519201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadTranslations() throws ClientResourcesException { try { loadTranslationsFromFS(); } catch (Throwable e) { try { loadTranslationsFromJar(); } catch (Throwable e2) { throw new ClientResourcesException("File: " + e.toString() + " Jar: " + e2.toString()); } } } COM: <s> loads all translations </s>
funcom_train/4412275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleUnexpectedException(Exception e) { logger.log(Level.SEVERE, null, e); String message = L10N_Unexpected_Exception_Message + ": " + Constants.getLogFile().getAbsolutePath(); if (e instanceof LiblouisXMLException || e instanceof IllegalArgumentException) { message = e.getMessage(); } UnoAwtUtils.showErrorMessageBox(parentWindowPeer, L10N_Exception_MessageBox_Title, message); } COM: <s> handling of an unexpected exception </s>
funcom_train/38379957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pushOnStack(GraphChange additionalGraphChange) { if (additionalGraphChange==null) return; if (additionalGraphChange.getStack()==null) return; Stack newStack = additionalGraphChange.getStack(); for (int index=0 ; index<newStack.size() ; index++) { this.stack.push(newStack.get(index)); } } COM: <s> pushes a complete graph change object on the stack of this graph change </s>
funcom_train/49320524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Vector _parseHeading(String s) { StringTokenizerUtil st = new StringTokenizerUtil(s, _columnSeparator); Vector<Object> v = new Vector<Object>(st.countTokens(), 1); while (st.hasMoreTokens()) { v.add(st.nextToken().trim()); } return v; } COM: <s> parse the given line looking for tab separated column heading strings </s>
funcom_train/1289066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDesiredOutput(int i,double value){ if((i>=0) && (i<this.InputLayer.NumberOfNodes)){ this.OutputLayer.DesiredValues[i]=value; return; } System.err.println("Error in setting Desired Output"); return; } COM: <s> set up the desired output value </s>
funcom_train/1026069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invokeJavaFunction(LFunction javaFunction) { ++base; // call hook if ( hooksenabled && !inhook ) { debugCallHooks( ); } int nactual = javaFunction.invoke(this); // call hook if ( hooksenabled && !inhook ) { debugReturnHooks( ); } if (nactual < 0) nactual = top - base; System.arraycopy(stack, top-nactual, stack, --base, nactual); luaV_settop_fillabove( base+nactual ); } COM: <s> invoke a lfunction being called via prep stack call </s>
funcom_train/32912314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int get(int key) { try { Object o = keyTable.get("" + key); if (o != null && o.getClass().getName().compareTo("java.lang.Integer")==0) { Integer integer = (Integer) o; return integer.intValue(); } else { return 0; } } catch (Exception ex) { Debug.LogException(this, ex); return 0; } } COM: <s> returns an integer value of the object </s>
funcom_train/5593165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void part(String nick, String user, String channel, String reason) { Object[] args = { nick, user, channel, reason }; String resource; if (nick.equals(server.getNick())) { resource = "part_self_template"; } else { resource = "part_other_template"; } addLine(getMessage(resource, args)); } COM: <s> describe code part code method here </s>
funcom_train/37741126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Map activityMap() throws RemoteException { if (activityMapCache == null) { activityMapCache = new HashMap (); try { for (Iterator i = activityHome().findByProcess ((Long)ctx.getPrimaryKey()).iterator (); i.hasNext();) { ExtActivity a = (ExtActivity)i.next(); cacheActivity (a); } } catch (FinderException e) { throw new EJBException (e); } } return activityMapCache; } COM: <s> returns the associated activities as map by key </s>
funcom_train/50925820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void findSprouts(boolean omitHydrogens) { for (RingNucleus ringNucleus : nucleusSet) { ringNucleus.findSprouts(omitHydrogens); for (Sprout sprout : ringNucleus.getSproutList(omitHydrogens)) { List<RingNucleus> ringNucleusList = sproutMap.get(sprout); if (ringNucleusList == null) { ringNucleusList = new ArrayList<RingNucleus>(); sproutMap.put(sprout, ringNucleusList); } if (!ringNucleusList.contains(ringNucleus)) { ringNucleusList.add(ringNucleus); } } } } COM: <s> calculate sprouts on ring nucleus and index them </s>
funcom_train/5618240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Token nextToken() { // if something in queue, just remove and return it if (tokens.size() > 0) { Token t = tokens.firstElement(); tokens.removeElementAt(0); //System.out.println(filename + t); return t; } insertImaginaryIndentDedentTokens(); return nextToken(); } COM: <s> from http www </s>
funcom_train/1379001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { String ip; ContextChangeEvent event; while(true){ try { ip = InetAddress.getLocalHost().getHostAddress(); if(!this.ipAddress.equals(ip)){ this.ipAddress = ip; event = new ContextChangeEvent(this, "ip", this.ipAddress, "", "Environment"); for(LocalContextChangeListener li : this.lis){ li.sendLocalContext(event); } } Thread.sleep(this.frequency); } catch (InterruptedException e) { e.printStackTrace(); } catch (Exception e){ e.printStackTrace(); } } } COM: <s> implement ip detection logic in this method </s>
funcom_train/20896118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEquals() { System.out.println("equals"); int id = 0; Role instance = null; boolean expResult = true; boolean result = instance.equals(id); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of equals method of class it </s>
funcom_train/50605443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addIntroduce (IntroduceCfg introducton) { if (introducton == null) throw new NullPointerException("Introduce config cannot be null"); if (!Imposter.class.isAssignableFrom(serviceType)) throw new IllegalArgumentException( "Cannot introduce interfaces to " + serviceType.getName() + ", it does not implement " + Imposter.class.getName()); introducedInterfaces.add(introducton.getInterface()); } COM: <s> declares an introduced interface on this service </s>
funcom_train/17676994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getPass2FetchGroupFields() { ArrayList result = new ArrayList(); addPass2Fields(result, fg); if (sameTableFgDsArray != null) { for (int i = 0; i < sameTableFgDsArray.length; i++) { addPass2Fields(result, sameTableFgDsArray[i].fg); } } return result; } COM: <s> this will return a list of pass2 fetch group fields </s>
funcom_train/9549982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonBrowseResource5() { if (jButtonBrowseResource5 == null) { jButtonBrowseResource5 = new JButton(); jButtonBrowseResource5.setText("Browse"); jButtonBrowseResource5.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent e) { getResourceFile5(); } }); } return jButtonBrowseResource5; } COM: <s> this method initializes j button browse resource5 </s>