__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/32649094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createPosXTextField() { GridData gridData = new GridData(); gridData.widthHint = 30; posXTextField = new ThemeTextField(this, SWT.NONE); posXTextField.setIntValued(true); posXTextField.setEmbeddedInBindableGroup(false); posXTextField.setLayoutData(gridData); posXTextField.setBindingSubPath("imagePositionX"); } COM: <s> this method initializes pos xtext field </s>
funcom_train/37229091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAltIdentifier( String sAltId ) { HL7Element e = new SimpleElement( iLevel + 1, this ); e.setType( "ST" ); e.setName( "CWE.4" ); e.setValue( sAltId ); try { setComponent( e, 4 ); } catch( MalformedFieldException mfe ) { mfe.printStackTrace(); } } COM: <s> set the alternate coded value of an existing coded element </s>
funcom_train/49778214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void syncPlaycount(final ITunesTrack track) { if (track.getPlayedCount() < track.getOnlinePlayedCount()) { track.setPlayedCount(track.getOnlinePlayedCount()); logAction(Action.PLAYCOUNT_SYNCED, track, Integer.toString(track.getOnlinePlayedCount())); } } COM: <s> synchronises an i tunes playcount with last </s>
funcom_train/15555626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getConnectButton() { if (connectButton == null) { connectButton = new JButton(); connectButton.setText(GEEClient.language.getString("connect")); connectButton.setLocation(32, 140); connectButton.setSize(110, 25); connectButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { connect(); } }); } return connectButton; } COM: <s> this method initializes j button </s>
funcom_train/3112621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notify(NotifyStrategy strategy) { //// 0. Check if enabled. If not, exit. if (hasNotifyEnabled() == false) { return; } //// 1. Initializations. Iterator it = watchers.iterator(); Watcher w; while (it.hasNext()) { w = (Watcher) it.next(); strategy.runNotify(w); } } // of notifyWatchers COM: <s> this is a generic method for doing notifications </s>
funcom_train/17788431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readSOC() throws ErrorException, IOException { if (in.readShort() != JPCMarkers.SOC) { in.seek(in.getPos() - 2); // Rewind 2 bytes the file pointer throw new ErrorException("Start Of Code Marker (SOC) has not been found"); } //End of SOC marker mainHeaderInitialPos = in.getPos() - 2; markerFound = false; } COM: <s> reads the soc marke and retrieves the parameters contained </s>
funcom_train/3083563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isNodeSibling(TreeNode anotherNode) { boolean retval; if (anotherNode == null) { retval = false; } else if (anotherNode == this) { retval = true; } else { TreeNode myParent = getParent(); retval = (myParent != null && myParent == anotherNode.getParent()); if (retval && !((DefaultMutableTreeNode) getParent()).isNodeChild(anotherNode)) { throw new InternalError("sibling has different parent"); } } return retval; } COM: <s> returns true if code another node code is a sibling of has the </s>
funcom_train/11938822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void argTraceSet(int i, Object arg) { i--; // make the index 0 based synchronized (argTrace) { // if an object is being inserted out of sequence, fill up missing // values with null... while (i >= argTrace.size()) { argTrace.add(argTrace.size(), null); } if (arg != null) { argTrace.set(i, arg.toString()); } else { argTrace.set(i, "null"); } } } COM: <s> store an argument bind variable into the arg trace list above for </s>
funcom_train/16294590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void record(PlayStation ps, ActiveBox bx) throws Exception{ forceStop(); recCursor=ps.getCustomCursor(Constants.REC_CURSOR); owner=(bx==null ? null : bx.getContainerResolve()); mainOwner=javax.swing.JOptionPane.getFrameForComponent(ps.getComponent()); showRecordingCursor(); record(); } COM: <s> starts sound recording with visual indications the mouse cursor switchs a </s>
funcom_train/1973358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createPlies() { if (plies == null) { ArrayList<Ply> pliesList = new ArrayList<Ply>(); ArrayList<Byte> jumpIndices = new ArrayList<Byte>(); for (byte i = 0; i < 32; i++) { byte pieceType = board[i]; if (pieceType == PLAYER1_CHECKER || pieceType == PLAYER1_KING) findPlies(i, pliesList, jumpIndices); } plies = pliesList.toArray(new Ply[pliesList.size()]); } } COM: <s> finds and creates the array of plies depending using </s>
funcom_train/926607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTarget() { if (m_SourceList.getSelectedIndex()>=0) { Object[] values = m_SourceList.getSelectedValues(); for (int i=0;i<values.length;i++) { CustomReportElement cre = (CustomReportElement)values[i]; CustomReportElement newCre = (CustomReportElement)cre.clone(); m_TargetListModel.addElement(newCre); m_TargetList.setSelectedValue(newCre, true); } } } COM: <s> add selected sources to targetlist </s>
funcom_train/14222629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(final GeneratedMessage.GeneratedExtension<?, ?> extension) { if (extension.getDescriptor().getJavaType() == FieldDescriptor.JavaType.MESSAGE) { add(new ExtensionInfo(extension.getDescriptor(), extension.getMessageDefaultInstance())); } else { add(new ExtensionInfo(extension.getDescriptor(), null)); } } COM: <s> add an extension from a generated file to the registry </s>
funcom_train/17564102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void adjustForVSB(boolean wantsVSB, Rectangle available, Rectangle vsbR, Insets vpbInsets, boolean leftToRight) { int vsbWidth = vsb.getPreferredSize().width; if (wantsVSB) { available.width -= vsbWidth; vsbR.width = vsbWidth; if (leftToRight) { vsbR.x = available.x + available.width + vpbInsets.right; } else { vsbR.x = available.x - vpbInsets.left; available.x += vsbWidth; } } else { available.width += vsbWidth; } } COM: <s> copied from javax </s>
funcom_train/9575906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerListener(String topicName, MessageListener listener) throws Exception { jndi = new InitialContext(); topicConnectionFactory = (TopicConnectionFactory) jndi.lookup("ConnectionFactory"); connection = topicConnectionFactory.createTopicConnection(); connection.start(); session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); Topic topic = (Topic)jndi.lookup(topicName); subscriber = session.createSubscriber(topic); subscriber.setMessageListener(listener); } COM: <s> registers a listener subscriber to a topic </s>
funcom_train/49441194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MInvoice lookupInvoice(Properties ctx, String documentNo) throws Exception { List<MInvoice> invoices = new Query(ctx, MInvoice.Table_Name, "DocumentNo=?", null) .setParameters(new Object[]{documentNo}) .setApplyAccessFilter(true) .list(); if (invoices.size()>1) { m_log.warning("Document No: " + documentNo + " is ambigous and can't be matched."); return(null); } if (invoices.size()==0) return(null); return(invoices.get(0)); } COM: <s> method to lookup invoice </s>
funcom_train/11739652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startupAction() { view = new DefaultsPreferencesView(ALL_CONTROL, UNINIT_CONTROL); view.setTitle("Update DbEntities Schema"); initController(); view.pack(); view.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); view.setModal(true); makeCloseableOnEscape(); centerView(); view.setVisible(true); } COM: <s> creates and runs the schema update dialog </s>
funcom_train/45453380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(final ApprovalState that) { final int BEFORE = -1; final int EQUAL = 0; final int AFTER = 1; if (this == that) { return EQUAL; } if (this.ordinal < that.ordinal) { return BEFORE; } if (this.ordinal > that.ordinal) { return AFTER; } return EQUAL; } COM: <s> compares this approval state with another for order </s>
funcom_train/3157431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBounds(int x, int y, int width, int height) { if (_userX >= 0 && _userY >= 0) { x = _userX; y = _userY; } super.setBounds(x, y, width, height); } COM: <s> force magnifier to stay at the location the user moved it </s>
funcom_train/7619547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean put(String domain, byte[] secureHash, long save) { if (domain != null && domain.length() != 0) { if (secureHash != null && secureHash.length != 0) { mCacheMap.put( new Integer(mBigScrew ^ domain.hashCode()), new CacheEntry(domain, secureHash, save)); return true; } } return false; } COM: <s> adds the domain secure hash tuple to the cache </s>
funcom_train/9878935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createDegreePanel() { JPanel panel = new JPanel(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.fill = GridBagConstraints.HORIZONTAL; gbc.weightx = 1.0; panel.add(this.degreeCombo_1, gbc); return panel; } COM: <s> creates a panel with a degree combo </s>
funcom_train/48045889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DateTimeField derive(DateTimeRule ruleToDerive) { ISOChronology.checkNotNull(ruleToDerive, "DateTimeRule must not be null"); // optimize special cases switch (size()) { case 0: return null; case 1: return fields.get(0).derive(ruleToDerive); default: return deriveForBase(ruleToDerive); } } COM: <s> derives the value of the specified rule from these fields </s>
funcom_train/4835263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void translate(Direction dir, Graphics2D g2D) { if (moveEnd == 0 || g2D == null || dir == null) { return; } double translateFactor = (moveEnd - lastFrameMs) / (double)MOVE_TIME; switch(dir) { case NORTH: g2D.translate(0, TILE_SPREAD * translateFactor); break; case SOUTH: g2D.translate(0, -TILE_SPREAD * translateFactor); break; case EAST: g2D.translate(-TILE_SPREAD * translateFactor, 0); break; case WEST: g2D.translate(TILE_SPREAD * translateFactor, 0); break; } } COM: <s> translates the passed graphics object for character movement </s>
funcom_train/3935888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkArchive(String inCatalog) { try { ZipFile lZip = new ZipFile(archive); String lName = ((ZipEntry)lZip.entries().nextElement()).getName(); if (lName.startsWith(inCatalog + File.separator)) { return true; } } catch (Exception exc) { RelationsPlugin.logError(0, exc.getMessage(), exc); } return false; } COM: <s> checks the archive for the correct catalog name </s>
funcom_train/5865057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String formatNumber(Object value, String defaultFormat) { if (value == null) return ""; final DecimalFormat df = (DecimalFormat) NumberFormat.getInstance(Locales.getCurrent()); if (_rounding != BigDecimal.ROUND_HALF_EVEN) df.setRoundingMode(RoundingMode.valueOf(_rounding)); String fmt = getFormat(); if (fmt == null) fmt = defaultFormat; if (fmt != null) df.applyPattern(fmt); return df.format(value); } COM: <s> formats a number integer big decimal </s>
funcom_train/40843760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getHeigths(Node node, NodeTemp nodeHeigth) { if(node.scrolledNow || node.children.isEmpty()) return (int)node.height; NodeTemp child; int totalHeigth = 0; int heigths[] = new int[node.children.size()]; for(int i=0;i<node.children.size();i++) { child = new NodeTemp(); nodeHeigth.children.add(child); heigths[i] = getHeigths(node.children.get(i),child); totalHeigth = totalHeigth + heigths[i]+SPACE_Y; } nodeHeigth.heigths = heigths; totalHeigth = totalHeigth -SPACE_Y; nodeHeigth.totalHeigth = totalHeigth; return totalHeigth; } COM: <s> calculates the total height required to show all the nodes children </s>
funcom_train/26509043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IForumComment insertComment(IForumComment comment) throws RAPDBException { return insertComment(comment.getCommentID(), comment.getParentCommentID(), comment.getThreadID(), comment.getForumID(), comment.getUserID(), comment.getSubject(), comment.getBody(), comment.getModValue(), comment.getBonusPoints()); } COM: <s> inserts a comment message into the database </s>
funcom_train/46189560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTrackBackWithNoContentSpam() { listener.trackBackAdded(trackBackEvent); assertTrue(trackBack.isApproved()); blog.getPluginProperties().setProperty(ContentSpamListener.REGEX_LIST_KEY, "casinos, poker, drugs"); listener.trackBackAdded(trackBackEvent); assertTrue(trackBack.isApproved()); } COM: <s> tests a track back with no content spam </s>
funcom_train/15623082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFeatureNames() throws M4Exception { Collection fs = this.getFeatures(); if (fs == null || fs.isEmpty()) { return ""; } Iterator it = fs.iterator(); String ret = ""; while (it.hasNext()) { Feature f = (Feature) it.next(); ret += f.getName() + ", "; } return ret.substring(0, ret.length() - 2); } COM: <s> returns a string with comma separated names of the features </s>
funcom_train/3024531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean load() { try { File file = getFile(); ObjectInputStream input = new ObjectInputStream(new FileInputStream(file)); stack = (Stack) input.readObject(); input.close(); return true; } catch (FileNotFoundException fnfe) { // Expected - this is normal the first time } catch (IOException ioe) { ioe.printStackTrace(System.out); } catch (ClassNotFoundException cnfe) { cnfe.printStackTrace(System.out); } return false; } COM: <s> loads the undo stack from the disk </s>
funcom_train/39350833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void traceRoots() { for (ObjectValue value : Scanning.getRoots()) { traceObject(value.getObjectValue(), true); } for (Mutator m : Mutators.getAll()) { for (ObjectValue value : m.getRoots()) { traceObject(value.getObjectValue(), true); } } } COM: <s> trace the harness root set </s>
funcom_train/12595487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAllDisonnectMenuItems(boolean disconnect) { for (int i = 0; i < this.openVPNConfigCount; i++) { PopupMenu popupMenu = (PopupMenu) this.trayIcon.getPopupMenu().getItem(i); popupMenu.getItem(1).setEnabled(disconnect); } } COM: <s> sets enabled disabled state to all disconnect menu items </s>
funcom_train/19748077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load() throws LoadableResourceException { if ( getServletContext() == null ) { throw new LoadableResourceException("no reference to servlet context found"); } InputStream input = null; Digester digester = initDigester(); try { input = getServletContext().getResourceAsStream(config); digester.parse(input); menus.setFast(true); } catch ( Exception e ) { e.printStackTrace(); throw new LoadableResourceException("Error parsing resource file: " + config + " nested exception is: " + e.getMessage()); } finally { try { input.close(); } catch ( Exception e ) { } } } COM: <s> loads the menu repository </s>
funcom_train/3341188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SocketBuffer createSocketBuffer(int offset, int length) { if ((offset < 0) || (offset >= used)) { throw new IndexOutOfBoundsException("offset " + offset); } if ((length < 0) || (offset + length > used)) { throw new IndexOutOfBoundsException("offset + length" + offset + '+' + length); } return new SocketBuffer(data, offset, length); } COM: <s> create a socketbuffer for a given portion of this databuffer </s>
funcom_train/4355356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ModelAndView getModelAndView(String viewName, Exception ex) { ModelAndView mv = new ModelAndView(viewName); if (this.exceptionAttribute != null) { if (logger.isDebugEnabled()) { logger.debug("Exposing Exception as model attribute '" + this.exceptionAttribute + "'"); } mv.addObject(this.exceptionAttribute, ex); } return mv; } COM: <s> return a model and view for the given view name and exception </s>
funcom_train/45860598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addParentFolders(String folder) throws CmsException { int level = CmsResource.getPathLevel(folder); String rfsFolder = resourcesFolder + folder; for (int i = 0; i < level; i++) { CmsResource res = cms.readResource(folder); File file = new File(rfsFolder); addSyncFile(res); addSyncFile(file); folder = CmsResource.getParentFolder(folder); rfsFolder = file.getParent(); } } COM: <s> in order to generate properties files for the parent folders add those </s>
funcom_train/3117995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteObjects(Iterator iter) { MacroCommand macroCommand = new MacroCommand(); macroCommand.addCommand(new DenimDeleteCommand(iter)); macroCommand.addCommand(new SetSheetModifiedCommand(this, true)); cmdqueue.doCommand(macroCommand); repaint(); } // of method COM: <s> deletes the objects contained in a graphical object collection whose </s>
funcom_train/36691307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onCreateOptionsMenu(android.view.Menu menu) { MenuItem item = menu.add(0, 0, 0, "Nothing Yet"); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { public boolean onMenuItemClick(MenuItem item) { return true; } }); return true; } COM: <s> the options menu </s>
funcom_train/11727755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(TestResult testResult) { try { helper = HELPER_POOL.borrowHelper(); try { super.run(new JCRTestResult(testResult, log)); } finally { HELPER_POOL.returnHelper(helper); helper = null; } } catch (InterruptedException e) { throw new RuntimeException(e); } } COM: <s> runs the test cases of this test class and reports the results to </s>
funcom_train/46360648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPoints(Player player) { int points=0; for(int i=0;i<blocks.size();i++) { if(blocks.elementAt(i).getOwner().getPlayerNumber()==player.getPlayerNumber() && !blocks.elementAt(i).isLocked()) points = points + blocks.elementAt(i).getNumberOfBlocks(); } return points; } COM: <s> calculates the value of blocks that player still has </s>
funcom_train/815875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String date(Object in_value, PageContext in_pageContext) { Date lc_date = (Date) in_value; if (lc_date==null) { return null; } else { //DateFormat lc_format = DateFormat.getDateInstance(DateFormat.SHORT, in_pageContext.getRequest().getLocale()); DateFormat lc_format = new SimpleDateFormat("dd/MM/yyyy"); return lc_format.format(lc_date); } } COM: <s> if in value is not null </s>
funcom_train/15530062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createAccount(String accountName, String password) throws Exception{ // accountID = RMI::createAccount(accountName, password); if (connectionID == 0){ throw new Exception("Not connected to a server."); } String response = remoteServer.createAccount(connectionID, accountName, password); //System.out.println("response: " + response); } COM: <s> create an account at the server </s>
funcom_train/28170246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parseNumbers() { for (int i = '0'; i <= '9'; i++) ctype[i] |= CT_DIGIT; ctype['.'] |= CT_DIGIT; ctype['-'] |= CT_DIGIT; //ctype['+'] |= CT_DIGIT; // rlw } COM: <s> specifies that numbers should be parsed by this tokenizer </s>
funcom_train/46943422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CheckBoxList getJListAudioLanguageCountries() { if (jListAudioLanguageCountries == null) { jListAudioLanguageCountries = new CheckBoxList(); DefaultListModel audioLangModel = new DefaultListModel(); jListAudioLanguageCountries.setModel(audioLangModel); for (String s : countries.getCountryNames()) audioLangModel.addElement(new JCheckBox(s)); } return jListAudioLanguageCountries; } COM: <s> this method initializes j list audio language countries </s>
funcom_train/2293060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CmsListItem getSelectedItem() { try { return getList().getItem( CmsStringUtil.splitAsArray(getParamSelItems(), CmsHtmlList.ITEM_SEPARATOR)[0].trim()); } catch (Exception e) { try { return getList().getItem(""); } catch (Exception e1) { return null; } } } COM: <s> returns the current selected item </s>
funcom_train/33717517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void choose(int row) { if (row == active) { return; } HTMLTable.CellFormatter cf = getCellFormatter(); DOM.setStyleAttribute(cf.getElement(active, 0), "backgroundColor", "transparent"); DOM.setStyleAttribute(cf.getElement(row, 0), "backgroundColor", "lightblue"); active = row; listener.chooserClicked(row); } COM: <s> chooses the specified row </s>
funcom_train/1383077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PlanningMese getNovembre() { if (novembre == null) { try { novembre = new PlanningMese(PlanningMese.NOVEMBRE, dbm, listener, padre); novembre.setPreferredSize(new Dimension(600, 300)); // Generated dbm.addDBStateChange(novembre); } catch (java.lang.Throwable e) { // TODO: Something } } return novembre; } COM: <s> this method initializes novembre </s>
funcom_train/35285406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(final T source, final T target) { if (source == null) { throw new NullPointerException("null source"); } final List<T> list = map.get(source); if (list == null) { return false; } if (list.contains(target)) { return true; } for (T auxiliary : list) { if (auxiliary == null) { continue; } if (contains(auxiliary, target)) { return true; } } return false; } COM: <s> checks if there is a dependency from code source code to </s>
funcom_train/48640704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void codeStringTable(int intclasstag, PrintStream s) { IntSymbol sym = null; for (int i = tbl.size() - 1; i >= 0; i--) { try { sym = (IntSymbol)tbl.elementAt(i); } catch (ArrayIndexOutOfBoundsException ex) { Utilities.fatalError("Unexpected exception: " + ex); } sym.codeDef(intclasstag, s); } } COM: <s> generates code for all int constants in the int table </s>
funcom_train/16849070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected BufferedReader getDataReader() { try { URL url = new URL(this.catalog.getCatalogURL()); Debug.output("Catalog URL:" + url.toString()); return new BufferedReader(new InputStreamReader(url.openStream())); } catch (IOException ex) { throw new SeismoException(ex); } } COM: <s> create a buffered reader for </s>
funcom_train/4347486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String generateSignature(Map<String, String> sortedParameters) { StringBuilder parameterString = new StringBuilder(); for (Entry<String, String> entry : sortedParameters.entrySet()) { parameterString.append(entry.getKey()); parameterString.append("="); parameterString.append(entry.getValue()); } parameterString.append(secretKey); return generateMd5(parameterString.toString()); } COM: <s> given a sorted map of parameter names to values calculate and return the </s>
funcom_train/51345184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long call() throws Exception { final QueryResult result = repository.issueQuery(query.query_); if (result == null) { // null is protocol for repository failure on query. throw new RuntimeException("Query returned null: query=" + query.id_); } // traverse the result set. long resultNum = 0; while (result.next() != false) resultNum++; return resultNum; } COM: <s> run a query </s>
funcom_train/11023254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConvertToClassDefault() { Converter converter = new ClassConverter(Object.class); assertEquals("Invalid Test", Object.class, converter.convert(Class.class, new Integer(6))); assertEquals("Null Test", Object.class, converter.convert(Class.class, null)); } COM: <s> test invalid conversion with default </s>
funcom_train/6406482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void replaceIndex(Triangle tri, int index, int replacement) { for (int i = 0; i < 3; i++) { Edge edge = tri.edges[i]; if (edge.newI0 == -1 && edge.i0 == index) { edge.newI0 = replacement; } if (edge.newI1 == -1 && edge.i1 == index) { edge.newI1 = replacement; } } } COM: <s> if the triangle contains the given index it is replaced with the </s>
funcom_train/2501161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillQueryNamedParameters(Query query, Map<String, ? extends Object> params) { if (params != null && params.size() > 0) { for (Map.Entry<String, ? extends Object> param : params.entrySet()) { query.setParameter(param.getKey(), param.getValue()); } } } COM: <s> sets the given query parameters with the specified map values </s>
funcom_train/37405700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setLookAndFell() { MetalTheme theme = new UniverseTheme(); MetalLookAndFeel.setCurrentTheme(theme); try { UIManager.setLookAndFeel("net.universekingdom.gui.laf.MetalLookAndFeel"); SwingUtilities.updateComponentTreeUI(this); } catch (Exception e) { System.out.println(e); } } COM: <s> sets look and feel and theme of this look and feel </s>
funcom_train/3562866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSessionClean(Integer volumeID, Integer sessionID) throws DbException { NVPair[] parms; parms = new NVPair[2]; parms[0] = new NVPair("volumeID", volumeID.toString()); parms[1] = new NVPair("sessionID", sessionID.toString()); simpleRequest(REMOVE_SESSION_CLEAN_PAGE, "Cannot remove session", parms); } COM: <s> removes a session in a clean way </s>
funcom_train/38512723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void applyFile(File pFile) { String path = pFile.getPath(); int pos = path.lastIndexOf(File.separatorChar); if (pos != -1 ) { filePath = path.substring(0, pos); } else { filePath = path; } fileName = pFile.getName(); } COM: <s> stores name and path from a given file object </s>
funcom_train/2677499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean sendCheckVideoCM(IMessageInput msgIn) { OOBControlMessage oobCtrlMsg = new OOBControlMessage(); oobCtrlMsg.setTarget(IStreamTypeAwareProvider.KEY); oobCtrlMsg.setServiceName("hasVideo"); msgIn.sendOOBControlMessage(this, oobCtrlMsg); if (oobCtrlMsg.getResult() instanceof Boolean) { return (Boolean) oobCtrlMsg.getResult(); } else { return false; } } COM: <s> send vod check video control message </s>
funcom_train/33329719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void today() { Calendar cal = Calendar.getInstance(); if (clock == null) { throw new ApplicationException("Clock not set up"); } long time = clock.getTime(); java.util.Date d = new java.util.Date(time); cal.setTime(d); clearDate(cal); set(cal); } COM: <s> sets this date value to todays date </s>
funcom_train/3133692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContentLength(int length) { boolean keepAlive = isKeepAlive(); if(keepAlive) { response.setValue("Connection", "keep-alive"); } else { response.setValue("Connection", "close"); } response.setInteger("Content-Length", length); } COM: <s> this is used to set the content length for the response </s>
funcom_train/9274601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSkipLongMaxValue() throws IOException { ArrayInputStream ais = new ArrayInputStream(new byte[1000]); assertEquals(1000, ais.skip(Long.MAX_VALUE)); assertEquals(1000, ais.getPosition()); ais.setPosition(1); assertEquals(999, ais.skip(Long.MAX_VALUE)); assertEquals(1000, ais.getPosition()); } COM: <s> test that we dont get an overflow when the argument to skip is </s>
funcom_train/23634289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addSymbol(String sym, boolean overrideAlias) { // check to see if the symbol already exists Integer idx = ids.get(sym); // if the symbol exists and is not an alias, return the proper number if(idx != null && (!overrideAlias || syms.get(idx).equals(sym))) return idx; // get the new id, add the symbol, and return idx = syms.size(); syms.add(sym); ids.put(sym, idx); return idx; } COM: <s> add a symbol to the vocabulary </s>
funcom_train/33775937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTfFreq () { if (tfFreq == null) {//GEN-END:|19-getter|0|19-preInit // write pre-init user code here tfFreq = new TextField ("Note", "127", 32, TextField.NUMERIC);//GEN-LINE:|19-getter|1|19-postInit // write post-init user code here }//GEN-BEGIN:|19-getter|2| return tfFreq; } COM: <s> returns an initiliazed instance of tf freq component </s>
funcom_train/45845010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setListenersOnTables() { jTable_Eyes.getSelectionModel().addListSelectionListener(new SelectionListener(jTable_Eyes, 0)); jTable_Heads.getSelectionModel().addListSelectionListener(new SelectionListener(jTable_Heads, 1)); jTable_HairStyles.getSelectionModel().addListSelectionListener(new SelectionListener(jTable_HairStyles, 2)); } COM: <s> sets a selection listener on the tables </s>
funcom_train/36229507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean saveRightFullRectifiedPhoto(String absulutePath) { getRightRectifiedFullImage(); if (rightRectifiedImage == null) return false; try { ImageUtil.writeToJPEG(rightRectifiedImage, absulutePath); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); return false; } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); return false; } return true; } COM: <s> save right epipolar rectified full photo </s>
funcom_train/12560104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OutputStream openOutputStream() throws IOException { OutputStream out; /* * call into parent to create output stream passed back to the user */ out = super.openOutputStream(); /* * Create a byte array output stream for output buffering * once the user calls flush() this gets written to stream */ writebuf = new byte[outputBufferSize]; return out; } COM: <s> open the output stream if it has not already been opened </s>
funcom_train/24138783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Builder withEditInfo(String editPerson, Date editDate){ if(editPerson ==null || editDate ==null){ optionalAttributes.remove(TigrAssemblerContigAttribute.EDIT_PERSON); optionalAttributes.remove(TigrAssemblerContigAttribute.EDIT_DATE); } optionalAttributes.put(TigrAssemblerContigAttribute.EDIT_PERSON,editPerson); optionalAttributes.put(TigrAssemblerContigAttribute.EDIT_DATE, formatEditDate(editDate)); return this; } COM: <s> sets the edit person and edit date attributes for this contig </s>
funcom_train/24939656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasGreaterPos(IDSourceInfo sinfo) { // if it is a lesser line, we are golden if (getSourceLine() > sinfo.getSourceLine()) return true; // if the same line, and the charpos is less, true if ((getSourceLine() == sinfo.getSourceLine()) && (getSourceCharPosition() > sinfo.getSourceCharPosition())) return true; return false; } COM: <s> true if this sourceinfo block has a greater position then the passed in </s>
funcom_train/18654118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setupDefaultInterceptors(){ // create the entity cache loadEntityDatabase(); AspectSystem aspectSystem = AspectSystemFactory.getAspectSystem(); aspectSystem.clear(); aspectSystem.addFirst( new BMPFinderHandler( entityDatabase ) ); aspectSystem.addFirst( new CMPFindByPrimaryKeyHandler( entityDatabase ) ); // All beans should have the exception handler aspectSystem.addFirst( new EjbExceptionHandler()); } COM: <s> add the interceptors that should always be present to </s>
funcom_train/2902887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getClientInput(String msg){ String pkg=null; if(input == null){ if(ldialog[PROCESS] == null){ initProcessDialog(); } input = new ZInputDialog(ldialog[PROCESS].getDialog(), true, true, false, msg, true); String icon = ZLocater.getIconPath("32x32"+File.separator+"run_application.png"); input.setIcon(ZImageRetriever.getImageIcon(icon)); input.setBounds(midX-150, midY-75, 300,150); } else{ input.clearInput(); input.invalidate(); input.setMsg(msg); input.validate(); } input.setVisible(true); return input.getInput(); } COM: <s> interact with client and get input information to start a process </s>
funcom_train/50608322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int do_QUERY_REQ(MessageToken msg ) { if (!dep_query_req.contains(msg.getSender())) throw new PlaceManagerException(OVER_REQUEST); //remove the sender from the dependency list dep_query_req.remove(msg.getSender()); //reply to the requester with the local database queue.put(new MessageToken(msg.getSender(), time, TK_QUERY_REPLY, local_objects)); return processQueryEnd(); } COM: <s> response to a tk query request message </s>
funcom_train/21739707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readString(int length) { StringBuilder builder = new StringBuilder(); for (int readResult = read(), counter = 0; counter < length; ++counter, readResult = read()) { if (notEOF(readResult)) { // We can't read anymore break; } // Good! We have read a character. Append it to the string builder.append((char)readResult); } return builder.toString(); } COM: <s> reading defined number of characters </s>
funcom_train/12922309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Function groundFunction(ArrayList<String> subst) { StringBuffer signature = new StringBuffer(name); String obj; for (int i = 0; i < objList.size(); i++) { // the thing that you're supposed to replace... obj = (String) subst.get(i); if (obj != null) signature.append(' ').append(obj); else signature.append(' ').append(objList.get(i)); } return (Function) problem.getFactory().make(Function.class, signature.toString()); } COM: <s> ground the function used when grounding functions c ground map </s>
funcom_train/23638703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getWSDLLocation(String serviceName) throws RegistryException { String wsdlLoc = null; try { mLog.debug("Looking up the WSDL location for " + serviceName); wsdlLoc = deploymentService.getWSDL(serviceName); } catch (Exception e) { mLog.error("Exception: " + e.getMessage(), e); throw new RegistryException(e); } // actually returning the whole WSDL now return wsdlLoc; } COM: <s> this method retrieves the location of the wsdl for a service </s>
funcom_train/45896281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(int serialno) { if (bodyData == null) { init(); } else { for (int i = 0; i < bodyData.length; i++) { bodyData[i] = 0; } for (int i = 0; i < lacingVals.length; i++) { lacingVals[i] = 0; } for (int i = 0; i < granuleVals.length; i++) { granuleVals[i] = 0; } } this.serialno = serialno; } COM: <s> initializes the store with the given serial number </s>
funcom_train/8467341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void discardChanges() { try { ETaskController tc = new ETaskController(); task = tc.getTask(task); } catch (Exception e) { ErrorBean.printMessage(e, "content:infoForm:taskModifiers", "Unexpected error while connecting database. Please contact the system Administrator."); } } COM: <s> refresh state of </s>
funcom_train/44661565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean test(Object argument) { if (argument != null) { if (argument instanceof String) { if (StringUtils.hasText((String) argument)) { return true; } } else if (argument instanceof Collection) { return !((Collection) argument).isEmpty(); } else if (argument instanceof Map) { return !((Map) argument).isEmpty(); } else if (argument.getClass().isArray()) { return ((Object[]) argument).length > 0; } else { return true; } } return false; } COM: <s> tests if this argument is present non null not empty not blank </s>
funcom_train/51558682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteContact(String name) { boolean foundAndDestroyed = false; Element rootElement = doc.getRootElement(); Element uaElement = rootElement.element("contacts"); for(Iterator i = uaElement.elementIterator("contact"); i.hasNext(); ) { Element contactElement = (Element)i.next(); if (contactElement.element("name").getText().equals(name)) { uaElement.remove(contactElement); foundAndDestroyed = true; break; } } this.writeSettings(); return foundAndDestroyed; } COM: <s> delete a contact </s>
funcom_train/6458162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setKey56(byte[] key) { int keylen = key.length; if (keylen > 8) { keylen = 8; } for (i = 0; i < 256; i++) { S[i] = (byte)i; } j = 0; for (i = 0; i < 256; i++) { j = (j + S[i] + (key[i % keylen] & 0x7f)) & 0xff; byte temp = S[i]; S[i] = S[j]; S[j] = temp; } i = j = 0; } COM: <s> set the key which is later used to create the </s>
funcom_train/23011000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TimeInterval getVisibleArea() { /* return new TimeInterval(new ExDate(dateAt(0)), new ExDate(dateAt(scaleWidth))); */ return new TimeInterval(new ExDate(scaleOrigin), new ExDate(scaleOrigin + scaleLength)); } COM: <s> returns time interval that is currently visible in timebar </s>
funcom_train/44011516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetType() { System.out.println("getType"); PaymentBO instance = new PaymentBO(); String expResult = ""; String result = instance.getType(); 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 get type method of class edu </s>
funcom_train/45471954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnmarshallerCtxClassClassloaderArg() throws Exception { Unmarshaller u = new Unmarshaller(_internalContext, UnmarshalFranz.class, UnmarshalFranz.class.getClassLoader()); UnmarshalFranz f = (UnmarshalFranz)u.unmarshal(_reader); Assert.assertNotNull(f); Assert.assertEquals("Bla Bla Bla", f.getContent()); } COM: <s> creates an unmarshaller instance with context class and class loader </s>
funcom_train/3107454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IDataStoreService getService(String serviceName) throws IloaException { // Read the list of services of the DataStore for (Iterator<IDataStoreService> iter = this.services.iterator(); iter.hasNext();) { IDataStoreService service = iter.next(); // Test the name of the service if (serviceName.equals(service.getServiceName())) { return service; } } return null; } COM: <s> return the service object instantiate for the datastore </s>
funcom_train/45473526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected short compareTo(final JDocDescriptor jdd) { short jddType = jdd.getType(); if (jddType == this._type) { return 0; } // The ordering is as follows // #param // #exception // #author // #version // #see (reference) // return (short) ((jddType < this._type) ? 1 : -1); } COM: <s> compares the type of this jdoc descriptor with the given descriptor </s>
funcom_train/3597004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NOMElement getNextElement() { if (local_children!=null) { return (NOMElement)local_children.get(0); } else { if (real_parent==null) { return null; } List kids = real_parent.getLocalChildren(); int ind = kids.indexOf(this); if (kids.size()>ind+1) { return (NOMElement)kids.get(ind+1); } else { return real_parent.getNextElementDoneKids(); } } } COM: <s> returns the element following this one in the corpus if it </s>
funcom_train/14266355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Message receive() throws IOException, BadPacketException { Message m = null; try { m = super.receive(); } catch(IOException e) { if( _manager != null ) _manager.remove(this); throw e; } // record received message in stats addReceived(); return m; } COM: <s> override of receive to do connection manager stats and to properly shut </s>
funcom_train/2961393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeFromDecisionPool(final Var v) { if (v instanceof IntDomainVar) { intNoDecisionVar.add((IntDomainVar) v); } else if (v instanceof SetVar) { setNoDecisionVar.add((SetVar) v); } else if (v instanceof RealVar) { realNoDecisionVar.add((RealVar) v); } else if (v instanceof TaskVar) { taskNoDecisionVar.add((TaskVar) v); } } COM: <s> add decision or non decision variable to the correct list </s>
funcom_train/50336257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean init() { // Try to create an empty buffer that will hold the actual sound data al.alGenBuffers(1, _dataStorageBuffer, 0); if (JoalAudioFactory.checkALError()) { log.warn("Error creating JoalAudioBuffer (" + this.getSystemName() + ")"); return false; } this.setState(STATE_EMPTY); return true; } COM: <s> initialise this joal audio buffer </s>
funcom_train/20882628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setVolume(Clip clip, float vol) { if (clip.isControlSupported(FloatControl.Type.MASTER_GAIN)) { FloatControl volumeControl = (FloatControl)clip.getControl( FloatControl.Type.MASTER_GAIN ); float range = volumeControl.getMaximum() - volumeControl.getMinimum(); volumeControl.setValue(vol * range + volumeControl.getMinimum()); } } COM: <s> set the volume on the given clip </s>
funcom_train/10210480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayEventInformation(final EventModel event) { eventType.setText(event.getEventType().toString()); intensity.setText(String.valueOf(event.getEventEffect())); startTime.setText(String.valueOf(event.getStartTime())); endTime.setText(String.valueOf(event.getEndTime())); ensureVisibility(eventWidget); } COM: <s> displays information about an event </s>
funcom_train/583199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getText( String tag ) { if( setup != null ){ String description = null; if( getModule().getCloneName() == null ){ description = setup.getLanguage( getLocale() ).getModuleDescription( getModule() .getModuleName(), tag ); } else { description = setup.getLanguage( getLocale() ).getModuleDescription( getModule() .getCloneName(), tag ); } return description; } return "TAG:" + tag; } COM: <s> fix i18 n localization of strings with label descriptions </s>
funcom_train/38291633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String valueFilter(String key, String value) { if (key.toLowerCase().indexOf("path") >= 0) { // convert separators to be correct for this system String correctSeparator = System.getProperty("path.separator"); if (correctSeparator.equals(";")) { value = value.replace('|', ';'); } else { value = value.replace('|', ':'); } } return value; } COM: <s> called by get property key default to perform any post processing of the </s>
funcom_train/31056675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showShutdownCellDialogBox() { // if we have more than one server to choose from, then bring // up that dialog box -- otherwise just shut down the only // server we are monitoring if( cellControlAgents.size() > 1 ) { new BaseAWTGUIShutDownCellUI( this, cms ); } else if( cellControlAgents.size() == 1 ) { Enumeration e = cellControlAgents.keys(); shutdownCellCommand( (CellAddress)e.nextElement() ); } } COM: <s> method to bring up a dialog box containing which servers we </s>
funcom_train/16676499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFileName(String fileName) { this.fileName = fileName; try { setPdfData(FileUtils.readFileToByteArray(new File(Constants.REPORT_DIR, this.fileName))); } catch (IOException e) { setPdfData(new byte[] {}); logClass.warn("Error: " + e.getMessage( ) //$NON-NLS-1$ + Constants.LINE_SEPARATOR, e); } } COM: <s> sets the file name of the report </s>
funcom_train/28545569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void synchronizeWithSourceOntology() { Set<EntityType> entitiesInSourceOntology = Collections.emptySet(); if (sourceOntology != null) { entitiesInSourceOntology = retrieveOWLEntities(sourceOntology); } removeWrappersNotInSourceOntology(entitiesInSourceOntology); // now add all those OWLObjectProperties which are not in the map // yet. for (final EntityType op : entitiesInSourceOntology) { addWrapper(op); } } COM: <s> synchronises the relations managed by this factory with the entities in </s>
funcom_train/28423848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addProperties( Properties props ) { resolveAllProperties( props ); Enumeration e = props.keys(); while ( e.hasMoreElements() ) { String name = ( String ) e.nextElement(); String value = props.getProperty( name ); forceProperty( name, value ); } } COM: <s> iterate through a set of properties resolve them then assign them </s>
funcom_train/7523573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { if(log.isInfoEnabled()) log.info("finishing JMS transport layer."); try { connection.stop(); subscriber.setMessageListener(null); session.close(); connection.close(); } catch(Throwable ex) { if(log.isErrorEnabled()) log.error("exception is " + ex); } } COM: <s> stops the work of the jms protocol </s>
funcom_train/50847990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUpdateDouble() throws Exception { if (!isTestUpdates()) { return; } try { ResultSet rs = this.newUpdateableJdbcResultSet(); rs.next(); rs.updateDouble("float_column", 1D); rs.updateDouble("double_column", 1D); } catch (Exception e) { fail(e.toString()); } } COM: <s> test of update double method of interface java </s>
funcom_train/2539629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEvent(AbstractCursorInputEvt te){ this.events.add(te); // if (events.size() > EVENT_HISTORY_DEPTH && events.size() > 30){ // events.subList(0, 30).clear(); // } if (events.size() > EVENT_HISTORY_DEPTH ){ events.remove(0); //logger.debug(this.getId() + " - First event removed!"); // System.out.println("First event removed!"); } } COM: <s> adds the event </s>
funcom_train/21459790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performImplicitSingleStep(double scale , double lambda , boolean byAngle) { createBulge(x1,lambda,scale,byAngle); for( int i = x1; i < x2-1 && bulge != 0.0; i++ ) { removeBulgeLeft(i,true); if( bulge == 0 ) break; removeBulgeRight(i); } if( bulge != 0 ) removeBulgeLeft(x2-1,false); incrementSteps(); } COM: <s> given the lambda value perform an implicit qr step on the matrix </s>