__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/5315763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetParameter() { HCSettings hc = HCSettings.getInstance(); hc.setParameter("language", "de"); hc.reloadSettings(); assertEquals("de", HCSettings.getParameterValue("language")); hc.setParameter("language", "it"); assertEquals("", HCSettings.getParameterValue("pippo pluto")); } COM: <s> test for the method set parameter </s>
funcom_train/2918026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void subtractInPlace(BitSet a) { if (a == null) return; // for all words of 'a', turn off corresponding bits of 'this' for (int i = 0; i < bits.length && i < a.bits.length; i++) { bits[i] &= ~a.bits[i]; } } COM: <s> subtract the elements of a from this in place </s>
funcom_train/32058009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetVisible() { System.out.println("testSetVisible"); GraphModel gm = new DefaultGraphModel(); CellViewFactory cvf = null; GraphLayoutCache cache = new GraphLayoutCache(gm, cvf); Object cell = new DefaultGraphCell(); Object port = new DefaultPort(); ((DefaultGraphCell) cell).add((DefaultPort) port); cache.setVisible(cell, false); } COM: <s> this function tests set visible function of graph layout cache class </s>
funcom_train/3316949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String translate(char ch) { if (ch == 0x09 || ch == 0x0a || ch == 0x0d || (ch >= 0x20 && ch <= 0xd7ff) || (ch >= 0xe000 && ch <= 0xfffd) || (ch >= 0x10000 && ch <= 0x10ffff)) { return super.translate(ch); } else { return ""; } } COM: <s> translates the character </s>
funcom_train/10821806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addResultRow(ArrayList<ArrayList<Object>> resultTable, Object ... values) { ArrayList<Object> resultRow = new ArrayList<Object>(); for (int i = 0; i < values.length; i++) { resultRow.add(values[i]); } resultTable.add(resultRow); } COM: <s> add a row to expected results table </s>
funcom_train/5418095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showFrame() { frame.getContentPane().add(rootWindow, BorderLayout.CENTER); frame.setJMenuBar(createMenuBar()); frame.setSize(900, 700); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); } COM: <s> initializes the frame and shows it </s>
funcom_train/31678965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSize(int newSize) { if (size < newSize) { while (newSize > objects.length) { resize(); } for (int i = size; i < newSize;) { objects[i++] = factory.create(); } } else { for (int i = newSize; i < size;) { objects[i++] = null; } } size = newSize; } COM: <s> sets the size of this queue creating or removing objects as necessary </s>
funcom_train/28707191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WSUnit saveSpace(){ for (Iterator iter = getChildren().iterator(); iter.hasNext();) for (Iterator it = ((WSUnitItem) iter.next()).getChildren().iterator(); it.hasNext(); ) ((WSPage) it.next()).setChildren(null); // omit regions return this; } COM: <s> omit regions of the pages </s>
funcom_train/34659343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Topic getTopic(String top) throws DiggException { Topic rv=null; final Map<String, TopicContainer> topics = getTopics(); for(final Map.Entry<String, TopicContainer> me : topics.entrySet()) { for(final Topic t : me.getValue()) { if(t.getName().equals(top) || t.getShortName().equals(top)) { assert rv == null : "Found duplicate topic match"; rv=t; } } } return rv; } COM: <s> get the named topic </s>
funcom_train/1034440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void emitBodyUserVariableAssignments(PrintWriter writer) { if (temporaryCVariableAssignments != null) { for (Iterator iter = temporaryCVariableAssignments.iterator(); iter.hasNext(); ) { String val = (String) iter.next(); writer.print(" "); writer.println(val); } } } COM: <s> emits the user defined c variable assignments from the </s>
funcom_train/19063403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void applyFilters(Object uid) throws Exception { IFilterList list = inboxFolder.getFilterList(); for (int j = 0; j < list.count(); j++) { IFilter filter = list.get(j); Object[] result = inboxFolder.searchMessages(filter, new Object[] { uid }); if (result.length != 0) { CompoundCommand command = new FilterCompoundCommand(filter, inboxFolder, result); CommandProcessor.getInstance().addOp(command); } } } COM: <s> apply filters on new message </s>
funcom_train/40433722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MendozaCommandResult changeMerchant(final MendozaRequest request) { log.trace("Entering changeMerchant"); MendozaChangeMerchantCommand command = new MendozaChangeMerchantCommand(request, this, serverState); command.execute(); initBuyerRobot(); if (buyerRobot == null) { throw new RuntimeException("Cannot init buyer robot."); } log.trace("Leaving changeMerchant"); return command.getResult(); } COM: <s> sets the new merchant id and key </s>
funcom_train/13272759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void show3DError() { String message = getUserPreferences().getLocalizedString(AppletApplication.class, "3DError.message"); String title = getUserPreferences().getLocalizedString(AppletApplication.class, "3DError.title"); JOptionPane.showMessageDialog(KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow(), message, title, JOptionPane.ERROR_MESSAGE); } COM: <s> displays a message to user about a 3 d error </s>
funcom_train/22028897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equalsExceptName(MathType type) { if (type instanceof RealTupleType) { try { return (((RealTupleType) type).getDimension() == 1 && ((RealTupleType) type).getComponent(0) instanceof RealType); } catch (VisADException e) { return false; } } return (type instanceof RealType); } COM: <s> any two real type s are equal except name </s>
funcom_train/49997305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putInGroup(Serializable key, String group, Serializable value) { try { JCS.getInstance(this.cacheName).putInGroup(key, group, value); } catch (CacheException e) { String msg = "Failure to add " + key + " to cache " + this.cacheName + ":" + e.getMessage(); this.logger.warning(msg); } } COM: <s> implements group based addition of cache elements </s>
funcom_train/29648579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readData(StringBuffer incomingData) throws IOException { int incomingByte = 0; incomingByte = input.read(); while (!isCommunicationError() && input.available() > 0) { if (incomingByte != '\r') { incomingData.append((char) incomingByte); } System.out.println("Reading2..."); incomingByte = input.read(); } // we should only reach the end of a stream when the socket // is closed, therefore error on it. if (incomingByte == -1) { throw new CommunicationException(); } } COM: <s> reads data from the socket stream into a string buffer </s>
funcom_train/19212512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupUserSettings(String[] args) { UserState.userSettings.set(createUserSettingMap(args)); if (UserState.getAcceptLanguage().contains("sv")) { UserState.locale.set(new Locale("sv")); } else { UserState.locale.set(LocaleContextHolder.getLocale()); } } COM: <s> sets the up user settings </s>
funcom_train/46060978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resolveModuleConfigurationIssues(ModuleConfiguration moduleConfiguration2) { int version = moduleConfiguration2.getConfigurationVersion(); /* * if no version was set before -> version is 1 */ if (version == 1) { // new keys and defaults are moduleConfiguration.set(CONFIG_KEY_EMAILTOAREAS, ""); moduleConfiguration.set(CONFIG_KEY_EMAILTOGROUPS, ""); moduleConfiguration.setBooleanEntry(CONFIG_KEY_EMAILTOCOACHES, false); moduleConfiguration.setBooleanEntry(CONFIG_KEY_EMAILTOPARTICIPANTS, false); // moduleConfiguration2.setConfigurationVersion(2); } } COM: <s> resolving version issues of the module configuration adds new default </s>
funcom_train/15811278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected BitSet calcMergeState(BitSet newSessionState, BitSet oldSessionState) { if(oldSessionState.get(SessionState.IS_REQUEST)) { // In a request, it is the start of processing. Therefore, set bit. newSessionState.or(oldSessionState); } else { // In a response, it is the end of processing. Therefore, delete bit. newSessionState.andNot(oldSessionState); } return newSessionState; } COM: <s> bit calculate processing messages </s>
funcom_train/36510881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNbrOfAccount(boolean activesOnly) { String whereClause = null; String[] whereArgs = null; if (!activesOnly) { whereClause = SipProfile.FIELD_ACTIVE+"=?"; whereArgs = new String[] {"1"}; } Cursor c = db.query(ACCOUNTS_TABLE_NAME, new String[] { SipProfile.FIELD_ID }, whereClause, whereArgs, null, null, null); int numRows = c.getCount(); c.close(); return numRows; } COM: <s> count the number of account saved in database </s>
funcom_train/2927781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLocalName(Object node) { String value; try { value = (String) DTMWrapper.dtmLocalNameMethod.invoke(this .getDTM(node), new Object[] { node }); } catch (InvocationTargetException e) { throw new GeneratorError("could not evaluate namespace of node " + node, e.getTargetException()); } catch (Exception e) { throw new GeneratorError("could not evaluate namespace of node " + node, e); } return value; } COM: <s> get xml names local name from dtm </s>
funcom_train/7625623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TypedArray obtainStyledAttributes(int[] attrs) { int len = attrs.length; TypedArray array = getCachedStyledAttributes(len); array.mRsrcs = attrs; AssetManager.applyStyle(mTheme, 0, 0, 0, attrs, array.mData, array.mIndices); return array; } COM: <s> return a styled attributes holding the values defined by </s>
funcom_train/12157120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateRequiredSets(ShorthandAnalyzer[] analyzers) { requiredForShorthand.clear(); requiredForIndividual.clear(); for (int i = 0; i < analyzers.length; i++) { ShorthandAnalyzer analyzer = analyzers[i]; analyzer.addRequired(requiredForIndividual, requiredForShorthand); } } COM: <s> update the required sets of properties from the composed analyzers </s>
funcom_train/21609482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fileReady(AFileTPImpl impl) { try { fileQueueEntry fqe = new fileQueueEntry(impl); fileQ.enqueue(fqe); synchronized (fileQ) { numOutstandingRequests += fqe.size; } } catch (SinkException se) { throw new InternalError("AFileTPTM.fileReady() got SinkException -- this should not happen, please contact <mdw@cs.berkeley.edu>"); } } COM: <s> indicate that a file has pending events </s>
funcom_train/806609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IAtomContainer readAtomContainer(DataInputStream dataIn) throws IOException, CDKException { Vector<Integer> v=new Vector<Integer>(); int i=0; while((i=dataIn.read())!=-1){ v.add(new Integer(i)); } byte[] bytes=new byte[v.size()]; for(i=0;i<v.size();i++){ bytes[i]=((Integer)v.get(i)).byteValue(); } String molString=new String(bytes); return (IAtomContainer) new MDLReader(new StringReader(molString)).read(new org.openscience.cdk.Molecule()); } COM: <s> reads and returns a single bio resource from the given stream </s>
funcom_train/18480652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void mergeSurf(Surface.Model s2,Surface.Model destination) { for(Model child: s2.getChildren()) { String qname = s2.getName() + " " + child.getName() ; qname = destination.findBestName(qname) ; Model new_child = (Model)child.clone() ; new_child.setName(qname) ; destination.addChild(new_child) ; } } COM: <s> merges a surfae into another surface </s>
funcom_train/29504673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConcurrencySingle() { try { OOoDocServiceRemote bean = OOoDocServiceLocator.bind(SERVER_JNDI_URL_1); for (int i = 0; i < N_THREADS; i++) { new Thread(new DocCreationThread("Th"+(i+1),bean)).start(); System.out.println("testConcurrencySingle() - Thread "+(i+1)+" started."); } } catch (Exception e) { System.out.println("testConcurrencySingle() - Failed to execute test: "+e); e.printStackTrace(); } } COM: <s> test for concurrency on a single instance </s>
funcom_train/37805255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getFilterTextField() { if( filterTextField == null ) { filterTextField = new JTextField(10); filterTextField.setMaximumSize(filterTextField.getPreferredSize()); filterTextField.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(final DocumentEvent e) { filterContentChanged(); } public void insertUpdate(final DocumentEvent e) { filterContentChanged(); } public void removeUpdate(final DocumentEvent e) { filterContentChanged(); } }); } return filterTextField; } COM: <s> this method initializes filter text field </s>
funcom_train/32814409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrentSubTask(TaskMonitor subTask, double subTaskShare) { if (subTask.getGlobalCompletionRate() > 0) { //throw new IllegalArgumentException("Illegal attempt to add a subTask which has already been started."); } this.currentSubTask = subTask; this.currentSubTaskShare = subTaskShare; subTask.parentTask = this; } COM: <s> set the current sub task </s>
funcom_train/4717574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCentPitch() { SynMessage msg = new SYN().synth(1).voice(1).pitchCents(12*12000); assertEquals("FFi", msg.getTypetag()); assertEquals((SynMessage.MAX_32BIT), msg.getArguments()[2]); assertEquals("/SYN/ID1/V1/PITCH", msg.getAddress()); } COM: <s> voice pitch in cent </s>
funcom_train/29272095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long createCard(String category, String front, String back) { ContentValues initialValues = new ContentValues(); initialValues.put(KEY_CATEGORY, category); initialValues.put(KEY_BOX, 0); initialValues.put(KEY_FRONT, front); initialValues.put(KEY_BACK, back); return mDb.insert(CARD_TABLE, null, initialValues); } COM: <s> creates a card </s>
funcom_train/31435774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changeToExecutable(String homeBin, String filename){ String cmd[] = new String[3]; cmd[0] = new String("chmod"); cmd[1] = new String("755"); cmd[2] = new String(homeBin+SEP+filename); try { Runtime r = Runtime.getRuntime(); Process p = r.exec(cmd); }catch (IOException err) { System.err.println("Failed to change to executable:"+err); //Toolkit.getDefaultToolkit().beep(); } } COM: <s> takes the bin directory of the application execution script </s>
funcom_train/35299286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumnType(int columnIndex, int SQLType) throws SQLException { // examine java.sql.Type reflectively, loop on the fields and check // this. Separate out into a private method checkColType(SQLType); checkColRange(columnIndex); colInfo[columnIndex].colType = SQLType; } COM: <s> sets the sql type code for values stored in the designated column </s>
funcom_train/43865950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteCellsInVectorByColor(Color c, Vector<DrawingBean> v) { for (int i=v.size()-1; i>=0; i--) { if (v.get(i).getColor() == c) { v.removeElementAt(i); } } repaint(); } COM: <s> deletes all the cells with a specified color in a given vector </s>
funcom_train/33370185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TableContainer add(Widget widget, int colspan, int rowspan) { if (!fixedSize) { xPos += colspan; if (xPos > cols) { cols = xPos; } } colspans.addElement(new Integer(colspan)); rowspans.addElement(new Integer(rowspan)); super.add(widget); return this; } COM: <s> adds the widget with a specified column width and row height </s>
funcom_train/46454156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void skipSpaces() throws ParserException { try { while(function.charAt(position-1)==' ') { position++; } character = function.charAt(position-1); } catch(StringIndexOutOfBoundsException e) { throw new ParserException(PAREN_NOT_MATCH); } } COM: <s> advances parsing pointer skips pass all white spaces </s>
funcom_train/34527785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void installMgrs() { // standard plugin manager ApplicationContext ctx = new ClassPathXmlApplicationContext("org/in4ama/editor/plugin/editor-plugin-context.xml"); pluginMgr = (PluginMgr)ctx.getBean("studio.pluginManager"); // iterate the plugins Collection<InforamaPlugin> plugins = pluginMgr.getPlugins(); for (InforamaPlugin plugin : plugins) { plugin.install(this); } // mailshot listener manager mailshotListenerMgr = (MailshotListenerMgr)ctx.getBean("studio.mailshotListenerManager"); } COM: <s> installs all registered plugins </s>
funcom_train/17849351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getVoice() { final String voice = mSettings.getProperty(KEY_SELECTED_VOICE, ""); if (voice.length() == 0) { final List<String> voices = SpeechPlugin.getInstance() .getAvailableVoices(); if (voices.size() > 0) { return voices.get(0); } return null; } return voice; } COM: <s> get currently selected voice </s>
funcom_train/38637914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getBoundsForCanvas() { Rectangle bounds = super.getBounds(); if(bounds == null) return null; bounds.y += marginHeight; bounds.height -= (marginHeight * 2); bounds.x += marginWidth; bounds.width -= (marginWidth * 2); return bounds; } COM: <s> calculate the bounds of the receiver should be drawing in </s>
funcom_train/24188759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseSpaces(String myVar, DFSview<V, U> myDFSview) { HashSet<String> varsBelow = new HashSet<String> (myDFSview.getChildren()); varsBelow.addAll(myDFSview.getAllPseudoChildren()); myDFSview.spaces = this.problem.getSolutionSpaces(myVar, this.withSharedVars, varsBelow); } COM: <s> parses and records the spaces for the input variable </s>
funcom_train/19061658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canImport(JComponent comp, DataFlavor[] transferFlavors) { boolean canImport = false; for (int i = 0; (i < transferFlavors.length) && (!canImport); i++) { if (transferFlavors[i].equals(DataFlavor.javaFileListFlavor)) { canImport = true; } } return canImport; } COM: <s> returns true if the one of the flavors is the </s>
funcom_train/18936237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int executeGreaterThenOperation( String machineAttValue, String attValue ) throws TokenErrorException { if ( machineAttValue == null ) return ATT_UNDEFINED; int attValueInt = testValueIsNumber( attValue, ">" ); int machineAttValueInt = testValueIsNumber( machineAttValue, ">" ); return (machineAttValueInt > attValueInt ? ATT_TRUE : ATT_FALSE); } COM: <s> executes the operation at two string arguments but before it tries </s>
funcom_train/19051894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean empty() { switch (type) { case '*': case '?': return true; case '+': case '|': for (WWEContentModel m = (WWEContentModel) content; m != null; m = m.next) { if (m.empty()) { return true; } } return false; case ',': case '&': for (WWEContentModel m = (WWEContentModel) content; m != null; m = m.next) { if (!m.empty()) { return false; } } return true; default: return false; } } COM: <s> return true if the content model could </s>
funcom_train/29518853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ActivateGenerationButton(){ if(!m_model.randomNotEnded){ if((Integer)MaxNodeNumberSpinner.getValue() > 1 && m_model.randomTrafficModel.getRowCount() > 1){ GenerateButton.setEnabled(true); }else{ GenerateButton.setEnabled(false); } } } COM: <s> allow to push the generation button only when the simulation can start </s>
funcom_train/34451390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRedefinedBehaviourPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_MBehaviour_redefinedBehaviour_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MBehaviour_redefinedBehaviour_feature", "_UI_MBehaviour_type"), M3ActionsPackage.Literals.MBEHAVIOUR__REDEFINED_BEHAVIOUR, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the redefined behaviour feature </s>
funcom_train/17885870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replayEndPrefixMappings(final ContentHandler handler, final Set<String> excludeNamespaces) throws SAXException { for (Map.Entry<String,LinkedList<String>> e : currentNamespaceMap.entrySet()) { if (!excludeNamespaces.contains(e.getValue().getFirst())) handler.endPrefixMapping(e.getKey()); } } COM: <s> replays all current prefix mappings for another code content handler code end mapping </s>
funcom_train/40885412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color getColor () { int intBits = NumberUtils.floatToRawIntBits(color); Color color = this.tempColor; color.r = (intBits & 0xff) / 255f; color.g = ((intBits >>> 8) & 0xff) / 255f; color.b = ((intBits >>> 16) & 0xff) / 255f; color.a = ((intBits >>> 24) & 0xff) / 255f; return color; } COM: <s> returns the color of this font </s>
funcom_train/3362823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void installDocumentFilter(DocumentFilter filter) { JFormattedTextField ftf = getFormattedTextField(); if (ftf != null) { Document doc = ftf.getDocument(); if (doc instanceof AbstractDocument) { ((AbstractDocument)doc).setDocumentFilter(filter); } doc.putProperty(DocumentFilter.class, null); } } COM: <s> installs the code document filter code code filter code </s>
funcom_train/1426707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stayInWonderland() { inWonderland = true; setIconImage( IconResourceManager.ICON_BLUE_PILL.getImage() ); if ( trayIcon != null ) trayIcon.setImage( new javax.swing.ImageIcon( getClass().getResource( IconResourceManager.ICON_RESOURCE_BLUE_PILL ) ).getImage() ); } COM: <s> stays in wonderland </s>
funcom_train/26319501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void collapseBuilding(Building bldg) { // Remove the building from our building vector. buildings.removeElement(bldg); // Walk through the building's hexes. Enumeration<Coords> bldgCoords = bldg.getCoords(); while (bldgCoords.hasMoreElements()) { final Coords coords = bldgCoords.nextElement(); collapseBuilding(coords); } // Handle the next building hex. } // End public void collapseBuilding( Building ) COM: <s> the given building has collapsed </s>
funcom_train/16743419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(AlleleCountPair rhsAcp) { for (int i = 0; i < mAlleleCount.length; i++) { if (getAlleleCount(i) < rhsAcp.getAlleleCount(i)) { return -1; } else if (getAlleleCount(i) > rhsAcp.getAlleleCount(i)) { return 1; } } return 0; } COM: <s> a convenience method used strictly by the data containers that contain it </s>
funcom_train/41446201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == this) return true; if (!(obj instanceof QueryCollator)) return false; QueryCollator that = (QueryCollator)obj; return this.locale.equals(that.locale) && this.hasStrength == that.hasStrength && this.strength == that.strength && this.hasDecomposition == that.hasDecomposition && this.decomposition == that.decomposition; } COM: <s> compare this query collator for equality with another object </s>
funcom_train/20333620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _persist(nuggets.ICruncher c) { // declare references int idHasLocation = c.declare(haslocation); // persist the nugget c.startConcept(this); if (devicestatus!=null) c.put("devicestatus", devicestatus); if (idHasLocation>0) c.put("haslocation", idHasLocation); if (instancename!=null) c.put("instancename", instancename); if (timestamp!=null) c.put("timestamp", timestamp); } COM: <s> persist this entertainment device using the nuggets utility </s>
funcom_train/1448202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String feedbackForOthers() { if (logger.isDebugEnabled()) { logger.debug("feedbackForOthers() - start"); //$NON-NLS-1$ } this.recordPerPage = 25; this.action = "submitToUserFeedback.htm"; this.redirectAction = "viewMyFeedbackForOthers.htm"; if (logger.isDebugEnabled()) { logger.debug("feedbackForOthers() - end"); //$NON-NLS-1$ } return SUCCESS; } COM: <s> feedback for others </s>
funcom_train/9645327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getMainElement() throws XMLNotValidException { if (super.getEditor().getDoc().getRootElement().getChild("target") == null) { throw new XMLNotValidException(); } return super.getEditor().getDoc().getRootElement().getChild("target"); } COM: <s> get the main element target or throws a xmlnot valid exception </s>
funcom_train/18749324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doOpenGraph(final File fromFile) throws IOException { currentFile = fromFile; // first create a graph from the gxl file final Graph graph = layoutGxl.unmarshalGraph(fromFile); // load the model in the event dispatch thread, to avoid concurrency // issues SwingUtilities.invokeLater(new Runnable() { public void run() { setPlainGraph(graph); } }); } COM: <s> reads the graph to be edited from a file </s>
funcom_train/13648091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MecRemote lookupLocalService() throws Exception { MecRemote request = AS2Server.lookupLocalRMI(this.service); //this will mainly return null because the servlet instanciatino is an other than //the server instanciation if (request == null) { return (this.lookupRemoteService()); } return (request); } COM: <s> checks if the server has registered local services </s>
funcom_train/32056902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPoint() { System.out.println("testGetPoint"); Object obj = null; JGraph jgraph = new JGraph(); CellMapper cellmapper = null; EdgeView edge = new EdgeView(obj, jgraph, cellmapper); Point p1 = null; int i = 1; edge.addPoint(i,p1); assertEquals(edge.getPoint(i), p1); } COM: <s> this function tests get point function of edge view class </s>
funcom_train/17787412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void launchProxyPrefetching() { proxyPrefetching = new ProxyPrefetching("ProxyPrefetching", proxySessionTargets, listOfClientSessions, proxyMutex, log, prefetchingDataHistory, prefetchingWOIType, movementProbabilities); proxyPrefetching.setPriority(Thread.MIN_PRIORITY); proxyPrefetching.start(); } COM: <s> this method creates and launches the proxy prefetching module </s>
funcom_train/38827308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long longValue(Unit<Q> unit) { if (!getUnit().equals(unit)) return this.to((Unit)unit).longValue(unit); double doubleValue = this.normValue(); if ((doubleValue >= Long.MIN_VALUE) && (doubleValue <= Long.MAX_VALUE)) return Math.round(doubleValue); throw new ArithmeticException( RESOURCES.getString("canNotBeLong"). replace("<VAL/>",doubleValue + " " + getUnit()) ); } COM: <s> returns the estimated integral value of this measurable stated in </s>
funcom_train/33831179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect(String host, int port) { try { logger.info(concat("Connecting to host ", quote(host), " at port ", String.valueOf(port))); socket = new Socket(host, port); pingHost(); logger.info("Connected"); } catch (Exception e) { throw logAndThrow("Cannot connect to host", e); } } COM: <s> connects to given named host at the given port </s>
funcom_train/24087870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String characteriseJHoveTree(Object object) { if(object instanceof SampleObject){ SampleObject tmpRec = (SampleObject)object; if (tmpRec != null) { jhoveTree=jHoveAdaptor.digestString(tmpRec.getFullname(), tmpRec.getJhoveXMLString()); } } return null; } COM: <s> creates from the sample object object retrieved by injection a tree with </s>
funcom_train/51782865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setReadingDirection(UmlRelation relation) { if (l2rRadioButton.isSelected()) { relation.setNameReadingDirection(ReadingDirection.LEFT_RIGHT); } else if (r2lRadioButton.isSelected()) { relation.setNameReadingDirection(ReadingDirection.RIGHT_LEFT); } else { relation.setNameReadingDirection(ReadingDirection.UNDEFINED); } } COM: <s> sets the reading direction </s>
funcom_train/29415705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDefaultFields(File f, Document doc, String category) throws IOException { doc.add(Field.Keyword(FILENAME, f.getCanonicalPath())); doc.add(Field.Keyword(FILECATEGORY, category)); doc.add(Field.Keyword(MODIFIED, DateField.timeToString(f.lastModified()))); } COM: <s> convenience method adds default fields to index entry </s>
funcom_train/23872874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object one(IteratorExp host, VariableDeclaration var1, VariableDeclaration var2, OclExpression body, Map data) { String result = host.getSource().accept(this,data)+"\n"; result+="->one( "+var1.getName()+"|\n"; result += " "+body.accept(this,data); result+=")"; return result; } COM: <s> generate code for one </s>
funcom_train/40409371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAllForAdExtension() throws Exception { // Create selector. AdExtensionOverrideSelector selector = new AdExtensionOverrideSelector(); selector.setAdExtensionIds(new long[] {adExtensionId}); AdExtensionOverridePage page = service.get(selector); assertNotNull(page); assertNotNull(page.getEntries()); assertTrue("Expected at least 1 entry", page.getTotalNumEntries() >= 1); } COM: <s> test getting all ad extension overrides for an ad extension </s>
funcom_train/5341010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getPreferredScrollableViewportSize() { int width = AutoCompleteTextField.this.getSize().width - 2; int rows = Math.min(getModel().getSize(), 8); int height = rows * getCellBounds(0, 0).height; return new Dimension(width, height); } COM: <s> sets the size according to the number of entries </s>
funcom_train/20128830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getSize(int position) throws SQLException { if (position <= column.length) { return size[position - 1]; } else { final SqlExceptionState state = SqlExceptionState.COLUMN_NOT_FOUND; throw new SQLException("The resultset contains only " + String.valueOf(column.length) + " column(s).", state.name(), state.code()); } } COM: <s> returns the designated columns total size in characters or digits </s>
funcom_train/9869678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaxproyectos(Integer newVal) { if ((newVal != null && this.maxproyectos != null && (newVal.compareTo(this.maxproyectos) == 0)) || (newVal == null && this.maxproyectos == null && maxproyectos_is_initialized)) { return; } this.maxproyectos = newVal; maxproyectos_is_modified = true; maxproyectos_is_initialized = true; } COM: <s> setter method for maxproyectos </s>
funcom_train/46761297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CustomControllerModel getCustomController(final long customControllerId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return SecurityData.getCustomController(customControllerId, chain, call); }}; return (CustomControllerModel) call(method, call); } COM: <s> same transaction return the single custom controller model for the primary key </s>
funcom_train/31011185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getNextSequenceValue(int transNum, int paramNum) { Parameter paramMarkerSpec = (Parameter) parameterMarkers[transNum] .elementAt(paramNum); // get values for start and step of the sequence int start = (Integer) paramMarkerSpec.getAttribute("start"); int step = (Integer) paramMarkerSpec.getAttribute("step"); // get the right sequence instance and call the method next() on it return Sequence.getSequence(transNum, paramNum, start, step).next(); } COM: <s> returns the next value of the sequence which is identified by the </s>
funcom_train/1907397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Result getCopy() { Result result = new Result(answer, query, docID, hitPos); result.score = score; result.normScore = normScore; result.cacheID = cacheID; result.correct = correct; result.nes = nes; result.terms = terms; result.predicate = predicate; result.sentence = sentence; result.neTypes = neTypes; result.extractionTechniques = extractionTechniques; result.coveredNuggets = coveredNuggets; result.extraScores.putAll(this.extraScores); return result; } COM: <s> returns a copy of this code result code object </s>
funcom_train/51538588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(File file) { String p1, p2; try { p1 = getCanonicalPath(); p2 = file.getCanonicalPath(); } catch (IOException e) { // What do we do here? The spec requires the canonical path. Even // if we don't call the method, we must replicate the functionality // which per the spec can fail. What happens in that situation? // I just assume the files are equal! // return (0); } return (p1.compareTo(p2)); } COM: <s> this method compares the specified code file code to this one </s>
funcom_train/42135088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDescription() { String name = getName(); int slash = name.indexOf(NAME_SEPARATOR); if (slash != -1) { name = name.substring(0, slash); } if (name.equals("")) { name = getCName(); } if (name.equals("")) { name = getSsrc(); } return name; } COM: <s> returns the description of the stream </s>
funcom_train/42472611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updatePerson(String intialName, String name, String mobile) { this.name = name; this.mobile = mobile; this.query = "UPDATE person SET person.name=\""+name+"\", person.mobile="+mobile+" WHERE name=\""+intialName+"\""; //Does the query: queryAdd(); } COM: <s> this method create the query to add users to the database </s>
funcom_train/46455438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseReleased(MouseEvent e) { mouseEvent = e; mouseAction = MOUSE_RELEASED; if(interactive!=null) { interactive.handleMouseAction(InteractivePanel.this, e); } iaDraggable = null; if(showCoordinates) { blMessageBox.setText(null); } setMouseCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR)); } COM: <s> handles the mouse released event </s>
funcom_train/20109045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Bitmap get(String key) { if (!checkStorageState(STORAGE_READABLE)) return null; File f = new File(cacheDir, key); if (!f.exists()) return null; f.setLastModified(System.currentTimeMillis()); return BitmapFactory.decodeFile(f.getAbsolutePath()); } COM: <s> retrieve a cached bitmap </s>
funcom_train/12282898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParameter(String name, String value) { if(value == null) { throw new IllegalArgumentException("Null value"); } Vector v = new Vector(); parameters.put(name, v); if(!parameterNames.contains(name)) { parameterNames.addElement(name); } v.addElement(value); } COM: <s> set the value of a parameter </s>
funcom_train/12806007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int insertDirectory(String dir) { File file = new File(dir); if (!file.exists() || !file.isDirectory()) return 0; File files[] = file.listFiles(); if (files == null) return 0; int count = 0; for (int k = 0; k < files.length; ++k) { count += insertFile(files[k]); } return count; } COM: <s> inserts all the fonts recognized by i text in the </s>
funcom_train/8095005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkDimensions() throws Exception { if (getFilters().length != getRanges().length) throw new IllegalArgumentException( "Number of filters (= " + getFilters().length + ") " + "and ranges (= " + getRanges().length + ") don't match!"); } COM: <s> checks whether the dimensions of filters and ranges fit together </s>
funcom_train/167489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFreeChart createChart(int index) { // return a new chart containing the overlaid plot... JFreeChart chart = new JFreeChart(null, JFreeChart.DEFAULT_TITLE_FONT, createSubPlot(index), true); chart.setBackgroundPaint(new GradientPaint(0, 0, Color.white, 0, 1000, Color.green)); return chart; } COM: <s> creates a combined chart </s>
funcom_train/43245380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetNOKOneWorkPhone() { System.out.println("getNOKOneWorkPhone"); EmergencyContactObject instance = new EmergencyContactObject(); String expResult = ""; String result = instance.getNOKOneWorkPhone(); 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 nokone work phone method of class org </s>
funcom_train/38519979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel buildFilePanel() { JPanel p = new JPanel(new BorderLayout()); file = new JTextField(20); file.setEditable(false); JButton choose = new JButton("..."); choose.addActionListener(this); choose.setActionCommand("..."); p.add(file, BorderLayout.CENTER); p.add(choose, BorderLayout.EAST); p.setBorder( BorderFactory.createCompoundBorder( BorderFactory.createTitledBorder("Save as ..."), BorderFactory.createEmptyBorder(5, 5, 5, 5) ) ); return p; } COM: <s> builds the file panel </s>
funcom_train/39185213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File fileobj) { String extension = ""; if(fileobj.getPath().lastIndexOf('.') > 0) extension = fileobj.getPath().substring(fileobj.getPath().lastIndexOf('.') + 1).toLowerCase(); if(extension != "") return extension.equals("exp"); else return fileobj.isDirectory(); } COM: <s> returns whether or not file contains the expression file extension </s>
funcom_train/41304820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnUndo() { if (btnUndo == null) { final BaseSwingInterface bsi = this; btnUndo = new JButton(); btnUndo.setText("Undo Move"); btnUndo.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent e) { bsi.undoMostCurrentMove(); } }); } return btnUndo; } COM: <s> this method initializes btn undo </s>
funcom_train/46161411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void createProgram(CellID cellID, String assetURI, float initialPlaybackSpeed) { ProgramConnectionHandlerMO instance = getInstance(); CreateProgramMessage message = new CreateProgramMessage(cellID, assetURI, initialPlaybackSpeed); instance.registerProgram(message); instance.sendMessage(message); } COM: <s> create a program from the given asset program manager should send </s>
funcom_train/23020482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeRequestHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException { LOG.trace("enter HttpMethodBase.writeRequestHeaders(HttpState," + "HttpConnection)"); addRequestHeaders(state, conn); String charset = getParams().getHttpElementCharset(); Header[] headers = getRequestHeaders(); for (Header header : headers) { String s = header.toExternalForm(); if (Wire.HEADER_WIRE.enabled()) { Wire.HEADER_WIRE.output(s); } conn.print(s, charset); } } COM: <s> writes the request headers to the given </s>
funcom_train/43911700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireChange() { for ( Iterator l = listeners.iterator(); l.hasNext(); ) { Listener listener = (Listener) l.next(); try { listener.changed(); } catch( Throwable t ) { LOGGER.warning( "listener threw exception, turn logging to FINE to view stack trace" ); LOGGER.log( Level.FINE, t.getLocalizedMessage(), t ); } } } COM: <s> notifies all listeners of a change </s>
funcom_train/7963634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void update() { if (message != null) { if (starredButton != null) starredButton.setSelected(message.isStarred()); if (fromLabel != null) fromLabel.setText(message.getFrom()); if (markReadLabel != null) markReadLabel.setVisible(message.isUnread()); if (messageTitleLabel != null) messageTitleLabel.setText(message.getMessageTitle()); if (messageBodyArea != null) messageBodyArea.setText(message.getMessageBody()); } } COM: <s> update info from the message </s>
funcom_train/50446918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processRequest(long remainingTime) throws IOException { log.debug("Processing request for <= " + remainingTime + "ms"); int charsRead = getDataToProcess(remoteReader, endOfLineScanner, remoteInBuffer, 0, SMALLBUFSIZE, remainingTime); if (charsRead > 0) { processRequestData(remoteInBuffer, 0, charsRead); // finding the end of a request is easy since requests // can only consist of one line. if (endOfLineScanner.foundMatch()) { endContext(); setState(STATE_RESPONSE); } } } COM: <s> reads and processes request data from the remote mta </s>
funcom_train/37822563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPattern() { controller.setLoad(false); modconn.setSaveStatus(SaveStatus.CHANGES_TO_SAVE); if (controller.getPhase() == 1) { controller.getPattern().setPattern(phaseonescreen.phaseoneinputPane.getTfPatternText()); initPhaseOne(); } if (controller.getPhase() == 2) { controller.getPattern().setPattern(phasetwoscreen.phasetwoinputPane.getTfPatternText()); phasetwoscreen.phasetwoinputPane.setGenerateSearchTextEnabled(true); initPhaseTwo(); } } COM: <s> the method is called to set the pattern </s>
funcom_train/31684234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractPropertyInstance getPropertyInstance(String sPropName) throws InvalidPropertyInstanceException, DataAccessException { AbstractPropertyInstance propInst = null; List profs = getProfiles(); Iterator iter = profs.iterator(); while (iter.hasNext() && propInst == null) { Profile prof = (Profile) iter.next(); propInst = prof.getPropertyInstance(sPropName); } return propInst; } COM: <s> returns the property instance of the given name from the default </s>
funcom_train/5668600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector toVector() { Vector result = new Vector(8); result.add(fName); result.add(fType); result.add(fModified); result.add(fSize); result.add(fRatio); result.add(fPacked); result.add(fCrc); result.add(fPath); return result; } COM: <s> returns vector contains item data representation very suitable to be </s>
funcom_train/23352337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringBuilder delete(int start, int end) { synchronized (this) { if (start < 0) { throw new StringIndexOutOfBoundsException(start); } if (end > count) { end = count; } if (start > end) { throw new StringIndexOutOfBoundsException(); } int len = end - start; if (len > 0) { if (shared) { copy(); } System.arraycopy(value, start + len, value, start, count - end); count -= len; } return this; } } COM: <s> removes the characters in a substring of this code string buffer code </s>
funcom_train/50297286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSigned(int column) throws SQLException { switch (getXsqlvar(column).sqltype & ~1) { case ISCConstants.SQL_SHORT: case ISCConstants.SQL_LONG: case ISCConstants.SQL_FLOAT: case ISCConstants.SQL_DOUBLE: case ISCConstants.SQL_D_FLOAT: case ISCConstants.SQL_INT64: return true; default: return false; } } COM: <s> indicates whether values in the designated column are signed numbers </s>
funcom_train/1242620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getImage(String imageName) { if (!directoryHasBeenSet) { throw new RuntimeException( "Image Directory hasn't been set - set it with store.setImagePath(String)."); } Image image = imageRegistry.get(imageName); if (image == null) { throw new RuntimeException("Image not found in the registry - called name:" + imageName); } return image; } COM: <s> gets an image out of the resource store </s>
funcom_train/18455466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAttrClasses() { assertEquals(NodeExtentAttr.class, GraphLayoutAttrs.attrClasses(NodeExtentAttr.DEFAULT)[0]); assertFalse(NodeExtentAttr.class.equals(GraphLayoutAttrs.attrClasses(EdgeLabelAttr.DEFAULT)[0])); assertEquals(NodeExtentAttr.class, GraphLayoutAttrs.attrClasses(new NodeExtentAttr() { public Dimension nodeExtent(Object obj) { return new Dimension(1,1); }})[0]); } COM: <s> p tests the </s>
funcom_train/4478365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mergeWith(SynthConfig config) { for (Object element : idToStyle.values()) { ComponentStyle thisStyle = (ComponentStyle) element; ComponentStyle otherStyle = config.getStyle(thisStyle.getId()); if (otherStyle != null && otherStyle.isChanged()) { thisStyle.mergeWith(otherStyle); } } } COM: <s> merges another config in this config </s>
funcom_train/16578381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected FLayer getLayerTree() { LayerTree layerTree = getLayerStructure(); TreePath[] selection = (TreePath[]) getSelectedPaths().toArray( new TreePath[0]);// layerTree.getSelectionPaths(); if (selection != null) { return getSubTree((WMSLayerNode) layerTree.getModel().getRoot(), selection); } return null; } COM: <s> if user does not select the chekbox disagregate layers will get the </s>
funcom_train/593465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isChildOfCurrentComponent() { try { LayoutTag parent = getLayoutParent(); return parent instanceof LayoutComponentTag && ((LayoutComponentTag) parent).isCurrentComponent(); } catch (StripesJspException e) { // This exception would have been thrown before this tag ever executed throw new StripesRuntimeException("Something has happened that should never happen", e); } } COM: <s> returns true if this tag is a child of the current component tag </s>