__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/19421209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected UserMessage getMessageToUser(Map parameters) { HttpSession ses = EaasyStreet.getServletRequest().getSession(); int index = getIndex(ses); String messageKey = "message.record.updated"; if (ses.getAttribute(Constants.SAK_NEW_RECORD + index) != null) { messageKey = "message.record.inserted2"; } SearchFieldDefinition field = (SearchFieldDefinition) parameters.get(DataConnector.RECORD_PARAMETER); return new UserMessage(messageKey, new String[] {field.getFieldName()}); } COM: <s> p returns an appropriate message informing the user that the </s>
funcom_train/34851587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRuntimeTokenPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Place_runtimeToken_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Place_runtimeToken_feature", "_UI_Place_type"), PetriPackage.Literals.PLACE__RUNTIME_TOKEN, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the runtime token feature </s>
funcom_train/8692564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(InputSource input) throws SAXException { if (input instanceof DocumentInputSource) { DocumentInputSource documentInput = (DocumentInputSource) input; Document document = documentInput.getDocument(); write(document); } else { throw new SAXNotSupportedException( "This XMLReader can only accept " + "<dom4j> InputSource objects"); } } COM: <s> parses an xml document </s>
funcom_train/39482233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getEIndex(Vector EElem) { Integer val = (Integer) E_.get(EElem); if (val == null) { // This shouldn't happen if the algorithm is working correctly teacher_.println("ERROR! E: " + printSequence(EElem) + " does not have an index."); return (-1); } else { return (val.intValue()); } } COM: <s> for an element in e gets its index </s>
funcom_train/18142279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delProperty(Property deletee) { if (children==null) throw new IndexOutOfBoundsException("no such child"); // find position (throw outofbounds if n/a) int pos = 0; for (;;pos++) { if (children.get(pos)==deletee) break; } // do it delProperty(pos); } COM: <s> removes a property by looking in the propertys properties </s>
funcom_train/20043117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _setModel() { aModel = oObj.getModel(); XControlModel the_model = (XControlModel) tEnv.getObjRelation("MODEL"); oObj.setModel(the_model); tRes.tested("setModel()",true); } COM: <s> at first current model is obtained and saved to variable a model </s>
funcom_train/16755000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IStatus restartApplication(ID adminId) { IStatus result = createStatus(Status.OK, null, null); if (lock.tryLock()) { if (authorizationService.isAdmin(adminId)) { result = createStatus(Status.OK, "Application has been sucessfully restarted", null); // new Runnable() { public void run() { administrationService.restartApplication(); } }.run(); } else { result = createStatus(Status.ERROR, "The provided user ID is not an admin", null); } lock.unlock(); } else { result = concurrentOperationError; } return result; } COM: <s> as eclipse does not support properly hot plugging we need a method to </s>
funcom_train/3102451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getAnnotationOffset(final IDocument document, final int offset) { Assertion.valid(document); Assertion.nonNegative(offset); IRegion line= null; try { line= document.getLineInformationOfOffset(offset); final int begin= line.getOffset(); final int result= getAnnotationOffset(begin, begin + line.getLength(), offset); if (result > 0 && result != offset) { return result; } } catch (final BadLocationException exception) { // Do nothing } return -1; } COM: <s> returns the offset of an annotation in the specified line which is </s>
funcom_train/2295091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addParameter(String name, String value) { // No null values allowed in parameters if ((name == null) || (value == null)) { return; } // Check if internal map exists, create new one if not if (m_parameterMap == null) { m_parameterMap = new HashMap(); } addParameter(m_parameterMap, name, value, false); } COM: <s> this methods adds parameters to the current request </s>
funcom_train/12111351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MioJButton getJButtonScelta() { if (jButtonScelta == null) { jButtonScelta = new MioJButton(); jButtonScelta.setText(Messages.getString("Elenco.Scelta")); //$NON-NLS-1$ jButtonScelta .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { scelta(); } }); } return jButtonScelta; } COM: <s> this method initializes j button scelta </s>
funcom_train/29697199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void findPathTo(Coords dest, int type) { int timeLimit = PreferenceManager.getClientPreferences().getMaxPathfinderTime(); if (timeLimit >= 5000) { System.out.print("WARNING!!! Settings allow up to "); System.out.print(timeLimit); System.out.println(" milliseconds to find the optimum path!"); } this.notSoLazyPathfinder(dest, type, timeLimit); } COM: <s> extend the current path to the destination code coords code </s>
funcom_train/5254540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JCU10State getJCU10State(int moduleAddress) throws IOException { byte[] data = null; synchronized (commPort) { data = sendModuleCommand(moduleAddress, (byte) 'F'); } int temperature = data[0]; temperature <<= 8; temperature |= (data[1] & 0xff); if (temperature == 0x8002) { throw new IOException( "communication error between JCU10 TFS and sensor"); } return new JCU10State((float) temperature / 10, data[2]); } COM: <s> get the temperature and the humidity from a jcu10 tfs module </s>
funcom_train/30058710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toFile(String filename, String output) throws IOException { if (filename == null) { throw new IOException( "Please specify a file to write the output to using --output option "); } File outfile = new File(filename); PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter( outfile))); pw.println(output); pw.close(); this.mLogger.log("Written out the converted file to " + filename, LogManager.INFO_MESSAGE_LEVEL); } COM: <s> writes out to a file a string </s>
funcom_train/7959945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isConstraintSet(int anchor, ArrayList baseDockables) { for (int i=0; i < baseDockables.size(); i++){ AnchorConstraints ac = constraintsByDockable.get(baseDockables.get(i)); if (ac != null){ // 2007/01/08 if ((ac.getAnchor() & anchor) > 0){ return true; } } } return false; } COM: <s> checks if a given anchor is set into one of the given dockables </s>
funcom_train/18792560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMonitorObjectName(String aMonitorObjectName) { if (aMonitorObjectName == null || aMonitorObjectName.trim().length() == 0) { throw new IllegalArgumentException("ObjectName for EtmMonitor may not be null or empty "); } monitorObjectName = aMonitorObjectName; } COM: <s> sets the name to be used for monitor registration </s>
funcom_train/18646121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RoleTypeDefinition getRoleTypeDefinition(String name) { RoleTypeDefinition ret=null; if (name != null && m_roleTypeDefinitions != null) { for (int i=0; ret == null && i < m_roleTypeDefinitions.length; i++) { if (m_roleTypeDefinitions[i].getRoleType().equals(name)) { ret = m_roleTypeDefinitions[i]; } } } return(ret); } COM: <s> this method returns the role type definition for the </s>
funcom_train/3114980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle2D getBounds2D() { Iterator it = strokes(); Rectangle2D gbds = null; Rectangle2D newbds = null; TimedStroke stk; while (it.hasNext()) { stk = (TimedStroke) it.next(); newbds = stk.getBounds2D(SatinConstants.COORD_REL); if (gbds == null) { gbds = newbds; } else { Rectangle2D.union(gbds, newbds, gbds); } } return (gbds); } // of method COM: <s> get the bounding box of the strokes in this graph </s>
funcom_train/10602356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyAdded(Item item) throws AccessControlException { List clone = new ArrayList(this.itemManagerListeners); for (Iterator i = clone.iterator(); i.hasNext();) { ItemManagerListener listener = (ItemManagerListener) i.next(); listener.itemAdded(item); } } COM: <s> notifies the listeners that an item was added </s>
funcom_train/18122139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAccessName() { Iterator it = form.blocks.iterator(); while (it.hasNext()) { EFBlock block = (EFBlock)it.next(); Iterator iterator = block.fields.iterator(); while (iterator.hasNext()) { EFField fld = (EFField)iterator.next(); if (fld.getName().equals(name)) { return "_" + name; } } } return PlSqlEnvironment._checkCase(name); } COM: <s> get access name </s>
funcom_train/1797727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPrevId(String prevId) { // check if setting to existing value if (this.prevId == null ? prevId != null : !this.prevId.equals(prevId)) { // set to new value for customer parameter this.prevId = prevId; setStringCustomParameter("previd", prevId); } } COM: <s> sets the the last feature of the previous page in the feed </s>
funcom_train/22028633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeCharArray(char[] c) throws IOException { byte[] b = new byte[2*c.length]; for(int i=0; i<c.length; i += 1) { int t = c[i]; b[2*i] = (byte) (t>>8); b[2*i + 1] = (byte) t; } write(b, 0, b.length); } COM: <s> write an array of chars </s>
funcom_train/40517795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Pair find(final int proxyId1, final int proxyId2, final int hash) { int index = m_hashTable[hash]; while (index != PairManager.NULL_PAIR && equals(m_pairs[index], proxyId1, proxyId2) == false) { index = m_pairs[index].next; } //System.out.println("Found at index "+index); if (index == PairManager.NULL_PAIR) { //System.out.println("Which is null..."); return null; } assert index < Settings.maxPairs; return m_pairs[index]; } COM: <s> finds the pair with the given hash </s>
funcom_train/17396546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ProfiledMethod_name_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ProfiledMethod_name_feature", "_UI_ProfiledMethod_type"), TracePackage.Literals.PROFILED_METHOD__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the name feature </s>
funcom_train/18525508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enableStartTestcase(boolean isEnabled) { if (mainframe != null) { if (mainframe.getJptcMenuBar().getstartItem() != null) { mainframe.getJptcMenuBar().getstartItem().setEnabled(isEnabled); } if (mainframe.getheadingToolbar() != null) { mainframe.getheadingToolbar().getstartBtn().setEnabled(isEnabled); } } } COM: <s> enale the start of a testcase </s>
funcom_train/29917825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateReportList(List<GeneratedReportDataVO> reports){ for(GeneratedReportDataVO report : reports){ List<GeneratedReportDataVO> list = currentLists.get(report.getOrgId()); GeneratedReportDataVO toRemove = null; if(list != null){ for(GeneratedReportDataVO next : list){ if(report.getId() == next.getId() ){ toRemove = next; break; } } if(toRemove != null){ list.remove(toRemove); } list.add(report); this.setChanged(); notifyObservers(currentLists); } } } COM: <s> updates the current report status with </s>
funcom_train/17976581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setSize(740, 360); this.setPreferredSize(new Dimension(740, 360)); this.setLayout(new BorderLayout()); this.add(getJPanel(), BorderLayout.NORTH); this.add(getJPanel3(), BorderLayout.SOUTH); this.add(getJSplitPane(), BorderLayout.CENTER); } COM: <s> this method initializes this </s>
funcom_train/15409479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DatabasePlatform create(ServerConfig serverConfig) { try { if (serverConfig.getDatabasePlatformName() != null){ // choose based on dbName return byDatabaseName(serverConfig.getDatabasePlatformName()); } if (serverConfig.getDataSourceConfig().isOffline()){ String m = "You must specify a DatabasePlatformName when you are offline"; throw new PersistenceException(m); } // guess using meta data from driver return byDataSource(serverConfig.getDataSource()); } catch (Exception ex) { throw new PersistenceException(ex); } } COM: <s> create the appropriate database specific platform </s>
funcom_train/41847255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchNote(long rowId) throws SQLException { Cursor mCursor = mDb.query(true, DATABASE_TABLE, new String[] { KEY_ROWID, KEY_NAME, KEY_VALUE }, KEY_ROWID + "=" + rowId, null, null, null, null, null); if (mCursor != null) { mCursor.moveToFirst(); } return mCursor; } COM: <s> return a cursor positioned at the note that matches the given row id </s>
funcom_train/31357461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroy() { //System.out.println("Destroying process"); //Thread.dumpStack(); // shut down engine process running = false; engine.destroy(); engine = null; // close i/o streams try { toEngine.close(); fromEngine.close(); fromEngineError.close(); } catch (IOException e) {} toEngine = null; fromEngine = null; fromEngineError = null; synchronized(this) { notifyAll(); } } // destroy() COM: <s> shuts down the engine </s>
funcom_train/2673908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Token getToken(String colorPreference, String stylePreference) { Token token = (Token) tokenTable.get(colorPreference); if (token == null) { // Create Token RGB rgb = PreferenceConverter.getColor(preferenceStore, colorPreference); int style = preferenceStore.getInt(stylePreference); token = new Token(new TextAttribute(getColor(rgb), null, style)); tokenTable.put(colorPreference, token); knownProperties.put(stylePreference, colorPreference); } return token; } COM: <s> returns the token for the chosen partition </s>
funcom_train/32632043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void verifyBufferSize(int sz) { if (sz > buf.length) { byte[] old = buf; buf = new byte[Math.max(sz, 2 * buf.length)]; System.arraycopy(old, 0, buf, 0, old.length); } } COM: <s> ensures that we have a large enough buffer for the given size </s>
funcom_train/3329775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ElementDecl getReference() { ElementDecl result = null; if (_elementRef != null) { result = _schema.getElementDecl(_elementRef); if (result == null) { String err = "Unable to find element referenced :\" "; err += getName(); err +="\""; throw new IllegalStateException(err); } } return result; } //-- getReference COM: <s> returns the element decl that this element definition references </s>
funcom_train/38524208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setupFileReader() { simple = readFile(simpleFile); assertNotNull("The simple file was null", simple); advanced = readFile(advancedFile); assertNotNull("The advanced file was null", advanced); malformed = readFile(malformedFile); assertNotNull("The malformed file was null", malformed); misc = readFile(miscFile); assertNotNull("The misc file was null", misc); } COM: <s> reads the xml files and saves them </s>
funcom_train/42850658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getProviderName() throws XBMCException { try { return getStringFromXML(getDocument(addonFile), "addon/@provider-name"); //$NON-NLS-1$ } catch (Exception e) { throw new XBMCException(Messages.getString("XBMCAddon.UNABLE_FIND_ADDON_ID"),e); //$NON-NLS-1$ } } COM: <s> used to get the provider name of the addon </s>
funcom_train/17999642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCreators(List<Creator> creators) { if (creators == null || creators.isEmpty()) { return; } checkCurrent(); Element creatorsListParent = newFilterTermsBlock(currentFilterTerms, false); Iterator<Creator> it = creators.iterator(); while (it.hasNext()) { Creator creator = it.next(); if (creator.id == null) { addCreatorByName(creatorsListParent, creator.name); } else { addCreatorById(creatorsListParent, creator.id, creator.name); } } } COM: <s> add a list of entry creators to filter </s>
funcom_train/17576507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getFileMenu() { if (fileMenu == null) { fileMenu = new JMenu(); fileMenu.setText("File"); fileMenu.add(getMapKbrdMenuItem()); fileMenu.add(new JSeparator()); fileMenu.add(getNewMenuItem()); fileMenu.add(getOpenMenuItem()); fileMenu.add(getSaveMenuItem()); fileMenu.add(getSaveAsMenuItem()); fileMenu.add(new JSeparator()); fileMenu.add(getExitMenuItem()); } return fileMenu; } COM: <s> this method initializes j menu </s>
funcom_train/51130224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PlayerStats getStats(League league) { for (int i = 0; i < playerStatsLeague.size(); i++) { PlayerStats tmp = playerStatsLeague.get(i); if (league.equals(tmp.getOwner())) { return tmp; } } this.createStats(league); return getStats(league); // return null; } COM: <s> return stats for given league </s>
funcom_train/13675187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private char entity2Char(String e) { if(e.equals(AMPERSAND_ENTITY)) { return AMPERSAND_CHAR; } else if(e.equals(GT_ENTITY)) { return GT_CHAR; } else if(e.equals(LT_ENTITY)) { return LT_CHAR; } else if(e.equals(QUOT_ENTITY)) { return QUOT_CHAR; } else { return e.charAt(1); } }//char2Entity COM: <s> translates a few chars to their corresponding entity </s>
funcom_train/2844912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLoading(String path, boolean loading) { ProjectItemTreeNode node = (ProjectItemTreeNode) nodeMap.get(path); if (node != null) { ((ProjectItem) node.getUserObject()).setLoading(loading); model.nodeChanged(node); } else { System.err.println("Project: Unable to setLoading for " + path); } } COM: <s> indicated that the specified path has the specified loading condition </s>
funcom_train/21021037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isAutoScrollDown(int x, int y){ boolean xOverlap = getAbsoluteLeft()<=x && (getAbsoluteLeft()+getOffsetWidth())>=x; boolean yOverlap = (getAbsoluteTop()+getOffsetHeight()-MARGIN_AUTO_SCROLL_POS)<=y && (getAbsoluteTop()+getOffsetHeight())>=y; return (xOverlap && yOverlap); } COM: <s> is auto scroll down </s>
funcom_train/329282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean matchPeak(int[] peak1, int[] peak2, int connectType) { if (connectType == 4) { if (peak1[0] > peak2[2] || peak2[0] > peak1[2]) { return false; } } else { if (peak1[0] > peak2[2]+1 || peak2[0] > peak1[2]+1) { return false; } } return true; } COM: <s> match to peaks return true if they merge into one another </s>
funcom_train/49160152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printException(Level l, Throwable e) { if (repository.isDisabled(l.getSyslogEquivalent())) return; if (isEnabledFor(l)) { forcedLog(FQCN, Level.ERROR, e.toString(), null); LoggerPrintStream out = new LoggerPrintStream(this, l); e.printStackTrace(out); out.flush(); } } COM: <s> print an exception with its stack tracke </s>
funcom_train/51572163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void testSaveGetSelfFingerprint() throws Exception { // LiveFingerprint fp = new LiveFingerprint(source); // fp.setUsesLength(true); // fp.scan(); // TargetSignature tSig = new TargetSignature(source); // tSig.setSelfFingerprint(fp); // tSig.save(); // // TargetSignature tSig2 = new TargetSignature(source); // Fingerprint fp2 = tSig2.getSelfFingerprint(); // FingerprintDelta delta = fp2.compareTo(fp); // assertFalse(delta.isAnyDifference()); // } COM: <s> test set save and reload stored self fingerprint </s>
funcom_train/13686567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeInit() throws IOException{ writer.writeLine("init InitRule"); writer.newLine(); writer.writeLine("rule InitRule ="); writer.writeTabLn("par", 1); writer.writeTabLn("state := " + csd.getStartNode().getText(), 2); writer.writeTabLn("program(self) := ruleelement Main", 2); writer.writeTabLn("endpar", 1); writer.newLine(); } COM: <s> writes section for the init rule </s>
funcom_train/37482693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCalibratedTimeChannel(int det, int strip, int channel){ int rval=0;//default return value if uncalibrated if (tCalibrated[det][strip]){ rval = Math.max(0, (int)(2048.0+timeGainFactor[det][strip]*(channel- timeOffsets[det][strip]))); } return rval; } COM: <s> returns the uncompressed channel number recommended for </s>
funcom_train/7638642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDirty() { for (UiAttributeNode ui_attr : getInternalUiAttributes().values()) { if (ui_attr.isDirty()) { return true; } } for (UiAttributeNode ui_attr : mUnknownUiAttributes) { if (ui_attr.isDirty()) { return true; } } return false; } COM: <s> returns true if the part has been modified with respect to the data </s>
funcom_train/17488589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AffineTransform getBodyTransform() { Point2D pos = model.getLocation(); AffineTransform transform = new AffineTransform(); //rotate around the body's center transform.rotate(model.getBearing(), pos.getX(), pos.getY()); //translate to Java coordinates: Phys2D position is at center, Java at top left //transform.translate(pos.getX(), pos.getY()); return transform; } COM: <s> creates a transform representing the bodys current translation and rotation in order to </s>
funcom_train/27945096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AllocThreadTraceRef getSiblingAlloc() { needConstructed(); if (!image.getAlwaysRefresh()) thread.refreshAllocThreadTraces(); List o=thread.getAllocThreadTraces(); return (AllocThreadTraceRef) image.filterByLocationFrames(o, location.getFrames()); } COM: <s> returns alloc thread trace ref of the same thread and the same trace </s>
funcom_train/8087196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initialize(Instances dataset, int capacity) { if (capacity < 0) capacity = 0; // Strings only have to be "shallow" copied because // they can't be modified. m_ClassIndex = dataset.m_ClassIndex; m_RelationName = dataset.m_RelationName; m_Attributes = dataset.m_Attributes; m_Instances = new FastVector(capacity); } COM: <s> initializes with the header information of the given dataset and sets </s>
funcom_train/5341980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillFromTable(DragGestureEvent dge, List l, List lazy) { LimeJTable table = (LimeJTable)dge.getComponent(); DataLine[] lines = table.getSelectedDataLines(); for(int i = 0; i < lines.length; i++) addFileTransfer((FileTransfer)lines[i], l, lazy); } COM: <s> fills up the lists l and lazy with files or lazy files </s>
funcom_train/22034958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setServer(LogServer server){ synchronized(this){ LogServer next = getNormalizedNext(server); if(next != server_){ // below invocation will cause "#reconfigure(next)" invocation, // so this should be synchronized at this point next.addServee(this); } } } COM: <s> add itself to specified server as code log servee code </s>
funcom_train/11751547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataMap loadDataMap(String uri) throws CayenneRuntimeException { // configure resource locator ResourceLocator locator = configLocator(); InputStream in = locator.findResourceStream(uri); if (in == null) { throw new CayenneRuntimeException("Can't find data map " + uri); } try { InputSource inSrc = new InputSource(in); inSrc.setSystemId(uri); return loadDataMap(inSrc); } finally { try { in.close(); } catch (IOException ioex) { } } } COM: <s> loads data map from file specified by code uri code parameter </s>
funcom_train/43244852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetUserId() { System.out.println("getUserId"); LockInfoObject instance = new LockInfoObject(); String expResult = ""; String result = instance.getUserId(); 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 user id method of class org </s>
funcom_train/23635940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NamedElement_name_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_name_feature", "_UI_NamedElement_type"), CescsmodelPackage.Literals.NAMED_ELEMENT__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the name feature </s>
funcom_train/25501258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void savePreferences() { // Save user preferences. We need an Editor object to // make changes. All objects are from android.context.Context SharedPreferences settings = getSharedPreferences( ScoreKeeper.PREFS_FILENAME, 0); SharedPreferences.Editor editor = settings.edit(); editor.putInt(ScoreKeeper.PREFS_CURRENTSPORT, getCurrentSportIndex()); // Don't forget to commit your edits!!! editor.commit(); } COM: <s> save the users preferences </s>
funcom_train/19322099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRolesUnresolved(RoleUnresolvedList _roleUnresList) { if (_roleUnresList == null) return; for (Iterator it = _roleUnresList.iterator(); it.hasNext();) { RoleUnresolved roleUnres = (RoleUnresolved) (it.next()); roleUnresList.add((RoleUnresolved) (roleUnres.clone())); } } COM: <s> sets list of roles unsuccessfully accessed </s>
funcom_train/2878181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visiting(String name, Integer numberOfChildren) throws RemoteException { // Notify any waiting threads that an attribute was added synchronized (visitingLock) { visiting = new Long (visiting.longValue() + numberOfChildren.longValue()); } //if (sfLog().isInfoEnabled()) sfLog().info("Visiting #"+visiting+ " "+name); } COM: <s> allows a visitor to notify that it is visiting a new node </s>
funcom_train/21034594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearChangeFlag() { key.clearChangeFlag(); if (attributes != null) { for (int i = 0; i < attributes.size(); i++) { DConfigAttribute attribute = (DConfigAttribute) attributes.get(i); attribute.clearChangeFlag(); } } bDelete = false; } COM: <s> clears change flags </s>
funcom_train/1222655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BSimThreadedTicker (int threads) { this.threads = threads; // Create a pool of worker threads workers = new Vector<BSimThreadedTickerWorker>(threads); myWorker = createWorker(0, threads); for (int i = 1; i < threads; i++) { BSimThreadedTickerWorker worker = createWorker(i, threads); workers.add(worker); Thread t = new Thread(worker); t.start(); } } COM: <s> creates a threaded ticker that uses a fixed size pool of threads </s>
funcom_train/13306843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void showSuggestionsWithTrust(String mbox) { ClosableIterator<Statement> it; try { it = model.queryConstruct(String.format(constructSuggestions, mbox),"SPARQL").iterator(); } catch (Exception e) { e.printStackTrace(); return; } while (it.hasNext()) { Statement s = it.next(); List<ITrustInfo> trustLevels = trustEngine.getTrustLevel(s); int level = SSCFTrustEngine.calculateTrustValue(trustLevels); if(level > 0) { System.out.println(level + "\t" + s); trustEngine.finalResult.add(s); } } it.close(); System.out.println(); } COM: <s> shows results and creates the list with result statements </s>
funcom_train/20883077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleDeallocate() throws EngineException { long[] states = setEngineState(CLEAR_ALL_STATE, DEALLOCATED); outputHandler.cancelAllItems(); outputHandler.terminate(); // Close the audio. This should flush out any queued audio data if (audio != null) { audio.close(); } outputQueue.close(); postEngineDeallocated(states[0], states[1]); } COM: <s> handles a deallocation request </s>
funcom_train/22496203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pointTo(Vector3f p, Vector3f up) { // Calculate new direction Vector3f d = new Vector3f(p); d.sub(getAbsolutePosition()); d.normalize(); // Calculate new right vector Vector3f r = new Vector3f(); r.cross(d, up); r.normalize(); // Calculate new up vector Vector3f u = new Vector3f(); u.cross(r, d); u.normalize(); // Get absolute vectors if (parent != null && parent instanceof SceneObject) { ((SceneObject) parent).absoluteToLocal(d); ((SceneObject) parent).absoluteToLocal(u); } // Set vectors setDirection(d); setUp(u); } COM: <s> point object to position </s>
funcom_train/37556015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deselect (int [] indices) { checkWidget (); if (indices == null) error (SWT.ERROR_NULL_ARGUMENT); LVITEM lvItem = new LVITEM (); lvItem.mask = OS.LVIF_STATE; lvItem.stateMask = OS.LVIS_SELECTED; for (int i=0; i<indices.length; i++) { lvItem.iItem = indices [i]; ignoreSelect = true; OS.SendMessage (handle, OS.LVM_SETITEM, 0, lvItem); ignoreSelect = false; } } COM: <s> deselects the items at the given zero relative indices in the receiver </s>
funcom_train/20504298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean verifyNoBookingReferenceInSeatStatus(long bookingId) { String sql = "select count(*) from Seat_Status where Booking_id = ?"; Object[] args = new Object[] { new Long(bookingId) }; int count = jdbcTemplate.queryForInt(sql, args); return count == 0; } COM: <s> verifies that the given booking is not reference by any seat status </s>
funcom_train/3785579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PopupTextFieldDialog (Flicker flk, String msg, String defaultAnswer) { /* Popup */ super(flk, "Message", true); this.flk= flk; this.util= flk.util; this.f= flk; this.msg= msg; answer= (defaultAnswer==null) ? "" : defaultAnswer; okFlag= false; popupTextField(); } /* PopupTextFieldDialog */ COM: <s> popup text field dialog constructor </s>
funcom_train/25705322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBcancel() { //if( Bcancel == null ) { JButton Bcancel = new JButton(language.getString("Common.cancel")); Bcancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(final java.awt.event.ActionEvent e) { returnCode = CANCEL; setVisible(false); } }); //} return Bcancel; } COM: <s> this method initializes bok </s>
funcom_train/50872932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFirstElement() { OMApplication application = new OMApplication(); OMInteger integer = new OMInteger("1"); OMSymbol symbol = new OMSymbol("a","b"); application.addElement(integer); application.addElement(symbol); assertTrue(application.firstElement() == integer); } COM: <s> test of first element method of class omapplication </s>
funcom_train/5427881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildContexts() { for (final Iterator<GrammarView> i = includeNode .immediateParentsIterator(); i.hasNext();) { final GrammarView pg = i.next(); for (final Iterator<ContextView> j = pg.contexts.values() .iterator(); j.hasNext();) { final ContextView pgc = j.next(); final ContextView lc = getOrCreateContext(pgc.name()); lc.processGrammarInclude(pgc); } } } COM: <s> build context using grammar include relationship </s>
funcom_train/41152050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Classifier initClassifier(int nextSeed) throws Exception { CollectiveTree tree; tree = new CollectiveTree(); tree.setNumFeatures(m_KValue); tree.setMinNum(getMinNum()); tree.setSeed(nextSeed); tree.setTestSet(m_TestsetNew); tree.buildClassifier(m_TrainsetNew); return tree; } COM: <s> creates a new instance of the classifier sets the parameters and </s>
funcom_train/12171363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean anyChildBreaksContainment(String element, Node node) { for (Node x = node; x != null; x = x.getNext()) { if (x instanceof Element) { String name = ((Element) x).getName(); if (!styleCfg.isContainmentPermitted(element, name) && !styleCfg.isAntiElement(name)) { return true; } } } return false; } COM: <s> if any child is an element that should not be contained </s>
funcom_train/7277152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleConnect(Socket socket) { // LOG.debug(_rfd + " -- Handling connect from PushConnector"); HTTPDownloader dl = httpDownloaderFactory.create(socket, _rfd, _commonOutFile, _manager instanceof InNetworkDownloader); try { dl.initializeTCP(); } catch (IOException iox) { failed(); return; } startDownload(dl); } COM: <s> notification that the push succeeded </s>
funcom_train/8080329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TreeClass getNode(String id) { //returns the treeclass object with the particular ident if (id.equals(m_identity)) { return this; } if (m_set1 != null) { TreeClass tmp = m_set1.getNode(id); if (tmp != null) { return tmp; } } if (m_set2 != null) { TreeClass tmp = m_set2.getNode(id); if (tmp != null) { return tmp; } } return null; } COM: <s> goes through the tree structure recursively and returns the node that </s>
funcom_train/15410381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String removeQuotes(String dbColumn) { dbColumn = StringHelper.replaceString(dbColumn, dbPlatform.getOpenQuote(), ""); dbColumn = StringHelper.replaceString(dbColumn, dbPlatform.getCloseQuote(), ""); return dbColumn; } COM: <s> strips off the database platform specific quoted identifier characters </s>
funcom_train/45541602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sessionStarted() { if (!isEnabled()) return; IStatus status; try { IJSCCompletionProposalComputer computer= getComputer(true); if (computer == null) // not active yet return; PerformanceStats stats= startMeter(SESSION_STARTED, computer); computer.sessionStarted(); stopMeter(stats, SESSION_ENDED); return; } catch (InvalidRegistryObjectException x) { status= createExceptionStatus(x); } catch (CoreException x) { status= createExceptionStatus(x); } catch (RuntimeException x) { status= createExceptionStatus(x); } fRegistry.informUser(this, status); } COM: <s> notifies the described extension of a proposal computation session start </s>
funcom_train/26292295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UserView changeUserStatus(String userID,boolean status) throws NoSuchObjectException { System.out.println("Deactivating user"); UserLO user; user = (UserLO)loadByPrimaryKey(userID,userID.getClass(),UserEJB.LocalREF); user.setActive(new Boolean(status)); return (UserView)user.getView(); } COM: <s> activates or deactivates user </s>
funcom_train/34895905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteOldResults() { File analysisDir = new File(getOpenMSProcessingDir()); if (!analysisDir.exists()) return true; log.debug("Deleting old analysis directory: "+analysisDir.getAbsolutePath()); if (!FileUtils.deleteDirectory(analysisDir)) { log.error("Old analysis directory "+analysisDir.getAbsolutePath()+" could not be deleted!"); return false; } return true; } COM: <s> this will delete the openms analysis directory in the project </s>
funcom_train/12179385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFindGreatestCommonDenominatorWithAZeroParameter() { DIAspectRatioFunction function = getFunction(); int gcd = function.findGreatestCommonDenominator(0, 450); assertEquals(450, gcd); gcd = function.findGreatestCommonDenominator(450, 0); assertEquals(450, gcd); } COM: <s> verify that attempting to find the gcd with a zero parameter results in </s>
funcom_train/42693342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateProbability_Min(double probability, DiagnosticChain diagnostics, Map<Object, Object> context) { boolean result = probability >= PROBABILITY__MIN__VALUE; if (!result && diagnostics != null) reportMinViolation(V3Package.eINSTANCE.getProbability(), new Double(probability), new Double(PROBABILITY__MIN__VALUE), true, diagnostics, context); return result; } COM: <s> validates the min constraint of em probability em </s>
funcom_train/3427382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addVariable(VariableRefBase variableRef) { if (_closureVars == null) { _closureVars = new ArrayList(); } // Only one reference per variable if (!_closureVars.contains(variableRef)) { _closureVars.add(variableRef); // Add variable to parent closure as well Closure parentClosure = getParentClosure(); if (parentClosure != null) { parentClosure.addVariable(variableRef); } } } COM: <s> add new variable to the closure </s>
funcom_train/21844958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String findPackage( String suffix ) { Value list = globals.localReference("SYS$PACKAGES"); if( list == null ) return null; for( int ix = 1; ix <= list.size(); ix++ ){ String className = list.getString(ix) + "." + suffix; Class c; try { c = Class.forName(className); } catch (ClassNotFoundException e) { continue; } if( c != null ) return className; } return null; } COM: <s> given a suffix for a class name search the list of </s>
funcom_train/7690448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char read() throws IOException { int ch; if (lastChar == '\0') { // this is the only point where anything is read from the reader ch = reader.read(); if (ch != -1) { totalCharactersRead++; } else { throw new EOFException(); } } else { ch = lastChar; lastChar = '\0'; } return (char)ch; } COM: <s> all read attempts pass through this function </s>
funcom_train/29529045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(Solution solution) { if (solutionsList_.size() == capacity_) { Configuration.logger_.severe("The population is full"); Configuration.logger_.severe("Capacity is : "+capacity_); Configuration.logger_.severe("\t Size is: "+ this.size()); return false; } // if solutionsList_.add(solution); return true; } // add COM: <s> inserts a new solution into the solution set </s>
funcom_train/4676501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addElement(Object element) { unfilteredElements.add(element); if(passesFilter(element.toString(), this.filter)) { int addIndex = filteredElements.size(); filteredElements.add(element); fireIntervalAdded(this, addIndex, addIndex); } } COM: <s> appends an element to the end of the list model </s>
funcom_train/19072711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getSerieIndexNumber(int serie) { CSVParser Parse = new CSVParser(getAdvancedSerieSelector(),true); int [] checker = Parse.parseInt(); for ( int i=0; i<checker.length;i++) { if(checker[i] == serie+1) return(i); // Returns index in array } return(-1); // Serie not found } COM: <s> gets the index of the current serie number </s>
funcom_train/35036031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Segment compareTo) { int compareSegNum = ((Segment) compareTo).getNumber(); int compResult = 0; if (compareSegNum < this.getNumber()) { compResult = 1; } else if (compareSegNum > this.getNumber()) { compResult = -1; } // else they are equal, leave as 0 return compResult; } COM: <s> used to determine the order in the file by segment number </s>
funcom_train/1028928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBug21462() throws Exception { if (!serverSupportsStoredProcedures()) { return; } CallableStatement cstmt = null; try { this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug21462"); this.stmt .executeUpdate("CREATE PROCEDURE testBug21462() BEGIN SELECT 1; END"); cstmt = this.conn.prepareCall("{CALL testBug21462}"); cstmt.execute(); } finally { if (cstmt != null) { cstmt.close(); } this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug21462"); } } COM: <s> tests fix for bug 21462 jdbc and odbc specifications allow </s>
funcom_train/40529076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String longStrBufToString() { // if (longStrBufOffset != -1) { // return Portability.newStringFromBuffer(buf, longStrBufOffset, // longStrBufLen); // } else { return Portability.newStringFromBuffer(longStrBuf, 0, longStrBufLen); // } } COM: <s> the larger buffer as a string </s>
funcom_train/22488846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeView(View view) { if (view.getRootWindow() == this) return; for (int i = 0; i < views.size(); i++) { View v = (View) ((WeakReference) views.get(i)).get(); if (v == view) { views.remove(i); break; } } getWindowItem().removeWindowRefs(view); } COM: <s> removes all internal references to a view </s>
funcom_train/1338857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point2D smallWarp(Point2D p) { if (canWarp()) { if (parent == null) { return warp(p); } else { p = parent.reverseWarp(p); return warp(p); } } else { return new Point2D.Double(p.getX(), p.getY()); } } COM: <s> warp only the final step </s>
funcom_train/49502730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDeviceName(){ StringBuffer strDeviceName=new StringBuffer(); DeviceBean deviceBean=null; for(int i=0;i<deviceID.length;){ deviceBean=DeviceBean.getRecordbyPrimarykey(deviceID[i]); if(deviceBean != null) strDeviceName.append(deviceBean.getName()); i++; if(i != deviceID.length) strDeviceName.append(","); } return strDeviceName.toString(); } COM: <s> returns comma separated list of device names related to appropriate device ids </s>
funcom_train/13996210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSubContainerElements() { for (Iterator i = children.iterator(); i.hasNext();) { TreeNode node = (TreeNode) i.next(); /* XXX: interface: LoadableTreeNode#isLoadable() */ if (node instanceof ContainerElementTreeNode) { i.remove(); } } } COM: <s> removes all tree nodes with subcontainers </s>
funcom_train/18884923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int takeImage(String name, BufferedImage bi) { // make sure its a 3byte int BufferedImage safe = new BufferedImage(bi.getWidth(), bi.getHeight(), BufferedImage.TYPE_INT_RGB); Graphics g = safe.getGraphics(); while (!g.drawImage(bi, 0,0,null)) { } ImagePlus ip = new ImagePlus(name, safe); ip.show(); ip.updateAndDraw(); return ip.getID(); } COM: <s> generalized method to accept buffered image data </s>
funcom_train/13934592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float converty2draw(float y, int hei, int marginyTop, int marginyBottom, float ymax, float ymin ) { return ( hei-marginyBottom - (y-ymin)*( ((float)(hei-(marginyTop+marginyBottom))) / (ymax-ymin) ) ) ; } COM: <s> procedures of graph coordinates conversion </s>
funcom_train/3291608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean create(MMObjectBuilder builder) { boolean result=false; DatabaseTransaction trans=null; try { trans=createDatabaseTransaction(); result=create(builder,trans); trans.commit(); } catch (StorageException e) { if (trans!=null) trans.rollback(); log.error(e.getMessage()); } return result; } COM: <s> create a database table for the specified builder </s>
funcom_train/49160151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resume(int n) { while (getCount() > n) try { synchronized (this) { wait(); } } catch (IllegalMonitorStateException e) { logger.warn("Illegal monitor exception while sleeping (SHOULD NOT HAPPEN)", e); } catch (Exception e) { logger.debug("Interrupted while sleeping: %s", e.toString()); if (logger.isDebugEnabled()) { logger.printException(Level.DEBUG, e); } } } COM: <s> wait until the count is less than a given value </s>
funcom_train/11702303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean performFinish() { try { editInstallationDescriptor(); } catch (Throwable e) { e.printStackTrace(); MessageDialog.openError(getShell(), "Error", "An error happened while trying to execute the wizard operetions: \n\nDetails:\n " + e.getMessage()); } return true; } COM: <s> this method is called when finish button is pressed in the wizard </s>
funcom_train/12126602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getViewPosition() { if (scrollDirector != null) { Dimension extent = getExtentSize(); return scrollDirector.getViewPosition(new PBounds(0, 0, extent.getWidth(), extent.getHeight())); } else { return null; } } COM: <s> gets the view position from the scroll director based on the current </s>
funcom_train/38880717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IFile getMakefile(IFolder unitTestFolder, IProgressMonitor progressMonitor) throws CoreException { IFile makefile = unitTestFolder.getFile("Makefile"); if (makefile.exists() == false){ String newMakefile = "#Unit Test Makefile create by "; ByteArrayInputStream dataToWrite = new ByteArrayInputStream(newMakefile.getBytes()); makefile.create(dataToWrite, true, progressMonitor); } return makefile; } COM: <s> return the file makefile in the folder </s>
funcom_train/26411597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getParentDirectoryCount() { SourceDirectory parentDirectory = currentDirectory; int count = 0; // The root source directory will return itself as its parent // directory. while (parentDirectory.getParentDirectory() != parentDirectory) { parentDirectory = parentDirectory.getParentDirectory(); count++; } return count; } COM: <s> get the number of parent directories that this directory has </s>
funcom_train/26492379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSiteExcluded(String path) { boolean result = false; try { String query = "SELECT * from mdir_Site_Exclude WHERE path=\'"+clean(path)+"\'"; ResultSet rs = db.getResultSet(con, query); if (rs.next()) result = true; } catch (SQLException e) { e.printStackTrace(); } return result; } COM: <s> get site exclusion </s>