__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/16484621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initialize() { this.setSize(new Dimension(361, 300)); //this.setContentPane(getJScrollPane()); this.setContentPane(getJTabbedContentPane()); this.setLocation(0, 2);//-11); this.setLayer(2); } COM: <s> this method initializes this </s>
funcom_train/6206339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadConverter() { if (converterFQN != null) { converter = resolveType(getGaijinFormField().getGaijinProject(), converterFQN); if (converter == null) { getPreGenerationStatus().add(createUnresolvedTypeStatus(converterFQN)); } } else { converter = null; } } COM: <s> load the itype of the fqn specified for the form field converter </s>
funcom_train/49462578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Integer getOrCreateAvailability(String _availability, boolean addAvailability) throws SQLException{ Db db = getDb(); try { db.enter(); String availability = DbHelper.nullify(_availability); if (availability == null) return null; pstLookupAvailability.setString(1, availability); Integer avId = DbHelper.getKey(pstLookupAvailability); if (avId != null || !addAvailability) return avId; _logger.info("Creating availability ["+availability+"]"); pstAddAvailability.setString(1, availability); return DbHelper.getKey(pstAddAvailability); } finally { db.exit(); } } COM: <s> get the id corresponding to the availability </s>
funcom_train/1649890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disconnected() { // Clear everything, call the callbacks LimitedRangeIntByteArrayMapElement[] elements = clear(); for(int i = 0; i < elements.length; i++) { LimitedRangeIntByteArrayMapElement element = elements[i]; AsyncMessageCallback[] callbacks = element.callbacks; if(callbacks != null) for(int j = 0; j < callbacks.length; j++) callbacks[j].disconnected(); } } COM: <s> called when the node appears to have been disconnected </s>
funcom_train/22712051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void endTestCaseImpl(String name, String resultComment) { if (this.testCaseStartedClass != null) { // JUnit test cases have priority return; } if (name.equals(this.testCaseStartedName)) { // reset the logged Strings this.testCaseStartedName = null; this.testCaseStartedComment = null; } } COM: <s> the coverage measurement for the current test case with the given name is </s>
funcom_train/32867512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getJIDIndex(JID jid, int nMask) { int i = -1; Enumeration e = vJIDs.elements(); while (e.hasMoreElements()) { i++; Object obj = e.nextElement(); if (((JID)obj).isEqual(jid, nMask) == true) return(i); } return -1; } COM: <s> find index of user </s>
funcom_train/35682536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLoadTextFile() { MockFILEA mockFILEAE = new MockFILEA(); List < byte[] > list = mockFILEAE.getCustomers("S*", 100); assertEquals(5, list.size()); list = mockFILEAE.getCustomers("*", 100); assertEquals(43, list.size()); } COM: <s> check that text file is loaded properly </s>
funcom_train/3442377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setBandIndexes() { // Handle prior calls to setBandIndex: for (Iterator i = needPredefIndex.iterator(); i.hasNext(); ) { Object[] need = (Object[]) i.next(); CPRefBand b = (CPRefBand) need[0]; Byte which = (Byte) need[1]; b.setIndex(getCPIndex(which.byteValue())); } needPredefIndex = null; // no more predefs if (verbose > 3) { printCDecl(all_bands); } } COM: <s> given cp indexes distribute tag specific indexes to bands </s>
funcom_train/18514688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void currentIt() { naiont = ina; kiont = ikt + il; if ((t >= tstim) && (t < (tstim + dt))) { stimtime = 0; tstim = tstim + bcl; dvdtmax = false; } if ((stimtime >= 0) && (stimtime < stl)) { it = st + naiont + kiont; } else { it = naiont + kiont; } stimtime = stimtime + dt; } COM: <s> calculates total current </s>
funcom_train/13391626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setLoggerLevel(String loggerName, String logLevelToSet) throws RemoteException { loggingMXBean.setLoggerLevel(loggerName, logLevelToSet); String levelCheck = loggingMXBean.getLoggerLevel(loggerName); logger.info("Changing logger;" + loggerName + ", level set to:" + logLevelToSet); return levelCheck.equals(logLevelToSet); } COM: <s> set a specific loggers level </s>
funcom_train/13596469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnAddGrapheme() { if (btnAddGrapheme == null) { btnAddGrapheme = new JButton(); btnAddGrapheme.setText(Messages.getString("GeneralUI.ButtonAdd")); // Generated // //$NON-NLS-1$ btnAddGrapheme .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { addNewGrapheme(); } }); } return btnAddGrapheme; } COM: <s> this method initializes btn add grapheme </s>
funcom_train/29391500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List execute(String sqlStmt, Object[] columns, Class classToFill) throws SQLException { if (classToFill == null) throw new SQLException("Null fill class not valid"); try { if ( null == this.con) this.con = Pool.getInstance().getConnection(); this.prepare(sqlStmt, columns); return this.populate(classToFill); } catch (SQLException ex) { LOG.fatal(ex); throw(ex); } finally { this.release(); } } COM: <s> this is with prepare statement </s>
funcom_train/16356980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object getData(final String key) { final String positionKey = getPositionKey(key); if (!getEntries().containsKey(positionKey)) { // act as if this was the end of the // string - return the _entry, if there is one if (trieEntry != null) { return (trieEntry.getData()); } else { return (null); } } else { return getEntry(key, positionKey); } } COM: <s> gets the data for a given key </s>
funcom_train/34039977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.add(getJButton(), java.awt.BorderLayout.SOUTH); jContentPane.add(getJList(), java.awt.BorderLayout.CENTER); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/44507910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matches(Method method, Class targetClass) { return ((method.getAnnotation(RequiresPermissions.class) != null) || (method.getAnnotation(RequiresRoles.class) != null) || (method.getAnnotation(RequiresUser.class) != null) || (method.getAnnotation(RequiresGuest.class) != null ) || (method.getAnnotation(RequiresAuthentication.class) != null )); } COM: <s> returns tt true tt if the method has any jsecurity annotations false otherwise </s>
funcom_train/51788040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addClosesRefinementPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FlowElement_closesRefinement_feature"), getString("_UI_PropertyDescriptor_description", "_UI_FlowElement_closesRefinement_feature", "_UI_FlowElement_type"), RAMPackage.Literals.FLOW_ELEMENT__CLOSES_REFINEMENT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the closes refinement feature </s>
funcom_train/34890065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setFileEncoding(String encoding) { // "default" charset -- do nothing if ("0".equals(encoding)){ return; } // find the charset for the encoding try { charset = Charset.forName("cp" + encoding); } // unsupported charset catch(Exception e){ if (Main.DEBUG) e.printStackTrace(); // (debug only) return; } // open the appropriate stream } COM: <s> sets up the encoding for the input file i </s>
funcom_train/49074028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void installDefaults() { Border b = this.ribbon.getBorder(); if (b == null || b instanceof UIResource) { Border toSet = UIManager.getBorder("Ribbon.border"); if (toSet == null) toSet = new BorderUIResource.EmptyBorderUIResource(1, 2, 1, 2); this.ribbon.setBorder(toSet); } } COM: <s> installs defaults on the associated ribbon </s>
funcom_train/13848290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { if (this == object) { return true; } else if (object == null || getClass() != object.getClass()) { return false; } SslServerEndpointImpl other = ((SslListenEndpoint) object).getImpl(); return serverSubject == other.serverSubject && safeEquals(serverPrincipals, other.serverPrincipals) && port == other.port && Util.sameClassAndEquals(serverSocketFactory, other.serverSocketFactory); } COM: <s> two instances of this class are equal if they have the same actual </s>
funcom_train/51783209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isAlreadyOpen(GeneralDiagram diagram) { for (int i = 0; i < tabbedPane.getTabCount(); i++) { EditorPanel editorPanel = (EditorPanel) tabbedPane.getComponentAt(i); if (editorPanel.getDiagramEditor().getDiagram() == diagram) return true; } return false; } COM: <s> determines whether the specified diagram is already opened in the </s>
funcom_train/4135891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addVolumeNumberPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ArticleBibTexEntry_volumeNumber_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ArticleBibTexEntry_volumeNumber_feature", "_UI_ArticleBibTexEntry_type"), BibtexPackage.Literals.ARTICLE_BIB_TEX_ENTRY__VOLUME_NUMBER, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the volume number feature </s>
funcom_train/24943592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Or getOr(Collection<Bus> buses) { final Set<Bus> uniqueBuses = new LinkedHashSet<Bus>(buses); Or or = orMap.get(uniqueBuses); if (or == null) { or = new Or(uniqueBuses.size()); int i = 0; for (Bus bus : uniqueBuses) { Port port = or.getDataPorts().get(i); port.setBus(bus); i++; } or.propagateValuesForward(); orMap.put(uniqueBuses, or); } return or; } COM: <s> returns an or with the set of buses as inputs </s>
funcom_train/19378939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add( String num ) { if( string_count == 0 || greaterThan( num, strings[string_count-1] ) ) { if( string_count == strings.length ) strings = (String[]) Array.grow( strings, growth_rate ); strings[string_count] = num; string_count++; } else insert( search( num ), num ); } COM: <s> adds the string passed to the array in its proper place sorted </s>
funcom_train/33399186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean complete() { if (!rtpMarker) return false; // need an rtp marker to signify end if (list.size() <= 0) return false; // need at least one fragments with data beyond // the header if (!contiguous()) return false; // missing fragments. TODO: theoretically we could // display a degraded image, but for now we'll // only display complete ones. // TODO: if some of the last ones come in after the marker, we'll // see blank squares in the lower right. return true; } COM: <s> is the frame complete </s>
funcom_train/12863586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Cargo getCargoForTrackingIdByNativeQuery(TrackingId trackingId) { flush(); getEntityManager().clear(); Query query = getEntityManager().createNativeQuery( "select * from Cargo where TRACKINGID = '" + trackingId.getIdentifier() + "'", Cargo.class); return (Cargo) query.getSingleResult(); } COM: <s> need to lookup cargo within the same transaction hsqldb 2 </s>
funcom_train/45238891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sortOn(int aColumnId, boolean asAsc) { super.getLog().warn("sortOn does nothing by default."); // if (aColomnId >=0) { // String columnName = (String)this.jTable.getColumnModel().getColumn(aColomnId).getHeaderValue(); // } } COM: <s> sort the jtable on the given column </s>
funcom_train/29814640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAdd() { LongHeap heap = new LongHeap(1); heap.add(100); // add smaller value heap.add(50); // add greater value heap.add(200); assertEquals("Expected different size", heap.size(), 3); assertEquals(50, heap.removeFirst()); assertEquals(100, heap.removeFirst()); assertEquals(200, heap.removeFirst()); assertEquals("Expected different size", heap.size(), 0); } COM: <s> test the add method </s>
funcom_train/9563881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createResizedImage() { if (originalImage == null) { image = null; } else { image = resize(originalImage, getWidth(), getHeight()); relRect.scale(image.getWidth(), image.getHeight()); offsetX = (getWidth() - image.getWidth()) / 2; offsetY = (getHeight() - image.getHeight()) / 2; } repaint(); } COM: <s> creates resized image and scales selection rectangle </s>
funcom_train/9042941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int next() { long y; if (--left < 0) return (reload()); y = state[next++]; y ^= (y >> 11); y ^= (y << 7) & 0x9D2C5680l; y ^= (y << 15) & 0xEFC60000l; return (int) (y ^ (y >> 18)); } COM: <s> returns the next integer </s>
funcom_train/13595416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(FilterConfig arg0) throws ServletException { log.info("filter method init() begin"); preparedServer[0] = new HessianServer(); preparedServer[1] = new BurlapServer(); if (XMLHelper.isXMLExisting()) sc = XMLHelper.getServiceCharger(); else if (Configuration.isConfigurationExist()) sc = Configuration.getServiceCharger(); else sc = new ServiceCharger(); register(); preparedServer[0].setServiceCharger(sc); preparedServer[1].setServiceCharger(sc); } COM: <s> initial the object context </s>
funcom_train/43098601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MActor buildActor(MNamespace ns, Object model) { if (ns == null) { ns = (MNamespace) model; } MActor actor = (MActor) createActor(); actor.setNamespace(ns); actor.setLeaf(false); actor.setRoot(false); return actor; } COM: <s> builds an actor in the given namespace </s>
funcom_train/2881773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRemainingLifetime() { long currentTime = ((new Date())).getTime(); int elapsedTime = (int) ((currentTime - timestamp) / 1000); int newLifetime = lifetime - elapsedTime; if (lifetime == ServiceURL.LIFETIME_PERMANENT) newLifetime = ServiceURL.LIFETIME_PERMANENT; return newLifetime; } COM: <s> calculates the remaining lifetime of the service </s>
funcom_train/29313411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDensity(double x){ int k = (int)Math.rint(x); if (k < 0 | k > trials) return 0; if (probability == 0){ if (k == 0) return 1; return 0; } else if (probability == 1){ if (k == trials) return 1; return 0; } else return Functions.comb(trials, k) * Math.pow(probability, k) * Math.pow( 1 - probability, trials - k); } COM: <s> this method computes the probability density function in terms of the number </s>
funcom_train/11708935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List createViewMenuItems() { List menuItemList = new ArrayList(); viewCasInitializerPanelMenuItem = new JCheckBoxMenuItem("CAS Initializer Panel"); viewCasInitializerPanelMenuItem.setSelected(casInitializerPanel.isVisible()); viewCasInitializerPanelMenuItem.addActionListener(this); menuItemList.add(viewCasInitializerPanelMenuItem); return menuItemList; } COM: <s> creates jmenu items that should be added to the view menu </s>
funcom_train/46384610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeWFSSnapshot(String name) { WFSSnapshot snapshot = wfsSnapshots.remove(name); if (snapshot == null) { return; } wfsMap.remove(snapshot.getRootPath()); File snapshotDir = new File(snapshotFile, name); if (snapshotDir.exists()) { RunUtil.deleteDir(snapshotDir); } } COM: <s> remove a snapshot from wfs </s>
funcom_train/42385333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Value getDefaultValue() { checkInit(); if (KeyTypes.isSimple(type)) { return type.cast(def); } if (elementType == null) { return null; } if (KeyTypes.isSimple(elementType)) { return type.cast(def); } return null; } COM: <s> returns the default value if this key has a simple type </s>
funcom_train/25187387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetIndex_int_boolean() { System.out.println("setIndex"); if (IGNORE_UNIMPLEMENTED) { return; } int index = 0; boolean enforce = false; Path instance = null; instance.setIndex(index, enforce); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set index method of class path </s>
funcom_train/19051177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean extractLink(AttributeSet a) throws IOException { Object key = a.getAttribute(HTML.Tag.A); if(key != null) { AttributeSet linkAttrs = (AttributeSet) key; startTag(HTML.Tag.A.toString(), linkAttrs); inLink = true; } return inLink; } COM: <s> test if an attribute set contains another attribute set identifying a link </s>
funcom_train/42263463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintBorder(SynthContext ctx, Graphics g, int x, int y, int w, int h, AffineTransform transform) { SeaGlassPainter borderPainter = style.getBorderPainter(ctx); if (borderPainter != null) { paint(borderPainter, ctx, g, x, y, w, h, transform); } } COM: <s> paint the objects border </s>
funcom_train/22024303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stepRungeKutter(float stepsize) { assert stepsize > 0 : "stepsize must be > 0"; RungeKuttaOrder4Stepper.getInstance().step(this, time, time + stepsize); time += stepsize; for(int i = 0; i < stepListeners.size(); i++){ stepListeners.get(i).notifyStep(this, time); } } COM: <s> steps the world forward stepsize seconds using runge kutter of order 4 intergration </s>
funcom_train/7223422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flush(ConsumerContext context){ Event event = getNext("flush()"); boolean completed = false; try{ event.flush(subject_, context); completed = true; } finally{ // see comment in "ensureEOE" about assignment shown below. failed_ = !completed; } if(rewind_){ ensureEOE(); } } COM: <s> examine whether quot flush quot invocation is expected or not </s>
funcom_train/20788923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lowerPriorityThan(CStateMachine smGreater, Canvas canvas) { synchronized(canvas.stateMachines) { if (canvas.stateMachines.remove(this)) { int i = canvas.stateMachines.indexOf(smGreater); if (i != -1) { if ((i + 1) < canvas.stateMachines.size()) { canvas.stateMachines.add(i + 1, this); } else { canvas.stateMachines.add(this); } } } } } COM: <s> makes this state machine having a lower priority than another state </s>
funcom_train/32778698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Object val) { if (type.isAssignableFrom(val.getClass())) { this.value = val; } else { // Backward compatibility: Attempt to store SimTimes as Double if (val instanceof desmoj.core.simulator.SimTime) this.setValue(((desmoj.core.simulator.SimTime)val).getTimeValue()); } } COM: <s> sets the value to o if o is of the correct type </s>
funcom_train/47736116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object getData(Node externalNode) throws FuzzySearchException { // by Dimm Object response = null; // String externalID = externalNode.getChildNodes().item(0).getNodeValue(); try { response = dataProvider.getData(externalNode); } catch (Exception e) { e.printStackTrace(); throw new FuzzySearchException(e); } return response; } COM: <s> call data for evaluating </s>
funcom_train/40334884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double var() { double tmp; tmp = Math.pow(params[LAMBDA], -2.0d / params[A]) * (SpecialMath.gamma(1 + (2.0d / params[A])) - Math.pow(SpecialMath.gamma(1d + (1d / params[A])), 2.0d)); return tmp; } COM: <s> returns the variance of the distribution </s>
funcom_train/20770107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void setProcessingMode(ProcessingMode processingMode) { getSupport().firePropertyChange("processingmode", this.processingMode, processingMode); this.processingMode = processingMode; chip.getPrefs().put("FilterChain.processingMode", processingMode.toString()); } COM: <s> sets whether this chain is procesed in the acquisition or rendering thread </s>
funcom_train/812710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CDK10Molecule createMoleculeFromSMILES(String SMILES) throws BioclipseException { SmilesParser parser=new SmilesParser(DefaultChemObjectBuilder.getInstance()); try { org.openscience.cdk.interfaces.IMolecule mol=parser.parseSmiles(SMILES); return new CDK10Molecule(mol); } catch (InvalidSmilesException e) { throw new BioclipseException("SMILES string is invalid"); } } COM: <s> create molecule from smiles </s>
funcom_train/27929963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDropTableScript(Scripter gen) { try { String script = ""; script += "DROP TABLE " + gen.getFullPrefix() + ddlName(); script += gen.getGo(); return script; } catch (Exception e) { System.err.println(e.getMessage()); return ""; } } COM: <s> returns a ddl script to drop the table </s>
funcom_train/10286109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder sb = new StringBuilder(); Iterator iterator = cards.iterator(); while (iterator.hasNext()) { Card card = (Card) iterator.next(); sb.append(card); if (iterator.hasNext()) { sb.append('+'); } } return sb.toString(); } COM: <s> return string representation of pack </s>
funcom_train/27822599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPopupMenu createPopupMenu(String popupMenuID) { Element element=getConfigurationNode("popupmenu","key",popupMenuID); LocalizedMenuBuilder menuBuilder=new LocalizedMenuBuilder(m_localizationManager,this,m_actions); return menuBuilder.createPopupMenu(element); } COM: <s> creates a popup menu from the gui specification with given key </s>
funcom_train/5872946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void modifyPlotData(PlotData pd) { if (_mdyDataList == null) _mdyDataList = new LinkedList(); _mdyDataList.add(pd); if (getAttribute(ATTR_ON_MODIFY_DATA_RESPONSE) == null) { setAttribute(ATTR_ON_MODIFY_DATA_RESPONSE, Boolean.TRUE); Events.postEvent(-20000, "onModifyDataResponse", this, null); } } COM: <s> modify a plot data in the plotinfo </s>
funcom_train/32622266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void push() { if (index == highWater) { trail.add(new Node[MAX_VAR]); highWater++; } Node[] newenv = (Node[]) trail.get(++index); System.arraycopy(environment, 0, newenv, 0, MAX_VAR); environment = newenv; } COM: <s> save the current environment on an internal stack </s>
funcom_train/14520176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IRaAdminSessionLocal getRAAdminSession() { if (raadminsession == null) { try { IRaAdminSessionLocalHome raadminsessionhome = (IRaAdminSessionLocalHome) getLocator().getLocalHome(IRaAdminSessionLocalHome.COMP_NAME); raadminsession = raadminsessionhome.create(); } catch (CreateException e) { throw new EJBException(e); } } return raadminsession; } //getRAAdminSession COM: <s> gets connection to ra admin session bean </s>
funcom_train/17922679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddToFile() { System.out.println("addToFile"); String data = "ARMIN"; String file = "d:/A/armin.txt"; FileHandling.addToFile(data, file); System.out.println("Source: " + file); System.out.println("Data: " + data); } COM: <s> test of add to file method of class eu </s>
funcom_train/46581028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File file) { if (dirs && file.isDirectory()) { return true; } String extn = UtilsFile.getExtension(file.getName()); if (extn != null) { for (int i = 0; i < extns.length; i++) { if (extn.equals(extns[i])) { return true; } } } return false; } COM: <s> accepts appropriate directories and files </s>
funcom_train/43258777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTimeLeft(){ // prevent divide by 0 zero if(m_speed != 0){ // Averages the speed + prevents divide by zero safe long time = (m_bytesTotal - m_bytes)/m_speed; String duration = "Time Remaining: "; getTime.time = time; duration += getTime.run(YEAR,"y"); duration += getTime.run(MONTH,"mo"); duration += getTime.run(WEEK,"w"); duration += getTime.run(DAY,"d"); duration += getTime.run(HOUR,"h"); duration += getTime.run(MINUTE,"m"); duration += getTime.run(SECOND,"s"); return PaddedString.rpad(duration,40); } return "Infinite time"; } COM: <s> method get time left </s>
funcom_train/25881389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { if (infiniteProgressAdapter != null) infiniteProgressAdapter.animationStopping(); if (animation != null) { animation.interrupt(); try { animation.join(); } catch (final InterruptedException ie) {} animation = null; animation = new Thread(new Animator(false)); animation.start(); } } COM: <s> stops the waiting animation by stopping the rotation of the circular </s>
funcom_train/17983644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String addColumnStatement(Column column, String tableName, String afterColumn) { Validator.notNull(column, "Column can not be null"); Validator.notNull(tableName, "Table name can not be null"); StringBuffer alter = new StringBuffer(); alter.append("ALTER TABLE ") .append(wrapName(tableName)) .append(" ADD ") .append(makeColumnString(column)); return alter.toString(); } COM: <s> alter table table name add column </s>
funcom_train/42642962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addVocabularyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IVocabularyEntry_vocabulary_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IVocabularyEntry_vocabulary_feature", "_UI_IVocabularyEntry_type"), DigitalHPSPackage.Literals.IVOCABULARY_ENTRY__VOCABULARY, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the vocabulary feature </s>
funcom_train/29764477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createListeners() { getDocument().addDocumentListener(new DocumentListener() { public void insertUpdate(DocumentEvent e) { firePropertyChange("text", null, getText()); } public void removeUpdate(DocumentEvent e) { firePropertyChange("text", null, getText()); } public void changedUpdate(DocumentEvent e) { firePropertyChange("text", null, getText()); } }); } COM: <s> adds a code document listener code to the field </s>
funcom_train/20764443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void setFontSize(int fontSize) { if (this.fontSize != fontSize) { this.fontSize = fontSize; textRenderer = new TextRenderer(new Font("SansSerif", Font.PLAIN, getFontSize()), true, true); } } COM: <s> sets a new font size for the axes labels and title </s>
funcom_train/4550669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void backToList() { ResourceBundle labels = FacesContext.getCurrentInstance().getApplication().getResourceBundle(FacesContext.getCurrentInstance(), "labels"); recursoBean.clear(); recursoBean.setListState(); recursoBean.setRecursos(recursoDaoImpl.findAll(Recurso.class)); recursoBean.setPageMessage(labels.getString("info.paginaLista")); recursoBean.setSelecaoRecurso(null); } COM: <s> responsible for go back to the list state </s>
funcom_train/11074837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object functionStringLength(EvalContext context) { String s; if (getArgumentCount() == 0) { s = InfoSetUtil.stringValue(context.getCurrentNodePointer()); } else { assertArgCount(1); s = InfoSetUtil.stringValue(getArg1().computeValue(context)); } return new Double(s.length()); } COM: <s> string length implementation </s>
funcom_train/36248171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removePendingColumn(final String table, final String column) { List<String> columns = this.pendingColumns.get(table); if (columns != null) { boolean result = columns.remove(column); if (columns.isEmpty()) { this.pendingColumns.remove(table); } return result; } return false; } COM: <s> removes temporary attribute when its no longer needed </s>
funcom_train/51357548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attributeAdded(final HttpSessionBindingEvent event) { log.info("Attribute Added : " + event.getName() + " = " + event.getValue()); if (event.getName().equals(USER_KEY)) { String username = (String) event.getValue(); log.info("User Logged In : " + username); addUsername(username); } } COM: <s> this method is designed to catch when users login and record their name </s>
funcom_train/31931923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent ae) { debug(this, "About selected"); JOptionPane.showMessageDialog(BlitzGui.this, "Blitz Testing Platform, Version " + Version.versionString() + "\n\nDesigned & Developed by David D. McLeod", "About", JOptionPane.INFORMATION_MESSAGE); } COM: <s> specify what to do when the action is invoked by the user </s>
funcom_train/36489846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processRequest(String connectionURL) { try { MySQLProjectDAO.getInstance().connectToDB(connectionURL); } catch(SQLException ex) { FlightTestData.getInstance().setTestData(); } catch(ClassNotFoundException ex) { FlightTestData.getInstance().setTestData(); } } COM: <s> this function processes the given string and determines if </s>
funcom_train/2636631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand() { if (backCommand == null) {//GEN-END:|40-getter|0|40-preInit // write pre-init user code here backCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|40-getter|1|40-postInit // write post-init user code here }//GEN-BEGIN:|40-getter|2| return backCommand; } COM: <s> returns an initiliazed instance of back command component </s>
funcom_train/11070273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getClassPath() { logger.debug("BSFManager:getClassPath"); if (classPath == null) { try { classPath = System.getProperty("java.class.path"); } catch (Throwable t) { logger.debug("[BSFManager] Exception :", t); // prolly a security exception .. so no can do } } return classPath; } COM: <s> get class path </s>
funcom_train/10452001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeYoungest(FastRemovalDequeue<JspServletWrapper>.Entry unloadHandle) { if (log.isTraceEnabled()) { JspServletWrapper jsw = unloadHandle.getContent(); log.trace(Localizer.getMessage("jsp.message.jsp_queue_update", jsw.getJspUri(), context.getContextPath())); } jspQueue.moveFirst(unloadHandle); } COM: <s> push unload handle for jsp servlet wrapper to front of the queue </s>
funcom_train/51114658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HTTPMessageWrapper createHTTPMessageWrapper(String message) { if (m_wrapperFactory == null) throw new NullPointerException("Before an HTTPTransceiver will work, you must define the class name of the MessageWrapperFactory to be used. Call 'setMessageWrapperFactoryClassName()'."); return m_wrapperFactory.createHTTPMessageWrapper(message); } COM: <s> return a httpmessage wrapper for the given message </s>
funcom_train/49155271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteAccount(String user, String pass) { JuicyAccount deleteAccount = JuicyAccountDao.getInstance().find(user, pass); if (deleteAccount == null) { return false; } else { Session session = HibernateUtil.getSession(); try { HibernateUtil.beginTransaction(); session.delete(deleteAccount); HibernateUtil.commitTransaction(); } catch (HibernateException exception) { log.error(exception); throw exception; } deleteFolder(new File("usr" + File.separator + deleteAccount.getJaUser().toLowerCase())); return true; } } COM: <s> deletes an account with the given username and password </s>
funcom_train/18475685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean md5SumMatch(String md5Sum, File file) { Checksum md5sumTask = new Checksum(); String verifyProp = "true"; //set the required ANT parms md5sumTask.setProperty(md5Sum); md5sumTask.setVerifyproperty(verifyProp); md5sumTask.setFile(file); log("Checking md5sum/checksum - " + md5sum); md5sumTask.execute(); verifyProp = md5sumTask.getVerifyProperty(); log("Checking md5sum/verifyProp - " + verifyProp); if (verifyProp.equalsIgnoreCase("true")) return true; else return false; } COM: <s> perform an md5sum check on the zip file tarball </s>
funcom_train/2712808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeVisible(final boolean boolFlag) { try { if (SwingUtilities.isEventDispatchThread()) { setVisible(boolFlag); } else { SwingUtilities.invokeAndWait(new Runnable() { public void run() { setVisible(boolFlag); } }); } } catch (Exception ex) { Logger.logWarning( "Could not change visibility of progress indicator to: " + boolFlag, ex); } } COM: <s> changes the visibility of progress indicator </s>
funcom_train/16463019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void duplicateSelected(Object formsList) { Form selected = getForm(uiController.getSelectedItem(formsList)); Form clone = new Form(selected.getName() + '*'); for (FormField oldField : selected.getFields()) { FormField newField = new FormField(oldField.getType(), oldField.getLabel()); clone.addField(newField, oldField.getPositionIndex()); } this.formsDao.saveForm(clone); this.refresh(); } COM: <s> duplicates the selected form </s>
funcom_train/19066024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mail(Address from) throws IOException, SMTPException { ensureState(PLAIN); try { sendCommand("MAIL", new String[] { "FROM:" + from.getCanonicalMailAddress() }); SMTPResponse response = readSingleLineResponse(); if (response.isERR()) throw new SMTPException(response); } catch (SocketException e) { // Catch the exception if it was caused by // dropping the connection if (state != NOT_CONNECTED) throw e; } } COM: <s> sends a mail command which specifies the senders email address and </s>
funcom_train/25231021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean areAllSubOperationsSuccessful() { // If there are any child operations that were not successful then return false. if ( null != this.childOperations ) { for ( SimpleFileOp childOperation: childOperations ) { if ( false == childOperation.fileOperationStatus.successful || false == childOperation.areAllSubOperationsSuccessful() ) { return false; } } } return true; } COM: <s> returns true if this operation and all sub operations completed successfully </s>
funcom_train/10209338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onSimulationError(Exception e) { JOptionPane.showMessageDialog(null, "An error occured during the sumo simulation: " + e.getMessage(), "Simulation error", JOptionPane.WARNING_MESSAGE); logger.error(e); this.stopButton.setEnabled(false); this.simulationRunning = false; this.notifyObservers(new ObserverNotification(NotificationType.simulationFinished, simSettings.getSumoCfgFile())); } COM: <s> slot that is invoked whenever a simulation error occurs </s>
funcom_train/3325710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMerge(String var_, byte value_) { int idx = f.getVarIdx(var_); byte oldValue = varVals[idx]; if (oldValue != C_DC) { if ((value_ != C_DC) && (oldValue != value_)) { varVals[idx] = C_VOID; cubeVoid = true; } } else varVals[idx] = value_; } COM: <s> set a given variable to a given value </s>
funcom_train/29296745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector retrieveObjectsMatching(StrataObject anObject, Query aQuery) { TunnelAgent theRequestAgent = new TunnelAgent(); theRequestAgent.setServiceObject(anObject); theRequestAgent.setServiceObjectMethodName("retrieveObjectsMatching"); theRequestAgent.addParameter(aQuery); theRequestAgent.setReturnObjectType(Vector.class); TunnelAgent theResponseAgent = service(theRequestAgent); Vector theVector = (Vector)theResponseAgent.getReturnObject(); return theVector; } COM: <s> retrieve objects matching method comment </s>
funcom_train/36147792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return getBuffer().toString() + ((getBufferEnd() != null && !"".equals(getBufferEnd().toString().trim())) ? (RESERVED_SEPARATOR_BUFFER + getBufferEnd().toString()) : ""); } COM: <s> convert the data in code string buffer code to a string </s>
funcom_train/23645406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasTwoBondsConnection(Atom neighbour) { boolean have = false; if (m_internalBonds != null && neighbour.m_internalBonds != null) { bondsloop: for (InternalBond b1 : m_internalBonds) { for (InternalBond b2 : neighbour.m_internalBonds) { if (b1.m_neighbour == b2.m_neighbour) { have = true; break bondsloop; } } } } return have; } COM: <s> determines whether tow atoms have a third in the middle a x b </s>
funcom_train/5245508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void openBluetooth() throws NXTCommException { comm = NXTCommFactory.createNXTComm(NXTCommFactory.BLUETOOTH); nxt = new NXTInfo(NXTCommFactory.BLUETOOTH, btname, btaddress); comm.open(nxt, NXTComm.PACKET); out = new DataOutputStream(comm.getOutputStream()); in = new DataInputStream(comm.getInputStream()); } COM: <s> stolen from lego jason nxt by andreas schmidt jensen </s>
funcom_train/16487811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFormat() { if (this.format != null) { return this.format; } final ValueBinding vb = this.getValueBinding("format"); final String v = vb != null ? (String) vb.getValue(this.getFacesContext()) : null; return v != null ? v : "png"; } COM: <s> format attribute default value is png </s>
funcom_train/33798888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void create_Lebensmittel_Abstrakt_Lieferant_Einkaufszettel(int id_Lebensmittel_Abstrakt_Lieferant_Einkaufszettel, Lebensmittel_Abstrakt_Lieferant product, int anzahl, Connection con, Einkaufszettel einkaufszettel) { Lebensmittel_Abstrakt_Lieferant_Einkaufszettel list2 = new Lebensmittel_Abstrakt_Lieferant_Einkaufszettel(product, einkaufszettel, id_Lebensmittel_Abstrakt_Lieferant_Einkaufszettel); con.add(list2); } COM: <s> create a new product on a specified list </s>
funcom_train/7959357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ToolBarConstraints getInsertionContraintsAt(Component draggedComponent, Point p){ boolean isHorizontal = panel.getOrientation() == SwingConstants.HORIZONTAL; if (isHorizontal){ return getHorizontalInsertionContraintsAt(draggedComponent, p); } else { // vertical return getVerticalInsertionContraintsAt(draggedComponent, p); } } COM: <s> returns a proposed too bar contraints for a given insertion point </s>
funcom_train/3077570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean matchPatterns(String patterns, String pName) { if (patterns == null) { return false; } StringTokenizer exStr = new StringTokenizer(patterns, ","); while (exStr.hasMoreTokens()) { if (DirectoryScanner.match(exStr.nextToken(), pName)) { return true; } } return false; } COM: <s> convenience method to see if a string match a one pattern </s>
funcom_train/4535950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void leaveChatRoom(ChatRoom room) { // Notify that the chatroom has been left. fireChatRoomLeft(room); room.leaveChatRoom(); final PacketListener listener = presenceMap.get(room.getRoomname()); if (listener != null && SparkManager.getConnection().isConnected()) { SparkManager.getConnection().removePacketListener(listener); } } COM: <s> leaves a chat room </s>
funcom_train/15616551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getBlockedByUsername() { String result = null; try { result = WikiBase.getDataHandler().lookupWikiUser(this.getBlockedByUserId()).getUsername(); } catch (DataAccessException e) { logger.error("Failure while trying to retrieve username for user with ID " + this.getBlockedByUserId(), e); } return result; } COM: <s> utility method for retrieving the username of the user who applied the </s>
funcom_train/21081436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectionChanged(IAction action, ISelection selection) { Object target = selection; if(target instanceof StructuredSelection) { target = ((StructuredSelection)selection).getFirstElement(); } boolean canExecute = target != null; canExecute &= target instanceof ITextSelection ||target instanceof IClassFile; action.setEnabled(canExecute); } COM: <s> selection in the workbench has been changed </s>
funcom_train/40839484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateEmptyInstance() { InstanceGenerator<DetailedTestDto> generator = getInstanceGeneratorBuilder(DetailedTestDto.class).build(); DetailedTestDto dto1 = generator.generate(); assertNotNull("should create instances", dto1); DetailedTestDto dto2 = generator.generate(); assertNotNull("should create instances", dto2); assertEquals("should both be the same", dto1, dto2); } COM: <s> tests the creation of an empty instance if no value generators are </s>
funcom_train/6331007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFailures(TestResult result) { String failures = ""; if (result.failureCount() != 0) { if (result.failureCount() == 1) { failures += "\nThere was 1 failure:\n"; } else { failures += "\nThere were " + result.failureCount() + " failures:\n"; } failures += getFailureDetails(result); } return failures; } COM: <s> gathers the failures </s>
funcom_train/18747823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NodeRelation computeChoice(RegExpr.Choice expr, List<NodeRelation> args) { Iterator<NodeRelation> argsIter = args.iterator(); NodeRelation result = argsIter.next(); while (argsIter.hasNext()) { NodeRelation operand = argsIter.next(); result.doOr(operand); } return result; } COM: <s> computes the union of the </s>
funcom_train/20803852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadIndex() throws FileNotFoundException, IOException { File indexFile = new File (this.dictionaryFileName + ".iidx"); FileChannel indexChannel = new RandomAccessFile (indexFile, "r").getChannel(); this.index = indexChannel.map (FileChannel.MapMode.READ_ONLY, 0, (int)indexChannel.size()).asIntBuffer(); } COM: <s> loads an existing index file </s>
funcom_train/27841615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List search() { List files = new ListModel(new ArrayList()); FilenameFilter nameFilter = new Perl5FilenameFilter(getFileNamePattern()); ComplexFileFilter filter = new ComplexFileFilter(); filter.nameFilter = nameFilter; if (isDateCriteriaEnabled()) { dateCriteria.prepareFilter(filter); } new SearchThread(files, roots(), filter).start(); return files; } COM: <s> creates background thread and search files </s>
funcom_train/37566120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasMoreElements() { boolean result = false; // // Go through Enumerations until we find one with // hasMoreElements() == true. (Or until we run out // of Enumerations.) // for (; curEnum < enumerations.length; curEnum++) { result = enumerations[curEnum].hasMoreElements(); if (result) { break; } } return result; } COM: <s> go through all the dbsection reader items in </s>
funcom_train/37721601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void viewTable() { if (isTableSelection()) { Table table = getSelectedTable(); TableView view = (TableView) ViewManager.getInstance() .showInFrame(TableView.class, "Table: " + table.getName(), "table-view"); try { view.load(table); } catch (DBProphetException e) { Util.alert(this, e); } } } COM: <s> view the selected table </s>
funcom_train/43882587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Class getGeometryClass(int wkbGeometryType) { if (wkbGeometryType < 0) throw new IllegalArgumentException("Can't have a negative type"); int mask25d = 0x80000000; int unmaskedType = wkbGeometryType & ~mask25d; if (wkbGeometryType >= OGR_GEOM_TYPES.length) { LOGGER.warning("Could not recognize geometry type " + wkbGeometryType + ". Assuming it's a new type and handling as a string"); return Geometry.class; } return OGR_GEOM_TYPES[unmaskedType]; } COM: <s> turns a wkb geometry type into the best corresponding geometry class we can </s>
funcom_train/27939419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInvisible() { if(getFormularFieldDefinition () == null) { return false; } Invisible invisible = getFormularFieldDefinition ().getInvisible (); if(invisible != null) { ConditionHelper conditionHelper = new ConditionHelper(); return conditionHelper.isValid (invisible.getCondition (), getContext ()); } return false; } COM: <s> is field invisible </s>
funcom_train/13712363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printDevices(){ System.out.println("\n<<< available proCONTROLL devices: >>>\n"); for (int i = 0; i < devices.size(); i++){ System.out.print(" "+i+": "); System.out.println(((ControllDevice) devices.get(i)).getName()); } System.out.println("\n<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); } COM: <s> lists the available devices in the console window </s>