__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/38762311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List listarHechosVitales() { Session session = getSession(); try { Criteria criteri = session.createCriteria(HechoVital.class); criteri.addOrder(Order.asc("orden")); criteri.setCacheable(true); return criteri.list(); } catch (HibernateException he) { throw new EJBException(he); } finally { close(session); } } COM: <s> lista todas los hechos vitales </s>
funcom_train/10204934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addKeyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MStringToStringMapEntry_key_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MStringToStringMapEntry_key_feature", "_UI_MStringToStringMapEntry_type"), ClassDiagramPackage.Literals.MSTRING_TO_STRING_MAP_ENTRY__KEY, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the key feature </s>
funcom_train/4233125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setOverlap(int overlap, boolean redraw) { if (overlap < 0) { overlap = segmentSize/2; } if (overlap >= segmentSize) { throw new IllegalArgumentException("Overlap must be less then the segment size."); } if (this.overlap == overlap) { return; } int oldOverlap = this.overlap; this.overlap = overlap; firePropertyChange(OVERLAP_PROPERTY, oldOverlap, overlap); plotSpectrum(); } COM: <s> sets the overlap and optionally redraws the chart </s>
funcom_train/12736124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getServiceState(final String serviceId, final Context context) { ServiceManager sm = getServiceManager(serviceId, context); if (sm != null) { ServiceLifecycleManager slm = sm.getServiceLifecycleManager(); if (slm.isInstalled()) { return INSTALLED; } if (slm.isInitialized()) { return INITIALIZED; } if (slm.isStarted()) { return STARTED; } if (slm.isSuspended()) { return SUSPENDED; } if (slm.isStopped()) { return STOPPED; } } return UNKNOWN; } COM: <s> get the services state </s>
funcom_train/33967665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FMDCacheItem getCacheItem(int state, int period, int id) { if (mCacheItems != null) { Iterator<FMDCacheItem> iter = mCacheItems.iterator(); while (iter.hasNext()) { FMDCacheItem item = iter.next(); if ((item.getState() == state) && (item.getPeriod() == period) && (item.getDataId() == id)) { return item; } } } return null; } COM: <s> look for a cache item by state period and id </s>
funcom_train/33725373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DefaultDataHandler getDefaultDataHandler() { DefaultDataHandler handler = new DefaultDataHandler(); handler.setDao(this.dao); handler.setBasePath(getTestPath()); handler.setMappingService(this.configMapper); handler.setLoadingService(this.dataLoader); return handler; } COM: <s> gets the default data handler </s>
funcom_train/6439914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isNotUnderCcmControl(String[] files) { boolean retVal; msgReceiver.addMessage(s_CMCONTROLLED_MSG); for (int i = 0; i < files.length; i++) { retVal = isUnderCcmControl(files[i], false); if (retVal) { msgReceiver.addMessage(s_ABORT_MSG); return false; } } return true; } COM: <s> determine whether a set of files is not under cm control at all </s>
funcom_train/1477410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getPDF(HttpServletResponse httpServletResponse, String id) throws IOException { final File file; synchronized (tempFiles) { file = tempFiles.get(id); } if (file == null) { error(httpServletResponse, "File with id=" + id + " unknown", 404); return; } sendPdfFile(httpServletResponse, file); } COM: <s> to get the pdf created previously </s>
funcom_train/325278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Double getHorizonPixel_H(int x) { Point p1 = vrControl.getHorizonPoint1(); Point p2 = vrControl.getHorizonPoint2(); if (p1 == null) { return null; } if (p2 == null) { return (double) p1.y; } // extrapolate / interpolate to allow for slanty horizon. return p1.y + (double) (p2.y-p1.y) / (double) (p2.x-p1.x) * (x - p1.x); } COM: <s> gets the horizon pixel number when horizon points have beenmarked </s>
funcom_train/14455681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showInternalFrame(JInternalFrame frame) { frame.pack(); frame.setVisible(true); // make the frame visible desktop.add(frame); // add the frame to the desktop try { frame.setSelected(true); // try to make the frame selected } catch(PropertyVetoException exception) { // do nothing... } } COM: <s> shows an internal frame </s>
funcom_train/7851016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print(int indent) { for (Map.Entry<String, String> entry : map.entrySet()) { for (int i = 0; i < indent; i++) System.out.print(" "); System.out.println("pre-post: " + entry.getKey() + " " + entry.getValue()); } } COM: <s> prnt the pre post list </s>
funcom_train/44694906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void curvetoCubicAbs(float x1, float y1, float x2, float y2, float x, float y) { posX = x; posY = y; emit("C" + x1 + " " + y1 + " " + x2 + " " + y2 + " "+ x + " " + y); last = OTHER; } COM: <s> invoked when an absolute cubic bezier curve command has been parsed </s>
funcom_train/47022633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdSearch() { if (cmdSearch == null) {//GEN-END:|242-getter|0|242-preInit // write pre-init user code here cmdSearch = new Command(getLocalizedString("Search"), Command.OK, 3);//GEN-LINE:|242-getter|1|242-postInit // write post-init user code here }//GEN-BEGIN:|242-getter|2| return cmdSearch; } COM: <s> returns an initiliazed instance of cmd search component </s>
funcom_train/3175828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer result = new StringBuffer(); for (int i=0;i<len;i++) { if (i>0) result.append(':'); result.append(tags[i]); if (qualifiers[i]>=0) { result.append('#'); result.append(qualifiers[i]); } } return result.toString(); } COM: <s> returns the path as a string </s>
funcom_train/1170771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String foundNameCard(String rStr) { int temp; int i; for (i = 0; i < rStr.length(); i++) { temp = rStr.codePointAt(i); if (temp >= 48 && temp <= 57) { break; } } return rStr.substring(0, i - 1); } COM: <s> p found name card </s>
funcom_train/40927452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContent(final String contentString) { try { this.setDocument(MathMLParserSupport.parseString(contentString)); } catch (final SAXException e) { throw new RuntimeException(e); } catch (final ParserConfigurationException e) { throw new RuntimeException(e); } catch (final IOException e) { throw new RuntimeException(e); } } COM: <s> set the content from a string containing the math ml content </s>
funcom_train/50223403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean writeToolPath(java.util.List path) { this.path = path; java.util.List lst = new ArrayList(); for (Iterator i = path.iterator(); i.hasNext(); ) { lst.add(i.next().toString()); } Lib.putenv(rep, ToolConstants.TOOLPOOLPATH, lst, ToolConstants.COLLECTIONTYPE); return true; } COM: <s> writes the tool path to the repository </s>
funcom_train/37837027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processFeaturesAdded(final Map<String, String> changes) { for (final Entry<String, String> entry : changes.entrySet()) { if (!features.containsKey(entry.getKey())) { features.put(entry.getKey(), entry.getValue()); fireFeatureEnabled(entry.getKey(), entry.getValue()); } } } COM: <s> a feature object added changed attribute s </s>
funcom_train/3812205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispatchSpeechEvent(SpeechEvent event) { switch (event.getId()) { case SynthesizerEvent.QUEUE_EMPTIED: fireQueueEmptied((SynthesizerEvent) event); break; case SynthesizerEvent.QUEUE_UPDATED: fireQueueUpdated((SynthesizerEvent) event); break; // Defer to BaseEngine to handle the rest. // default: super.dispatchSpeechEvent(event); break; } } COM: <s> dispatches a code speech event code </s>
funcom_train/26091297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeService(){ Intent intent = new Intent(); intent.setClassName("task3.tracking", "task3.tracking.TrackingService"); serviceConnection = new TrackingServiceConnection(); bindService(intent,serviceConnection,Context.BIND_AUTO_CREATE); if(serviceProxy == null){ isBound = true; } } COM: <s> called to initialize the underlying service </s>
funcom_train/17961746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private XYDataset createDataset(int index) { XYSeries series1 = new XYSeries("Series " + (index + 1)); series1.add(-10.0, -5.0); series1.add(10.0, 5.0); XYSeriesCollection dataset = new XYSeriesCollection(); dataset.addSeries(series1); return dataset; } COM: <s> creates a sample dataset </s>
funcom_train/5272781
/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 instanceof URLPattern) { URLPattern otherPattern = (URLPattern) obj; return ( constraint.equals(otherPattern.getSecurityConstraint()) && resourceCollection.equals(otherPattern.getWebResourceCollection()) && pattern.equals(otherPattern.getPattern()) ); } return false; } COM: <s> test if this pattern is equivalent to another pattern </s>
funcom_train/27866890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String encrypt(String str) { try { MessageDigest md = MessageDigest.getInstance("MD5"); md.update(str.getBytes()); BASE64Encoder encoder = new BASE64Encoder(); return encoder.encode(md.digest()); } catch (NoSuchAlgorithmException e) { return null; } } COM: <s> encrypts the input string using md5 and then followed by base64 </s>
funcom_train/25980132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { Thread server = new Thread(this); if (getLogger().isDebugEnabled()) this.getLogger().debug("Starting DBPrism External Cache Server Invalidator thread"); server.setPriority(Thread.MIN_PRIORITY); // nice process, runs with low priority server.setDaemon(true); server.setName("DBPrism Cache Server"); server.start(); } COM: <s> start the server </s>
funcom_train/10237824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextFieldDBuserName() { if (jTextFieldDBuserName == null) { jTextFieldDBuserName = new JTextField(); jTextFieldDBuserName.setBounds(new Rectangle(195, 143, 167, 23)); jTextFieldDBuserName.setHorizontalAlignment(JTextField.CENTER); } return jTextFieldDBuserName; } COM: <s> this method initializes j text field dbuser name </s>
funcom_train/23778927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _configureTableViewer() { if (_tableViewer == null) return; DatasetEditorInput input = (DatasetEditorInput)this.getEditorInput(); if (input == null) return; input.setTable(_tableViewer.getTable()); _tableViewer.setInput(input.getData()); setPartName(input.getName()); } COM: <s> configure table viewer from current input </s>
funcom_train/2927803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStringValue(Object node) { String value; try { value = DTMWrapper.dtmStringValueMethod.invoke(this.getDTM(node), new Object[] { node }).toString(); } catch (InvocationTargetException e) { throw new GeneratorError("could not evaluate string value of node " + node, e.getTargetException()); } catch (Exception e) { throw new GeneratorError("could not evaluate string value of node " + node, e); } return value; } COM: <s> get xpath string value from dtm </s>
funcom_train/26459092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void characters(char[] chars, int start, int end) throws SAXException { try { for (Iterator iterator = activeHandlers.iterator(); iterator.hasNext();) { ContentHandler handler = (ContentHandler) iterator.next(); handler.characters(chars, start, end); } } catch (SAXException e) { addError(e); throw e; } } COM: <s> delegates character event calls to the active sub handlers </s>
funcom_train/549896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storePreferences() { model.storePreferences(); Enumeration e = table.getColumnModel().getColumns(); while (e.hasMoreElements()) { TableColumn c = (TableColumn) e.nextElement(); putWidth(c.getHeaderValue().toString(), c.getPreferredWidth()); } } COM: <s> code store preferences code calls this models store preferences </s>
funcom_train/32969462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton20() { if (jButton20 == null) { jButton20 = new JButton(); jButton20.setRolloverIcon(new ImageIcon(getClass().getResource("/orders/sel/work2.gif"))); jButton20.setPressedIcon(new ImageIcon(getClass().getResource("/orders/push/work3.gif"))); jButton20.setIcon(new ImageIcon(getClass().getResource("/orders/norm/work1.gif"))); jButton20.setDoubleBuffered(true); jButton20.setBounds(new java.awt.Rectangle(502,36,34,34)); jButton20.setToolTipText("Production"); jButton20.setBorderPainted(false); } return jButton20; } COM: <s> this method initializes j button20 </s>
funcom_train/10533018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ControlBeanContextServicesSupport deserializeCBCSS(File serFile) throws IOException, ClassNotFoundException { ObjectInputStream ois = new ObjectInputStream(new FileInputStream(serFile)); try { return (org.apache.beehive.controls.runtime.webcontext.ControlBeanContextServicesSupport) ois.readObject(); } finally { ois.close(); serFile.delete(); } } COM: <s> deserialize a control bean context services support instance </s>
funcom_train/51591345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setRootVirtual(boolean virtual) { boolean old = this.isRootVirtual(); this.isRootVirtual = virtual; if ( old != this.isRootVirtual() ) { TreeModelEvent event = new TreeModelEvent(this, new TreePath(this.getRoot())); this.fireTreeStructureChanged(event); } } COM: <s> tells if the root element of the tree model is a virtual element </s>
funcom_train/4539684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean writeFile(){ if(outputFile == null){ return false; } FileWriter output = null; BufferedWriter writer = null; try { output = new FileWriter(outputFile); writer = new BufferedWriter(output); writer.write(board.getGame().getMoveExecutionList().exportList()); } catch (IOException e){ errorCode = ParserErrorConstants.FILE_IO_ERROR; return false; } finally{ if(writer != null){ try { writer.flush(); writer.close(); output.close(); return true; } catch (IOException e) { errorCode = ParserErrorConstants.FILE_UNABLE_TO_OPEN; return false; } } } return false; } COM: <s> this method will write to a file the move list </s>
funcom_train/3543377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeTable(JTable oldTable, JTable newTable) { if (oldTable != null) { oldTable.removePropertyChangeListener("ancestor", this); } cleanUp(); if (newTable != null) { newTable.addPropertyChangeListener("ancestor", this); trySetUp(newTable); } } COM: <s> the filter header reports that the table being handled is going to </s>
funcom_train/51376374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStatus() throws AuthValidationException { if (vq == null) { throw new AuthValidationException("Use loadQueueEntry(...) method first"); } try { String status = vq.getField(ValidationQueue.FLD_STATUS_CODE); return status; } catch (DBException dbe) { throw new AuthValidationException("DB error", dbe); } } COM: <s> returns the current status of the validation request creation date </s>
funcom_train/21034390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(ListSelectionEvent e) { //Ignore extra messages. if (e.getValueIsAdjusting()) return; ListSelectionModel lsm = (ListSelectionModel)e.getSource(); if (lsm.isSelectionEmpty()) { } else { int selectedCol = lsm.getMinSelectionIndex(); TableContext tableContext = AppContext.tableContext(); tableContext.setSelectedViewCol(selectedCol); } } COM: <s> called whenever the value of the selection changes </s>
funcom_train/40679027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect(final AUDIO_TAGS_CHANGED listener) { connect(AUDIO_TAGS_CHANGED.class, listener, new GstCallback() { @SuppressWarnings("unused") public void callback(PlayBin2 elem, int stream) { listener.audioTagsChanged(elem, stream); } }); } COM: <s> adds a listener for the code audio tags changed code signal </s>
funcom_train/7980566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initialize(Environment env) throws DatabaseException { DatabaseConfig dbConfig = getDatabaseConfig(); dbConfig.setAllowCreate(true); try { env.truncateDatabase(null, DB_NAME, false); } catch (DatabaseNotFoundException e) { // Ignored } open(env, dbConfig); } COM: <s> method shared by constructors </s>
funcom_train/49817872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initProgressBar(JPanel progressPanel, int y) { GridBagConstraints c = new GridBagConstraints(); pBar = new JProgressBar(); pBar.setIndeterminate(true); pBar.setMaximum(100); pBar.setValue(0); pBar.setBorder(new EmptyBorder(5, 0, 5, 0)); pBar.setDoubleBuffered(true); c.gridx = 1; c.gridy = y; c.fill = GridBagConstraints.HORIZONTAL; progressPanel.add(pBar, c); } COM: <s> initializes the jprogress bar </s>
funcom_train/29779435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initComponents() { info = new MonitorInfo(); setLayout(new BorderLayout()); progressBar = new JProgressBar(); progressBar.setBorderPainted(true); progressBar.setStringPainted(true); progressBar.setMinimum(0); progressBar.setMaximum(100); add(progressBar, BorderLayout.CENTER); } COM: <s> the initialization method </s>
funcom_train/23999932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsStatic() throws Exception { TestFeatureDefinition instance = new TestFeatureDefinition(TestClass.class.getDeclaredMethod("foo"),null); assertFalse(instance.isStatic()); instance = new TestFeatureDefinition(DynamicFeatureDefinitionTest.class.getDeclaredMethod("staticVoid"),null); assertTrue(instance.isStatic()); } COM: <s> test of is static method of class dynamic feature definition </s>
funcom_train/15769802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void aSetEnabled(boolean b){ Container cnt = jPanel1; int count = cnt.getComponentCount(); for (int i = 0; i < count; i++){ Component c = cnt.getComponent(i); if (c != null){ c.setEnabled(b); } } } COM: <s> sets enable state of all components attached to the panel </s>
funcom_train/28362179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateChannelRefs() { final Map<String,List<ChannelRef>> channelRefMap = new HashMap<String,List<ChannelRef>>(); for ( final String monitorName : TRIP_MONITOR_NAMES ) { final List<ChannelRef> channelRefs = fetchChannelRefs( monitorName ); channelRefMap.put( monitorName, channelRefs ); } synchronized( CHANNEL_REF_MAP ) { CHANNEL_REF_MAP.clear(); CHANNEL_REF_MAP.putAll( channelRefMap ); } } COM: <s> update the channel refs </s>
funcom_train/29606709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyUndoStateChanged() { for (Iterator i = undoStateListeners.iterator(); i.hasNext();) { UndoStateListener l = (UndoStateListener) i.next(); UndoStateEvent ev = new UndoStateEvent(undoSnapshot != null, redoSnapshot != null); l.undoStateChanged(ev); } } COM: <s> notifies all registered listeners of an update in the undo redo state </s>
funcom_train/21175275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addUserRole (String user, Course course, Role role) { StringBuffer sql = new StringBuffer (512); sql.append ("insert into UserRoles (UserName, RoleName, CourseID) values ('"); sql.append (user); sql.append ("', '"); sql.append (role.name()); sql.append ("', "); sql.append (course.getId()); sql.append (")"); updateQuery(sql.toString()); return true; } COM: <s> adds the specified role for the given user in the specified course </s>
funcom_train/14018567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("AWSECommerceServicePort".equals(portName)) { setAWSECommerceServicePortEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/47183992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(long ovProcedureID) throws DBException { Connection conn = null; PreparedStatement ps = null; try { conn = factory.getConnection(); ps = conn.prepareStatement("DELETE FROM OVProcedure WHERE ID=? "); ps.setLong(1, ovProcedureID); ps.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } COM: <s> removes the given medication from its office visit </s>
funcom_train/1746518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean parseDir(String asDir) { boolean result = true; try { if (asDir==null) return result; if (asDir.trim().length()==0) { result = false; }else { File fdir = new File(asDir); if (!fdir.exists() || !fdir.isDirectory()) result = fdir.mkdirs(); } }catch(Exception ex){ result = false; } return result; } COM: <s> method to parser any folder name parameter </s>
funcom_train/37147112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setFilterSelectionManager(TreePath selectionPath) { /* Get task selected by mouse click */ Task task = getSelectedTask(selectionPath); myFilterSelectionManager.clear(); if (task != null) { myFilterSelectionManager.addTask(task); /* Set task selected */ getSelectionModel().setSelectionPath(selectionPath); } } COM: <s> add task under selection path to selection manager </s>
funcom_train/11720047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validate(CommandLine cl) throws JcrParserException { Iterator iter = cl.getRequiredParameters(); while (iter.hasNext()) { AbstractParameter param = (AbstractParameter) iter.next(); if (param.getValue() == null) { throw new JcrParserException("exception.missing.paramater", new String[] { param.getName() }); } } } COM: <s> validate the code command line code </s>
funcom_train/5861578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFilter(String ext, Filter filter, int flags) { if (ext == null || filter == null) throw new IllegalArgumentException("null"); filter.init(new FilterConfig() { public ExtendletContext getExtendletContext() { return _cwc; } }); ext = ext.toLowerCase(); if (flags == 0 || (flags & FILTER_REQUEST) != 0) addFilter(_reqfilters, ext, filter); if ((flags & FILTER_INCLUDE) != 0) addFilter(_incfilters, ext, filter); } COM: <s> adds a filter </s>
funcom_train/17966430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double calculateExtendedWidth(final double width) { double result = width; if (this.type == ABSOLUTE) { result = result + this.left + this.right; } else if (this.type == RELATIVE) { result = result + (this.left * width) + (this.right * width); } return result; } COM: <s> returns the width after adding the left and right spacing amounts </s>
funcom_train/16869134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() throws ProcessException { try { // initialize input components inputValue= (DataValue) inputData.getComponent("inputValue"); // initialize output components trueOrFalse = (DataValue) outputData.getComponent("trueOrFalse"); threshold = (DataValue) paramData.getComponent("threshold"); } catch (ClassCastException e) { throw new ProcessException("Invalid I/O data", e); } } COM: <s> initializes the process </s>
funcom_train/11075473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkSimplePath(Expression expr) { if (!(expr instanceof LocationPath) || !((LocationPath) expr).isSimplePath()) { throw new JXPathInvalidSyntaxException( "JXPath can only create a path if it uses exclusively " + "the child:: and attribute:: axes and has " + "no context-dependent predicates"); } } COM: <s> checks if the path follows the jxpath restrictions on the type </s>
funcom_train/34537886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFilterField(String _field, String _type) { QueryFieldStructure p = new QueryFieldStructure(_field, "", "", _type); if (this.filter == null) this.filter = new Vector<QueryFieldStructure>(); filter.addElement(p); } COM: <s> adds new field to the filter clause </s>
funcom_train/13364716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { final TreeViewer viewer = getTreeViewer(); if (viewer != null) { final Control control = viewer.getControl(); if (control != null && !control.isDisposed()) { control.setRedraw(false); if (jDocument != null) { viewer.refresh(jDocument, true); } control.setRedraw(true); } } } COM: <s> updates the outline page </s>
funcom_train/51226212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void seenClient(String clientIp) { Iterator<DTO_Client> it = clients.iterator(); boolean found = false; while(it.hasNext()) { DTO_Client cur = it.next(); if(cur.getIp().equals(clientIp)) { cur.updateLastSeen(); found = true; // debugging: //System.out.println(cur.getIp()+" : "+cur.getLastSeen()); break; } } if(!found) addClient(clientIp); } COM: <s> updates the last seen time of the specified client with the current time </s>
funcom_train/12181026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processStartElement(Attributes attributes) { if (attributes.getIndex(REF) >= 0) { // Add this reference as a sub-element of the current element // definition elementDefinition.addSubElement(attributes.getValue(REF)); } else { // This is a new element definition elementDefinition = schemaDefinition.addElement( attributes.getValue(NAME)); } } COM: <s> helper method used to process sax start events for elements </s>
funcom_train/46761304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PatientModel getPatient(final long patientId, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { if (call.isStoreAudit()) { BaseData.getSecurity().storeAudit(call.getUserRefId(), patientId, "Viewed Patient", call); } return PatientData.getPatient(patientId, call); }}; return (PatientModel) call(method, call); } COM: <s> return the single patient model for the primary key </s>
funcom_train/42652103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer getAbsoluteMaxResults() { if(parentCriteria == null) return maxResults ; Integer parentMax = parentCriteria.getAbsoluteMaxResults() ; if(parentMax == null) { return maxResults ; } else if(maxResults == null) { return Math.max(0, parentMax - firstResult); } else { return Math.max(0, Math.min(parentMax - firstResult, maxResults)); } } COM: <s> returns the absolute max results by taking into account the limitations </s>
funcom_train/40221906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connected(boolean status) { inner.getLobbyOutput().setEditable(status); // update connect if (status) { inner.getConnectButton().setText("Disconnect"); // now that we are connected we can set up the processor // for all requests coming back from the server Client client = context.getClient(); client.setProcessor(new Processor(this)); } else { inner.getConnectButton().setText("Connect"); } } COM: <s> respond to changes in our connected status </s>
funcom_train/31099893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renderBodyAreaContainer(BodyAreaContainer area) { writeStartTag("<BodyAreaContainer>"); java.util.Vector children = area.getChildren(); for (int i = 0; i < children.size(); i++) { Box b = (Box)children.elementAt(i); b.render(this); } writeEndTag("</BodyAreaContainer>"); } COM: <s> render a body area container to xml </s>
funcom_train/4470263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean remove(Widget widget) { boolean stop = false; for ( int i=0; i < layout.getWidgetCount() && !stop; i++) { FlowPanel item = (FlowPanel)layout.getWidget(i); int index = item.getWidgetIndex(widget); if ( index != -1 ) { stop = true; removeItem(item); } } return stop; } COM: <s> removes the given code widget code in the stack </s>
funcom_train/1169276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel getColorLabel() { if (colorLabel == null) { colorLabel = new JLabel(); colorLabel.setText("Color"); colorLabel.setFont(new java.awt.Font("Segoe UI", 0, 14)); } return colorLabel; } COM: <s> p getter for the field code color label code </s>
funcom_train/20044795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean redoChanges() { if (!executeChange(originalElement)) return false; if (!xBatch.hasPendingChanges()) return false; try { xBatch.commitChanges(); } catch(com.sun.star.lang.WrappedTargetException e) { e.printStackTrace((PrintWriter)log); return false; } return true; } COM: <s> redo the change using an implementation of the xchanges batch interface </s>
funcom_train/46981205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Table getTable(String tableName) { if (tableName == null) return null; for (int i = 0; i < tables.size(); i++) { if (tableName.equals(((Table)tables.elementAt(i)).name)) { return (Table)tables.elementAt(i); } } return null; } COM: <s> get a table with a specified name </s>
funcom_train/19456628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save() throws IOException { File file = new File(getFilename()); if (!file.exists()) { file.createNewFile(); } OutputStream output = new FileOutputStream(file); if (isCompressed()) { output = new GZIPOutputStream(output); } output.write(getDiskImageManager().getDiskImage()); output.close(); getDiskImageManager().setChanged(false); newImage = false; } COM: <s> save a disk image to its file </s>
funcom_train/5328377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void putWord(String word) { String code = getCode(word); Vector list = (Vector) mainDictionary.get(code); if (list != null) { list.addElement(word); } else { list = new Vector(); list.addElement(word); mainDictionary.put(code, list); } } COM: <s> allocates a word in the dictionary </s>
funcom_train/44880311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doEndTag() throws JspTagException { try { JspWriter out = pageContext.getOut(); out.print("Simple tag ended."); } catch (IOException ex) { throw new JspTagException("Could not write at end tag: " + ex.getMessage()); } return EVAL_PAGE; } COM: <s> process the end tag </s>
funcom_train/47487381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long createPresentation(String name, String desc, boolean delays) { ContentValues initialValues = new ContentValues(); initialValues.put(KEY_NAME, name); initialValues.put(KEY_DESC, desc); initialValues.put(KEY_DELAYS, Utils.boolToInt(delays)); return mDb.insert(DATABASE_TABLE, null, initialValues); } COM: <s> create a new presentation using the title and body provided </s>
funcom_train/20211117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeInstallation(Installation installation) { if (!(installation instanceof Installation)) { throw new ClassCastException( "ContinuumDatabase.removeInstallations(installation) parameter must be instanceof " + Installation.class.getName()); } getInstallations().remove(installation); } // -- void removeInstallation(Installation) COM: <s> method remove installation </s>
funcom_train/2302143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasMultipleCharacterLabels(Automaton automaton) { Transition[] transitions = automaton.getTransitions(); for (int k = 0; k < transitions.length; k++) { FSATransition transition = (FSATransition) transitions[k]; String label = transition.getLabel(); if (label.length() > 1) return true; } return false; } COM: <s> returns true if code automaton code has labels with multiple </s>
funcom_train/39320532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fire(SimTransition tt) { Set<Var> arcs_in = getArcsIn(tt); Set<Var> arcs_out = getArcsOut(tt); // update Var icons if (arcs_in != null) for (Var pp : arcs_in) { pp.setValue(false); } if (arcs_out != null) for (Var pp : arcs_out) { pp.setValue(true); } } COM: <s> fire an individual transition </s>
funcom_train/25648852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateTestSet() { String name = "TestSet"; CreateTestSetCommand cmd = new CreateTestSetCommand(perspectiveModel, null); TestSet set = cmd.createTestSet(name); assertNotNull(set); assertEquals(name, set.getName()); assertTrue(set.getItemCount() == 0); } COM: <s> test of create test set method of class com </s>
funcom_train/2344668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSublabel(int index, String name) throws IndexOutOfBoundsException { if(index >= length_) { //throw new IndexOutOfBoundsException("Index out of feature vector bounds"); length_ = index+1; sublabels_.setSize(length_); values_.setSize(length_); sublabels_.set(index, new String(name)); } else sublabels_.set(index, new String(name)); } COM: <s> sets the sublabel of the feature vector at the specified index </s>
funcom_train/32061446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSingleIntValueForGood(Good g) { int intvalue = 0; int intbasicval = design.getSingleIntValueForGood(g); if (damage > CRITICAL_DAMEGE_LEVEL) { return 0; } if (intbasicval > 0) { intvalue = (int)(intbasicval * (1 - damage) * (1 - damage)); } return intvalue; } COM: <s> returns the int value of how much of the good the component produces </s>
funcom_train/35916320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMenuItem createLafMenuItem(JMenu menu, String label, String laf) { JMenuItem mi = (JRadioButtonMenuItem) menu .add(new JRadioButtonMenuItem(label)); lafMenuGroup.add(mi); mi.addActionListener(new ChangeLookAndFeelAction(this, laf)); mi.setEnabled(isAvailableLookAndFeel(laf)); return mi; } COM: <s> creates a jradio button menu item for the look and feel menu </s>
funcom_train/4358013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void end() throws Exception { // Identify the objects to be used Object child = digester.peek(0); Object parent = digester.peek(1); NamingResources namingResources = null; if (parent instanceof Context) { namingResources = ((Context) parent).getNamingResources(); } else { namingResources = (NamingResources) parent; } // Call the specified method IntrospectionUtils.callMethod1(namingResources, methodName, child, paramType, digester.getClassLoader()); } COM: <s> process the end of this element </s>
funcom_train/8222308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void extractVersionFromManifest() { Package pkg = Package.getPackage("org.owasp.webscarab"); if (pkg != null) _version = pkg.getImplementationVersion(); else _logger.severe("PKG is null"); if (_version == null) _version = "unknown (local build?)"; } COM: <s> extract version from manifest </s>
funcom_train/14471632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(final NodeInfo nodeInfo, final Context context) throws TransformerException { final String str = nodeInfo.getStringValue(); final NodeInfo parent = nodeInfo.getParent(); if (str.trim().length() > 0) { final ElementDetails elementDetails = (ElementDetails) context.getController().getUserData(parent, "ed"); elementDetails.hasCharacterContent = true; } } COM: <s> handle character data </s>
funcom_train/25332924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetProteinFeatureDAO() throws Exception { DBDAOSingleSpeciesCoreFactory instance = new DBDAOSingleSpeciesCoreFactory(); DBSpecies sp = new DBSpecies(); instance.setSpecies(sp); DBProteinFeatureDAO result = instance.getProteinFeatureDAO(); assertNotNull(result); assertTrue(result.getFactory()==instance); assertTrue(result.getSpecies()==sp); } COM: <s> test of get protein feature dao method of class dbdaosingle species core factory </s>
funcom_train/21014763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPerimeter(E edge, V vertex) { if (this.getSource(edge)!=vertex && this.getTarget(edge)!=vertex) return Integer.MAX_VALUE; E ed = getLeftEdge(vertex, edge); int nbEdges = 1; while (ed != edge) { vertex = getOtherNode(ed, vertex); ed = getLeftEdge(vertex, ed); nbEdges++; } return nbEdges; } COM: <s> gets the number of edges one have to follow starting from vertex and </s>
funcom_train/37820230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(Graphics g) { Graphics2D g2d = (Graphics2D) g; g2d.addRenderingHints(new RenderingHints( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)); // Draw Base // Shadow g2d.setColor(Color.GRAY); // Horizontal Line g2d.drawLine(SHADOW_WIDTH, SHADOW_WIDTH, width, SHADOW_WIDTH); // Base Himself g2d.setColor(this.myColor); // Horizontal Line g2d.drawLine(0, 0, width - SHADOW_WIDTH, 0); } COM: <s> used when the adress should be drawn </s>
funcom_train/18243463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getWindowListText() { IBaseAssembly asm = this.assemblyCoordinator.getAssembly(); String text = null; try { text = asm.getDisplayText(); } catch (SeqdataException sx) { Log.log(Log.ERROR, new Throwable(), sx, ResourceUtil.getMessage(TDBAssemblyWindow.class, "caught_seqdata_exception")); } return text; } COM: <s> getter for our window list text </s>
funcom_train/6289301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resolveMyExceptionRun(MyException ex) { ex.printStackTrace(); if (ex.getErrorCode() == MyException.COM_HALTED) { connection.unQuit(); } resolveExceptions(ex.getDetails() + "/ " + account.getEmail(), SOURCE_FILE); } COM: <s> resolves my exception while running some task </s>
funcom_train/44779543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object processEndLayoutEvent( EndLayoutEvent in_event ) throws JspException { LayoutTag lc_tag = in_event.getSource(); if ( lc_tag instanceof CollectionTag ) { CollectionTag lc_collectionTag = (CollectionTag)lc_tag; doPrintHiddenSelect( lc_collectionTag ); first = false; currentCollectionNumber++; } return new EndLayoutEvent( lc_tag, in_event.getValue() ).sendToParent( this ); } COM: <s> called by inner tag to inform this tag of what is going on </s>
funcom_train/22602146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setCaretPosition(int pos, int length) { if ((pos > -1) && ((pos + length) < editorPane.getText().length())) { editorPane.setCaretPosition(pos); editorPane.select(pos, pos + length); } } COM: <s> moves the caret in the editor area to pos selecting length </s>
funcom_train/50873189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(File file1, File file2) { //if this is a directory and the other is not, then return -1 if (file1.isDirectory() && !file2.isDirectory()) { return -1; } else if (!file1.isDirectory() && file2.isDirectory()) { return 1; } else { return file1.getName().compareToIgnoreCase(file2.getName()); } } COM: <s> compare two files if the first is greater 1 equal 0 </s>
funcom_train/21610907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkAttributes(NodeAttribute[] expected, NodeAttribute[] found) { assertEquals("Unespected attrs size.", expected.length, found.length ); for( int i = 0; i < expected.length; i++ ) { assertEquals("Unespected attribute.", expected[i], found[i]); } } COM: <s> checks the returned attributes comparing them with expected </s>
funcom_train/45442688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCode(final String code) { codeBrowser.getDisplay().asyncExec(new Runnable() { @Override public void run() { String actualContent = codeBrowser.getText(); if (code != null && !Java2Html.convertToHtml(code).equals(actualContent)) { codeBrowser.setText(Java2Html.convertToHtml(code), false); logger.debug("Preview of: " + code); } codeBrowser.update(); } }); } COM: <s> display highlighted code </s>
funcom_train/16770602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeIterator(Output out, Iterator<Object> it) { log.trace("writeIterator"); // Create LinkedList of collection we iterate thru and write it out // later LinkedList<Object> list = new LinkedList<Object>(); while (it.hasNext()) { list.addLast(it.next()); } // Write out collection out.writeArray(list, this); } COM: <s> writes an iterator out to the output </s>
funcom_train/18652608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LDItem addInternalSpecial(final int typeId) { LDItem node = new LDItem(this, typeId, LDId.getTypeFromId(typeId), "", ""); fEntryPoints.put(new Integer(typeId), node); return node; } COM: <s> adds a special predifined item to the lditems list </s>
funcom_train/24117198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getResourcePositions() { resourcePositions = new HashMap<JGraphRes,Point>(); for(Resource res : systemModel.getResourceTable().values()){ JGraphRes r = (JGraphRes)res.getSingleExtDataByClass(JGraphRes.class); Point p = new Point(); p.setLocation(0,0); resourcePositions.put(r, p); } } COM: <s> help points to recalculate the task positions </s>
funcom_train/18889318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertBytesAt(int offset, byte[] content) throws ModifyException{ if (insertHash.isUnique(offset)==false){ throw new ModifyException("There can be only one insert per offset"); } flb.append( (long)offset | MASK_INSERT_BYTE); fob.append(content); } COM: <s> insert the byte content into xml </s>
funcom_train/17966768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshButtons() { final Calendar c = getFirstVisibleDate(); for (int i = 0; i < 42; i++) { final JButton b = this.buttons[i]; b.setText(new Integer(c.get(Calendar.DATE)).toString()); b.setBackground(getButtonColor(c)); c.add(Calendar.DATE, 1); } } COM: <s> update the button labels and colors to reflect date selection </s>
funcom_train/1563947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildClientApprovalState() { OAuthAccessor accessor = accessorInfo.getAccessor(); responseParams.getNewClientState().setRequestToken(accessor.requestToken); responseParams.getNewClientState().setRequestTokenSecret(accessor.tokenSecret); responseParams.getNewClientState().setOwner(realRequest.getSecurityToken().getOwnerId()); } COM: <s> builds the data well cache on the client while we wait for approval </s>
funcom_train/22402447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane1() { if (jContentPane1 == null) { jContentPane1 = new JPanel(); jContentPane1.setLayout(new BorderLayout()); jContentPane1.add(getJPanel1(), java.awt.BorderLayout.SOUTH); jContentPane1.add(getJPanel2(), java.awt.BorderLayout.CENTER); } return jContentPane1; } COM: <s> this method initializes j content pane1 </s>
funcom_train/21963901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBareText() { String html = "some random text stuff"; SgmlLexer lex = new SgmlLexer(new StringCharacterStream(html)); String test = ""; int count = 0; while (lex.hasNext()) { test += lex.next(); count++; } assertEquals(html,test); assertEquals(1,count); } COM: <s> tests bare text </s>
funcom_train/51537933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void callScreenListener(Command cmd, CommandListener listener) { Displayable currentDisplayable = null; synchronized (LCDUILock) { currentDisplayable = current.lGetDisplayable(); } try { // SYNC NOTE: We release the lock on LCDUILock and acquire // calloutLock before calling into application code synchronized (calloutLock) { listener.commandAction(cmd, currentDisplayable); } } catch (Throwable thr) { handleThrowable(thr); } } COM: <s> called from chameleon to notify a listener of a screen </s>
funcom_train/16910496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prepareCellMatrix(final ActionEvent event) { this.matrixCellsRows = new ArrayList<Row>(); this.cellStatusMap = new HashMap<Knowledge, Map<String, CellStatus>>(); this.createCellStatus(null); //first we prepare the rows for (KnowledgeGroup group : this.matrixOnFocus.getKnowledgeGroups()) { this.matrixCellsRows.addAll(this.getRowsFor(group, 0)); } //now we prepare the grid this.createGrid(); } COM: <s> when the abilities phase is over we move on to the cell phase </s>