__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/44308179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AssociationRule getAssociationRule(Object premise,Object conclusion) { AssociationRuleKey associationRuleKey=new AssociationRuleKey(premise,conclusion); AssociationRule associationRule=(AssociationRule)m_rules.get(associationRuleKey); if (associationRule==null) { associationRule=new AssociationRule(associationRuleKey); m_rules.put(associationRuleKey,associationRule); } return associationRule; } COM: <s> returns the association rule with given premise and conclusion </s>
funcom_train/42225491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void findNextFleet() { logger.info("Inside FleetManager.findNextFleet()"); int currentFleetIndex = fleetList.indexOf(currentFleetNode); do { currentFleetIndex++; if (currentFleetIndex == fleetList.size()) currentFleetIndex = 0; currentFleetNode = fleetList.get(currentFleetIndex); } while (currentFleetNode.getFleet().getOwner() != gameManager.playerRace); } COM: <s> find the next fleet belonging to the player </s>
funcom_train/9157317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Filter getFilter() { if (useCartesian){ return new SerialChainFilter(new Filter[] {cartesianFilter, distanceFilter}, new int[] {SerialChainFilter.AND, SerialChainFilter.SERIALAND}); } return new SerialChainFilter(new Filter[] {latFilter, lngFilter, distanceFilter}, new int[] {SerialChainFilter.AND, SerialChainFilter.AND, SerialChainFilter.SERIALAND}); } COM: <s> create a distance level1query using </s>
funcom_train/21105685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MJComboBox_NACO getCbBS_Account() { if (cbBS_Account == null) { cbBS_Account = new MJComboBox_NACO(false); cbBS_Account.setPreferredSize(new java.awt.Dimension(100, 20)); } return cbBS_Account; } COM: <s> this method initializes cb bs account </s>
funcom_train/37074992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAllStyleFilesString() { if (styleFiles.size()==0) return null; String files = (String)styleFiles.get(0); for (int i=1; i<styleFiles.size(); i++) files += ", "+styleFiles.get(i); return files; } COM: <s> returns a string of all the style files used to create this file </s>
funcom_train/37827505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getDataFile(int session_id) { Vector datafile = new Vector(); try { Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery( "SELECT File_Data FROM cve.session WHERE Session_ID = " + session_id); rs.next(); Clob clob = rs.getClob(1); BufferedReader instream = new BufferedReader(clob.getCharacterStream()); String string; while((string = instream.readLine()) != null) { datafile.add(string); } rs.close(); stmt.close(); con.close(); } catch (java.lang.Exception ex) { ex.printStackTrace(); } return datafile; } COM: <s> p gets datafile for a session p </s>
funcom_train/3370813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRowHeight(int rowHeight) { if (rowHeight <= 0) { throw new IllegalArgumentException("New row height less than 1"); } int old = this.rowHeight; this.rowHeight = rowHeight; rowModel = null; if (sortManager != null) { sortManager.modelRowSizes = null; } isRowHeightSet = true; resizeAndRepaint(); firePropertyChange("rowHeight", old, rowHeight); } COM: <s> sets the height in pixels of all cells to code row height code </s>
funcom_train/13755242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getTextAsVector() { Vector textV = new Vector(); // Set to the start of the file int walkPos = 0; // Start walking the file, looking for the records while(walkPos != -1) { int newPos = findTextRecords(walkPos,textV); walkPos = newPos; } // Return what we find return textV; } COM: <s> fetches the all the text of the powerpoint file in a vector of </s>
funcom_train/5725335
/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; } if (!(object instanceof InstituteInfo)) { return false; } final InstituteInfo that = (InstituteInfo) object; if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) { return false; } return true; } COM: <s> returns code true code if the argument is an institute info instance </s>
funcom_train/40729950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDirectoryServicesInternal() throws Exception { setUpDsInternal(); testAuthentication("Admin", "livelink"); assertFalse("External user who shouldn't be able to log in " + "through the internal web server", authenticate("llglobal-external", "Gibson")); } COM: <s> tests using the directory services enabled livelink through </s>
funcom_train/21041750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String deRegisterAgent(AgentIDInterface objAgentId) { if (hashAgentRegistry.get(objAgentId.getAgentName()) == null) { return "No Agent found with the corresponding AgentIDImpl"; } hashAgentRegistry.remove(objAgentId.getAgentName()); return "Agent deregistered Successfully"; } COM: <s> this method accepts an agent id and de registers that agent from agent </s>
funcom_train/7720631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doNetbookSetup() { Editor editor=(Editor)getJPE().getEditor(); editor.setWindowSize(640,480); getJPE().say("Switched to Netbook setup"); getJPE().putProperty("setup","machine","netbook"); } COM: <s> switch to netbook setup </s>
funcom_train/33282831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String jsxGet_responseText() { if (webResponse_ != null) { return webResponse_.getContentAsString(); } if (LOG.isDebugEnabled()) { LOG.debug("XMLHttpRequest.responseText was retrieved before the response was available."); } return ""; } COM: <s> returns a string version of the data retrieved from the server </s>
funcom_train/21953645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRecipients(Address[] pRecipients, Message.RecipientType type) { if (type == Message.RecipientType.TO) toList = pRecipients; else if (type == Message.RecipientType.CC) ccList = pRecipients; else if (type == Message.RecipientType.BCC) bccList = pRecipients; } COM: <s> sets the recipients for the particular type </s>
funcom_train/48747553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getExpiresAt() throws AuthValidationException { if (vq == null) { throw new AuthValidationException("Use loadQueueEntry(...) method first"); } try { Date ex = vq.getFieldDate(vq.FLD_EXPIRES_AT); return ex; } catch (DBException dbe) { throw new AuthValidationException("DB error", dbe); } } COM: <s> method to retrieve the absolute date time when the request expires </s>
funcom_train/44340543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Type getType() { // New Amine 2.5 : Adil return type; /***** Old Enumeration fathers = this.getFathers(); if (fathers == null || !fathers.hasMoreElements()) return null; else return (Type) fathers.nextElement(); // An individual has one father; its type *****/ } COM: <s> get the immediate type of the current individual </s>
funcom_train/33606627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHasNext(){ System.out.println("hasNext"); assertEquals("i1",true,instance1.hasNext()); assertEquals("i2",true,instance2.hasNext()); assertEquals("i3",true,instance3.hasNext()); assertEquals("i4",false,instance4.hasNext()); } COM: <s> test of has next method </s>
funcom_train/31406180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void docUpdate(DocumentEvent evt) { try { Document doc = evt.getDocument(); String text = doc.getText(0, doc.getLength()); updateObject(text); } catch (javax.swing.text.BadLocationException e) { // this should not happen e.printStackTrace(); } } COM: <s> update the persistent object on a document event </s>
funcom_train/39407784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getJListFiles() { if (jListFiles == null) { jListFiles = new JList(); jListFiles.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { showFile(jListFiles.getSelectedIndex()); } }); fileListModel = new DefaultListModel(); jListFiles.setModel(fileListModel); refresh(); } return jListFiles; } COM: <s> this method initializes j list backup </s>
funcom_train/20824209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void previous() { Cues cues = context.getShow().getCues(); execute(new LayerPreviousCue(Lanbox.ENGINE_SHEET)); int index = cues.getCurrentIndex(); index--; if (index < 0) { index = -1; } cues.setCurrent(index); } COM: <s> issues a lanbox previous cue command and makes the </s>
funcom_train/31873644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddReal(){ Value v = _rv1.add(_rv2); assertTrue("Return type check.", v instanceof RealValue); assertEquals(7.0, ((RealValue)v).doubleValue(), 0.00001); assertEquals(new RealValue(7), v); } COM: <s> tests addition of two real values </s>
funcom_train/51646066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TypeSet addedTo(TypeSet that) { if (isUniverse() || that.isUniverse()) return getTypeSetEnvironment().getUniverseTypeSet(); if ((this instanceof EnumeratedTypeSet || this instanceof SingletonTypeSet) && (that instanceof EnumeratedTypeSet || that instanceof SingletonTypeSet)) { EnumeratedTypeSet result= enumerate(); result.addAll(that); return result; } return new TypeSetUnion(this, that); } COM: <s> returns the type set resulting from unioning the receiver with the argument </s>
funcom_train/892009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelect(FieldValue[] filterConstraint, FieldValue[] orderConstraint, String sqlFilter, FieldValue[] sqlFilterParams) { this.filterConstraint = filterConstraint; this.orderConstraint = orderConstraint; this.sqlFilter = sqlFilter; this.sqlFilterParams = sqlFilterParams; } COM: <s> set the filter constraint and order constraint used to build the sql select </s>
funcom_train/11658080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void log(Context context, String id) { StringBuffer sb = (StringBuffer) context.get("log"); if (sb == null) { sb = new StringBuffer(); context.put("log", sb); } if (sb.length() > 0) { sb.append('/'); } sb.append(id); } COM: <s> p log the specified code id code into a string buffer attribute </s>
funcom_train/29611962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startElement(String uri, String localName, String qName, Attributes attributes) { String elName = localName; if (elName == null) elName = qName; if (elName.equals(XmlProperty.EL_NAME)) { XmlProperty prop = new XmlProperty(); prop.setParser(theReader, this, elName, attributes); } } COM: <s> receive notification of the start of an element </s>
funcom_train/3341310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ARPNetworkLayer getARP() throws NetworkException { if (arp == null) { try { arp = (ARPNetworkLayer) NetUtils.getNLM().getNetworkLayer( EthernetConstants.ETH_P_ARP); } catch (NoSuchProtocolException ex) { throw new NetworkException("Cannot find ARP layer", ex); } } return arp; } COM: <s> gets the arp service </s>
funcom_train/26413202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkPopup( MouseEvent e ) { if( e.isPopupTrigger() ) { popupMenu = desktop.getMenuBar().createPanelPopupMenu( this ); if( popupMenu != null ) { popupMenu.show( this, e.getX(), e.getY() ); popupMenu.addPopupMenuListener( this ); } } } COM: <s> check if the menu needs popping up </s>
funcom_train/35691513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object saveState(FacesContext _context) { Object _values[] = new Object[4]; _values[0] = super.saveState(_context); _values[1] = this.doctypePublic; _values[2] = this.doctypeRoot; _values[3] = this.doctypeSystem; return _values; } COM: <s> p save the state of this component </s>
funcom_train/41251396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeUser(User user) { if (!(this == user.getDatabase())) { throw new IllegalArgumentException("User not associated with this database"); } log.debug("Removing user '" + user.getUsername() + "'"); synchronized (users) { users.remove(user.getUsername()); } } COM: <s> remove the specified </s>
funcom_train/2886769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String extractLastPathElement(String systemId) { int lastSlash = systemId.lastIndexOf('/'); if (lastSlash == -1) { return null; } String endString = systemId.substring(lastSlash + 1); if (endString.length() > 0) { return endString; } else { return null; } } COM: <s> strip off everything after the last forward </s>
funcom_train/39273062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UPMError removeUser(int userID) { UPMError upme = UPMError.SUCCESS; if(!EntityUtil.EntityExists(userID,users)) return (upme = UPMError.ENTITY_DOES_NOT_EXIST); removeAdminFromAllProjects(userID); removeUserFromAllProjects(userID); int pos = EntityUtil.getEntityPosition(userID, users); users.remove(pos); return upme; } COM: <s> removes a user from the system also removes him from all projects </s>
funcom_train/48190480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(PosPolicyForm entity) { LogUtil.log("saving PosPolicyForm instance", Level.INFO, null); try { entityManager.persist(entity); LogUtil.log("save successful", Level.INFO, null); } catch (RuntimeException re) { LogUtil.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved pos policy form entity </s>
funcom_train/45076670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NameService getNameService() { if (ns != null) return ns; if (nameServiceIOR != null && !nameServiceIOR.equals("")) nameService = nameServiceIOR; if (service == null) service = ServiceFactory.getSSLService(); if (service != null) ns = new NameService(service, nameService); else ns = new NameService(the_orb, nameService); return ns; } COM: <s> set up and return the nameservice </s>
funcom_train/5864977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String name) { if (name != null && name.length() == 0) name = null; if (!Objects.equals(_name, name)) { _name = name; if (_name != null) smartUpdate("z.name", _name); else invalidate(); //1) generate _value; 2) add submit listener } } COM: <s> sets the name of this component </s>
funcom_train/27824822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireSelectedEntitiesChanged() { m_oimodelerViewable.getSmartActionMap().updateActions(); EventListener[] listeners=m_eventListenerList.getListeners(OIModelerSelectionListener.class); for (int i=0;i<listeners.length;i++) ((OIModelerSelectionListener)listeners[i]).selectedEntitiesChanged(this); } COM: <s> fires the notification that the selected entities have changed </s>
funcom_train/47958861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean filterFile(int depth, int fileSize, String contentType, int downloadedLinks, Doc doc) { if (filterDepth(depth)) { return true; } if (filterDownloadedLinks(downloadedLinks)) { return true; } if (filterFileSize(fileSize)) { return true; } if (filterContentType(contentType)) { return true; } if (filterUrlRegexp(doc.getUrl().toString())) { return true; } if (filterWithCustomFilters(doc)) { return true; } return false; } COM: <s> decide if file should be filtered </s>
funcom_train/21633556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInt(String name, boolean required, int defaultValue) { String str = getString(name,required,null); if( str==null ) return defaultValue; try { return Integer.parseInt(str); } catch(NumberFormatException ex) { throw new EncogError("Property " + name + " has an invalid value of " + str + ", should be valid integer."); } } COM: <s> get a param as a integer </s>
funcom_train/8664357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONObject toJSONObject(final JSONArray names) throws JSONException { if ((names == null) || (names.length() == 0) || (this.length() == 0)) { return null; } final JSONObject jo = new JSONObject(); for (int i = 0; i < names.length(); i += 1) { jo.put(names.getString(i), this.opt(i)); } return jo; } COM: <s> produce a jsonobject by combining a jsonarray of names with the values of </s>
funcom_train/21974935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { EdaObject eo = null; try { Constructor con = getClass().getConstructor(new Class[0]); eo = (EdaObject)(con.newInstance(new Object[0])); } catch (Exception e) { System.out.println("ERROR: Cannot get constructor in EdaObject.clone"); } /*try { eo = (EdaObject)(super.clone()); } catch (CloneNotSupportedException e) { System.out.println("ERROR: Clone not supported"); }*/ eo.copyProperties(this); return eo; } COM: <s> implements the code cloneable code interface </s>
funcom_train/25838244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finalize() { if(STATE != STATE_FINALIZED) { STATE = STATE_FINALIZED; for (Iterator iterator = groups.iterator(); iterator.hasNext();) { Group grp = (Group) iterator.next(); grp.finalize(); grp.setMaterial(materials.get(grp.getMaterialName())); } for (Iterator<Material> iterator = materials.values().iterator(); iterator.hasNext();) { Material mtl = iterator.next(); mtl.finalize(); } } } COM: <s> convert all dynamic arrays to final non alterable ones </s>
funcom_train/50501545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void downButton_actionPerformed(ActionEvent e) { int i = table.getSelectedRow(); if(i < table.getRowCount()){ moveRow((String)table.getValueAt(i,0) , i, false); table.changeSelection(i+1,1,false,false); checkButtons(); } } COM: <s> down button action </s>
funcom_train/22447872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(TestModel tm) { Component[] components = this.getComponents(); for( int i=0; i<components.length; i++ ){ // foreach JCheckBox component if( components[i].getClass().equals(JCheckBox.class) ){ JCheckBox cb = (JCheckBox) components[i]; // setSelected based on it's text cb.setSelected( tm.isTestSelected( cb.getText() ) ); } } } COM: <s> this methods initialize test console with the specified </s>
funcom_train/2957007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int orderEqualSizedItems(Model model, int fromIndex) { final int n = getNbItems() - 1; int nbC = 0; for (int i = fromIndex; i < n; i++) { if(sizes[i].getValue() == sizes[i+1].getValue()) { model.addConstraint(leq(bins[i],bins[i + 1])); nbC++; } } return nbC; } COM: <s> symmetry breaking equal sized items are ordered according to their indices </s>
funcom_train/34340363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getSalirGeneral() { if (SalirGeneral == null) {//GEN-END:|25-getter|0|25-preInit // write pre-init user code here SalirGeneral = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|25-getter|1|25-postInit // write post-init user code here }//GEN-BEGIN:|25-getter|2| return SalirGeneral; } COM: <s> returns an initiliazed instance of salir general component </s>
funcom_train/5304779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeElements(Object[] elements) { int i = 0; for (Object element : elements) { if (element.getClass() == DSIEdge.class) { removeEdge((DSIEdge) element); } if (element.getClass() == DSIVertex.class) { if (DefaultGraphModel.isGroup(currentModel, element)) { removeGroup(element); } else { removeVertex((DSIVertex) element); } } i++; } } COM: <s> try to remove the edges and vertices from the current graph </s>
funcom_train/12965765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDefinitionString() { StringBuffer buffer = getTypeDefinitionString(); if (defaultValue != null && !defaultValue.equals("")) { buffer = buffer.append(" DEFAULT ").append(defaultValue); } else { buffer = buffer.append(" DEFAULT NULL "); } if (!isNullable) { buffer = buffer.append(" NOT NULL "); } else { buffer = buffer.append(" NULL "); } return buffer.toString(); } COM: <s> returns a sql sniplet that defines the column </s>
funcom_train/18730034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double distance(Vertex vertex) { Vertex eye = new Vertex(getCamera()); double scale = (getFocalwidth() / 85); double dist = 0.0; if (getType() == Camera.PERSPECTIVE) { dist = eye.distance(vertex); } else { dist = eye.distance(new Vertex(getCenter())); } return dist * scale / 16; } COM: <s> calculate an adjusted distance from this camera to </s>
funcom_train/46153948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setButtonColor(int buttonIndex, ColorRGBA color) throws IllegalArgumentException { if (buttonIndex < 0 || buttonIndex >= numButtons) { throw new IllegalArgumentException("Invalid button index"); } if (buttonColors == null) { buttonColors = new ColorRGBA[numButtons]; } buttonColors[buttonIndex] = color; setBoxColor(buttonNodes[buttonIndex], buttonBoxes[buttonIndex], color); } COM: <s> set the color of the specified button </s>
funcom_train/44823176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JNDIConnectionDef getEnumDefByName (String connectionName) { for (int i=0; connDefs != null && i < connDefs.length; i++) { if (connectionName.equals(connDefs[i].getName())) return connDefs[i]; } return null; } COM: <s> get the jndiconnection def for a given connection name </s>
funcom_train/4962570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init(InspectableGraph g) throws InvalidEdgeException{ graph_ = g; NUMBER_KEY_ = new Object(); queue_ = new NodeSequence(); //make sure all edges are directed EdgeIterator ei = graph_.edges(); while (ei.hasNext()){ Edge e = ei.nextEdge(); if (!graph_.isDirected(e)){ throw new InvalidEdgeException("All edges must be directed"); } } } COM: <s> this helper method is called by the execute </s>
funcom_train/8715974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean nextItemIs(String match) throws IOException { // skip whitespace int c; while (isWhiteSpace(c = buf.get())) { } for (int i = 0; i < match.length(); i++) { if (i > 0) { c = buf.get(); } if (c != match.charAt(i)) { return false; } } return true; } COM: <s> requires the next few characters after whitespace to match the </s>
funcom_train/26265114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNodePath(Object object) throws Exception { String returnValue = ""; try { Object value = PropertyUtils.getProperty(object, pathProperty); if (value != null) { returnValue = value.toString(); } } catch (IllegalAccessException e) { log.error(e); throw new Exception(e.getMessage()); } catch (InvocationTargetException e) { log.error(e); throw new Exception(e.getMessage()); } catch (NoSuchMethodException e) { log.error(e); throw new Exception(e.getMessage()); } return returnValue; } COM: <s> returns the parent path of the node </s>
funcom_train/13479469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateAccess(int mask, boolean clear) { Player player = controller.whoami(); int access = 0; super.updateAccess(mask,clear); if ((mask & ACCESS_INSPECT) != 0) { if (player == null) { access |= ACCESS_INSPECT; } else { // check if the current Player has contact with this Player // FIXME: todo access |= ACCESS_INSPECT; } } if ((mask & ACCESS_SELF) != 0) { if (player != null && equals(player)) { access |= ACCESS_SELF; } } setAccess(access,mask); } COM: <s> update access for this player </s>
funcom_train/25313637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean searchSmallestMiddle() { long begin = System.currentTimeMillis(); boolean result = false; search = new DepthFirstSearch(); SelectChoicePoint select = new SimpleSelect(vars.toArray(new Var[1]), new SmallestDomain(), new IndomainMiddle()); result = search.labeling(store, select); long end = System.currentTimeMillis(); System.out.println("Number of milliseconds " + (end - begin)); return result; } COM: <s> it searches using smallest domain variable ordering and </s>
funcom_train/2889704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MessageDocument terminate(String reason) { SoapElement request; request = apiElement(API_ELEMENT_TERMINATE_REQUEST); if (reason != null) { SoapElement er = apiElement("reason",reason); request.appendChild(er); } return invokeBlocking(API_SYSTEM_OPERATION_TERMINATE, request); } COM: <s> terminate the app it will still exist </s>
funcom_train/32761259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PreparedStatement getLogbookEntryAssociationStatement() { try { final String sql = "INSERT INTO logbook.entry_logbook ( log_entry_id, logbook_id ) VALUES (?, ?)"; return _connection.prepareStatement( sql ); } catch( SQLException exception ) { exception.printStackTrace(); throw new RuntimeException( "Exception getting an insert statement for inserting an entry-logbook record.", exception ); } } COM: <s> get the prepared statement for associating a new entry with a logbook </s>
funcom_train/10927623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CmisObjectType createIdObject(String objectId) { CmisObjectType object = new CmisObjectType(); CmisPropertiesType properties = new CmisPropertiesType(); object.setProperties(properties); CmisPropertyId idProperty = new CmisPropertyId(); properties.getProperty().add(idProperty); idProperty.setPropertyDefinitionId(PropertyIds.OBJECT_ID); idProperty.getValue().add(objectId); return object; } COM: <s> creates a cmis object that only contains an id in the property list </s>
funcom_train/50759175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHowNowBrownCow() { Utterance u = getSyllables("how now brown cowboy"); Relation segment = u.getRelation("Segment"); assertTrue("segment", segment != null); assertTrue("Syllable", u.getRelation("Syllable") != null); assertTrue("SylStructure", u.getRelation("SylStructure") != null); } COM: <s> tests simple syllable and segment behavior </s>
funcom_train/29829090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setConnection(ConnectionBean connection) { if (this.connection != null) { this.connection.delPacketListener(this); this.connection.delConnectionListener(this); } this.connection = connection; if (connection != null) { connection.addPacketListener(this); connection.addConnectionListener(this); } curPresences.clear(); individualPresences.clearAll(); } COM: <s> sets existing and connected code connection bean code </s>
funcom_train/40795509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringBuffer getRootURL() { StringBuffer url = new StringBuffer(48); synchronized (url) { String scheme = getScheme(); int port = getServerPort(); url.append(scheme); url.append("://"); url.append(getServerName()); if (port > 0 && ((scheme.equalsIgnoreCase("http") && port != 80) || (scheme .equalsIgnoreCase("https") && port != 443))) { url.append(':'); url.append(port); } return url; } } COM: <s> reconstructs the url the client used to make the request </s>
funcom_train/2467051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getPopupLocation() { Component component = this.getInvoker(); Point point = new Point(); int x = component.getX(); int y = component.getY(); while (component.getParent() != null) { component = component.getParent(); x += component.getX(); y += component.getY(); } point.x = x; point.y = y + this.getInvoker().getHeight(); return point; } COM: <s> returns the location of the popup depending on the invoking component </s>
funcom_train/22603458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateResponseStatus(Integer authorStatus, AuthorContext pAuthorContext){ if(AuthorResponseCode.AUTHORIZED==authorStatus.intValue()){ updateResponseAuthorized(pAuthorContext); }else if(AuthorResponseCode.UNAUTHORIZED==authorStatus.intValue()){ updateResponseUnauthorized(pAuthorContext); }else{ updateResponseUnset(pAuthorContext); } } COM: <s> update authorization status to authorization response </s>
funcom_train/49317602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected LinkedList mergeHistoryList() { LinkedList savedHistory = historyList; loadHistory(); // Go through the list in reverse, since addToHistory inserts at the start of the list ListIterator it = savedHistory.listIterator(savedHistory.size()); while (it.hasPrevious()) { addToHistory((HTMLViewerHistoryItem) it.previous()); } return historyList; } COM: <s> merge the history list with current serialized version another instance </s>
funcom_train/3576584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel2() { if (ivjJPanel2 == null) { try { ivjJPanel2 = new JPanel(); ivjJPanel2.setName("JPanel2"); ivjJPanel2.setPreferredSize(new Dimension(10, 0)); ivjJPanel2.setLayout(null); ivjJPanel2.setMaximumSize(new Dimension(20, 0)); ivjJPanel2.setMinimumSize(new Dimension(20, 0)); } catch (Throwable ivjExc) { handleException(ivjExc); } } return ivjJPanel2; } COM: <s> return the jpanel2 property value </s>
funcom_train/11721732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ensureCapacity(int minCapacity) { int oldCapacity = elementData.length; if (minCapacity > oldCapacity) { Object oldData[] = elementData; int newCapacity = (oldCapacity * 3)/2 + 1; if (newCapacity < minCapacity) newCapacity = minCapacity; elementData = new WeakRef[newCapacity]; System.arraycopy(oldData, 0, elementData, 0, size); } } COM: <s> ensures that the internal </s>
funcom_train/25578483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateWidth() { int w = getPreferredPopupWidth(); int minWidth = mFilterPanel.getImpl().getWidth(); // obey the parent's size if we require less than it if (w < minWidth) { w = minWidth; } if (w != getWidth()) { setSize(w, getHeight()); mFilterPanel.updatePanelWidth(); } } COM: <s> if the contents width is greater than the filter panels and the </s>
funcom_train/22358656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Faction getFaction(ID id) { return (factionView() == null) ? null : (factionView().get(id) != null ? factionView().get(id) : (id.equals(getNullFaction().getID()) ? getNullFaction() : null)); } COM: <s> retrieve a faction from factions by id </s>
funcom_train/49836974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFriends(String nick) { if(DEBUG) System.out.println("Chat.getFriends(\"" + nick + "\")"); Player player = Player.getPlayer(nick); if(player != null) { return player.getFriends(); } // can't add user is offline... return ";"; } COM: <s> get the friends list for a player </s>
funcom_train/14616486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ensureDirectoryFor( File targetFile ) throws BuildException { File directory = new File( targetFile.getParent() ); if( !directory.exists() ) { if( !directory.mkdirs() ) { throw new BuildException( "Unable to create directory: " + directory.getAbsolutePath(), getLocation() ); } } } COM: <s> create directories as needed </s>
funcom_train/9490813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeDash(float[] dash, float phase) throws IOException { // for backward compatibility double[] dd = new double[dash.length]; for (int i = 0; i < dash.length; i++) dd[i] = dash[i]; writeDash(dd, phase); } COM: <s> writes out the dash of the stroke </s>
funcom_train/47737827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void adjustActions() { for (Iterator it = componentAction.values().iterator(); it.hasNext();) { ActionBase ab = ((JaWEAction) it.next()).getAction(); if (ab != null) { ab.enableDisableAction(); } } } COM: <s> adjusts the enabled disabled state for every </s>
funcom_train/30075619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void onBindAndValidate(HttpServletRequest request, Object command, BindException errors) throws GPIRException { Downtime downtime = (Downtime) command; int resourceId = RequestUtils.getIntParameter(request, "resourceId", 0); downtime.setResource(getGpir().getResource(resourceId)); } COM: <s> method binds the resource id chosen to the code downtime code object </s>
funcom_train/9867997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Attributes _attributes(final Reifiable reifiable, int pos) { _attrs.clear(); _addReifier(_attrs, reifiable); _attrs.addAttribute("", "number", "", "CDATA", Integer.toString(pos)); return _attrs; } COM: <s> returns attributes which contain the reifier if any and the number </s>
funcom_train/4557890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSignUpValidData() { repEng.newStep("323", "Sign up-Sign up with vaild data"); //1. Launch http://hobbes.ontometrics.com/magnetportal/ //2. Click the Manage You Assets link. //3. Click the Publish Magnet link in the Albums/Tracks page. //4. Click the cart icon. //5. Click Sign up button. //6. Fill in all fields with valid data. //7. Click Sign up button. // Go to the "Payment Setting" successfully.. } COM: <s> 323 sign up sign up with valid data </s>
funcom_train/7623643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unregisterObserver(T observer) { if (observer == null) { throw new IllegalArgumentException("The observer is null."); } synchronized(mObservers) { int index = mObservers.indexOf(observer); if (index == -1) { throw new IllegalStateException("Observer " + observer + " was not registered."); } mObservers.remove(index); } } COM: <s> removes a previously registered observer </s>
funcom_train/7982432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { synchronized (this) { StringBuffer fbuffer = new StringBuffer(""); for (Object aV : v) { fbuffer.append(((FrontierElement) aV).url).append(":").append(((FrontierElement) aV).score).append(" "); } return fbuffer.toString().trim(); } } COM: <s> a string version of the frontiers current state </s>
funcom_train/8630664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMask() { switch (compareType) { case Comparison.FALSE: return ALWAYS_FALSE; case Comparison.EQUAL: case Comparison.IN_LIST: case Comparison.IN_QUERY: return EQUALITY; case Comparison.BIGGER_EQUAL: case Comparison.BIGGER: return START; case Comparison.SMALLER_EQUAL: case Comparison.SMALLER: return END; default: throw Message.throwInternalError("type=" + compareType); } } COM: <s> get the comparison bit mask </s>
funcom_train/28118605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double computeTokenProbability(Knowledge knowledge,Bucket bucket,String attribute,Object token) { if(token instanceof String){ return computeStringTokenProbability(knowledge,bucket,attribute,(String)token); } else { throw new UnsupportedOperationException("Unhandled matrix passed to "+this.getClass().getName()+". This classifier does not support tokens of type: "+token.getClass().getName()); } } COM: <s> the robinson method only supports string tokens </s>
funcom_train/26345486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doCmd(String cmd) throws IOException { gThread.ret = 0; if (cmd.startsWith("PASS")) { panel.getFrame().getStatusArea().append("PASS\n", "black"); } else { panel.getFrame().getStatusArea().append(cmd + "\n", "black"); } // out.write((cmd + "\r\n").getBytes()); cbuf.clear(); cbuf.put(cmd + "\r\n"); cbuf.flip(); sc.write(encoder.encode(cbuf)); cbuf.clear(); Utilities.print(cmd + "\r\n"); return getReply(); } COM: <s> sends a command and calls get reply </s>
funcom_train/9568515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PdfObjectTreeNode getNode(int ref) { int idx = objects.getIndexByRef(ref); PdfObjectTreeNode node = nodes.get(idx); if (node.getPdfObject().isNull()) { node = PdfObjectTreeNode.getInstance(objects.loadObjectByReference(ref), ref); nodes.set(idx, node); } return node; } COM: <s> gets a tree node for an indirect objects </s>
funcom_train/24442605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public MappingCell createFunctionMappingCell(Integer id, Integer mappingId, MappingCellInput inputs[], Integer output, Integer functionID, String author, Date modificationDate, String notes) { return new MappingCell(id, mappingId, inputs, output, 1.0, functionID, author, modificationDate, notes); } COM: <s> constructs a function mapping cell </s>
funcom_train/18548799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setValueIntoPreparedStatement(String token, String mask, Locale loc, Vector<Integer> types, Vector<Object> values) throws BusinessException{ boolean response = false; ReportFieldTO field = this.getReportField(token); if (field!=null) { response = field.setValueIntoPreparedStatement(mask, loc, types, values); } return response; } COM: <s> check if a given token is a id of a report field </s>
funcom_train/31904547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DOMException createInvalidLexicalUnitDOMException(short type) { Object[] p = new Object[] { getPropertyName(), new Integer(type) }; String s = Messages.formatMessage("invalid.lexical.unit", p); return new DOMException(DOMException.NOT_SUPPORTED_ERR, s); } COM: <s> creates a dom exception given an invalid lexical unit type </s>
funcom_train/46453765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if(errorcode>0) { return defaultString; } String str = "{"; for(int i = 0, n = array.length;i<n;i++) { str += Integer.toString(array[i]); if(i<n-1) { str += ", "; } } str += "}"; return str; } COM: <s> converts the array to a comma delimited string enclosed in braces </s>
funcom_train/48668762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawZeroRangeBaseline(Graphics2D g2, Rectangle2D dataArea) { if (isZeroRangeBaselineVisible()) { getRenderer().drawRangeLine( g2, this, getRangeAxis(), dataArea, 0.0, this.zeroRangeBaselinePaint, this.zeroRangeBaselineStroke ); } } COM: <s> draws the gridlines for the plots primary range axis if they are </s>
funcom_train/26466259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireLoginProcessed(User user, boolean loggedIn) { for (int i = 0; i < logList.size(); i++) { LoginListener l = (LoginListener) logList.get(i); if (l != null) { l.loginProcessed(user, loggedIn); } } } COM: <s> fires an event that user has not logged in </s>
funcom_train/26084231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runUntil( int frame ) { int frameCt = frames.size(); if ( frameCt == 0 || frame > frameCt - 1 ) return; if ( isSuspended() || isTerminated() ) { currentFrame = 0; panel.removeAll(); while ( currentFrame <= frame ) { Display.getDefault().syncExec( new Runnable() { public void run() { Frame frame = frames.get( currentFrame ); fireFrameUpdated( currentFrame++ ); frame.executeCommands(); panel.revalidate(); } }); } } } COM: <s> run the animation up to the given frame immediately </s>
funcom_train/38520059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cell getCellByID(String id) { log.debug("searching for " + id + " in a list of " + getSize() + " cells ..."); for(int i = 0; i < getSize(); i++) { Cell c = (Cell) get(i); if(id.equals(c.getId())) { log.debug("found " + c.getId()); return c; } } log.warn(id + " not found"); return null; } COM: <s> finds a cell by its id </s>
funcom_train/11653434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHeaders(String[] h) { int x = 0; header = new ArrayList<String>(h.length); for (x = 0; x < h.length; x++) { header.add(h[x]); data.put(h[x], new ArrayList<Object>()); } } COM: <s> sets the headers for the data set </s>
funcom_train/31816469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void save() { this.logger.debug("Saving the parameters for the aglet general config"); Resource tahiti_res = Resource.getResourceFor("tahiti"); tahiti_res.setResource("tahiti.startup", String.valueOf(this.startUpAgent.isSelected())); tahiti_res.setResource("tahiti.startupAglets", this.startUpAgentClass.getText()); Util.reset(); Util.update(); } COM: <s> saves the status of the dialog </s>
funcom_train/32867493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAllExpanded() { Enumeration e = vGroups.elements(); while (e.hasMoreElements()) { // step thru all groups JIDGroup obj = (JIDGroup)e.nextElement(); (obj).setExpanded(); // set to expanded? } // end, step thru all groups display(); // display the new roster } COM: <s> create display the roster list with all groups expanded </s>
funcom_train/22238224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unSelected(boolean propagate) { if (!selected) { return; } selected = false; // can't cache pickedBounds; e.g. child tg changes... if (pickedBoundsBG != null) { pickedBoundsBG.detach(); pickedBoundsBG = null; } if (!propagate) { return; } if (triggeredOnSelect) { processTriggerState(TRIGGERED_ON_SELECT, false, 0f); } fireNodeSelection(this, false); } COM: <s> sets this proxy to the unselected state </s>
funcom_train/43318231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ResourceEvent buildResourceEvent(HttpServletRequest request) throws IOException{ String pathInfo=request.getPathInfo(); EventContext ctx=new WebEventContext(this,request); for (Enumeration locales=request.getLocales();locales.hasMoreElements();){ Locale l=(Locale)locales.nextElement(); ctx.getLocales().add(l); } if (request.getUserPrincipal()!=null){ ctx.setUserName(request.getUserPrincipal().getName()); } ResourceEvent event=handlerManager.buildResourceEvent(pathInfo,request.getQueryString(),ctx); getRequestData(request,event); return event; } COM: <s> build the resource event from the http request </s>
funcom_train/1573348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File userDomainPropertiesFile() { // Note: I don't think 'user.dir' actually returns something. The system // properties are probably reset by Jetty String fn = this.getClass().getSimpleName() + ".properties"; return new File(System.getProperty("user.dir", "."), fn); } COM: <s> loads a properties configuration file from the current directory </s>
funcom_train/37804486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCloseButton() { if( closeButton == null ) { closeButton = new JButton(); closeButton.setText("IdentitiesBrowser.button.close"); closeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(final java.awt.event.ActionEvent e) { setVisible(false); // update messages if a board is shown MainFrame.getInstance().getMessagePanel().updateTableAfterChangeOfIdentityState(); } }); } return closeButton; } COM: <s> this method initializes close button </s>
funcom_train/39550418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Shape getOutline() { if (outline != null) return outline; outline = new GeneralPath(); for (int i = 0; i < getNumGlyphs(); i++) { if (glyphVisible[i]) { Shape glyphOutline = getGlyphOutline(i); outline.append(glyphOutline, false); } } return outline; } COM: <s> returns a shape whose interior corresponds to the visual representation </s>
funcom_train/18723038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { for (int i = 0; i < 100; i++) { try { Thread.sleep(25); } catch (InterruptedException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } fdp.step(); System.out.println(fdp.getCurrentMovement()); panel.repaint(); } } COM: <s> when an object implementing interface code runnable code is used </s>
funcom_train/48105514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TypeExpr matches(Token token, int no, Stack<MatchFork> stack, List<Token> lookBackStack) { if(next != null) { TypeExpr te = next.matches(token,no,stack,lookBackStack); if(te == null) next.reset(); return te; } else { return this; } } COM: <s> does this match the token </s>
funcom_train/40622327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void recalculateIdealColumnWidthsTeardown(IdealColumnWidthInfo info) { // Workaround for IE re-entrant bug on window resize if (info == null) { return; } info.table.getElement().getStyle().setProperty("tableLayout", "fixed"); getTableBody(info.table).removeChild(info.tr); } COM: <s> tear down after recalculating column widths </s>
funcom_train/8897925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPanelDiagnosticos() { if (panelDiagnosticos == null) { panelDiagnosticos = new JPanel(); panelDiagnosticos.setLayout(null); panelDiagnosticos.add(getTextDiagnostico(), null); panelDiagnosticos.add(getComoNodoDiagnostico(), null); panelDiagnosticos.add(getButtonGravaDiagnostico(), null); } return panelDiagnosticos; } COM: <s> this method initializes panel diagnosticos </s>