__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/2269243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeUnit() { node00 = 1; node01 = 0; node02 = 0; node03 = 0; node10 = 0; node11 = 1; node12 = 0; node13 = 0; node20 = 0; node21 = 0; node22 = 1; node23 = 0; node30 = 0; node31 = 0; node32 = 0; node33 = 1; } COM: <s> reinitializes this to be the unit matrix </s>
funcom_train/1710860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final private void printAllCopies() { /**loop to print each copy of document in turn * * JPS also has a function to set number of copies but not at a document level * */ for(int currentCopy=0;currentCopy<copiesToPrint;currentCopy++){ /**tell user and add 1 so user sees list 1,2,3 not 0,1*/ logMessage("========================"); logMessage("\nPrinting copy "+(currentCopy+1)); logMessage("========================"); printPages(); } } COM: <s> top level routine used to print the copies in a loop </s>
funcom_train/43277086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Class getClassForFeature(Enumeration enumeration) { // get the model FeaturesDomainModel fdm = (FeaturesDomainModel) enumeration .get_ParentModelPartOfType(FeaturesDomainModel.class); try { Class c = getClass().getClassLoader().loadClass( fdm.getJavaPackage() + "." + enumeration.getName()); return c; } catch (ClassNotFoundException e) { return null; } } COM: <s> get a class for a certain feature </s>
funcom_train/25191893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EventAdvertisement (Event template) { if (template != null) { this.type = template.getType (); this.name = template.getName (); this.desc = template.getDescription (); this.level = template.getLevel (); this.topic = template.getTopic (); } } COM: <s> a convienience constructor that builds the advertisement from a template event </s>
funcom_train/644438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void switchToOptionMainWindow(DialogOptions dialogOptions) { this.dialogOptions = dialogOptions; CardLayout cl = (CardLayout) (dialogOptions.getPanelOptions().getLayout()); cl.show(dialogOptions.getPanelOptions(), PersistenceManager.Values.CARD_MAIN_WINDOW.name()); dialogOptions.setSelectedOption(PersistenceManager.Values.CARD_MAIN_WINDOW.name()); } COM: <s> switches to the main window category in the option dialog </s>
funcom_train/42115068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private InputStream getLocalResourceAsStream(String name) { if (ESLoader.isDebugLoader()) System.out.println(" ** getLocalResourceAsStream, resource '" + name + "' asked to: " + this); // Get the stream of this file. InputStream inputStream = this.getClass().getResourceAsStream(name); if (ESLoader.isDebugLoader()) System.out.println(" ** Resource found, returned as stream: " + inputStream); return inputStream; } COM: <s> gets the local resource as stream </s>
funcom_train/4404366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final private void substituteSuccessor(Element_Node_TreeGP __oldElement, Element_Node_TreeGP __newElement) { int targetIndex = this.getSuccessors().indexOf(__oldElement); this.getSuccessors().add(targetIndex, __newElement); this.getSuccessors().remove(__oldElement); } COM: <s> substitute a successor with another new successor </s>
funcom_train/25648842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDeleteTestSet() { DeleteTestSetCommand cmd = new DeleteTestSetCommand(perspectiveModel, null); cmd.deleteTestSet(testSet); assertNull(testSetModel.getTestSet(testSetName)); assertFalse(testSetModel.getTestSets().contains(testSet)); } COM: <s> test of delete test set method of class com </s>
funcom_train/17413268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPrimaryKey(String column, String table) { boolean retVal = false; Connection conn = getConnection(); if (conn != null && !isOracle()) { ResultSet rs = null; try { DatabaseMetaData dbmd = conn.getMetaData(); rs = dbmd.getPrimaryKeys(null, null, table); while (rs.next()) { if (column.equals(rs.getString(4))) { retVal = true; break; } } } catch (SQLException e) { logger.error(e); } finally { closeResultSet(rs); } } return retVal; } COM: <s> determines whether the specified column in the specified table is </s>
funcom_train/41426262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String toHexString(byte b[]) { int pos = 0; char[] c = new char[b.length * 2]; for (int i = 0; i < b.length; i++) { c[pos++] = toHex[(b[i] >> 4) & 0x0F]; c[pos++] = toHex[b[i] & 0x0f]; } return new String(c); } COM: <s> convert an array of bytes to an hexadecimal string </s>
funcom_train/644542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setLookAndFeel() { String laf = persistenceManager.gettIniFile().getValue(PersistenceManager.Sections.Appearance.name(), PersistenceManager.Keys.laf.name(), PersistenceManager.Values.METAL.name()); this.applyLookAndFeelByName(laf); } COM: <s> loads the look and feel from the settings </s>
funcom_train/3813626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean tokenIsRanked(Token token) { while (token != null) { if (token.isEmitting()) { if (token.getTokenProps().get(TOKEN_RANK) == null) { if (token.getFrameNumber() != 0) { System.out.println("MISSING " + token); return false; } } else { } } token = token.getPredecessor(); } return true; } COM: <s> checks to make sure that all upstream tokens are ranked </s>
funcom_train/22204504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFile(File inFile) throws IOException { // warn user about config mishap if (!merger.getSources().isEmpty()) { log("You specified both a \"file\" attribute " + "and a nested <fileset> element. " + "The nested element takes precedence", Project.MSG_WARN); } else { merger.addSource(inFile); } } COM: <s> configures the task to use a single input file to read </s>
funcom_train/28150992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getX(double t) { int n=list.size(); t=t*n; double di=StrictMath.floor(t); int i=(int)di; if (i<0) return startX; else if (i>=n) return endX; else return getX(list.get(i), t-di); } COM: <s> returns the x position at the given point 0 t 1 </s>
funcom_train/8686227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { DirectoryScanner ds = getDirectoryScanner(getProject()); String[] dirs = ds.getIncludedDirectories(); StringBuffer sb = new StringBuffer(); for (int i = 0; i < dirs.length; i++) { if (i > 0) { sb.append(';'); } sb.append(dirs[i]); } return sb.toString(); } COM: <s> returns included directories as a list of semicolon separated paths </s>
funcom_train/36247985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getSdkSourceJar() throws FileNotFoundException { File[] files = libDirectory.listFiles( new FilenameFilters.SdkSourceJarFilenameFilter()); if (files == null || files.length == 0) { throw new FileNotFoundException("Could not find an SDK source Jar"); } return files[0]; } COM: <s> returns the jar file containing the sdk source </s>
funcom_train/35233126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connectTo(String host, int port, String key, boolean keepKey) throws UnknownHostException, IOException, Exception { createConnection(host, port, key); this.omni_host = host; if (keepKey) { this.omni_port = port; this.omni_key = key; } else { this.omni_port = 0; this.omni_key = ""; } } COM: <s> connect to a controller </s>
funcom_train/44220917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showDialog(JDialog dlg) { Dimension dlgSize = dlg.getPreferredSize(); Dimension frmSize = getSize(); Point loc = getLocation(); dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y); dlg.setModal(true); dlg.show(); } COM: <s> shows the specified jdialog as a modal dialog box in the center of </s>
funcom_train/9365339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void attachViewToParent(View child, int index, LayoutParams params) { child.mLayoutParams = params; if (index < 0) { index = mChildrenCount; } addInArray(child, index); child.mParent = this; child.mPrivateFlags = (child.mPrivateFlags & ~DIRTY_MASK) | DRAWN; if (child.hasFocus()) { requestChildFocus(child, child.findFocus()); } } COM: <s> attaches a view to this view group </s>
funcom_train/31252015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { //_lw.logDebugMsg("MT:templ", _currentTemplate); //_lw.logDebugMsg("MT:tags", _tagTable.toString()); send(); } catch (MailerException mex) { String msg = "MailTemplate.run: Send problem: "+mex.toString(); if (_lw == null) { _lw.logDebugMsg(msg); _lw.logErr(msg); } else { System.err.println(msg); } } } COM: <s> use to set the mail to rich text html mode and send at </s>
funcom_train/3903936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRandomizationTimingPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RandomizationType_randomizationTiming_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RandomizationType_randomizationTiming_feature", "_UI_RandomizationType_type"), ImsssPackage.Literals.RANDOMIZATION_TYPE__RANDOMIZATION_TIMING, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the randomization timing feature </s>
funcom_train/19245573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SourceFileExceptionList getAllErrors() { final DefaultSourceFileExceptionList errors = new DefaultSourceFileExceptionList(); Iterator iterator = plugins.keySet().iterator(); while (iterator.hasNext()) { errors.add(((PluginResults) plugins.get(iterator.next())).getErrors()); } return errors; } COM: <s> get all errors that occurred </s>
funcom_train/14012040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addActionListener(ActionListener l) { getEventListenerList().addListener(ActionListener.class, l); // Notification of action listener changes is provided due to // existence of hasActionListeners() method. firePropertyChange(ACTION_LISTENERS_CHANGED_PROPERTY, null, l); } COM: <s> adds an code action listener code to the code table code </s>
funcom_train/1538903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isUnit() { if ( isunit > 0 ) { return true; } if ( isunit == 0 ) { return false; } if ( isZERO() ) { isunit = 0; return false; } for ( C e : val.values() ) { if ( ! e.isUnit() ) { isunit = 0; return false; } } isunit = 1; return true; } COM: <s> is product unit </s>
funcom_train/27943778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onLogin( int nPluginStatus ) { userDetails.setUserId( Long.parseLong( getUserId() ) ); userDetails.setPassword( getPassword() ); session.setUser( userDetails ); addToLibContactList(); session.login( ( ( Integer ) translateStatusToPlugin( nPluginStatus ) ).intValue() ); } COM: <s> implement the on login event listener </s>
funcom_train/2484718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStateValue(){ switch (state) { case STATE_ERROR: return "ERROR"; case STATE_ONLINE: return "ONLINE"; case STATE_AWAY: return "AWAY"; case STATE_ONTHEPHONE: return "ONTHEPHONE"; case STATE_BUSY: return "BUSY"; default: return "OFFLINE"; } } COM: <s> returns the state as a string </s>
funcom_train/36075565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delete(String id) { Connection con = null; try { PreparedStatement ptmt = null; con = DBUtil.getConnection(); ptmt = con.prepareStatement(deleteSessions); ptmt.setString(1, id); ptmt.executeUpdate(); ptmt.close(); return true; } catch (SQLException ex) { logger.log(Level.SEVERE, null, ex); return false; } finally { DBUtil.closeConnection(con); } } COM: <s> delete sessions by id </s>
funcom_train/130293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getGeometry () { try { sendHeader (PLAYER_MSGTYPE_REQ, 1); /* 1 byte payload */ os.writeByte (PLAYER_FIDUCIAL_GET_GEOM); os.flush (); } catch (Exception e) { System.err.println ("[Fiducial] : Couldn't send PLAYER_FIDUCIAL_GET_GEOM " + "command: " + e.toString ()); } } COM: <s> configuration request get geometry </s>
funcom_train/45803003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLessThan(String lessThanString) { try { this.lessThanNumber = Integer.parseInt( lessThanString ); } catch (NumberFormatException e) { log.warn("Reset invalid lessThan value to '-1' was '" + lessThanString + "'."); this.lessThanNumber = -1; } } COM: <s> sets lower bound test value against collection size </s>
funcom_train/10188322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getSubstText() { if (SubstText == null) { SubstText = new JTextField(); SubstText.setHorizontalAlignment(JTextField.LEFT); SubstText.setName("jTextField"); SubstText.setPreferredSize(new Dimension(2000, 20)); SubstText.setColumns(20); SubstText.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ActionPermormedText(e); } }); } return SubstText; } COM: <s> this method initializes subst text </s>
funcom_train/26024428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CellView createEdgeView() { EdgeView view = new JGraphComboEdgeView(" "); List points = new LinkedList(); points.add(new Point(2, 6)); points.add(new Point(14, 6)); GraphConstants.setPoints(view.getAttributes(), points); GraphConstants.setBeginSize(view.getAttributes(), 8); GraphConstants.setEndSize(view.getAttributes(), 8); return view; } COM: <s> returns a new edge to be used for preview </s>
funcom_train/3410131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTitle(String title) { String oldTitle = this.title; if (title == null) { title = ""; } synchronized(this) { this.title = title; FramePeer peer = (FramePeer)this.peer; if (peer != null) { peer.setTitle(title); } } firePropertyChange("title", oldTitle, title); } COM: <s> sets the title for this frame to the specified string </s>
funcom_train/44185056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void requestCrawlResume() { if (state != State.PAUSING && state != State.PAUSED) { // Can't resume if not been told to pause return; } assert toePool != null; Frontier f = getFrontier(); f.unpause(); sendCrawlStateChangeEvent(State.RUNNING, CrawlStatus.RUNNING); } COM: <s> resume crawl from paused state </s>
funcom_train/28768735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MessageValidator validate(Resource schema, Resource... schemas) throws IOException { Resource[] joinedSchemas = new Resource[schemas.length+1]; joinedSchemas[0] = schema; System.arraycopy(schemas, 0, joinedSchemas, 1, schemas.length); validate(schemaValidator.createValidatorFromSchemas(joinedSchemas, schemaLanguage )); return this; } COM: <s> validates if the message corresponds to given xsd </s>
funcom_train/19248171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLocationDescription() { final StringBuffer buffer = new StringBuffer(); for (int i = 0; i < location.size(); i++) { if (i > 0) { buffer.append(" / "); } buffer.append(location.get(i)); } return buffer.toString(); } COM: <s> get readable description of current location </s>
funcom_train/925522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIpAsLong(long ip) { byte[] data = new byte[4]; data[0] = (byte)((ip >> 24) & 0x0ff); data[1] = (byte)((ip >> 16) & 0x0ff); data[2] = (byte)((ip >> 8) & 0x0ff); data[3] = (byte)(ip & 0x0ff); setAttributeData(data); } COM: <s> sets the ip number represented by this ip attribute </s>
funcom_train/32209428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(EffectRecord r) { if ((src == r.src || src.equals(r.src)) && effect == r.effect) return 0; if (effect == null) return 1; else if (r.effect == null) return -1; else { int effectcmp = effect.compareTo(r.effect); return (effectcmp != 0 ? effectcmp : src.hashCode() - r.src.hashCode()); } } COM: <s> for once sorting is important </s>
funcom_train/10575276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConnectionProperties(Properties props) { assertInitializationAllowed(); connectionProperties = props; if (connectionProperties.containsKey("user")) { setUser(connectionProperties.getProperty("user")); } if (connectionProperties.containsKey("password")) { setPassword(connectionProperties.getProperty("password")); } } COM: <s> p set the connection properties passed to the jdbc driver </s>
funcom_train/28752880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCdnabufflotnum(String newVal) { if ((newVal != null && this.cdnabufflotnum != null && (newVal.compareTo(this.cdnabufflotnum) == 0)) || (newVal == null && this.cdnabufflotnum == null && cdnabufflotnum_is_initialized)) { return; } this.cdnabufflotnum = newVal; cdnabufflotnum_is_modified = true; cdnabufflotnum_is_initialized = true; } COM: <s> setter method for cdnabufflotnum </s>
funcom_train/12549227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayInputTable generateArrayInputTable(String key) { ArrayInputTable internalArrayInputTable = new ArrayInputTable(); internalArrayInputTable.setToolTipText(getTranslator().translateMessage( key + ".toolTipText")); internalArrayInputTable.setLocalHeaderString(getTranslator() .translateMessage("element")); registerComponent(key, internalArrayInputTable); return internalArrayInputTable; } COM: <s> method for generating a new array input table with an empty constructor </s>
funcom_train/5547849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getStatements(int max, Request request, Response response, HandlerChain chain) { RSIterator stmtIter = model.listReifiedStatements(); Collection removingStmt = new ArrayList(); int i = 0; while (stmtIter.hasNext()) { ReifiedStatement current = stmtIter.nextRS(); StmtIterator properties = current.listProperties(); if (containsNonRS(properties)) { continue; } if (model.contains(null, null, current)) { continue; } removingStmt.add(current); if (i++ == max) { break; } } return removingStmt; } COM: <s> get unneeded reifications </s>
funcom_train/11751934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object followRelationship(Relationship rel) { if (this.objectContext != null) { EntityResolver resolver = this.objectContext.getEntityResolver(); ClassDescriptor descriptor = resolver.getClassDescriptor(getName()); this.objectContext.prepareForAccess(this, rel.getName()); Object value = descriptor.getProperty(rel.getName()).readProperty(this); return value; } return null; } COM: <s> accesses the given relationship for this object returning the result </s>
funcom_train/47768525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(FrameTreeNode root) { IFrameVisitor visitor = newVisitor(m_config); root.traversePreOrder(visitor); RapidUtil.setHeader(m_config.hdr, m_agent.name(), m_agent.name(), m_serialId); if(m_configWriter != null) { m_configWriter.write(m_config, m_configInstance); } } COM: <s> write a frame store config for agent by traversing the </s>
funcom_train/14520081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ICreateCRLSessionLocal getCRLCreateSession() { if(crlsession == null){ try{ ICreateCRLSessionLocalHome home = (ICreateCRLSessionLocalHome) getLocator().getLocalHome(ICreateCRLSessionLocalHome.COMP_NAME); crlsession = home.create(); }catch(Exception e){ throw new EJBException(e); } } return crlsession; } COM: <s> gets connection to crl create session bean </s>
funcom_train/1546837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void newYSampleData(double[] y) { if (y == null) { throw MathRuntimeException.createIllegalArgumentException( LocalizedFormats.NULL_NOT_ALLOWED); } if (y.length == 0) { throw MathRuntimeException.createIllegalArgumentException( LocalizedFormats.NO_DATA); } this.Y = new ArrayRealVector(y); } COM: <s> loads new y sample data overriding any previous data </s>
funcom_train/32056948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsRemovePointEvent() { System.out.println("testIsRemovePointEvent"); Object obj = null; JGraph jgraph = new JGraph(); CellMapper cellmapper = null; EdgeView edge = new EdgeView(obj, jgraph, cellmapper); MouseEvent event = null; assertEquals(edge.isRemovePointEvent(event),false); } COM: <s> this function tests is remove point event function of edge view class </s>
funcom_train/47945321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws MotuException { if (netcdfDataset == null) { return; } try { if (!this.netcdfDataset.isClosed()) { this.netcdfDataset.close(); this.netcdfDataset = null; } } catch (Exception e) { throw new MotuException(String.format("Enable to close NetCDF reader - location: %s", locationData), e); } } COM: <s> closes the reader </s>
funcom_train/31651173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startService( ) throws Exception{ File f = new File(deployProperties); Properties props = new Properties( ); props.load(new FileInputStream(deployProperties)); Iterator iter = props.values( ).iterator(); while(iter.hasNext( )){ String location = (String)iter.next( ); deployPackage(location); } System.out.println("Started BPML Engine."); } COM: <s> starts the engine service by deploying available packages </s>
funcom_train/46575630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startTAB(NamedNodeMap nnm) throws AppToyException { TabItem ti = new TabItem((TabFolder) ctx.parent,SWT.NONE); Composite panel = new Composite((TabFolder) ctx.parent,SWT.NONE); String title = getAttribute(nnm, "title", null); ti.setText(title); ti.setControl(panel); ctx.control = panel; ctx.parent = panel; processEventAttributes(nnm, "http://apptoy.sf.net/events"); processControlAttributes((Control)ctx.control,nnm); } COM: <s> creates a tab </s>
funcom_train/20883133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void postSpeakableCancelled() { boolean shouldPost; // The JSAPI docs say that once a cancelled event is sent, no // others will be. This makes sure that a cancelled will never be // sent twice. This deals with the race that can occur when an // item that is playing is cancelled. synchronized(this) { shouldPost = !done; done = true; cancelled = true; } if (shouldPost) { SpeechEventUtilities.postSpeechEvent( this, new SpeakableEvent(source, SpeakableEvent.SPEAKABLE_CANCELLED)); } } COM: <s> utility function that generates a </s>
funcom_train/44851905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Object inValue, Object inSortCriteria) throws VInvalidSortCriteriaException, VInvalidValueException { // Pre: inSortCriteria not null if (VSys.assertNotNull(this, "setValue(Object inValue, Object inSortCriteria)", inSortCriteria) == Assert.FAILURE) { return; } // Post: set try { add(create(inValue, inSortCriteria)); } catch (VInvalidValueException exc) { throw exc; } } COM: <s> this method sets the value of the item with the specified sort criteria </s>
funcom_train/16435740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDueDate() { Calendar iCalendar = Calendar.getInstance(); if (iPaymentTerm != null) { iCalendar.setTime(iDate); iCalendar.add(Calendar.DAY_OF_MONTH, iPaymentTerm.decodeValue()); iPaymentDay = iCalendar.getTime(); } else { iPaymentDay = iDate; } } COM: <s> set the duedate depending on the invoice date and the payment term </s>
funcom_train/1910254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void map(int map) { if(!this.mapped) { //Clear the phenotype this.phenotype.clear(); this.valid = this.grammar.genotype2Phenotype(true); this.mapped = true; this.usedCodons = this.grammar.getUsedCodons(); this.usedWraps = this.grammar.getUsedWraps(); } } COM: <s> setting these both here so as to negate the need for multiple </s>
funcom_train/20294607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String encodeMultiValues(String[] values) { StringBuffer buffer = new StringBuffer(); for (int i = 0; i < values.length; i++) { buffer.append(values[i] != null ? values[i] : ""); if (i + 1 < values.length) { buffer.append(VALUE_DELIM); } } return encodeCharacters(buffer.toString()); } COM: <s> encode a string array containing multiple values into a single string </s>
funcom_train/26570664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkIfStillOverBomb() { Enumeration keys = bombsStillUnderPlayer.keys(); while (keys.hasMoreElements()) { Bomb bomb = (Bomb) keys.nextElement(); if (!bomb.isCollidingWithExact(this)) { bombsStillUnderPlayer.remove(bomb); } } } COM: <s> checks if the player still collides </s>
funcom_train/2907947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getBackupFolder() throws IOException { String name = getName(); if ( name == null ) return null; Preferences prefs = Preferences.userNodeForPackage( PsionLink.class ); File defaultFolder = new File( System.getProperty( "user.home" ), "jpl2" ); File parent = new File( prefs.get( "jpl_folder", defaultFolder.toString() ), "backups" ); File folder = new File( parent, name ); folder.mkdirs(); return folder; } COM: <s> returns null if this machine has not had its name specified </s>
funcom_train/21023059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void evaluateKey(char key) { if (Character.toUpperCase(key) == pass[count] && count<phrase.length()) { count++; String msg = "<b><font color=\"red\">"; msg += phrase.substring(0,count); msg += "</font></b>"; msg += phrase.substring(count); msg += "<br><br>"; Main.get().aboutPopup.setText(msg); } else { String msg = "<b>"+phrase+"</b><br><br>"; Main.get().aboutPopup.setText(msg); count=0; } if (count==phrase.length()){ Main.get().aboutPopup.changeImg("img/futurama.gif"); } } COM: <s> evaluates the key </s>
funcom_train/21287402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean verifyHash(final byte[] hash) { try { // Create a hash of the photo data final MessageDigest md = MessageDigest.getInstance("SHA-1"); byte[] sha1hash = new byte[40]; md.update(fPhoto); sha1hash = md.digest(); final String actualHash = ByteConverter.hexify(sha1hash); // Check whether equal return actualHash.equals(ByteConverter.hexify(hash)); } catch (NoSuchAlgorithmException e) { // Shouldn't occur } // Shouldn't get here throw new IllegalStateException(); } COM: <s> verifies the picture against the given hash code </s>
funcom_train/39892905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String isFriend(String jabberId, String remoteJabberId) { String method = "POST"; String url = "/contacts/getRelation"; Map <String, String> paramList = new HashMap<String, String>(); paramList.put("jabberId", jabberId); paramList.put("remoteJabberId", remoteJabberId); return TB_Request(method, url, paramList); } COM: <s> get the relation between two users </s>
funcom_train/16487832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JFreeChart getSource() { if (this.source != null) { return this.source; } final ValueBinding vb = this.getValueBinding("source"); final Object v = vb != null ? vb.getValue(this.getFacesContext()) : null; return (JFreeChart) (v != null ? v : null); } COM: <s> data source attribute </s>
funcom_train/2885322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buildNodeFarm() throws SmartFrogException, RemoteException { nodeFarm = new HashMap<String, FarmNode>(clusterLimit); for (int i = 0; i < clusterLimit; i++) { FarmNode node = createFarmNode(i); nodeFarm.put(node.getId(), node); } } COM: <s> build the node farm </s>
funcom_train/3786612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { /* init */ /* Run Length Maps (R.L.M)s */ entranceX= new int[dbSample.pixWidth]; entranceY= new int[dbSample.pixHeight]; exitX= new int[dbSample.pixWidth]; exitY= new int[dbSample.pixHeight]; xyPoint= new Point(0,0); } /* init */ COM: <s> init init any globals required on a per spot basis </s>
funcom_train/32870660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JID getJIDFromXML(String XML) { MiniXMLParser oParser = new MiniXMLParser(); String sJID = oParser.parseTag(XML, "JID"); String sNick = oParser.parseTag(XML, "Nick"); String sGroup = oParser.parseTag(XML, "Group"); JID oJID = new JID(sJID, sNick, sGroup, true); return oJID; } COM: <s> convert the supplied xml generated by input dialog </s>
funcom_train/46638439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public LayerCell getCellByPosition(int columnPosition, int rowPosition) { int bodyRowIndex = getRowIndexByPosition(rowPosition); // Row group header cell if (RowGroupUtils.isPartOfAGroup(model, bodyRowIndex)) { if (columnPosition == 0) { return new LayerCell( this, columnPosition, getStartPositionOfGroup(rowPosition), columnPosition, rowPosition, 1, getRowSpan(rowPosition) ); } } return new LayerCell(this, columnPosition, rowPosition); } COM: <s> if a cell belongs to a column group </s>
funcom_train/28116655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer result = new StringBuffer(); for (int i = 0; i < _types.length; ++i) { if (i > 0) { result.append(","); } result.append(_types[i].getName()); } return result.toString(); } COM: <s> returns a stringified version of this for debugging purposes </s>
funcom_train/15866058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessage(String key){ Object obj = JetData.getMapped(key, this.data); //check for String returned! if( String.class.isInstance( obj ) ){ return (String)obj; }else{ if( obj!=null ){ return obj.toString(); }else{ return null; } } } COM: <s> returns the message for the given key </s>
funcom_train/13687129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert(byte source, long position) throws IOException { if (position > length()) return; dirty = true; dirtySize = true; lastUpperNibblePosition = position; if (actions != null) actions.eventPreModify(ActionHistory.TYPE_INSERT, position, true); updateChanges(position, true); myChanges.set((int)(position - myChangesPosition), new Integer(source & 0x0ff)); notifyListeners(); } COM: <s> inserts a byte into this content at the given position </s>
funcom_train/40262945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getPopupShellTitle() { IProduct product = Platform.getProduct(); if (product != null) { String productName = product.getName(); String LABEL_SDK = "SDK"; //$NON-NLS-1$ if (productName.endsWith(LABEL_SDK)) { productName = productName.substring(0, productName.length() - LABEL_SDK.length()); } return productName + " " + LABEL_NOTIFICATION; //$NON-NLS-1$ } else { return LABEL_NOTIFICATION; } } COM: <s> override to return a customized name </s>
funcom_train/4190028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(final ActionEvent e) { Stream s = (Stream) e.getSource(); fireContentsChanged(this, 0, 1); if ((s.getStatus() == Stream.FAILED) || (s.getStatus() == Stream.SUCCESSFUL)) { streams.remove(s); fireIntervalRemoved(this, 0, 1); saveNext(); } } COM: <s> called when the status of a stream has changed </s>
funcom_train/1579077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setBase(final String tagValue) { baseName = tagValue; final String[] paths = { "", "msi.gaml.metamodel.agent.", "msi.gama.emf.", "msi.gama.metamodel." }; for ( final String s : paths ) { try { final Class c = Class.forName(s + baseName); setBase(c); // addSkillClass(c); } catch (final ClassNotFoundException e) {} } } COM: <s> sets the base </s>
funcom_train/2883680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unloadPending() { Iterator iter = pending.iterator(); while( iter.hasNext() ) { try { ((RComponent)iter.next()).sfUnload(); } catch (RemoteException e) { if( log.isErrorEnabled() ) { log.error("RemoteException when unloading a component pending termination - ignoring and continue", e); } } } pending.clear(); } COM: <s> unload components in the pending state these will not be caught by </s>
funcom_train/18165756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (cdfData == null) { return "** in Progress **"; } // alert that we haven't made persistent yet. if (file == null) { IClassEntry ce = cdfData.getPrimary(); if (ce == null) { return "** in Progress **"; } return "* " + cdfData.getPrimary().toString(); } // otherwise, return name of file. return file.getName(); } COM: <s> reasonable representation of the cdf as a string </s>
funcom_train/5231013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getDate() { String sVal = getValue(); Date date = null; if (sVal != null) { try { date = stringToDate(sVal); } catch (ParseException e) { // Should never get here because all values would have been // parsed as part of validateValue(). throw new RuntimeException(e); } } return date; } COM: <s> returns the value of this parameter as a java </s>
funcom_train/32763448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setScale(double newScale) { String scaleString = String.valueOf(10*newScale); Dictionary valueLabels = new Hashtable(2); valueLabels.put( new Integer(0), new JLabel("0") ); valueLabels.put( new Integer(100), new JLabel(scaleString) ); valueSlider.setLabelTable(valueLabels); updateValueSlider(); } COM: <s> set the specified scale for the scale slider </s>
funcom_train/44853194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IAuthenticator getActiveAuthenticator() throws VException { if (availableAuthenticators.isEmpty()) return null; String lAuthenticatorName = getContributionName(PreferencesHandler.KEY_MEMBER_SEARCHER); for (IAuthenticatorContribution lContribution : availableAuthenticators) { if (lAuthenticatorName.equals(lContribution.getBundleName())) { return lContribution.getAuthenticator(); } } //if we didn't find the appropriate one, take the first available return availableAuthenticators.iterator().next().getAuthenticator(); } COM: <s> retrieve the actual authenticator </s>
funcom_train/1683170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String substring(int beginIndex, int endIndex) { if (beginIndex < 0) { throw new IndexOutOfBoundsException(); } if (endIndex > this.len) { throw new IndexOutOfBoundsException(); } if (beginIndex > endIndex) { throw new IndexOutOfBoundsException(); } return new String(this.buffer, beginIndex, endIndex - beginIndex); } COM: <s> returns a substring of this buffer </s>
funcom_train/26067450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveFile(final String aSaveableURLString, final byte[] someData) throws IOException{ final OutputStream os = this.openFileOutputBasedOnStoragePolicy(aSaveableURLString); final BufferedOutputStream bos = new BufferedOutputStream(os, StreamUtils.IO_BUFFER_SIZE); bos.write(someData); bos.flush(); bos.close(); if(!this.mTilesAlreadyUpdatedInDatabase.contains(aSaveableURLString)){ updateCacheSize(aSaveableURLString, someData.length); this.mTilesAlreadyUpdatedInDatabase.add(aSaveableURLString); } } COM: <s> saves the file based on this instances storage policy </s>
funcom_train/19051436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WWEEditorPane getOutermostJEditorPane() { View parent = getParent(); WWEFrameSetView frameSetView = null; while (parent != null) { if (parent instanceof WWEFrameSetView) { frameSetView = (WWEFrameSetView)parent; } parent = parent.getParent(); } if (frameSetView != null) { return (WWEEditorPane)frameSetView.getContainer(); } return null; } COM: <s> finds the outermost frame set view </s>
funcom_train/44136174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanFileName() { if(this.m_FileName.toLowerCase().endsWith("."+OSMFile.OSM_THEMEFILE_EXTENSION)) m_FileName = m_FileName.substring(0, m_FileName.length() - OSMFile.OSM_THEMEFILE_EXTENSION.length() - 1); } COM: <s> it transforms the name of the file into a name without extension </s>
funcom_train/3351237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PCIDevice findDevice(int vendorId, int deviceId) { for (PCIDevice dev : devices) { final PCIDeviceConfig cfg = dev.getConfig(); if (cfg.getVendorID() == vendorId) { if (cfg.getDeviceID() == deviceId) { return dev; } } } return null; } COM: <s> find a device with a given vendor and device id </s>
funcom_train/25857334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadData(String loadFileName)throws Exception{ try{ DataInputStream fin=new DataInputStream(new BufferedInputStream(new FileInputStream(loadFileName))); for (int i = 0; i < 256; ++i) sets0[i].loadSet(fin); for (int i = 0; i < 256; ++i) sets1[i].loadSet(fin); fin.close();} catch(Exception e){ throw new Exception("Error while load Sets!"); } } COM: <s> load the sets from a file named load file name </s>
funcom_train/37034119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean addMapping( String ctxP, String ext, PrintWriter mod_jk ) { if( debug > 0 ) log( "Adding map for " + ext ); if(! ext.startsWith("/") ) ext = "/" + ext; if(ext.length() > 1) mod_jk.println(indent + "JkMount " + ctxP + ext+ " " + jkWorker ); return true; } COM: <s> add a partially specified appache mapping </s>
funcom_train/23247184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTrafficMessageSource(final ITrafficMessageSource aSource) { this.mySources.add(aSource); for (TrafficMessagesListener listener : this.myTrafficMessagesListeners) { try { listener.sourceAdded(aSource); } catch (Exception e) { LOG.log(Level.SEVERE, "Internal error while informing listener about " + "an added source of TMC information", e); } } } COM: <s> register another source of traffic messages </s>
funcom_train/22277417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setKnobLength(int newKnobLength) { int scrollTrayLength; scrollTrayLength = scrollTrayLength(); if (newKnobLength < minKnobLength()) { newKnobLength = minKnobLength(); } else if (newKnobLength > scrollTrayLength) { newKnobLength = scrollTrayLength; } knobLength = newKnobLength; } COM: <s> sets the length of the scroll bars scroll knob </s>
funcom_train/20045594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _isReadOnly() { boolean result = false; try { openReg(oObj, openF, false, true); result = !oObj.isReadOnly(); closeReg(oObj); } catch (InvalidRegistryException e) { e.printStackTrace(log); result = false; } tRes.tested("isReadOnly()", result); } COM: <s> test opens the registry key with the url from </s>
funcom_train/18729986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double dist() { return Math.sqrt((camera[0] - center[0]) * (camera[0] - center[0]) + (camera[1] - center[1]) * (camera[1] - center[1]) + (camera[2] - center[2]) * (camera[2] - center[2])); } COM: <s> the distance from camera to center </s>
funcom_train/32353442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMLNode getNodeSubNode(final String tagname) { final NodeList children = node.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { final Node child = children.item(i); if (child.getParentNode() == node) { final String name = child.getNodeName(); if (name.equals(tagname)) { return new XMLNode(child); } } } return null; } COM: <s> getter for an direct sub node </s>
funcom_train/14022762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerConverter(BeanConverter pConverter) { List<Class<?>> supportedClassConverter = pConverter.getSupportedClassConverter(); for (Class<?> class1 : supportedClassConverter) { registerClassConverter(class1, pConverter); } List<Class<?>> supportedBeanConverter = pConverter.getSupportedBeanConverter(); for (Class<?> class1 : supportedBeanConverter) { registerBeanConverter(class1, pConverter); } } COM: <s> register all supported convert abilities from the converter </s>
funcom_train/44168140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canAttack(Unit defender) { if (!isOffensiveUnit() || defender == null || defender.getTile() == null) return false; Tile tile = defender.getTile(); return (isNaval()) ? (tile.getSettlement() == null && defender.isNaval()) : (!defender.isNaval() || defender.isBeached()); } COM: <s> can this unit attack a specified defender </s>
funcom_train/30172442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getUploadQueue(){ Vector newVect = new Vector(); synchronized(pool){ DownloadInfo di; try{ for(int i=0;i<pool.size();i++){ di = new DownloadInfo((DownloadInfo)pool.get(i)); newVect.add(di); } } catch(GIEWSException e){ return null; } } return newVect; } COM: <s> get upload queue </s>
funcom_train/13953851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(ERMetadataDirectorySet rawAssetMetadata) { if (rawAssetMetadata._width != -1) { _width = rawAssetMetadata._width; } if (rawAssetMetadata._height != -1) { _height = rawAssetMetadata._height; } _metadataDirectories.addAll(rawAssetMetadata._metadataDirectories); } COM: <s> adds the given raw directory set to this directory set </s>
funcom_train/28657317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRotation(int value) throws CameraException { if ((value >= 0) && (value < rotation.length)) { valueRotation = value; } else { throw new CameraException( java.util.ResourceBundle.getBundle("lang/Languages").getString("invalid_image_parameter_selection")); } } COM: <s> sets the value for the rotation </s>
funcom_train/36431691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object around(final ProceedingJoinPoint proceedingJoinPoint) { Object object; try { object = proceedingJoinPoint.proceed(); } catch (final Throwable e) { throw new TechnicalException( ProfilingThread.MBK_PROC_JOINPOINT_PROFILING_ERROR, "Exception while proceeding to the next target method", e); } // TODO: get the method signature and the callee // TODO: identify thread and pass method information to the JMX MBean // TODO: consolidate method chain calls return object; } COM: <s> around advice can be used to profile method calls for a thread </s>
funcom_train/49462482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reportInconsistentData() throws Exception{ //check that all rules return a 407 for(Iterator<RuleDefinition> it = rules.iterator(); it.hasNext();){ RuleDefinition rd = it.next(); if(rd.status != 407){ _logger.warn("Rule ["+rd.name+"] expected to return HTTP 407, but returns HTTP "+rd.status+"."); } } } COM: <s> theoricately rules should all return http 407 </s>
funcom_train/31167690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int processEscape(byte[] b, int index) { int start = index; boolean complete = false; // we know we want at least one character, otherwise this method would not have been called while (!complete && index < b.length) { escapeSequence.append((char) b[index++]); complete = tryToProcessEscapeSequence(); } return index - start; } COM: <s> processes a partial or complete escape sequence </s>
funcom_train/15470341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkOrganizationForNullUuid(Organization o) { if (o.getUuid() == null || o.getUuid().equals("0")) { o.setUuid(CaBIG_UUIdGenerator.getUUID()); // Set the document text to the synthesized section Transaction txPub = sessionPub.beginTransaction(); sessionPub.saveOrUpdate(o); sessionPub.flush(); sessionPub.refresh(o); txPub.commit(); } } COM: <s> check organization for null uuid </s>
funcom_train/34564362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean ping(final boolean local) { try { new ClientSession(local ? "localhost" : ctx.prop.get(Prop.HOST), ctx.prop.num(local ? Prop.SERVERPORT : Prop.PORT), "", ""); } catch(final IOException e) { if(e instanceof LoginException) return true; } return false; } COM: <s> checks if a server is running ping like </s>
funcom_train/46636048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reorderViewableColumnsLeftToRightByPosition() throws Exception { // Moving to the end columnReorderLayer.reorderColumnPosition(0, 4); assertEquals(2, columnReorderLayer.getColumnPositionByIndex(3)); assertEquals(3, columnReorderLayer.getColumnPositionByIndex(0)); assertEquals(0, columnReorderLayer.getColumnIndexByPosition(3)); assertEquals(1, columnReorderLayer.getColumnIndexByPosition(0)); } COM: <s> index 1 2 3 0 </s>
funcom_train/29955686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isMutatable(final Constant c, final int i) { return mConstantFirstRef[i] != -1 && c != null && ((mStrings && c instanceof ConstantString) || (mCPool && (c instanceof ConstantLong || c instanceof ConstantInteger || c instanceof ConstantFloat || c instanceof ConstantDouble))); } COM: <s> test if a constant in the pool is mutatable </s>
funcom_train/18060965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String ret; ret = Integer.toString(ifIndex)+"="+ifDescr+"("+ifAlias+")@" + getIfSpeedString() +" Admin=" + ifAdminStatus + " Link=" + ifOperStatus + "\nVlans: "+ifVlanMember.toString()+"\n"; return ret; } COM: <s> general to string method to convert all info in a single string </s>