__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/32383734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isProbablePrime(int certainty) { if (certainty <= 0) return true; BigInteger w = this.abs(); if (w.equals(TWO)) return true; if (!w.testBit(0) || w.equals(ONE)) return false; return w.primeToCertainty(certainty, null); } COM: <s> returns tt true tt if this big integer is probably prime </s>
funcom_train/5085272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleOutlineSelectionChanged() { PaletteEntry entry = getSelectedPaletteEntry(); if (activeEntry == entry) { return; } if (errorMessage != null) { MessageDialog dialog = new MessageDialog(getShell(), PaletteMessages.ERROR, null, PaletteMessages.ABORT_PAGE_FLIPPING_MESSAGE + "\n" + errorMessage, //$NON-NLS-1$ MessageDialog.ERROR, new String[] {IDialogConstants.OK_LABEL}, 0); dialog.open(); treeviewer.addPostSelectionChangedListener(pageFlippingPreventer); } else { setActiveEntry(entry); } updateActions(); } COM: <s> this is the method that is called everytime the selection in the outline </s>
funcom_train/16380286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPreserveOrderOfAnswersPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new UnsettablePropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_McSubTaskDefType_preserveOrderOfAnswers_feature"), getString("_UI_PropertyDescriptor_description", "_UI_McSubTaskDefType_preserveOrderOfAnswers_feature", "_UI_McSubTaskDefType_type"), CTEPackage.Literals.MC_SUB_TASK_DEF_TYPE__PRESERVE_ORDER_OF_ANSWERS, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the preserve order of answers feature </s>
funcom_train/9931351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isOverlapping() { // logger.error("isOverlapping"); if (isUnplacable()) { return false; } Iterator<Label> it = neighbours.iterator(); while (it.hasNext()) { Label next = it.next(); if (next.isUnplacable()) { continue; } if (doesIntersect(next)) { return true; } } return false; } COM: <s> returns true if the label intersects with one of its neighbours </s>
funcom_train/14108626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(final String str) throws IOException { try { byte[] data = str.getBytes("US-ASCII"); write(data, 0, data.length); } catch (UnsupportedEncodingException e) { throw new IOException("System does not support US-ASCII charset."); } } COM: <s> writes a string to this output stream </s>
funcom_train/31454117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updatePopups(MapEvent e) { //Either should description be updated or map is shown. if (!subMap) { updateDescription(e); } else { // FIXME originalTrigger is used!!!!!!!!!!!!!!! if (e.hitType == MapEvent.HIT_NONE || (originalTrigger != null && e.mapObject != ((MapEvent) originalTrigger).mapObject)) { killSubWin(); updateDescription(e); } else moveSubWin(e); } } COM: <s> this function is the entry point for event handling for popups </s>
funcom_train/6350119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PreparedStatement getPreparedStmt(String database, String tag) throws SQLException { PreparedStatement preparedStmt = null; try { Connection conn = DriverManager.getConnection("jdbc:apache:commons:dbcp:" + database); conn.setAutoCommit(false); String cmd = (String)preparedStmts.get(tag); preparedStmt = conn.prepareStatement(cmd); } catch (SQLException e) { log.writeLog("error","SQLException in Data.getPreparedStatememt: " + e.getMessage()); preparedStmt = null; } return preparedStmt; } COM: <s> get prepared statement </s>
funcom_train/13491004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getQuery() { if (query == null) { String q = predicate.getQuery().trim(); String w = getWhereClause(); if (w != null) { w = w.trim(); if (w.length() > 0) { if (w.toLowerCase().indexOf("where") == 0) { q = q + " " + w; } else { q = q + " where " + w; } } } query = q; } return query; } COM: <s> get the query build from the select statement from the predicate </s>
funcom_train/4232777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putData(String channel, double timestamp, double data) throws RBNBException { registerChannels(); putTime(timestamp); int cindex = cmap.GetIndex(channel); try { cmap.PutDataAsFloat64(cindex, new double[] {data}); } catch (SAPIException e) { throw new RBNBException(e); } } COM: <s> puts data in the souce </s>
funcom_train/44850404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(DataSourceFactory inFactory) { try { FactoryProperties lParameters = new FactoryProperties(inFactory); factories.put(lParameters.getFactoryID(), lParameters); LOG.debug("Registered DB access \"{}\".", lParameters.getFactoryID()); } catch (SQLException exc) { LOG.error("Error encountered while registering DB access!", exc); } } COM: <s> registers the specified factory to the registry </s>
funcom_train/15493597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCacheEntry(long timeout, CacheEntry entry) throws RMIException { synchronized(cacheEntries) { checkStatus(); long cacheTimeout = timeout; if (timeout == -1) { cacheTimeout = defaultCacheExpiryTime; } cacheEntries.put(entry,new RMICacheEntry(cacheTimeout,entry)); } } COM: <s> this method is responsible for adding an entry to the cache </s>
funcom_train/3361890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { // Calculate the hash code value if it has not yet been done (ie 1st call to hashCode()) // if (myHashCode == null) { myHashCode = new Integer(this.getClassName().hashCode()); } // return always the same hash code for this instance (immutable) // return myHashCode.intValue(); } COM: <s> returns the hash code value for this code simple type code instance </s>
funcom_train/13488874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCookieManager() throws Exception { UrlConnectionStub conn = new UrlConnectionStub(new URL("http://example.com")); XmlaOlap4jCookieManager manager = new XmlaOlap4jCookieManager(); conn.connect(); manager.storeCookies(conn); conn = new UrlConnectionStub(new URL("http://example.com")); manager.setCookies(conn); assertEquals(sentCookieKey, conn.getInternalCookieKey()); assertEquals(cookieValue, conn.getInternalCookieValue()); } COM: <s> this simple test makes sure that the cookie manager works as expected </s>
funcom_train/22829325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createExternalForeignKeys(Database database, Table table) { if (!getDbDialectInfo().isForeignKeysEmbedded()) { for (int idx = 0; idx < table.getForeignKeyCount(); idx++) { writeExternalForeignKeyCreateStmt(database, table, table.getForeignKey(idx)); } } } COM: <s> creates external foreignkey creation statements if necessary </s>
funcom_train/41772941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void retReadyDisch(int ownership) throws SQLException{ super.opendbConnection(); Statement s = super.con.createStatement(); Date d = new Date(); ResultSet rs = s.executeQuery("SELECT * from contractTbl WHERE ownership='"+ownership+"' AND delivery=0"); while (rs.next()){ if (d.getTime()<(rs.getLong("duration")+rs.getLong("commencedate"))){ toDisch.add(rs.getString("contractID")); } } super.closedbConnection(); return; } COM: <s> returns a list of all valid contracts owned by ownership </s>
funcom_train/15828069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static final String CHANGE_ATTR_METHOD_NAME_A = "package com.example.mypackage;\n" + "import java.util.*;\n" + "public class MyClass {\n" + "\tpublic static final String staticString = \"\\\"Hello World\\\"\";\n" + "\tpublic void run() {\n" + "\t\tSystem.out.println(staticString);\n" + "\t\treturn;\n" + "\t}\n" + "}"; COM: <s> base source for changing a method name </s>
funcom_train/19437320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Workout parseWorkout(byte[] downloadedWorkout) { RawParser parser = new RawParser(downloadedWorkout); Workout parsedWorkout = new Workout(); try { parsedWorkout = parser.parseWorkout(); } catch (Exception e) { Vm.debug(e.getMessage()); new Zs710Exception(e.getMessage()); } return parsedWorkout; } COM: <s> parse downloaded workout </s>
funcom_train/47302817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String removeHTMLTags(String string) { while (string.indexOf("<") != -1 && string.indexOf(">") > string.indexOf("<")) { string = string.substring(0, string.indexOf("<")) + string.substring(string.indexOf(">") + 1); } return string; } COM: <s> helper method to remove all html tags from a string </s>
funcom_train/35941156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Row readRow(DataPage s) throws SQLException { int len = s.readInt(); Value[] data = new Value[len]; for (int i = 0; i < len; i++) { data[i] = s.readValue(); } Row row = new Row(data, memoryPerRow); return row; } COM: <s> read a row from the data page </s>
funcom_train/36463621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPlugin(Plugin plugin) { // expand the table my one expandTable(); // add the plugin to the newly made position int lastIndex = myTableData.length - 1; myTableData[lastIndex][0] = plugin; myTableData[lastIndex][1] = new Boolean(true); // update changes myPluginsTable.setModel(new PluginTableModel(myTableData)); System.out.println("PLUGIN ADDED!"); } COM: <s> expand the table and add the plugin to the last element </s>
funcom_train/17885868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replayStartPrefixMappings(final ContentHandler handler, final Set<String> excludeNamespaces) throws SAXException { for (Map.Entry<String,LinkedList<String>> e : currentNamespaceMap.entrySet()) { final String ns=e.getValue().getFirst(); if (!excludeNamespaces.contains(ns)) handler.startPrefixMapping(e.getKey(),ns); } } COM: <s> replays all current prefix mappings for another code content handler code start mapping </s>
funcom_train/12566341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testListTree() { //File file = new File(System.getProperty("user.dir")); File file = new File("e:/20010905"); String[] list = FileUtility.listTree(file); for (int i = 0; i < list.length; i ++) { System.out.println(list[i]); } } COM: <s> test the method list tree </s>
funcom_train/40412790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateTitleBar(EdgeRow titleBar) { titleBar.setDimensions(0, titleBarHeight, titleBarLeftWidth, titleBarRightWidth); Layout l = titleBar.getLayout(); if (l instanceof RowLayout) { ((RowLayout)l).setSpacing(titleBarSpacing); } } COM: <s> configure the dimensions of the title bar </s>
funcom_train/26138667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel() { if (jPanel == null) { GridBagConstraints gridBagConstraints3 = new GridBagConstraints(); gridBagConstraints3.gridx = 0; gridBagConstraints3.gridy = 0; jLabel = new JLabel(); jLabel.setText("Bokningen finns redan. Vill du dubbelboka?"); jPanel = new JPanel(); jPanel.setLayout(new GridBagLayout()); jPanel.setPreferredSize(new Dimension(300, 20)); jPanel.add(jLabel, gridBagConstraints3); } return jPanel; } COM: <s> this method initializes j panel </s>
funcom_train/4207560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPlugin(PublicPlugin plugin) throws Exception { expandNewPlugins(); URL url = new URL(plugin.getDownloadURL()); String name = URLFileSystem.getName(url); File pluginDownload = new File(PluginManager.PLUGINS_DIRECTORY, name); classLoader.addPlugin(pluginDownload); Plugin pluginClass = loadPublicPlugin(pluginDownload); Log.debug("Trying to initialize " + pluginClass); pluginClass.initialize(); } COM: <s> adds and installs a new plugin into spark </s>
funcom_train/36986205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endCamera() { if (!manipulatingCamera) { throw new RuntimeException("cannot call endCamera while not "+ "in camera manipulation mode"); } // reset the modelview to use this new camera matrix modelview.set(camera); modelviewInv.set(cameraInv); // set matrix mode back to modelview forwardTransform = modelview; reverseTransform = modelviewInv; // all done manipulatingCamera = false; } COM: <s> record the current settings into the camera matrix </s>
funcom_train/23011559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isTheme(DisplayContext dc) { String sTheme = style; if(style == null){ if (dc == null || themes == null) return true; sTheme = dc.getThematicMap(); } return ( (themes == null) || (themes.size() == 0) || (sTheme == null) || (themes.indexOf(sTheme) >= 0)); } COM: <s> determines whether this layer is displayed for the current </s>
funcom_train/20825022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(final String[] args) throws ParseException, IOException { LogToolOptions options = new LogToolOptions(); options.parse(args); CommandWriter c = new CommandWriter(options.getOutputFilename()); LogParser parser = new LogParser(c); new LogFile(parser, options.getInputFilename()); c.close(); } COM: <s> formats lcedit lanbox command logfiles </s>
funcom_train/10812783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Operator findNonFilterPredecessor(Operator current) { Operator op = current; do { List<Operator> predecessors = currentPlan.getPredecessors( op ); // if there are no predecessors return false if( predecessors == null || predecessors.size() == 0 ) { return null; } Operator pred = predecessors.get( 0 ); if( pred instanceof LOFilter ) { op = pred; continue; } else { return pred; } } while( true ); } COM: <s> starting from current operator which is a filter search its successors until </s>
funcom_train/22310249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void putPreferencesJMenuItem(JMenu menu) { JMenuItem preferencesMenuItem = new JMenuItem(messagesProvider.getMessage(Messages.PREFERENCES)); preferencesMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { showPreferences(); } }); menu.add(preferencesMenuItem); List<Component> menuItemToBeRemoved = new LinkedList<Component>(); menuItemToBeRemoved.add(preferencesMenuItem); menuItemsToBeRemoved.put(menu, menuItemToBeRemoved); } COM: <s> adds the preferences jmenu item on the jmenu specified </s>
funcom_train/4557774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPublicMagnetPauseTracks() { repEng.newStep("277", "Publish Magnet main page-Pause the tracks"); //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 Artist image preview in middle. //5. Choose a tracks reord and click it. //6. Click the Pause icon. // The Tracks mp3 will be paused. // The Pause icon will be changed to Play. } COM: <s> 277 publish magnet main page pause the tracks </s>
funcom_train/25015610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(Object object) { //long start = System.currentTimeMillis(); boolean ret = true; if( object != null ) { synchronized (producerLock) { Link link = new Link(); link.value = object; producer.next = link; producer = link; if(++producedCount < 0l) { producedCount=0l; } producerLock.notifyAll(); } } //long time = System.currentTimeMillis()-start; //if( time > Collector.DEBUG_MAX_TIME) { // System.out.println("Queue add time = "+time); //} return ret; } COM: <s> add an object to the queue </s>
funcom_train/34812545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void windowScanChromosome(PointData pd){ //make windows makeWindows(pd.getPositions()); //any windows? if (windows.length == 0){ System.out.println("\n\tSkipping "+chromosome+". No windows found with minimum reads of "+minimumCsInWindow+" within a window size of "+windowSize); return; } //scan scoreWindows(pd); //save array IO.saveObject( new File(serializedWindowObjectsDirectory, chromosome), smoothingWindow); //write writeBarFileGraphsOnCurrentSM(); } COM: <s> window scans a chromosome </s>
funcom_train/13478651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNewProperty(String prop, String label, int size) { adapters.add(prop); nameMappings.put(prop, label); if (size != 0) { sizes.put(prop, new Integer(size)); } //Set a BooleanRenderer as default, this will be overriden if // neccessary setTextRenderer(prop, new SimpleObjectRenderer()); } COM: <s> adds a new column to the table for the specified property using the </s>
funcom_train/39398467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handle(PeerConnection connection, int length) { Peer peer = connection.getPeer(); getLogger().fine("<- " + peer.getInetSocketAddress() + " ChunkAnswerInfo"); getServer().addBytesReceived(length); if (peer.isDownloadAcceptable(chunkId) && connection instanceof DataConnection) { peer.setIncomingDataConnection((DataConnection) connection); } else { connection.close("We don't need this chunk " + chunkId); peer.downloadRequester.perform(); } } COM: <s> handles a chunk answer info </s>
funcom_train/19104979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessage(){ String message = ""; switch( type ){ case NAF_CONNECTION_ERROR: message = "Failed to connect to NAF. (Perhaps NAF is not running?)"; break; case LOCALHOST_NOT_FOUND: message = "Failed to query the localhost address."; break; case JAXB_INIT_ERROR: message = "Failed to initialise JAXB for NAF XML processing. (Perhaps JAXB is not installed or not in your CLASSPATH?)"; break; default: message = "An unidentified error occurred! (Try using printStackTrace() for more details)"; break; } return message; } COM: <s> returns a human readable explanation of this exception </s>
funcom_train/17923300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void jbInit(JPanel cp) throws Exception { model = new CommunityModel(); communityView = new CommunityView(params, model, userSource, categorySource, viewManager.getFrame()); cp.add(communityView, BorderLayout.CENTER); showFrame(); } COM: <s> initialize the display </s>
funcom_train/9086726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Customers entity) { EntityManagerHelper .log("deleting Customers instance", Level.INFO, null); try { entity = getEntityManager().getReference(Customers.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent customers entity </s>
funcom_train/28151841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public int hashCode() { int n = 5*filename.hashCode() + 7*commandname.hashCode(); n = n + 7*atom2sets.hashCode() + 31*type2atoms.hashCode() + 71*set2atoms.hashCode() + 3*rel2tuples.hashCode(); return 17*n + model.hashCode(); } COM: <s> computes a hash code based on the same information used in equals </s>
funcom_train/20845926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DPWSException copy() { DPWSException result = new DPWSException(this.code, this.subCode, this.faultType); result.detail = this.detail; result.detailXML = this.detailXML; if (reasons != null) { for (Enumeration enu = reasons.keys(); enu.hasMoreElements();) { String key = (String) enu.nextElement(); result.addReason(key, (String) reasons.get(key)); } } return result; } COM: <s> copies object new object shares the references to attributes with copied </s>
funcom_train/18880824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JCheckBox getJCheckBoxWindTurbulent() { if (jCheckBoxWindTurbulent == null) { jCheckBoxWindTurbulent = new JCheckBox(); jCheckBoxWindTurbulent.setBounds(new Rectangle(264, 101, 87, 18)); jCheckBoxWindTurbulent.setSelected(simToolBox.turbulentWind); jCheckBoxWindTurbulent.setText("Turbulent"); } return jCheckBoxWindTurbulent; } COM: <s> this method initializes j check box wind turbulent </s>
funcom_train/32791565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPRevEngButton() { if (jPRevEngButton == null) { FlowLayout flowLayout11 = new FlowLayout(); flowLayout11.setAlignment(FlowLayout.RIGHT); jPRevEngButton = new JPanel(); jPRevEngButton.setLayout(flowLayout11); jPRevEngButton.add(getJBtnRevEng(), null); } return jPRevEngButton; } COM: <s> this method initializes j prev eng button </s>
funcom_train/20272078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void randomizePasses() { List<NamedPass> mixedupPasses = Lists.newArrayList(); Random random = new Random(); while (myPasses.size() > 0) { mixedupPasses.add( myPasses.remove(random.nextInt(myPasses.size()))); } myPasses.addAll(mixedupPasses); } COM: <s> re arrange the passes in a random order </s>
funcom_train/32964593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSubPathWithIds(String node) { initNodes(); StringBuffer sb = new StringBuffer( 100 ); for (int x = 0; x < nodes.length; x++ ) { if (sb.length()>0) sb.append(":"); sb.append( nodes[x] ); if (nodeKeys[x]!=0) { sb.append("-"); sb.append(nodeKeys[x]); } if (node.equals(nodes[x])) return sb.toString(); } return null; } COM: <s> construct a path to a sub node with ids </s>
funcom_train/38318542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString () { final Color c= getColor(); return new StringBuffer("ColorMapEntry [name=").append(getName()). append(",alias=").append(getAlias()).append(",color="). append(toHex(c.getRed())).append(toHex(c.getGreen())). append(toHex(c.getBlue())).append("]").toString(); } COM: <s> returns a string representation of this color map entry </s>
funcom_train/6369906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateFromHeightMap() { for (int i = 0; i < this.getQuantity(); i++) { if (this.getChild(i) instanceof TerrainPage) { ((TerrainPage) getChild(i)).updateFromHeightMap(); } else if (this.getChild(i) instanceof TerrainBlock) { ((TerrainBlock) getChild(i)).updateFromHeightMap(); } } } COM: <s> code update from height map code updates the verts of all sub blocks </s>
funcom_train/26454883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPut() { Thread thread = null; for (int idx = 0; idx < THREAD_COUNT; idx++) { OSGeneralTest runner = new OSGeneralTest(); thread = new Thread(runner); thread.start(); } do { try { Thread.sleep(100); } catch (InterruptedException e) { // do nothing } } while (thread.isAlive()); } COM: <s> verify that we can concurrently access the cache without problems </s>
funcom_train/23275783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getAllDisp() { Vector ret = new Vector(v.size()); //copy only the guys to be displayed for (Enumeration e = v.elements() ; e.hasMoreElements() ;) { Object este = e.nextElement(); if (((File)este).isDisplay()) ret.add(este); } return ret; } COM: <s> gets data to be displayed </s>
funcom_train/23868151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRequiredString(final String key, final Object... arguments) { CDebug.checkParameterNotEmpty(key, "key"); final String resource = getString(key, arguments); if (resource == null) { throw new MissingResourceException(String.format("Could not locate key:key=%s in bundles:%s" , key, toString()), getClass().getName(), key); } return resource; } COM: <s> gets a required string resource from the list of resource bundles </s>
funcom_train/4154558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String kickPlayer( final int playerIndex, final String kickMessage ) { if ( playerIndex < 0 || playerIndex > players.length - 1 || players[ playerIndex ] == null ) return "Invalid player index!"; players[ playerIndex ].kick( kickMessage ); return "Player has been kicked."; } COM: <s> kicks a player out of game </s>
funcom_train/25193855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getMatchingResourceNames(String match) { Vector matches = new Vector(20); Enumeration es = getResourceNames(); if(es != null) { while(es.hasMoreElements()) { String resourceName = (String)es.nextElement(); if(resourceName.startsWith(match)) matches.addElement(resourceName); } } return matches; } COM: <s> this method fetches a list of all accesable resource names and identifies </s>
funcom_train/21848875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private AbstractBorderView createBorderView(BorderProperty bp) { if (bp instanceof BevelBorderProperty) { return new BevelBorderView(); } else if (bp instanceof EtchedBorderProperty) { return new EtchedBorderView(); } else if (bp instanceof LineBorderProperty) { return new LineBorderView(); } else if (bp instanceof EmptyBorderProperty) { return new EmptyBorderView(); } else if (bp instanceof ShadowBorderProperty) { return new ShadowBorderView(); } else if (bp instanceof TitledBorderProperty) { return new TitledBorderView(); } else { assert (false); return null; } } COM: <s> creates a view for editing the given border property </s>
funcom_train/6267629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getVersionMajor() { if (sipVersion == null) return null; String major = null; boolean slash = false; for (int i = 0; i < sipVersion.length(); i++) { if (sipVersion.charAt(i) == '.') break; if (slash) { if (major == null) major = "" + sipVersion.charAt(i); else major += sipVersion.charAt(i); } if (sipVersion.charAt(i) == '/') slash = true; } return major; } COM: <s> get the major verrsion number </s>
funcom_train/45018334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMagneticFieldPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NXsampleMagneticField_magneticField_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NXsampleMagneticField_magneticField_feature", "_UI_NXsampleMagneticField_type"), NexusPackageImpl.Literals.NXSAMPLE_MAGNETIC_FIELD__MAGNETIC_FIELD, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the magnetic field feature </s>
funcom_train/19971859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LocationModel(Context context) { appContext = context; // Get the messages. lastFixMsg = appContext.getString(R.string.gps_last_fix); // Create the Handler we use for posting updates. updateHandler = new Handler() { @Override public void handleMessage(Message m) { update(); } }; // Set up the client lists. locationListeners = new ArrayList<Listener>(); timezoneListeners = new ArrayList<ZoneListener>(); // Get the location provider. locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); } COM: <s> create a location model </s>
funcom_train/22129372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setResultSetConcurrency(int concurrencyFlag) { super.setResultSetConcurrency(concurrencyFlag); // // FIXME: Issue warning when asked for updateable result set, but result set is not // updatable // if ((concurrencyFlag == CONCUR_UPDATABLE) && !isUpdateable()) { java.sql.SQLWarning warning = new java.sql.SQLWarning( NotUpdatable.NOT_UPDATEABLE_MESSAGE); } } COM: <s> sets the concurrency type of this result set </s>
funcom_train/14160838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getString(final String key, final Object ... args) { String rawValue; try { synchronized (bundle) { rawValue = bundle.getString(key); } } catch (MissingResourceException e) { return key; } try { return MessageFormat.format(rawValue, args); } catch (IllegalArgumentException e) { return rawValue; } } COM: <s> retrieves a localized code string code which may contains parameters </s>
funcom_train/32057675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetAntiAliased() { System.out.println("testSetAntiAliased"); jgraph.setAntiAliased( true ); boolean b = jgraph.isAntiAliased(); assertEquals( b, true ); jgraph.setAntiAliased( false ); b = jgraph.isAntiAliased(); assertEquals( b, false ); } COM: <s> test of set anti aliased method of class jgraph </s>
funcom_train/21728330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFriend(String[] mails){ addList.addAll(Arrays.asList(mails)); if(!addList.isEmpty()){ setAdd(true); priv(getBotnick(),getLocalNick(),LLChanUser.parseNick(addList.get(0))+" "+ACT.get("add0")); } } COM: <s> set the code botnick code value </s>
funcom_train/38433884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initJavaMail() throws OpenAS2Exception { MailcapCommandMap mc = (MailcapCommandMap) CommandMap.getDefaultCommandMap(); mc.addMailcap( "message/disposition-notification;; x-java-content-handler=org.openas2.util.DispositionDataContentHandler"); CommandMap.setDefaultCommandMap(mc); } COM: <s> adds a group of content handlers to the mailcap code command map code </s>
funcom_train/46111581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LocaleFilter exclude(LocaleFilter filter) { if (filter == null) return this; excludes.addAll(0, filter.getIncludes()); languageExcludes.addAll(0, filter.getLanguageIncludes()); regionExcludes.addAll(0, filter.getRegionIncludes()); userPartExcludes.addAll(0, filter.getUserPartIncludes()); patternExcludes.addAll(0, filter.getPatternIncludes()); return this; } COM: <s> disallows all locales allowed in a given locale filter </s>
funcom_train/21656478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtNuevoUsuario() { if (btNuevoUsuario == null) { btNuevoUsuario = new JButton(); btNuevoUsuario.setMnemonic('n'); btNuevoUsuario.setBounds(new Rectangle(500, 80, 130, 30)); btNuevoUsuario.setText("Nuevo Usuario"); btNuevoUsuario.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { limpiarTodo(); } }); } return btNuevoUsuario; } COM: <s> this method initializes bt nuevo usuario </s>
funcom_train/3520009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RDB get(String acct, boolean connect) throws RDBException { logRDB.debug("get:" + acct + connect); RDB rdb = (RDB) super.get(acct); if (rdb == null) { //should verify that prefix of name is "jdbc: rdb = add(new JDBCAcct(acct)); } if (rdb != null) { if (connect && ((RDBImpl) rdb).isClosed()) ((RDBImpl) rdb).connect(); } return rdb; } COM: <s> get an existing rdb from the database or create and store </s>
funcom_train/17922696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testByteArrayToBoolean() throws Exception { System.out.println("byteArrayToBoolean"); byte[] b = String.valueOf(true).getBytes("UTF-8"); boolean expResult = true; boolean result = ByteArrayToAny.byteArrayToBoolean(b); assertEquals(expResult, result); } COM: <s> test of byte array to boolean method of class eu </s>
funcom_train/13445693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Rectangle getBounds(int row, Rectangle placeIn) { log.fine("row="+row+" placeIn="+placeIn); if(updateNodeSizes) updateNodeSizes(false); if(row >= 0 && row < getRowCount()) { Rectangle r = getNode(row).getNodeBounds(placeIn); log.fine("return="+r); return r; } log.fine("return null"); return null; } COM: <s> retursn the bounds for row code row code by reference in </s>
funcom_train/14093255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEvaluateEndsString3() { String leftside = "ABC"; String rightside = "AB"; int operation = Operator.Operation.ENDSWITH; boolean ignoreCase = false; boolean expectedReturn = false; boolean actualReturn = Operator.evaluate(leftside, rightside, operation, ignoreCase); assertEquals("return value", expectedReturn, actualReturn); } COM: <s> test endswith false </s>
funcom_train/32754464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applySettings() { super.applySettings(); OrbitSource primarySource = (OrbitSource)_primarySourceMenu.getSelectedItem(); OrbitSource referenceSource = (OrbitSource)_referenceSourceMenu.getSelectedItem(); OrbitDifferenceSource orbitSource = (OrbitDifferenceSource)_orbitSource; orbitSource.setPrimarySource( primarySource ); orbitSource.setReferenceSource( referenceSource ); } COM: <s> apply user settings to the orbit source </s>
funcom_train/20211088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addInstallation(Installation installation) { if (!(installation instanceof Installation)) { throw new ClassCastException( "ContinuumDatabase.addInstallations(installation) parameter must be instanceof " + Installation.class.getName()); } getInstallations().add(installation); } // -- void addInstallation(Installation) COM: <s> method add installation </s>
funcom_train/8091942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setJythonPaths(String value) { String[] paths; int i; if (value.length() == 0) { m_JythonPaths = new File[0]; } else { paths = value.split(","); m_JythonPaths = new File[paths.length]; for (i = 0; i < m_JythonPaths.length; i++) m_JythonPaths[i] = new File(paths[i]); } } COM: <s> sets the additional jython paths </s>
funcom_train/16395019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ActionForward enter(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp) { AccessCheckInteractionEnterOrEditForm timeCheckForm = (AccessCheckInteractionEnterOrEditForm)form; timeCheckForm.setSortLabel(sortLabelProposalFromSession(req)); req.getSession().setAttribute("enterOrEdit", "enter"); req.getSession().setAttribute("formActionPath", req.getParameter("formActionPath")); return mapping.findForward("enter"); } COM: <s> initializes a new access check interaction entry </s>
funcom_train/30278445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendAvgTimes(String queueName, AgentAvgValue averageTimes) { if (LOG.isInfoEnabled()) { LOG.info("avgTimes: queue = " + queueName + "; " + averageTimes.toString()); } if (!isForGeneralRow) { AgentDetailItem item = agentRows.get(queueName); if (item != null) { item.setDuration(averageTimes); } } else { if (agentRow != null) { agentRow.setDuration(averageTimes); } } } COM: <s> send info to client </s>
funcom_train/10350131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URI getReasonerLevel(URI dataSourceURI) throws DataSourceException { check(); Element requestElement = MessageElementHandler .getDataSourceBasedElement("getReasonerLevelRequest", dataSourceURI); Element responseElement = sendMessage(requestElement); return MessageElementHandler.getDataSourceURI(responseElement); } COM: <s> implements fluxion service delegating to a web service at the configured </s>
funcom_train/50894461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeDirectory(String name) { File directory; String fixedName = name; if (name.indexOf('\\') > 0) { fixedName = name.substring(name.lastIndexOf('\\') + 1); } else if (name.indexOf('/') > 0) { fixedName = name.substring(name.lastIndexOf('/') + 1); } directory = new File(diskFile, fixedName); directory.mkdir(); buildChildList(); } COM: <s> creates a subdirectory under this object </s>
funcom_train/25217683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logNet(DependencyNet net) { if (debug) { ByteArrayOutputStream os = new ByteArrayOutputStream(); PrintWriter w = new PrintWriter(os); w.print('\n'); net.print(w, "\t"); w.flush(); getLog().debug(os.toString()); } } COM: <s> print the net to the log </s>
funcom_train/44709948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHorizontalAlignment(int alignmentEnum) { String alignmentLiteral = ""; switch (alignmentEnum) { case LEFT: alignmentLiteral = "left"; break; case RIGHT: alignmentLiteral = "right"; break; case CENTER: alignmentLiteral = "center"; break; default: throw new IllegalArgumentException("Undefined Arg in setHorizontalAlignment"); } setAttribute("horizontalAlignment", alignmentLiteral); } COM: <s> sets the horizontal alignment of this component </s>
funcom_train/3990335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addZaniki_miesniowePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BadanieOkresowe_zaniki_miesniowe_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_zaniki_miesniowe_feature", "_UI_BadanieOkresowe_type"), PrzychodniaPackage.Literals.BADANIE_OKRESOWE__ZANIKI_MIESNIOWE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the zaniki miesniowe feature </s>
funcom_train/16792470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Resource createEpisode(Resource brand, String description) { Resource episode; episode = this.model.createResource(this.createEpisodeUri(brand, description), PO.Episode); episode.addProperty(TMSNet.episode_of, brand); episode.addLiteral(PO.short_synopsis, description); brand.addProperty(PO.episode, episode); return episode; } COM: <s> create a program episode </s>
funcom_train/8804325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Chbuf append ( String[] ary){ if ( null == ary) return this; else { char infix = token_infix ; String arg; for ( int c = 0; c < ary.length; c++){ arg = ary[c]; if ( null != arg){ if ( 0 < infix && 0 < c) append(infix); append(arg); } } return this; } } COM: <s> appends each element followed by the token infix </s>
funcom_train/7302018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calcHash (PyObject object) { try { hash = object.hashCode(); realHash = true; } catch (PyException e) { if (Py.matchException(e, Py.TypeError)) { hash = System.identityHashCode(object); } else { throw e; } } } COM: <s> calculate a hash code to use for this object </s>
funcom_train/42711099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getJButtonUpdateInvoiceTB() { if (jButtonUpdateInvoiceTB == null) { jButtonUpdateInvoiceTB = new JButton(); jButtonUpdateInvoiceTB.setBounds(new Rectangle(10, 330, 121, 21)); jButtonUpdateInvoiceTB.setText("Update"); jButtonUpdateInvoiceTB.setEnabled(false); jButtonUpdateInvoiceTB.setActionCommand("UpdatePosition"); } return jButtonUpdateInvoiceTB; } COM: <s> this method initializes j button update invoice tb </s>
funcom_train/31012524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QuestionValue getQuestionInfo(long questionid) { PollManager pollMan = null; try { pollMan = ((PollManagerHome)EJBHomeFactory.getInstance().lookup(POLL_MANAGER_JNDI,PollManagerHome.class)).create(); return pollMan.getQuestion(questionid); } catch (Exception e) { e.printStackTrace(); return null; } finally { EJBUtils.remove(pollMan); } } COM: <s> get the information about a question from the database </s>
funcom_train/20841147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void DisplayPageDirect(String strURL) { m_CurrentURL = strURL; m_txtURL.setText(strURL); m_btnReload.setToolTipText(strURL); try { // setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); // future feature m_HtmlPane.setPage(strURL); } catch (Exception exc) { System.out.println("Problem loading URL..."); } } COM: <s> display page direct </s>
funcom_train/320142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean skipScope(int openToken, int closeToken) { int depth= 1; while (true) { nextToken(); if (fToken == closeToken) { depth++; } else if (fToken == openToken) { depth--; if (depth == 0) return true; } else if (fToken == Symbols.TokenEOF) { return false; } } } COM: <s> scans tokens for the matching opening peer </s>
funcom_train/22354707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getRest(PotionInfo potionInfo) { int max = Integer.MAX_VALUE; for (HerbInfo herb : herbs) { if (potionInfo.ingredients.containsKey(herb.item) && potionInfo.ingredients.get(herb.item) > 0) { max = Math.min(max, getRest(herb) / potionInfo.ingredients.get(herb.item)); } } return max; } COM: <s> return the maximal producible number of the potion </s>
funcom_train/20622162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get() { while (true) { Thread t = threadVar.get(); if (t == null) { return getValue(); } try { t.join(); } catch (InterruptedException e) { String message = "Error in progress bar thread."; Categories.app().error(message, e); Thread.currentThread().interrupt(); // propagate return null; } } } COM: <s> return the value created by the code construct code method </s>
funcom_train/40290813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long stringDateToLong(String sDate){ long ldate = 0; Date convert = new Date(); DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT); try { convert = df.parse(sDate); } catch (ParseException ex) { ex.printStackTrace(); } ldate = convert.getTime(); return ldate; } COM: <s> changes a string date to a long date </s>
funcom_train/21439066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element toXML(Document document) { if( document==null ) return null; // create root node Element w_node = document.createElement("GlycanWorkspace"); // create configuration node storeToConfiguration(true); w_node.appendChild(theConfiguration.toXML(document)); // create structures node w_node.appendChild(theStructures.toXML(document)); return w_node; } COM: <s> create an element of a dom document containing the </s>
funcom_train/22782704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRespond(JobFailureOption respond) throws IllegalArgumentException { //if new respond is null, just set it if (respond==null) { this.respond = null; return; } //else check if this options is supported if (!options.contains(respond)) { throw new IllegalArgumentException("option not suppored by JobFailure"); } this.respond = respond; } COM: <s> set the selected response </s>
funcom_train/1997006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void expand(int level) { setExpanded(level > 0); if ((getChildren() != null) && (getChildren().size() > 0)) { for (int i = 0; i < getChildren().size(); i++) { ((TreeElement) getChildren().elementAt(i)).expand(level - 1); } } } COM: <s> expands all nodes to the given level </s>
funcom_train/26335451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayPrevious() { if( this.historyPtr > 0 ) { this.historyPtr--; // clear area Toolkit.drawRectangle( this.getX(), this.getY(), this.width, this.height, this.colors ); Toolkit.printString( this.history[this.historyPtr], 0, this.getY(), this.colors ); } } COM: <s> browse previous message from history </s>
funcom_train/5244715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dropP(int n) { int counter = 0; int lastcount = 0; ListIterator<IntentionRow> i = intentionRows.listIterator(intentionRows.size()); while (i.hasPrevious()) { IntentionRow ir = i.previous(); counter += ir.deeds().size(); if (counter <= n) { i.remove(); } else { ir.dropIR(n - lastcount); } lastcount = counter; } /* if (empty()) { source = new Atom("empty"); } */ intentionRows.trimToSize(); } COM: <s> drop n deeds from the intentions deed stack along with their associated </s>
funcom_train/31824053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TreeItem getItem (Point point) { checkWidget (); if (point == null) error (SWT.ERROR_NULL_ARGUMENT); TVHITTESTINFO lpht = new TVHITTESTINFO (); lpht.x = point.x; lpht.y = point.y; OS.SendMessage (handle, OS.TVM_HITTEST, 0, lpht); if (lpht.hItem != 0) { if ((style & SWT.FULL_SELECTION) != 0 || (lpht.flags & OS.TVHT_ONITEM) != 0) { return _getItem (lpht.hItem); } } return null; } COM: <s> returns the item at the given point in the receiver </s>
funcom_train/19456832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeCpmBlock(int block, byte[] data) { int track = computeTrack(block); int sector = computeSector(block); byte[] sectorData = new byte[SECTOR_SIZE]; for (int i=0; i<PHYSICAL_SECTORS_PER_BLOCK; i++) { System.arraycopy(data, i*SECTOR_SIZE, sectorData, 0, SECTOR_SIZE); writeSector(track, sectorSkew[sector+i], sectorData); } } COM: <s> write a cp m block </s>
funcom_train/34563163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unknown() { final ArrayList<String> val = new ArrayList<String>(); val.add(MimeType.UNKNOWN.toString()); metaElements.put(MetaElem.FORMAT, val); val.clear(); val.add(FileType.UNKNOWN_TYPE.toString()); metaElements.put(MetaElem.TYPE, val); } COM: <s> sets format and type to unknown </s>
funcom_train/32886582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void expandedUpdateComponent(){ final String className = JavaLang.getThisClassName(); final String methodName = JavaLang.getThisMethodName(); LOG.entering(className, methodName); LOG.finest("expand component"); ComponentTools.expand(this.mComponentToExpand); LOG.exiting(className, methodName); } // end COM: <s> set the action component to the expand state </s>
funcom_train/42717748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringMaker appendIf(String prefix, String string, String suffix, boolean flag) { if (flag && (string != null) && (string.length() > 0)) { if (buffer.length() > 0) { buffer.append(glue); } buffer.append(prefix + string + suffix); } return this; } COM: <s> optionally append with prefix and suffix if string is non empty </s>
funcom_train/24135189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processMouseEvent( MouseEvent e ) { if (e.isPopupTrigger() && getSelectedValue()!=null) { GuiUser guiUser = (GuiUser)getSelectedValue(); JPopupMenu popup = guiUser.createPopupMenu(); add(popup); popup.show(this,e.getX(),e.getY()); } else super.processMouseEvent(e); } COM: <s> used internally to handler pop up menu mouse clicks </s>
funcom_train/4390770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeChatboxInterface(Player p) { setTab(p, 68, 752); p.getByteVector().createFrame(246); p.getByteVector().writeWord(752); p.getByteVector().writeWord(12); p.chatboxInterfaceId = -1; } COM: <s> set the chatbox back removing any interfaces on it </s>
funcom_train/20768680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean stopAer() { boolean b = vendorRequest(VENDOR_REQUEST_STOP_TRANSFER, (short) 0, (short) 0, new byte[0]); if (b) { inEndpointEnabled = false; } log.info("data aquisition stopped:" + b); return b; } COM: <s> start aer data from in endpoint 3 </s>
funcom_train/11381456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void purgeCache() { synchronized (cachedArchives) { for (Map.Entry<String,CacheStatus> f: cachedArchives.entrySet()) { try { deleteLocalPath(asyncDiskService, localFs, f.getValue().localizedLoadPath); } catch (IOException ie) { LOG.debug("Error cleaning up cache", ie); } } cachedArchives.clear(); } } COM: <s> clear the entire contents of the cache and delete the backing files </s>