__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/11322805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testColsRows() { MockContext.initContext(); TextArea field = new TextArea("field"); field.setCols(25); field.setRows(4); assertTrue(field.toString().contains("cols=\"25\"")); assertTrue(field.toString().contains("rows=\"4\"")); } COM: <s> coverage test of cols and rows property </s>
funcom_train/23233676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handle(Request req, Response resp) { resp.set("Server", "Midhedava http (Simpleweb)"); resp.setDate("Date", System.currentTimeMillis()); resp.setDate("Expires", System.currentTimeMillis() + EXPIRES); resp.setDate("Last-Modified", System.currentTimeMillis()); handler.handle(req, resp); } COM: <s> process a http request and add convenience headers </s>
funcom_train/35725075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dolly(float amount) { float dirX = dx / shotLength; float dirY = dy / shotLength; float dirZ = dz / shotLength; cameraX += amount * dirX; cameraY += amount * dirY; cameraZ += amount * dirZ; targetX += amount * dirX; targetY += amount * dirY; targetZ += amount * dirZ; } COM: <s> moves the camera and target along the view vector </s>
funcom_train/4510184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteGroup(Group group) { // Fire event. GroupEventDispatcher.dispatchEvent(group, GroupEventDispatcher.EventType.group_deleting, Collections.emptyMap()); // Delete the group. provider.deleteGroup(group.getName()); // Expire cache. groupCache.remove(group.getName()); } COM: <s> deletes a group from the system </s>
funcom_train/8662983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHttpProxy(String host, int port) { String proxyHeader = "POST http://" + orgServername + ":" + orgPort; String cmd = proxyHeader + "/lookup HTTP/1.0"; lookupCommand = cmd.getBytes(); cmd = proxyHeader + "/rmi HTTP/1.0"; rmiCommand = cmd.getBytes(); this.servername = host; this.port = port; } COM: <s> sets an http proxy server </s>
funcom_train/15908050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRange(int dimension, int min, int max) { Range d; for (int dim = 1; dimension > 0; dim<<=1) { if ((dimension & dim) != 0) { d= new Range(min, max); ranges.put(new Integer(dimension), d); dimension &= ~dim; } } } COM: <s> sets the range of a dimension </s>
funcom_train/20439852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIterationsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SequentialSchedule_iterations_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SequentialSchedule_iterations_feature", "_UI_SequentialSchedule_type"), CM3Package.Literals.SEQUENTIAL_SCHEDULE__ITERATIONS, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the iterations feature </s>
funcom_train/44342346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CG parseCGIF() throws ParsingException { CGIFParserGenerator cgifParserGenerator = new CGIFParserGenerator(this.txtTokenizer, this.lexicon); cgifParserGenerator.generateCode = this.generateCode; cgifParserGenerator.setWithDrawingInf(true); CG cg = cgifParserGenerator.parseCG(); cgifParserGenerator = null; return cg; } COM: <s> parse the cgif form of a cg </s>
funcom_train/5774384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getInComment() { if (inComment == null) { inComment = new JTextField(); inComment.setBounds(new java.awt.Rectangle(181,118,220,25)); inComment.setEditable(false); } return inComment; } COM: <s> this method initializes in comment </s>
funcom_train/22048020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadImage() { // Get current classloader ClassLoader cl = this.getClass().getClassLoader(); // Create icons try { image = new ImageIcon(cl.getResource(imageURL)); } catch (Exception e) { image = null; // Image not found so lets show a debug message Misc.debug(this, "\"" + imageURL + "\" image not found!"); } } COM: <s> attempt to load or reload the image into memory </s>
funcom_train/22982875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateComboBox(JComboBox combobox, String[] items, String selected) { for (int i = 0; i < items.length; i++) { combobox.addItem(items[i]); if (items[i].equals(selected)) { combobox.setSelectedIndex(i); } } } COM: <s> populates a combobox with an array of strings and selects the default </s>
funcom_train/41446091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == this) return true; if (!(obj instanceof Alarm)) return false; Alarm that = (Alarm)obj; return this.notificationSource.equals(that.notificationSource) && this.alarmType.equals(that.alarmType) && this.instanceID.equals(that.instanceID); } COM: <s> compare this alarm for equality with another object </s>
funcom_train/15616942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WikiBaseFascade wikiBase = new WikiBaseFascade() { public void writeTopic(Topic topic, TopicVersion topicVersion, LinkedHashMap categories, List<String> links, Object transactionObject) throws DataAccessException, WikiException { WikiBase.getDataHandler().writeTopic(topic, topicVersion, null, null); } }; COM: <s> defaul wiki base fascade for production </s>
funcom_train/2292612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CmsListDefaultAction getDefaultAction(String actionId) { Iterator it = m_defaultActions.iterator(); while (it.hasNext()) { CmsListDefaultAction action = (CmsListDefaultAction)it.next(); if (action.getId().equals(actionId)) { return action; } } return null; } COM: <s> returns a default action by id </s>
funcom_train/37593095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCaretMovementCyclesWhenAtEnd() throws EditDocumentException { _doc.insertText(_doc.getLength(), "test text", InteractionsDocument.DEFAULT_STYLE); _controller.moveToEnd(); _controller.moveRightAction(); assertEquals("Caret was not cycled when moved right at the end.", _doc.getPromptPos(), _text.getCaretOffset()); } COM: <s> tests that moving the caret right when its already at the end will </s>
funcom_train/5369387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point findScreenCenter(JFrame dialog) { Dimension screenSize = new Dimension(Toolkit.getDefaultToolkit().getScreenSize()); Dimension mySize = dialog.getSize(); Point fin = new Point(0, 0); fin.x = (screenSize.width - mySize.width) / 2; fin.y = (screenSize.height - mySize.height) / 2; return fin; } COM: <s> find the center of the screen </s>
funcom_train/27911091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyFilter(int from, int to) { PluginCollection collection = _filters; PluginIfc plugin = collection.get(from); PluginIfc newPlugin = (PluginIfc) plugin.clone(); newPlugin.setEnabled(false); collection.add(to, newPlugin); _ui.updateUI(); } COM: <s> duplicates the filter indicated by the code from code index placing </s>
funcom_train/43253515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCompletedTasks() { int total = 0; for(int i = 0; i < childList.size(); i++) { if(((Task)childList.get(i)).getProgress() == 1.0) { total++; total += ((Task)childList.get(i)).getCompletedTasks(); } else total += ((Task)childList.get(i)).getCompletedTasks(); } return total; } COM: <s> returns the number of completed child tasks </s>
funcom_train/13725027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNotEvaluableBuiltinPassing() throws Exception { final String prog = "i(?X) :- ?X < ?Y, e(?Y)." + "?- i(?X)."; final LeftToRightSip sip = parseProgram(prog); assertEquals("There must be not edges created", Collections.<LabeledEdge<ILiteral, Set<IVariable>>>emptySet(), sip.getEdges()); } COM: <s> checks whether not evaluable built ins dont produce any passings </s>
funcom_train/31753078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNameAuto() { if (autogenerateName) { if (person == null || person.getDisplayName() == null || person.getDisplayName().length() == 0) { this.name = userID; } else { this.name = person.getDisplayName() + " (" + userID + ")"; } } } COM: <s> checks whether the flag </s>
funcom_train/20894772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Expression createOrEqExpression(Set dests) { Iterator it = dests.iterator(); if (!it.hasNext()) throw new RuntimeException("No elements for an OR expression"); State st = (State)it.next(); Expression e = new Expression( Expression.EQ, MODE, new Expression(getRealStateName(st.toString()))); while (it.hasNext()) { st = (State)it.next(); e = new Expression( Expression.OR, e, new Expression( Expression.EQ, MODE, new Expression(getRealStateName(st.toString())))); } return e; } COM: <s> the method takes a set of states and constructs an </s>
funcom_train/511074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startTest(Test test) { this.testRunTime = 0; this.inTest = true; final int count = test.countTestCases(); synchronized (this) { runTests += count; } for (TestListener listener : cloneListeners()) { listener.startTest(test, this); } } COM: <s> informs the result that a test will be started </s>
funcom_train/45561808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processDefine( Object element ) throws XSWTException { if ( parser.getAttributeCount( element ) != 0 ) { throw new XSWTException( "Usage: <x:define><prototypeObject x:id=\"idInMap\"/></x:extends>\n", element ); } // Process the children. int count = parser.getChildElementCount( element ); for ( int i = 0; i < count; i++ ) { processChild( parser.getChildElement( element, i ), null ); } } COM: <s> process the x define keyword </s>
funcom_train/38552660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initialize() { try { RMIUtils.bindInterface(getRMIPort(), getRMIName(), this); } catch (Cube42Exception e) { e.log(LogSeverity.FATAL); System.exit(BAD_EXIT); } this.mThread = new MaintainenceThread(MAINTAINENCE_INTERVAL); } COM: <s> initializes the sscclient </s>
funcom_train/33783957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TypeRelationDO saveTypeRelation(final TypeRelationDO typeRelationDO) throws StorageException { final Session session = getSession(); final Transaction transaction = session.beginTransaction(); try { session.saveOrUpdate(typeRelationDO); transaction.commit(); } catch (final HibernateException e) { transaction.rollback(); throw new StorageException(e, MapErrorCodes.STORAGE_ERROR); } return typeRelationDO; } COM: <s> saves a type relation </s>
funcom_train/26455047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaxEntries(int newLimit) { if (newLimit > 0) { maxEntries = newLimit; synchronized (this) { // because remove() isn't synchronized while (size() > maxEntries) { remove(removeItem(), false); } } } else { // Capacity must be at least 1 throw new IllegalArgumentException("Cache maximum number of entries must be at least 1"); } } COM: <s> set the cache capacity </s>
funcom_train/3720608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HL7Reader getReader(InputStream in) throws LLPException { try { if (charset != null) { return new MinLLPReader(in, charset); } else { return new MinLLPReader(in); } } catch (IOException e) { throw new LLPException("Can't create MinLLPReader with the given input stream: " + e.getMessage(), e); } } COM: <s> creates an hl7 reader that implements message reading according to </s>
funcom_train/51298965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setTreeSelection() { if (orgId == 0) treeOrganizations.setSelectedGroup(selectedId); else { TreeNode parent = treeOrganizations.getNode( (TreeNode) treeOrganizations.getModel().getRoot(), orgId); TreeNode node = treeOrganizations.getNode(parent, selectedId); treeOrganizations.setSelectionPath(new TreePath( ((DefaultTreeModel) treeOrganizations.getModel()) .getPathToRoot(node))); } } COM: <s> set tree selection </s>
funcom_train/21995770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void read(InputStream is) throws IOException, XmlException { log.debug("read(InputStream)"); if (is == null) throw new XmlException("you must specify an input stream to import playlists"); try { SAXBuilder builder = new SAXBuilder(); document = builder.build(is); } catch (JDOMException e) { throw new XmlException("xml-problem reading playlists", e); } } COM: <s> refresh the document from the specified file </s>
funcom_train/4476603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONObject toJSONObject(JSONArray names) { if (names == null || names.length() == 0 || length() == 0) { return null; } JSONObject jo = new JSONObject(); for (int i = 0; i < names.length(); i += 1) { jo.put(names.getString(i), this.opt(i)); } return jo; } COM: <s> produce a jsonobject by combining a jsonarray of names with the values of </s>
funcom_train/45231777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnOk() { if (btnOk == null) { btnOk = new JButton(); btnOk.setBounds(new java.awt.Rectangle(277, 213, 103, 32)); btnOk.setText(Messages.getString("VcDlgAbout.btnOk")); //$NON-NLS-1$ btnOk.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { close(); } }); } return btnOk; } COM: <s> this method initializes btn ok </s>
funcom_train/47824628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String stopBundle(String param) { long number; try{ number = Long.parseLong(param); }catch(NumberFormatException e) { return ERR+"Invalid bundle number in call to 'stop'.\n"+e.getMessage(); } Bundle bundle = context.getBundle(number); if(bundle==null) { return ERR+"Bundle number does not exist.\n"; } try { bundle.stop(); } catch (BundleException e) { return ERR+"Bundle could not be stopped.\n"+e.getMessage(); } return OK; } COM: <s> stops a bundle </s>
funcom_train/26239907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillQuestionComboBox() { questionComboBox.removeAllItems(); for (int i=0; i<sentQuestionsModel.getRowCount(); i++) { ComboBoxEntry entry = new ComboBoxEntry(sentQuestionsModel.getQuestionAt(i)); questionComboBox.addItem(entry); } } COM: <s> fill the question combo box </s>
funcom_train/4918039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRepeatedDescriptiveOption() throws Exception { this.record_Factory(COMMAND, "descriptive", null, true); this.record_Command(COMMAND, "descriptive", null); this.record_Argument(COMMAND, "descriptive", "A"); this.record_Argument(COMMAND, "descriptive", "B"); this.doTest("--descriptive A --descriptive B", COMMAND); } COM: <s> ensure can parse command with repeated descriptive parameter </s>
funcom_train/3857812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MBeanOperationInfo getOperationInfo(MBeanInfo beanInfo, String operationName, java.util.List parameterList) { MBeanOperationInfo[] operations = beanInfo.getOperations(); for (int counter = 0; counter < operations.length; counter++) { if (operations[counter].getName().equals(operationName)) { if (checkSignature(operations[counter], parameterList)) { return operations[counter]; } } } return null; } COM: <s> finds the mbean operation info for the indicated operation name </s>
funcom_train/43095436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MessageNode getNode(int position) { if (position < linkPositions.size()) { return (MessageNode) linkPositions.get(position); } MessageNode node = null; for (int cnt = position - linkPositions.size(); cnt >= 0; cnt--) { node = new MessageNode(this); linkPositions.add(node); } calcBounds(); return node; } COM: <s> gets a node that has the given position creates new nodes if needed </s>
funcom_train/3815217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(Graphics graphics) { g = graphics; size = getSize(); super.paintComponent(g); if (zipDB != null) { g.setColor(NORM_COLOR); for (ZipInfo zi : zipDB) { plot(zi, false); } if (currentInfo != null) { g.setColor(HIGHLIGHT_COLOR); plot(currentInfo, true); } } } COM: <s> updates the map </s>
funcom_train/34104637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BufferedImage createInvertedImage(final Image image) { BufferedImage invertedImage = new BufferedImage(image.getWidth(null), image.getHeight(null), BufferedImage.TYPE_INT_ARGB); ((Graphics2D) invertedImage.getGraphics()).drawImage(image, AffineTransform.getRotateInstance(Math.PI, 0.5 * image.getWidth(null), 0.5 * image.getHeight(null)), null); return invertedImage; } COM: <s> invert an image </s>
funcom_train/17773989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLowerLimit(Comparable<T> min) { if (min == null) { this.min = null; } else { if (!(myClass.isInstance(min))) { throw new ClassCastException("min (" + min + ") is not an " + "instance of " + myClass); } this.min = min; } } COM: <s> sets the smallest allowed value </s>
funcom_train/43605603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Set labelRefs( Block b ) { final Set result = new HashSet(); b.visit( new NodeVisitor() { public Node leave( Node old, Node n, NodeVisitor v ) { if ( n instanceof Branch ) { result.add( ((Branch)n).label() ); } return n; } } ); return result; } COM: <s> traverses a block and determines the set of label references </s>
funcom_train/17059829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*private Connection getConnection() throws SQLException { StringBuffer connect = new StringBuffer(); connect.append(realm.getConnectionURL()); Connection connection = DriverManager.getConnection(connect.toString(), realm.getConnectionName(), realm.getConnectionPassword()); return connection; }*/ COM: <s> get a connection to this servers user database </s>
funcom_train/41668089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (getDate() == null) { return "0000-00-00 00:00:00"; } int ampm = getAmpm(); String ampmString = "PM"; if (ampm == Calendar.AM) { ampmString = "AM"; } return getYear() + "-" + getMonth() + "-" + getDay() + " " + getHour() + ":" + getMinute() + ":" + getSecond() + " " + ampmString; } COM: <s> provides an easy date time as a string </s>
funcom_train/8039405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTrigger() { DOMConfigurator.configure("input/xml/smtpAppender1.xml"); SMTPAppender appender = (SMTPAppender) Logger.getRootLogger().getAppender("A1"); TriggeringEventEvaluator evaluator = appender.getEvaluator(); assertTrue(evaluator instanceof MockTriggeringEventEvaluator); } COM: <s> tests that triggering policy element will set evaluator </s>
funcom_train/9234835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTypeName() { switch(type) { case GLOBALDEFAULT: return "globaldefault"; case GLOBAL: return "global"; case THEME: return "theme"; case PROFILE: return "profile"; case IRCD: return "ircd"; case NETWORK: return "network"; case SERVER: return "server"; case CHANNEL: return "channel"; default: return "Unknown"; } } COM: <s> returns a string representation of the type of this target </s>
funcom_train/51301118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeExternal(ObjectOutput out) throws IOException { int size = rowsInfo.size(); out.writeInt(size); for (int i = 0; i < size; i++) { MSTEquivalenceRelation rel = (MSTEquivalenceRelation) rowsInfo.elementAt(i); out.writeObject(rel); } } COM: <s> save information for use on the client </s>
funcom_train/25841588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FBMethod auth_getSession(String authToken) { Log.d(LOG, "facebook.auth.getSession"); TreeMap<String, String> parameters = new TreeMap<String, String>(); parameters.put("auth_token", authToken); return getMethodFactory().create("facebook.auth.getSession", parameters); } COM: <s> create a fbmethod that requests a session object </s>
funcom_train/31906899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GVTFont deriveFont(float size) { return new SVGGVTFont(size, fontFace, glyphUnicodes, glyphNames, glyphLangs, glyphOrientations, glyphForms, ctx, glyphElements, missingGlyphElement, hkernElements, vkernElements, textElement); } COM: <s> creates a new gvtfont object by replicating this font object and </s>
funcom_train/44167684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getProductivity(Unit... additionalUnits) { if (getGoodsOutputType() == null) { return 0; } int productivity = 0; for (Unit unit : getUnitList()) { productivity += getUnitProductivity(unit); } for (Unit unit : additionalUnits) { if (canAdd(unit)) { productivity += getUnitProductivity(unit); } } return Math.max(0, productivity); } COM: <s> returns the maximum productivity of worker s currently working </s>
funcom_train/34783291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean validateControls() { // don't attempt to validate controls until they have been created if (containerGroup == null) { return false; } problemType = PROBLEM_NONE; problemMessage = "";//$NON-NLS-1$ if (!validateContainer() || !validateResourceName()) { return false; } IPath path = containerGroup.getContainerFullPath().append( getResource()); return validateFullResourcePath(path); } COM: <s> validates the values for each of the groups controls </s>
funcom_train/16830025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void incrementCount3D(Object first, Object second, Object third, double count) { if (depth != 3) { wrongDepth(); //throws exception } this.addToTotal(count); GeneralizedCounter next = this.conditionalizeHelper(first); next.incrementCount2D(second, third, count); } COM: <s> equivalent to increment count new object first second third count </s>
funcom_train/2615512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendAlert(String subject, String text, String recipients) { SystemMailConfiguration config = Roma.component(ApplicationConfigManager.class).getSystemMail(); if (config != null) { OutBoxMailMessageInstance message = MailingHelper.getInstance().buildMailMessage(subject, text, recipients, config.getSendingMail()); if (message != null) { MailingHelper.getInstance().send(message); } } } COM: <s> method that provides send mail messages </s>
funcom_train/49703977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void process (FetchDocument doc) { Iterator<IProcessorModule> it = modules.iterator(); while (it.hasNext()) { IProcessorModule mod = it.next(); logger.debug("Going to send doc to module " + mod); try { mod.process(doc); } catch (RuntimeException e) { logger.error("Unexpected exception processing module " + mod, e); throw e; } } } COM: <s> sends the document to all the modules in sequence </s>
funcom_train/47147203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearSelection() { // there is nothing selected - bug fix ID 628818 if (selectionCount() == 0) { // avoid unnecessary selection changed event when nothing has to be cleared return; } FigureEnumeration fe = selection(); while (fe.hasNextFigure()) { fe.nextFigure().invalidate(); } fSelection = CollectionsFactory.current().createList(); fSelectionHandles = null; fireSelectionChanged(); } COM: <s> clears the current selection </s>
funcom_train/14011058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getBlogEntryFilename(String content) { String hashable = content; if (content.length() > MAX_HASHABLE_LENGTH) { hashable = hashable.substring(0, MAX_HASHABLE_LENGTH); } String baseFilename = BlojsomUtils.digestString(hashable).toUpperCase(); String filename = baseFilename + _blogEntryExtension; return filename; } COM: <s> return a filename appropriate for the blog entry content </s>
funcom_train/44852285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QueryResult getAuthorsCompletions(Long inAuthorID, Long inGroupID, Integer[] inState) throws VException, SQLException { KeyObject lKey = new KeyObjectImpl(); lKey.setValue(ResponsibleHome.KEY_TYPE, ResponsibleHome.Type.AUTHOR.getValue()); return getContributionsResponsibleFor(lKey, inAuthorID, inGroupID, inState); } COM: <s> returns all completions being in the specified state in the specified group </s>
funcom_train/18730466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void display(GL gl, GLU glu, boolean selection) { gl.glPushMatrix(); gl.glTranslatef(x, y, 0); if (selection) { drawHit(gl, glu); } else { //drawHit(gl, glu); draw(gl, glu); } gl.glPopMatrix(); } COM: <s> displays this widget in the global coordinatesystem of the window </s>
funcom_train/28426469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyRmdir(IConnection connection, FileObject file) { StatisticsObserver observer = this.observer; if (observer != null) { observer.notifyRmdir(); } FileObserver fileObserver = this.fileObserver; if (fileObserver != null) { fileObserver.notifyRmdir(connection, file); } } COM: <s> observer remove directory notification </s>
funcom_train/41157483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DefaultMutableTreeNode load() { XMLDecoder decoder = null; DefaultMutableTreeNode rootNode = null; // Opening the file try { decoder = InkFileUtil.openFileForRead(treeFile); } catch (Exception e) { System.out.println(e.getMessage()); return null; } // Reading from file try { rootNode = (DefaultMutableTreeNode) decoder.readObject(); } catch (ArrayIndexOutOfBoundsException ex) { ex.printStackTrace(); return null; } return rootNode; } COM: <s> load the tree from a xml file </s>
funcom_train/19279766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRightSwitchOn(boolean value) { Icon icon = switchOffImage; String tooltip = getLocalizedMessage("rightSwitchStatusLabel.tooltip.off");//$NON-NLS-1$ if (value == true) { icon = switchOnImage; tooltip = getLocalizedMessage("rightSwitchStatusLabel.tooltip.on");//$NON-NLS-1$ } rightSwitchStatusLabel.setToolTipText(tooltip); rightSwitchStatusLabel.setIcon(icon); } COM: <s> sets the right switch status </s>
funcom_train/38575162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void Display(QFunction Q) throws Exception { DecimalFormat f = new DecimalFormat(" 0.00;-0.00"); StringBuilder str= new StringBuilder(); for(int i = 1;i< levers;i++){ str.append("+--------"); } str.append("+\n"); for(int i = 1;i< levers;i++){ double param = Q.getValue(STATE_SET.get(0), new Action(new double[] {i})); str.append("| "+f.format(param)+" "); } str.append("|\n"); for(int i = 1;i< levers;i++){ str.append("+--------"); } str.append("+\n"); //System.out.println(str); log4j.debug(str); } COM: <s> prints out all values on the console </s>
funcom_train/44492344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void activateBrowserWithTitle(String title) { InternetExplorer matchingWindow = session.getBrowserWithTitle(title); if (matchingWindow != null) { session.removeBrowser(matchingWindow); session.addBrowser(matchingWindow); activateLastNewWindow(); }else{ throw new RuntimeException("Could not activate window with the provided title - '"+title+"'!"); } } COM: <s> activates the browser with the provided title </s>
funcom_train/38415729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AStarDoubleServer getAStar() { if( aStarDoubleServer == null) { aStarDoubleServer = new AStarDoubleServer(); aStarDoubleServer.setMask( manager.getMapMask() ); aStarDoubleServer.setTileSize( 32 ); aStarDoubleServer.setSpriteSize( 1 ); } return aStarDoubleServer; } COM: <s> return the astar double for this map </s>
funcom_train/51811893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInputStream() throws Exception { oranjestad.commons.io.ByteArrayResource byteResource = new oranjestad.commons.io.ByteArrayResource(); IOUtils.copy( resource.getInputStream(), byteResource.getOutputStream()); byteResource.getOutputStream().close(); assertEquals("Bytes not propogated", getName(), new String( byteResource.toByteArray())); } COM: <s> tests that the underlying input stream can be read </s>
funcom_train/19409029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Object o1, Object o2) { Collection c1 = (Collection) o1; Collection c2 = (Collection) o2; if (c1.size() != c2.size()) return c1.size() - c2.size(); Iterator it1 = c1.iterator(); Iterator it2 = c2.iterator(); while (it1.hasNext() && it2.hasNext()) { int comp = ((Comparable) it1.next()).compareTo(it2.next()); if (comp != 0) return comp; } return 0; } COM: <s> compare two collections </s>
funcom_train/18895535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertFirst(AVLNode newNode) throws IOException { if (!isEmpty()) { throw new IllegalStateException( "insertFirst() called on AVL tree that is not empty"); } // Tree is empty. Set the root. setRootId(newNode.getId()); incNrNodes(); } COM: <s> insert the first avlnode in the tree </s>
funcom_train/45248490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isParentMatch(Viewer viewer, Object element){ Object[] children = ((ITreeContentProvider) ((AbstractTreeViewer) viewer) .getContentProvider()).getChildren(element); if ((children != null) && (children.length > 0)) { return isAnyVisible(viewer, element, children); } return false; } COM: <s> check if the parent category is a match to the filter text </s>
funcom_train/46718680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTextualValue() { String textValue = ""; if (date != null) { String dateFormatPattern = getFormatPattern(precision); SimpleDateFormat fmt = new SimpleDateFormat(dateFormatPattern); fmt.setTimeZone( TimeZone.getTimeZone(stdTimeZone) ); textValue = fmt.format(this.date); // correct time zone identifier if (precision >= PREC_MINUTE) { int len = textValue.length(); textValue = textValue.substring(0,len-2)+":"+textValue.substring(len-2,len); } } return textValue; } COM: <s> format this date into a standard textual form used for </s>
funcom_train/7965314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateRequest(final HttpServletRequest request) { final String contentType = request.getContentType(); if (contentType == null || !contentType.equals("application/octet-stream")) { throw new IllegalArgumentException("Request has invalid " + "Content-Type. Only application/octet-stream is " + "accepted by this servlet."); } } COM: <s> validates the post request </s>
funcom_train/33607055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { if (e.getSource() == timer) { if (e.getActionCommand().equals(TimerStatus.STOPPED.toString())) plottables.setAnimationOn(false); else { if (!plottables.isAnimationOn()) plottables.setAnimationOn(true); plottables.recomputeAtTime(visometry, visometryGraphics, timer); } repaint(); } } COM: <s> here we listen for any action caused by the timer </s>
funcom_train/23011244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Layer getLayerByDsId(String datasetId) { if(!Strings.isNullOrBlank(datasetId)){ int count = getLayerCount(); for (int i=0;i<count;i++) { Layer lyr = (Layer)layers.elementAt(i); if(lyr.datasetId.equals(datasetId)) return lyr; } } return null; } COM: <s> searches layer list and returns a code layer code that has </s>
funcom_train/29720223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeModeActionListener(ValueChangeEvent evt) { Boolean isForAssignment = (Boolean) evt.getNewValue(); this.selectedProjectId = (String) WebSessionService .getAttribute(WebSessionService.PROJECT_ID); if (!isForAssignment) { // show the confirmation popup. this.visiblePopup = true; } else { this.participantService.saveProjectForAProjectManager(this .getParticipantFromSession().getId(), this.selectedProjectId, true); } } COM: <s> method permits to change the mode </s>
funcom_train/9769773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test(expected=IllegalArgumentException.class) public void testConstructorNoHonor() { Combo[] combos = new Combo[] {this.bamboo_123, this.bamboo_444, this.bamboo_33, this.bamboo_999, this.bamboo_234}; new Scoreentry_ONE_SUIT_WITH_HONORS(combos); } COM: <s> check if it fails if no element is a honor combo </s>
funcom_train/12193184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addString(String value) { if (null == value) { internalAdd(currentPath.resolve("null"), MetadataClassMapper.NULL, true); } else { internalAdd(currentPath.resolve(value), MetadataClassMapper.NULL, false); } } COM: <s> add a string value this may be null </s>
funcom_train/7909026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putIniNodeTable(int inode, String path, String serialPath){ AllocationBlockINodeEntry abe = new AllocationBlockINodeEntry(inode, path, serialPath); myLock.lock(); { isModified = true; allocationBlock.allocationINodeEntries.remove(abe); allocationBlock.allocationINodeEntries.add(abe); iNodeToSSFSPath.put(inode, path); iNodeToSerialPath.put(inode, serialPath); SSFSPathToSerialPath.put(path, serialPath); } myLock.unlock(); } COM: <s> adds an allocation entry into the table </s>
funcom_train/34889174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Object fh1, Object fh2) { long lastModified1 = ((FileHolder) fh1).lastModDate; long lastModified2 = ((FileHolder) fh2).lastModDate; if (lastModified1 < lastModified2) return -1; else if (lastModified1 > lastModified2) return 1; else return 0; } COM: <s> compares two file holders by the last modified time of their </s>
funcom_train/23411118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRoleTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Role_RoleType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Role_RoleType_feature", "_UI_Role_type"), OMPackage.Literals.ROLE__ROLE_TYPE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the role type feature </s>
funcom_train/33890772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getNext() { if (next == null) { next = new JButton(); next.setBounds(new Rectangle(503, 315, 65, 18)); next.setText("Next"); next.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { Function4Invoker function4Invoker = new Function4Invoker(); function4Invoker.invoke(); hideMe(); } }); } return next; } COM: <s> this method initializes next </s>
funcom_train/51142944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buffer = new StringBuffer(super.toString()); buffer.append(" ----- Target VariableStar Values="); if( this.type != null ) { buffer.append("\nVariable star type="); buffer.append(this.type); } if( !Float.isNaN(this.maxApparentMag) ) { buffer.append("\nMax apparent magnitude="); buffer.append(this.maxApparentMag); } return buffer.toString(); } COM: <s> overwrittes to string method from java </s>
funcom_train/4016740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadPageQnts(List<IFormElement> elements, IFormElement questionDef, SkipRule skipRule){ for(int index = 0; index < elements.size(); index++){ IFormElement qtnDef = elements.get(index); if(qtnDef == questionDef) continue; if(skipRule != null && skipRule.containsActionTarget(qtnDef.getId())) continue; lbAllQtns.addItem(qtnDef.getDisplayText(), qtnDef.getBinding()); } } COM: <s> loads the all questions list box with questions from a given page </s>
funcom_train/38551209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(String line) throws IOException { final String text = line; try { AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws IOException{ if (printWriter == null){ if (!file.exists()){ file.createNewFile(); } printWriter = new PrintWriter(new java.io.FileWriter(file)); } printWriter.print(text); return null; } }); } catch (PrivilegedActionException e) { throw (IOException) e.getException(); } } COM: <s> writes the given string to the file this file writer represents </s>
funcom_train/1282654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Graphics2D getGraphics() { if (!isWindowed) { Window window = this.device.getFullScreenWindow(); if (window != null) { BufferStrategy strategy = window.getBufferStrategy(); return (Graphics2D)strategy.getDrawGraphics(); } else { return null; } } else { return (Graphics2D)frame.getGraphics(); } } COM: <s> get page to render on </s>
funcom_train/3563671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateDataSet(Long dataSetID, String dataSetName) throws DbException { LinkedList parmList; parmList = new LinkedList(); addIfNotNull(parmList, "dataSetID", dataSetID); addIfNotNull(parmList, "dataSetName", dataSetName); simpleRequest(UPDATE_DATA_SET_REDUCED_PAGE, "Cannot update data set", parmList); } COM: <s> updates a data set </s>
funcom_train/24441509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildSearchResult(Composite parent) { _searchResultControl = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(1, false); layout.marginHeight = 5; layout.marginWidth = 5; _searchResultControl.setLayout(layout); _matchSummaries = new MatchSummary [0]; _toolkit = new FormToolkit(_parent.getDisplay()); updateResults(_matchSummaries); } COM: <s> build the bottom portion of the panel for displaying search results </s>
funcom_train/18950520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEmptySection( String pSectionName ) { boolean result = true; if( ErrorUtil.not_null( pSectionName, "pSectionName" ) ) { if( iSectionsByName.containsKey( pSectionName ) ) { result = ((Section)iSectionsByName.get(pSectionName)).isEmpty(); } } return result; } COM: <s> true if section content is empty </s>
funcom_train/46114103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void endFilter() { // clear out all unended temp events eventBuilder.flushRemainingTempEvents(); // make sure we flush out any whitespace at the end of the file if (bufferedWhitespace.length() > 0) { eventBuilder.addDocumentPart(bufferedWhitespace.toString()); bufferedWhitespace.setLength(0); bufferedWhitespace.trimToSize(); } // add the final endDocument event eventBuilder.addFilterEvent(createEndFilterEvent()); } COM: <s> end the current filter processing and send the </s>
funcom_train/51379716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNestedOutputs(Output o, Throwable error) { ByteArrayOutputStream bos = new ByteArrayOutputStream(); error.printStackTrace(new PrintStream(bos)); o.addNested(new Output("stackTrace", bos.toString())); o.addNested(new Output("errorMessage", error.getMessage())); } COM: <s> adds the exceptions as nested outputs to the original log message </s>
funcom_train/16380474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addKindnessExtensionTimePropertyDescriptor(Object object) { itemPropertyDescriptors.add (new UnsettablePropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ConfigType1_kindnessExtensionTime_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ConfigType1_kindnessExtensionTime_feature", "_UI_ConfigType1_type"), CTEPackage.Literals.CONFIG_TYPE1__KINDNESS_EXTENSION_TIME, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the kindness extension time feature </s>
funcom_train/22578419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addListener2Set(ConfigurationChangeListener ccl, URL urlSet[]) { Set<URL[]> set = listener2set.get(ccl); if (set == null) { set = new HashSet<URL[]>(); listener2set.put(ccl, set); } // Let the set sort out if the urlSet is already there set.add(urlSet); } COM: <s> look up the entry in the </s>
funcom_train/21632984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void go() { for(int i=0;i<this.grid.length;i++) { this.hopfield.getCurrentState().setData(i, grid[i]); } this.hopfield.run(); for(int i=0;i<this.grid.length;i++) { grid[i] = this.hopfield.getCurrentState().getBoolean(i); } repaint(); } COM: <s> run the neural network </s>
funcom_train/40539691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void signalToken(final ProcessInstance processInstance, final String tokenName, final String transitionId) { execute(new BpmCallback() { public Object doInBpm(JbpmContext context) { Token token = processInstance.getRootToken().findToken(tokenName); if (token == null) { processInstance.signal(transitionId); } else { token.signal(transitionId); } return null; } }); } COM: <s> signals a specific token with the given transition to take </s>
funcom_train/7395013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Date nextStandardDate(Date date, DateTickUnit unit) { Date previous = previousStandardDate(date, unit); Calendar calendar = Calendar.getInstance(this.timeZone, this.locale); calendar.setTime(previous); calendar.add(unit.getCalendarField(), unit.getCount()); return calendar.getTime(); } COM: <s> returns the first standard date based on the specified field and </s>
funcom_train/28752885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPurity(Long newVal) { if ((newVal != null && this.purity != null && (newVal.compareTo(this.purity) == 0)) || (newVal == null && this.purity == null && purity_is_initialized)) { return; } this.purity = newVal; purity_is_modified = true; purity_is_initialized = true; } COM: <s> setter method for purity </s>
funcom_train/14415973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(CIMValue pValue) { if (iType != null && pValue != null && pValue.getType().getType() != iType.getType()) { throw new IllegalArgumentException( "value type does not match property type"); } this.iValue = pValue; if (iType == null && pValue != null) iType = pValue.getType(); } COM: <s> specifies the cimvalue for this cimargument </s>
funcom_train/2628513
/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"); Object obj = null; PropertyTypeWrapper instance = null; boolean expResult = false; boolean result = instance.equals(obj); 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 property type wrapper </s>
funcom_train/15695148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void putInColumns(WritableSheet sh, String key, int col) { Map<String, Integer> cols = this.colsOfSheet.get(sh); if (cols == null) { cols = new HashMap<String, Integer>(); cols.put(key, col); this.colsOfSheet.put(sh, cols); } else { cols.put(key, col); } } COM: <s> called at the beginning to collect information on the schema </s>
funcom_train/34632012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String treenodesToString(List<TreeNode> nodes) { StringBuilder sb = new StringBuilder(); TreeNode prev = null; for (TreeNode tn : nodes) { if (prev != null) { sb.append(prev.getTextContent()); String spaces = prev.computeSpacesBetweenPositions(prev .getEndLine(), prev.getEndCol(), tn.getStartLine(), tn .getStartCol()); sb.append(spaces); } prev = tn; } sb.append(prev.getTextContent()); return sb.toString(); } COM: <s> a list of treenodes is flated to its textual representation </s>
funcom_train/8462136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttributeSize(ScoreAttribute sa, float size, SizeUnit unit) { if (!(sa.getDefaultValue() instanceof ScoreAttribute.Size)) throw new RuntimeException(sa.toString() + " is not a size attribute"); m_attributes.put(sa.getName(), new ScoreAttribute.Size(size, unit)); notifyListeners(); } COM: <s> sets the size associated to an attribute </s>
funcom_train/27767185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void probeOldPlanets(Vector np, int turnsold) { Vector t = ParseReport.getPlanetList(); for (int a = 0; a < t.size(); a++) { Planet p = (Planet) t.elementAt(a); if (p.getLastVisited() + turnsold < ParseReport.currentTurn .getTurnNumber() && !np.contains(p)) { np.addElement(p); } } } COM: <s> parse report obing all planets not visited in the past turnsold turns </s>
funcom_train/43887543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(SimpleFeature feature) { init(); this.featureType = (SimpleFeatureType) feature.getType(); for (Iterator i = feature.attributes().iterator(); i.hasNext();) { this.attributes.add(i.next()); // TODO: copy } } COM: <s> initialize the builder with the provided feature </s>
funcom_train/4149603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetValues() { List<String> keys = m1.getValues(); assertNotNull(keys); assertEquals(3, keys.size()); assertEquals("aaronz", keys.get(0)); assertEquals("beckyz", keys.get(1)); assertEquals("cat", keys.get(2)); } COM: <s> testing the get values method </s>