__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/14229122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void inCall(Leg newLeg) { switch (newLeg.getState()) { case Leg.ALERTING: { this.setState(PhoneModel.RINGING); break; } case Leg.INPROGRESS: case Leg.CONNECTED: { this.setState(PhoneModel.ACTIVE); break; } case Leg.IDLE: { this.setState(PhoneModel.DIALTONE); break; } default: { System.err.println("Error in Call Leg state machine: adding leg in state " + newLeg.getState()); return; } } this.getListener().inCall(newLeg); } COM: <s> in call method comment </s>
funcom_train/43449089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Graphics g) { Graphics dbg; if (dbImage == null) { dbImage = createImage(getSize().width, getSize().height); } if (dbImage != null) { dbg = dbImage.getGraphics(); if (dbg != null) { paint(dbg); g.drawImage(dbImage, 0, 0, this); dbg.dispose(); return; } } paint(g); } COM: <s> p prepares painting of image button </s>
funcom_train/40312368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsCurrency_InvalidColumn3() { try { ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry); resMetaData.isCurrency(10); fail("SQLException is expected."); } catch(SQLException e) { //ensure the SQLException is thrown by isCurrency method. assertEquals("The sqlstate mismatches", "22003", e.getSQLState()); } } COM: <s> tests is currency with column index larger than the number of column </s>
funcom_train/20923090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setImage(int[] pixels) throws IllegalArgumentException { if (pixels.length != _width*_height) { throw new IllegalArgumentException( "setImage: Specified image size does not" + "match that of the component."); } _pixels = pixels; if (_imageSource != null) { _imageSource.newPixels(pixels, ColorModel.getRGBdefault(), 0, _width); } } COM: <s> specify the packed argb representation of the image </s>
funcom_train/9086749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Apartments update(Apartments entity) { EntityManagerHelper.log("updating Apartments instance", Level.INFO, null); try { Apartments result = getEntityManager().merge(entity); EntityManagerHelper.log("update successful", Level.INFO, null); return result; } catch (RuntimeException re) { EntityManagerHelper.log("update failed", Level.SEVERE, re); throw re; } } COM: <s> persist a previously saved apartments entity and return it or a copy of </s>
funcom_train/46395421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doKeyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_DELETE) { int idx = table.getSelectedRow(); doRemoveEntry(); if (idx < table.getRowCount()) { table.getSelectionModel().setSelectionInterval(idx, idx); } else { table.getSelectionModel().setSelectionInterval(idx - 1, idx - 1); } } } COM: <s> delete the selected entry </s>
funcom_train/26172005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int sync () { try { if ( null != _mstFD && _mstFD.valid() ) _mstFD.sync(); if ( null != _ptrFD && _ptrFD.valid() ) _ptrFD.sync(); return OK; } catch ( SyncFailedException e ) { Log.error( MODULE, "could not sync db " + _path + ": " + Log.getTrace( e ) ); } return ERR_IO; } COM: <s> synchronizes the file to disk </s>
funcom_train/11710270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRange(TextPresentation presentation, int offset, int length, TextAttribute attr) { if (attr != null) presentation.addStyleRange(new StyleRange(offset, length, attr.getForeground(), attr .getBackground(), attr.getStyle())); } COM: <s> adds style information to the given text presentation </s>
funcom_train/21483388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoteCachePeersEqualsNumberOfCacheManagersInCluster() { if (JVMUtil.isSingleRMIRegistryPerVM()) { return; } CacheManagerPeerProvider provider = manager1.getCachePeerProvider(); List remotePeersOfCache1 = provider.listRemoteCachePeers(cache1); assertEquals(4, remotePeersOfCache1.size()); } COM: <s> 5 cache managers should means that each cache has four remote peers </s>
funcom_train/38556519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WOActionResults invalidateNavigationAction() { cat.debug("Entering invalidateNavigationAction ..."); EOEditingContext ec = OCEApplication.readOnlyEditingContext(); ec.rootObjectStore().invalidateAllObjects(); // too heavyweight? //ec.refreshAllObjects(); // doesn't work with cached entities return pageWithName("InvalidateOnly"); } COM: <s> a direct action to trigger the invalidation of all navigation information </s>
funcom_train/18015716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ImageIcon createImageIcon(String path) { java.net.URL imgURL = getClass().getResource(path); //System.out.println("trying to open " + imgURL); if (imgURL != null) { return new ImageIcon(imgURL); } else { //System.err.println("Couldn't find file: " + path); return null; } } COM: <s> returns an image icon or null if the path was invalid </s>
funcom_train/50141699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNull(int parameterIndex, int sqlType) throws SQLException{ try{ ps.setNull(parameterIndex, sqlType); } catch (SQLException sqlex){ log.debug(getLogString() + " sqlType = " + sqlType + " Exception: " + sqlex); throw sqlex; } setContent(parameterIndex, null); } COM: <s> sets the designated parameter to sql code null code </s>
funcom_train/16849973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextFieldYear() { if (jTextFieldYear == null) { jTextFieldYear = new JTextField(); jTextFieldYear.setText(strYear); jTextFieldYear.moveCaretPosition(0); jTextFieldYear.setBounds(new Rectangle(74, 113, 40, 18)); } return jTextFieldYear; } COM: <s> this method initializes j text field year </s>
funcom_train/38855985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getGroups(final ListStore<GroupModel> store) { groupServiceAsync.getAllGroups(new LogoutableAsyncCallback<List<Group>>() { @Override public void onSuccess(List<Group> result) { for (Group g : result) { store.add(new GroupModel(g)); } } }); } COM: <s> get all users </s>
funcom_train/17273735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Buffer pinNew(String filename, PageFormatter fmtr) { try { long timestamp = System.currentTimeMillis(); Buffer buff = bufferPool.pinNew(filename, fmtr); while (buff == null && !waitingTooLong(timestamp)) { wait(MAX_TIME); buff = bufferPool.pinNew(filename, fmtr); } if (buff == null) throw new BufferAbortException(); return buff; } catch (InterruptedException e) { throw new BufferAbortException(); } } COM: <s> pins a buffer to a new block in the specified file potentially waiting </s>
funcom_train/8281043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Button getButtonAbrir() { if (buttonAbrir == null) { buttonAbrir = new Button(); buttonAbrir.setLabel("Abrir"); buttonAbrir.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("Abrir"); JLabel label=new JLabel(); ImageIcon escena = new ImageIcon(textFieldRutaImagen.getText()); panelImagen.add(label); label.setIcon(escena); } }); } return buttonAbrir; } COM: <s> this method initializes button abrir </s>
funcom_train/9805048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isClockDriver(EdifCell cell) { String str = cell.getName().toLowerCase(); if (str.startsWith("bufg")) return true; if (str.startsWith("dcm")) return true; if (str.contains("dll")) return true; return false; } COM: <s> return true if the edif cell ec is bufg dll or dcm </s>
funcom_train/26138793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel31() { if (jPanel31 == null) { jLabel2 = new JLabel(); jLabel2.setText("signatur"); FlowLayout flowLayout3 = new FlowLayout(); flowLayout3.setHgap(0); flowLayout3.setAlignment(FlowLayout.LEFT); jPanel31 = new JPanel(); jPanel31.setPreferredSize(new Dimension(100, 30)); jPanel31.setLayout(flowLayout3); jPanel31.add(jLabel2, null); } return jPanel31; } COM: <s> this method initializes j panel31 </s>
funcom_train/2812637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawSuppSeparator(ClassicBarcodeLogicHandler logic) { //draw inter-character separator 01 logic.startBarGroup(BarGroup.UPC_EAN_GUARD, null); logic.addBar(false, 1); logic.addBar(true, 1); logic.endBarGroup(); } COM: <s> generates a supplemental separator </s>
funcom_train/9891051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float calcPriority(float fDone, int iBasePriority) { float fPriority, fComputedPriority; //P(t) = t^x fComputedPriority = (float) Math.pow(fDone, m_x); //P(t) = (b + b*t^x)/2 fPriority = (iBasePriority/100f + iBasePriority/100f * fComputedPriority)/2; return (fPriority * 100);// should be between 0 and 100. } COM: <s> calculates the priority when the base priority and the percentage already </s>
funcom_train/50813643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IEngineParameters getParameters() { try { EngineParameters parameters = new EngineParameters() ; parameters.setTabuListCapacity( getTabuListCapacity() ) ; parameters.setCustomizer( (ICustomizer ) getCustomizer().clone() ) ; return parameters ; } catch( CloneNotSupportedException ex ) { throw new ApplicationError( ex ) ; } } COM: <s> returns a copy of parameters currently in use </s>
funcom_train/38762658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean tieneNormativas(Long id){ Session session = getSession(); try { Boletin boletin = (Boletin) session.load(Boletin.class, id); Set normativas = boletin.getNormativas(); return !normativas.isEmpty(); //return normativas != null; } catch (HibernateException he) { throw new EJBException(he); } finally { close(session); } } COM: <s> nos dice si un boletin tiene normativas </s>
funcom_train/3837931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelRigth() { if (jPanelRigth == null) { jPanelRigth = new JPanel(); jPanelRigth.setLayout(new BorderLayout()); jPanelRigth .add(getJSplitPaneEditor(), java.awt.BorderLayout.CENTER); jPanelRigth.add(getJJToolBarEdit(), java.awt.BorderLayout.NORTH); } return jPanelRigth; } COM: <s> this method initializes j panel rigth </s>
funcom_train/42941537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date parse(String value, boolean strict) throws MetaParseException { Date d; try { d = RetsDateTime.parse1_7_2(value, strict); if (d == null) d = RetsDateTime.parse(value, RetsVersion.RETS_1_0, strict); } catch (ParseException e) { if( strict ) throw new MetaParseException(e); try { d = RetsDateTime.parse(value, RetsVersion.RETS_1_0, strict); } catch (ParseException f) { if (strict) throw new MetaParseException(f); return null; } } return d; } COM: <s> parse the timestamp </s>
funcom_train/3447493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getCustomizer() { Component customizer = null; if (beanDescriptor != null) { Class cls = beanDescriptor.getCustomizerClass(); if (cls != null) { try { customizer = (Component)cls.newInstance(); } catch (Exception ex) { LOG.warn( "PropertyTableModel: Instantiation exception creating Customizer", ex); } } } return customizer; } COM: <s> gets the customizer for the current object </s>
funcom_train/45050198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doInitialise() throws Exception { doValidate(); final ConnectionFactory connectionFactory = (ConnectionFactory)getFeatureContext().getResource(ConnectionFactory.class); connection = connectionFactory.createConnection(); LOG.log(Level.INFO, "Connection initialised for {0}", this.getClass().getName()); } COM: <s> initialise the connection that is used in the test </s>
funcom_train/43268197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initComponents() { // GEN-BEGIN:initComponents tabbedPane = new JTabbedPane(); setLayout(new java.awt.BorderLayout()); addComponentListener(new java.awt.event.ComponentAdapter() { public void componentResized(final java.awt.event.ComponentEvent evt) { resizeHandler(evt); } }); add(tabbedPane, java.awt.BorderLayout.CENTER); } COM: <s> this method is called from within the constructor to </s>
funcom_train/31910726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle2D getGeometricBounds() { Rectangle2D ret = null; for (int idx=0; idx<gvs.length; idx++) { Rectangle2D b = gvs[idx].getGeometricBounds(); if (ret == null) ret = b; else ret = ret.createUnion(b); } return ret; } COM: <s> returns the geometric bounds of this glyph vector </s>
funcom_train/40450281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdback() { if (cmdback == null) {//GEN-END:|92-getter|0|92-preInit // write pre-init user code here cmdback = new Command("Regresar", Command.BACK, 0);//GEN-LINE:|92-getter|1|92-postInit // write post-init user code here }//GEN-BEGIN:|92-getter|2| return cmdback; } COM: <s> returns an initiliazed instance of cmdback component </s>
funcom_train/8687138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTask(Task nestedTask) { if (this.nestedTask != null) { throw new BuildException("Only one nested element allowed"); } if (!(nestedTask instanceof UnknownElement)) { throw new BuildException( "addTask called with a task that is not an unknown element"); } this.nestedTask = (UnknownElement) nestedTask; } COM: <s> add a nested task to predefine attributes and elements on </s>
funcom_train/45018363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFacilityUserIdPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NXuser_facilityUserId_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NXuser_facilityUserId_feature", "_UI_NXuser_type"), NexusPackageImpl.Literals.NXUSER__FACILITY_USER_ID, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the facility user id feature </s>
funcom_train/27725235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSUIDProperties(Properties suidProperties) { if(theSUIDProperties == null) { theSUIDProperties = suidProperties; } else { Enumeration keys = suidProperties.propertyNames(); while (keys.hasMoreElements()) { String tmpKey = (String)keys.nextElement(); theSUIDProperties.put(tmpKey, suidProperties.getProperty(tmpKey)); } } } COM: <s> add the content of the suid properties to the current list </s>
funcom_train/645138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSet getNextResultSet() throws SQLException { if (!firstResultReceived) { ResultSet rs = stmt.getResultSet(); firstResultReceived = true; if (rs == null) { rs = getNextResultSet(); } return rs; } boolean isResultSet = stmt.getMoreResults(); while (!isResultSet) { if (stmt.getUpdateCount() == -1) { return null; } isResultSet = stmt.getMoreResults(); } ResultSet result = stmt.getResultSet(); return result; } COM: <s> honors multiple result sets and asks for update counts </s>
funcom_train/18753903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JDialog createCancelDialog(Component parentComponent, String title) { JDialog result; // create message dialog JOptionPane message = new JOptionPane(createCancelDialogContent(), JOptionPane.PLAIN_MESSAGE); JButton cancelButton = new JButton("Cancel"); // add a button to interrupt the generation process and // wait for the thread to finish and rejoin this one cancelButton.addActionListener(createCancelListener()); message.setOptions(new Object[] { cancelButton }); result = message.createDialog(parentComponent, title); result.pack(); return result; } COM: <s> creates a modal dialog that will interrupt this thread </s>
funcom_train/1342824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ApplicationEvent getEvent(int last) { List eventList= appListener.eventList; if (last >= 0) throw new IllegalArgumentException("Bad parameter:" + last); if ((eventList.size() + last) < 0) throw new IllegalArgumentException( "Bad parameter:" + last + " size=" + eventList.size()); return (ApplicationEvent) eventList.get(eventList.size() + last); } COM: <s> gets the last event </s>
funcom_train/15458463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void promptSave() { // prompt for save if (currentType != null) { String currentSelectedType = currentType.getName(); // prompt for save if (currentType.modified && currentSelectedType != null) { int answer = JOptionPane.showConfirmDialog(this, "Type '" + currentSelectedType + "' is changed, do you want to update it? "); if (answer == JOptionPane.YES_OPTION) { onSave(null); } } } } COM: <s> prompt to save changes when exit </s>
funcom_train/45422216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateELink(ELink elink, String filename) throws EbssException { elink.renewIdGroups(); elink.addIdGroup(getPMID()); Document doc = elink.getDocument(); File ef = getFile(filename); Resource.save(doc, ef.getPath()); this.db.getLogger().debug("Elink\t" + ef.getName() + "\t" + getPMID()); } COM: <s> update a resource file with the given elink resource </s>
funcom_train/17729011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void commandDelProp(String cmd) { StringTokenizer st = new StringTokenizer(cmd, " "); if (st.countTokens() != 2) ps.println("delprop <property name>"); else { st.nextToken(); System.getProperties().remove(st.nextToken()); } } COM: <s> removes a system property </s>
funcom_train/36147785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer nextInteger() { String str = readString(); if (str == null || "".equals(str)) { return null; } char sep1 = StringUtils.nextCharacterSeparator(getBuffer().getDelimiter()); StringTokenizer stk = new StringTokenizer(str, sep1); stk.next(); String value = stk.next(); return (Integer) getObject(Integer.class.getName(), value, sep1); } COM: <s> gets the next integer object </s>
funcom_train/17859658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getImage (String key) { URL url = getResource(key); Image ret = null; Toolkit tk = Toolkit.getDefaultToolkit(); ret = tk.getImage(url); if (ret == null) { throw new ResourceException("Cannot load image for key '"+key+"'," +"with URL '"+url+"'"); } return ret; } COM: <s> get a resource as an image </s>
funcom_train/50328174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendFunctionGroup2() { int new_fn = ((getF5() ? CbusConstants.CBUS_F5 : 0) | (getF6() ? CbusConstants.CBUS_F6 : 0) | (getF7() ? CbusConstants.CBUS_F7 : 0) | (getF8() ? CbusConstants.CBUS_F8 : 0)); cs.setFunctions(2, _handle, new_fn); } COM: <s> send the cbus message to set the state of </s>
funcom_train/48406403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDefinitionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FragmentUse_definition_feature"), getString("_UI_PropertyDescriptor_description", "_UI_FragmentUse_definition_feature", "_UI_FragmentUse_type"), SpemxtcompletePackage.eINSTANCE.getFragmentUse_Definition(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the definition feature </s>
funcom_train/20479662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillTile(Canvas canvas, String fileName, int top, int left) { if (!new File(fileName).exists()) { sLog.warning("Tile file " + fileName + " does not exist!!"); return; } Bitmap bitmap1 = BitmapFactory.decodeFile(fileName); // Log.d(Constants.LOG_TAG, " drawing left,top="+top+","+left); canvas.drawBitmap(bitmap1, left, top, null); } COM: <s> fill the given tile at the given position in the given canvas </s>
funcom_train/50354548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getDoneButton() { if (doneButton == null) { doneButton = new JButton(); doneButton.setText("Done"); doneButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { addAttributeDialog.dispose(); } }); } return doneButton; } COM: <s> this method initializes done button </s>
funcom_train/39349972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeHeader(ObjectReference object) { byte oldValue = VM.objectModel.readAvailableByte(object); byte newValue = (byte) ((oldValue & GC_MARK_BIT_MASK) | markState); if (HeaderByte.NEEDS_UNLOGGED_BIT) newValue |= HeaderByte.UNLOGGED_BIT; VM.objectModel.writeAvailableByte(object, newValue); } COM: <s> initialize the object header post allocation </s>
funcom_train/28660785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createGroupSettings() { groupSettings = new Group(content, SWT.NONE); groupSettings.setText(Messages.getString("ECContentFp.6")); //$NON-NLS-1$ groupSettings.setLayout(new GridLayout(1, false)); GridData gridData = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 2); gridData.widthHint = 300; groupSettings.setLayoutData(gridData); createGroupSize(); createGroupCurveType(); createGroupCurveAttributes(); createGroupCalculations(); createGroupSave(); } COM: <s> this method initializes group settings </s>
funcom_train/20170342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addUnit(Unit unit) { unit.setPosition(null); // this is done so that the units in Army // do not think they are still on the Tile // the Army was created on getPlayer().removeUnit(unit); getPlayer().modifyEnergyUsed(unit.getUnitType().upkeep()); getPosition().removeUnit(unit); this.units.add(unit); this.numOfUnits++; //MainScreen.writeToConsole("Army: Unit added to Army."); } COM: <s> add a unit to this army </s>
funcom_train/12652770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetIndexNotFound() { int code = 0; int otherCode = 0; while (code == otherCode) { code = generator.nextInt(); otherCode = generator.nextInt(); } CharacteristicCode characteristicCode = new CharacteristicCode(code); CharacteristicCode[] set = new CharacteristicCode[] {new CharacteristicCode(otherCode)}; assert (characteristicCode.getIndex(set) == -1) : "The set " + Arrays.toString(set) + " contains " + characteristicCode; } COM: <s> test get index not found </s>
funcom_train/18865837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExchangeRate(final String cur1, final String cur2, final BigDecimal rate) { if (rate.compareTo(ZERO) > 0) { exchangeRate.setExchangeRate(cur1, cur2, rate); } else { exchangeRate.setExchangeRate(cur1, cur2, new BigDecimal("0.00001")); } doAutoSave(); } COM: <s> set the exchange rate for the commodity pair </s>
funcom_train/4397158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tokenize(String decoded, int startPosition) { //we split the string into tokens using the specified delimiters StringTokenizer tokenizer = new StringTokenizer(decoded," ,.!?;()[]{}\"'`\t\n\r»•| /:-"); //for every token while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); //we normalize it using the specific strategy used by every type of evaluator token = eval.normalizeKeyword(token); //hook method process(token, startPosition); } } COM: <s> used to tokenize a string into containing words </s>
funcom_train/23199673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getReaderCmb() { if (readerCmb == null) { readerCmb = new JComboBox(ReadersEnum.values()); readerCmb.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ReadersEnum reader = (ReadersEnum) ((JComboBox) e .getSource()).getSelectedItem(); getInfo().getCurrentReader().setReader(reader); updateReaders(getInfo().getCurrentReader()); } }); } return readerCmb; } COM: <s> this method initializes j combo box </s>
funcom_train/44026534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateModifiedDateFromChild(APElement child) { ((DateProperty)getProperties().get(Property.DATE_MOD)).setValue( (Date)((DateProperty)child.getProperties().get(Property.DATE_MOD)).getValue(), child.getProperties().get(Property.DATE_MOD).getStringValue()); } COM: <s> copies modified date property value from element to this element </s>
funcom_train/18643175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addition(Object obj) { RecordDetails details=(RecordDetails)obj; // Check what action type this exchange should be // and then set the name and description Interaction interaction=details.getInteraction(); if (interaction != null && details.getName() == null) { String name="Record"; int ind=1; while (interaction.getRecordDetail(name+ind) != null) { ind++; } details.setName(name+ind); } } COM: <s> this method is invoked to handle the addition of the </s>
funcom_train/1589814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TimeOfDay withMillisOfSecond(int millis) { int[] newValues = getValues(); newValues = getChronology().millisOfSecond().set(this, MILLIS_OF_SECOND, newValues, millis); return new TimeOfDay(this, newValues); } COM: <s> returns a copy of this time with the millis of second field updated </s>
funcom_train/10628510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstrInt() { int a = 732546982; String res = "732546982"; int resScale = 0; BigDecimal result = new BigDecimal(a); assertEquals("incorrect value", res, result.unscaledValue().toString()); assertEquals("incorrect scale", resScale, result.scale()); } COM: <s> new big decimal int value </s>
funcom_train/45143373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWarningLevel4() { ForteCCCompiler compiler = ForteCCCompiler.getInstance(); Vector args = new Vector(); compiler.addWarningSwitch(args, 4); assertEquals(1, args.size()); assertEquals("+w2", args.elementAt(0)); } COM: <s> tests command line switches for warning 4 </s>
funcom_train/3925324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public boolean fieldHasType( String node, String field, ReturnInteger result ) { String nodeField = node + "_" + field; Integer x = (Integer)actualTypesByField.get( nodeField ); if ( x != null ) { result.setValue( x.intValue() ); return( true ); } else { return( false ); } } COM: <s> does a field restrict its values to a specific type </s>
funcom_train/25141865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBug5235() throws Exception { createTable("testBug5235", "(field1 DATE)"); this.stmt .executeUpdate("INSERT INTO testBug5235 (field1) VALUES ('0000-00-00')"); Properties props = new Properties(); props.setProperty("zeroDateTimeBehavior", "convertToNull"); Connection nullConn = getConnectionWithProps(props); this.rs = nullConn.createStatement().executeQuery( "SELECT field1 FROM testBug5235"); this.rs.next(); assertTrue(null == this.rs.getObject(1)); } COM: <s> tests for bug 5235 class cast exception on all zero date field when </s>
funcom_train/2756745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDynamicTimer(){ //Create timer for updating the values if (dynamicUpnpTimer != null) dynamicUpnpTimer.cancel(); dynamicUpnpTimer = new Timer("NetworkMonitor", true); final MonitoringPanel mPanel = this; dynamicUpnpTask = new TimerTask(){ public void run() { JFritz.getFritzBox().getInternetStats(mPanel); getStaticUPnPInfos(); } }; dynamicUpnpTimer.schedule(dynamicUpnpTask, 1000, 975); } COM: <s> this function sets up the timer for automatic updates </s>
funcom_train/36470295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertAbove(long id, Item i) { Cursor c = mCursor; boolean found=false; if(c.getCount() > 0) { c.moveToFirst(); do { if(c.getLong(c.getColumnIndexOrThrow(DbAdapter.KEY_ITEM_ID)) == id) { found=true; break; } } while(c.moveToNext()); } if(found) { add(c.getPosition(), i); } else { add(i); } } COM: <s> insert an item above another item in the list with the </s>
funcom_train/5342934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getMeasuredBandwidth() { List activeCopy; synchronized(this) { activeCopy = new ArrayList(_activeUploadList); } float sum=0; for (Iterator iter = activeCopy.iterator(); iter.hasNext(); ) { HTTPUploader up = (HTTPUploader)iter.next(); if (up.isForcedShare()) continue; sum += up.getMeasuredBandwidth(); } return sum; } COM: <s> returns the total upload throughput i </s>
funcom_train/38859990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object convertFieldValuesToMap(LoidTypeField[] fields,String langTypeName) throws Exception { Map<Object,Object> map = new HashMap<Object,Object>(); String [] types = getMapTypes(langTypeName); for(int x=0;x<fields.length;x++) { Object key = objectForType(types[0],fields[x].name); Object val = objectForType(types[1],fields[x].value); map.put(key, val); } return map; } COM: <s> convert the fields key name and value value to primitive map </s>
funcom_train/13500731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComponent createCenterPanel() { JTabbedPane leftPanel = new JTabbedPane(); leftPanel.addTab("File Selection", fileSelectTask); leftPanel.addTab("Metadata Entry", metadataEntryTask); leftPanel.addTab("Conversion Rules", conversionRulesTask); return leftPanel; } COM: <s> this method returns a jtabbed pane showing with a single tab for each </s>
funcom_train/13994323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setButtonBorderB(AbstractButton button) { button.setBorder(BorderFactory.createCompoundBorder(BorderFactory .createEmptyBorder(0, 0, 1, 1), BorderFactory .createCompoundBorder(BorderFactory.createLineBorder( SystemColor.controlShadow, 1), BorderFactory .createEmptyBorder(0, 2, 0, 2)))); } COM: <s> used when layed out with other components with etched border </s>
funcom_train/1674559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addBinRefToQueueAlreadyLatched(BINReference binRef) { Long node = Long.valueOf(binRef.getNodeId()); BINReference existingRef = binRefQueue.get(node); if (existingRef != null) { existingRef.addDeletedKeys(binRef); } else { binRefQueue.put(node, binRef); } } COM: <s> adds the binreference with the latch held </s>
funcom_train/12857495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void returnReservedValues(Log log) { for (SequenceValueProducer producer : values()) { try { producer.returnReservedValues(); } catch (RepositoryException e) { if (log == null) { log = LogFactory.getLog(SequenceValueProducerPool.class); } log.error(e.getMessage(), e); } } } COM: <s> returns reserved values for all </s>
funcom_train/16082561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUnlistedContact(Contact contact) { identity.addUnlistedContact(contact); if (log.isDebugEnabled()) { log.debug(contact.getName() + " added to " + identity.getUsername() + "." + identity.getMessenger() + "." + identity.getSignin() + "." + identity.getUnlistedGroup().getName()); } } COM: <s> adds the specified contact to the unlisted group </s>
funcom_train/34109540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GWTCategory toGWT(Category persistedVar) { GWTCategory gwtVar = null; if (persistedVar == null) return null; try { gwtVar = new GWTCategory(); BeanUtils.copyProperties(gwtVar, persistedVar); } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InvocationTargetException e) { // TODO Auto-generated catch block e.printStackTrace(); } return gwtVar; } COM: <s> converts an object to its gwt dto equivalent </s>
funcom_train/35660021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DataAccessor getDataAccessor(EntityMetadata metadata) { EntityMetadata.Type type = metadata.getType(); if (type.equals(EntityMetadata.Type.COLUMN_FAMILY)) { return accessorCF; } else if (type.equals(EntityMetadata.Type.SUPER_COLUMN_FAMILY)) { return accessorSCF; } else if (type.equals(EntityMetadata.Type.DOCUMENT)) { return accessorDocument; } return null; } COM: <s> gets the data accessor </s>
funcom_train/14317883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String replaceIcal4Principal(String value) { if (value != null && value.contains("/principals/__uuids__/")) { return value.replaceAll("/principals/__uuids__/([^/]*)__AT__([^/]*)/", "mailto:$1@$2"); } else { return value; } } COM: <s> replace i cal4 snow leopard principal paths with mailto expression </s>
funcom_train/3082234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPopUpAlignment(Alignment newValue) { if (newValue == null) newValue = DEFAULT_ALIGNMENT; switch (newValue.getHorizontal()) { case Alignment.LEFT: case Alignment.RIGHT: case Alignment.CENTER: break; default: throw new IllegalArgumentException("The horizontal alignment must be LEFT, CENTER or RIGHT"); } switch (newValue.getVertical()) { case Alignment.TOP: case Alignment.CENTER: case Alignment.BOTTOM: break; default: throw new IllegalArgumentException("The vertical alignment must be TOP, CENTER or BOTTOM"); } setProperty(PROPERTY_POPUP_ALIGNMENT, newValue); } COM: <s> sets the alignment of the box around the popup component with respect to </s>
funcom_train/45038223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEvaluate() throws Exception { Start[] asts = OclDirectoryParser.parseDirectory( "test_files" + File.separator + "evaluator"); ModelFacade model = new ExampleModel(); Evaluator eval = new Evaluator(model); for (int i = 0; i < asts.length; i++) { Start start = asts[i]; try { System.out.println(eval.evaluate(start)); } catch (OclContextException oce) { fail( "Context Exception was thrown while parsing: \nAST:" + asts[i].toString() + "\nException: " + oce.toString()); } } } COM: <s> tests the evaluation of constraints included in </s>
funcom_train/26071578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Layer findInputLayer() { Layer input = null; if (layers == null) return null; for (int i=0; i < layers.size(); ++i) { Layer ly = (Layer)layers.elementAt(i); if (ly.isInputLayer()) { input = ly; break; } } return input; } COM: <s> returns the input layer by searching for it following </s>
funcom_train/3363076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void read(InputStream in, Object desc) throws IOException { if (desc instanceof HTMLDocument && kit instanceof HTMLEditorKit) { HTMLDocument hdoc = (HTMLDocument) desc; setDocument(hdoc); read(in, hdoc); } else { String charset = (String) getClientProperty("charset"); Reader r = (charset != null) ? new InputStreamReader(in, charset) : new InputStreamReader(in); super.read(r, desc); } } COM: <s> this method initializes from a stream </s>
funcom_train/29583392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void expandCollection(DefaultMutableTreeNode parent) throws HTTPMessageException { String collectionURI = getCollectionURI(parent); DefaultMutableTreeNode collections = getCollections(collectionURI, parent.getLevel(), 2); parent.removeAllChildren(); while(collections.getChildCount() != 0) { parent.add((DefaultMutableTreeNode) collections.getChildAt(0)); } rootModel.nodeStructureChanged(parent); } COM: <s> method that is invoked on a tree will expand event </s>
funcom_train/12900059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setToNull() { if (editValue == null && !isPropertySet()) { // This is just to force the change. Without this on a not set property, // it would look like it was being changed from null to null, and so it would not apply it. editValue = Void.TYPE; applyNewValue(null); if (editValue == Void.TYPE) editValue = null; // In case the apply failed, we don't want it to stay Void.TYPE. } else applyNewValue(null); } COM: <s> set the value to null </s>
funcom_train/35101221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setSize(300, 200); this.setJMenuBar(getJJMenuBar()); this.setContentPane(getJContentPane()); this.setTitle("JFrame"); this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); this.addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent e) { closeDown(); } }); } COM: <s> this method initializes this </s>
funcom_train/12777396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isPrimitiveCall(WalkContext context, FunctionCall n) { return isPrologueScript(context) && n.getType() == Token.CALL && getCallTarget(n).getType() == Token.NAME && getCallTarget(n).getString().equals("primitive"); } COM: <s> is n a call to primitive within our synthetic modeling code </s>
funcom_train/7347311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getConnection(String ip, String user, String pwd) { try { System.out.println("FtpConnection getting a connection : " +ftcon.getCurrentDir(true)); ftcon.connectLogin(ip, user, pwd); } catch(IllegalArgumentException iae){ this.setStatus(false); } catch (Exception e) { System.out.println("FtpConnection err a connection : "+e); } } COM: <s> gets the actual ftp connection </s>
funcom_train/43141485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long overlap(LongRange other) { if (start >= other.end || end <= other.start) { return 0; } else { // At this point they definitely have something in common. if (start < other.start || end > other.end) { return Math.min(end, other.end) - Math.max(start, other.start); } else { return end - start; } } } COM: <s> computes the overlap between this range and </s>
funcom_train/33398865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPositionPanel() { if (positionPanel == null) { lengthLabel = new JLabel(); lengthLabel.setText(nanosToString(0)); lengthLabel.setOpaque(false); positionLabel = new JLabel(); positionLabel.setText(nanosToString(0)); positionLabel.setOpaque(false); positionPanel = new JPanel(); positionPanel.setOpaque(false); positionPanel.setLayout(new BorderLayout()); positionPanel.add(getPositionSlider(), BorderLayout.CENTER); positionPanel.add(positionLabel, BorderLayout.WEST); positionPanel.add(lengthLabel, BorderLayout.EAST); } return positionPanel; } COM: <s> this method initializes position panel </s>
funcom_train/12759043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyServiceManager(ServiceRow service, String message) { if (message.equals("startReportingREQUEST") || message.equals("stopReportingREQUEST")) { message = message + " " + privateTopic; } try { message = message + " " + service.getServiceName(); System.out.println("Notify Service Manager with message: " + message); publisher.publish(message); } catch (EnyWareMessagingException e) { } } COM: <s> send a message to the service manager actually the </s>
funcom_train/22279291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseEntered(java.awt.event.MouseEvent e) { // panel.addEvent(new MouseEvent(e.getWhen(),netscape.application.MouseEvent.MOUSE_ENTERED,e.getX(),e.getY(),e.getModifiers())); e.consume(); } COM: <s> invoked when the mouse enters a component </s>
funcom_train/51615466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Cube getCube(DataRepresentation report_and_data, URLParser.Result url) throws ReadError, ObjectInstantiationError, CubeException { CubeDescriptor cube_descriptor = (CubeDescriptor)ERATypes.CUBE_DESCRIPTOR.get(report_and_data, "data"); Cube cube = cube_descriptor.makeCube(); Cube filtered_cube = url.getFilters().apply(cube); return filtered_cube; } COM: <s> gets the cube specified by the bindings </s>
funcom_train/38414578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeChatRoom(String primaryKey) { if ( !chatRooms.containsKey(primaryKey) ) { Debug.signal( Debug.CRITICAL, this, "removeChatRoom failed: key " + primaryKey + " not found in " + this ); return false; } chatRooms.remove(primaryKey); return true; } COM: <s> to remove a chat room </s>
funcom_train/25187857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMinimum() throws Exception { System.out.println("getMinimum"); JSchema instance = new JSchema(); assertNull(instance.getMinimum()); instance.setMinimum(1); assertEquals(1, instance.getMinimum()); instance.setMinimum(-121.2); assertEquals(-121.2, instance.getMinimum()); } COM: <s> test of get minimum method of class jschema </s>
funcom_train/36158961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document parseStringToDom(String xmlString) throws CloudException, InternalException{ DocumentBuilderFactory factory =DocumentBuilderFactory.newInstance(); DocumentBuilder builder; try { builder = factory.newDocumentBuilder(); Document doc = builder.parse(new InputSource(new StringReader(xmlString))); if(doc != null) return doc; } catch (ParserConfigurationException e) { throw new InternalException(e); } catch (SAXException e) { throw new InternalException(e); } catch (IOException e) { throw new InternalException(e); } return null; } COM: <s> convert string to a xml document </s>
funcom_train/5346142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buildQRT() { super.buildQRT(); Iterator iter = getXMLKeyWords().iterator(); while(iter.hasNext()) _queryRouteTable.add((String)iter.next()); iter = getXMLIndivisibleKeyWords().iterator(); while(iter.hasNext()) _queryRouteTable.addIndivisible((String)iter.next()); } COM: <s> build the qrt table </s>
funcom_train/30188436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void publishOverall(FinalJobStatus[] jobStatus) { System.err.println("job is complete!!!!!!!!!!!!!!"); int counta = 0; for (JobStatus status : jobStatus) { System.err.println(Thread.currentThread().getName() + " Job status DONE tradeIds:" + Arrays.toString(status.tradeIdsHandled) + " overall:" + counta); counta += status.tradeIdsHandled.length; } } COM: <s> only called once all job status msgs are done </s>
funcom_train/2993703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintIt(Graphics2D g2, int column, int row, int x, int y) { g2.setColor(GraphSettings.color[getIndex(x,y)]); g2.fillRect(x,y,swatchSize.width,swatchSize.height); } COM: <s> paint method for a swatch rectangle </s>
funcom_train/48406514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsPlannedPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BreakdownElement_isPlanned_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BreakdownElement_isPlanned_feature", "_UI_BreakdownElement_type"), SpemxtcompletePackage.eINSTANCE.getBreakdownElement_IsPlanned(), true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is planned feature </s>
funcom_train/13186560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDomainAxisLocation(AxisLocation location, boolean notify) { if (location == null) { throw new IllegalArgumentException("Null 'location' argument."); } this.domainAxisLocations.set(0, location); if (notify) { notifyListeners(new PlotChangeEvent(this)); } } COM: <s> sets the location of the domain axis and if requested sends a </s>
funcom_train/20885099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAttribute() { AttributeDTO dto = new AttributeDTO(); dto.intField = 21689; assertTrue(JSefaTestUtil.serialize(XML, dto).indexOf("21689") >= 0); JSefaTestUtil.assertRepeatedRoundTripSucceeds(XML, dto); } COM: <s> tests it for an attribute </s>
funcom_train/28200060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean asynchronous() { if (warnedAsynchronousActions.add(getClass())) { Logger.getLogger(CallableSystemAction.class.getName()).warning( "Warning - " + getClass().getName() + " should override CallableSystemAction.asynchronous() to return false" ); } return DEFAULT_ASYNCH; } COM: <s> if true this action should be performed asynchronously in a private thread </s>
funcom_train/27937372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Unit getUnit(String unitName) { UIHConfig defaultConfig = getDefault(); if(nameToUnitMap != null) { Unit unit = (Unit)nameToUnitMap.get(unitName); if(unit != null) { return unit; } } if(this == defaultConfig) { return Unit.getUnit(unitName); } return defaultConfig.getUnit(unitName); } COM: <s> get the unit that is registered with the given name </s>
funcom_train/44790673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float maxRGB() { List<Double> pComposantes = new ArrayList<Double>(); pComposantes.add((double) this.getRedRGB()); pComposantes.add((double) this.getGreenRGB()); pComposantes.add((double) this.getBlueRGB()); return Collections.max(pComposantes).intValue(); } COM: <s> return the maximal rgb color component of this color </s>
funcom_train/2537553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setSizeXYRelativeToParent(float width, float height){ if (width > 0 && height > 0){ Vector3D centerPoint = this.getCenterPointRelativeToParent(); this.scale( (1f/this.getWidthXYRelativeToParent()) * width, (1f/this.getHeightXYRelativeToParent()) * height, 1, centerPoint); return true; }else return false; } COM: <s> scales this shape to the given width and height </s>
funcom_train/44026118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getTagsAndShow() { connectionToServer.makeACall(new CallbackActions() { public void execute(AsyncCallback callback) { connectionToServer.searchService.getAllTags(callback); } public void onFailure(Throwable caught) { new PopupError("Unfortunately tags cannot be received!", caught.getMessage()); } public void onSuccess(Object result) { if (result instanceof Tag[]) { displayTags((Tag[])result); } }}); } COM: <s> gets tags from server and initiate their showing </s>
funcom_train/33284954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeParentheses(final List<String> list) { for (int i = 0; i < list.size(); i++) { final String string = list.get(i); if (string.endsWith("()")) { list.set(i, string.substring(0, string.length() - 2)); } } } COM: <s> to be removed once </s>
funcom_train/21462649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double median(Vector v) { OnlineSummarizer med = new OnlineSummarizer(); if (v.size() < 100) { return v.zSum() / v.size(); } for (Vector.Element e : v) { med.add(e.get()); } return med.getMedian(); } COM: <s> a quick and dirty hack to compute the median of a vector </s>