__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/26071063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean isLast() { Boolean isLast = Boolean.FALSE; int dimensionsCount = dimensions.length; DimensionSizeIndexPair lastDimensionSizeIndexPair = dimensions[dimensionsCount-1]; Integer parameterIndex = lastDimensionSizeIndexPair.getDimensionParameterIndex(); Integer maxParameterIndex = lastDimensionSizeIndexPair.getMaxDimensionParameterIndex(); if (parameterIndex.equals(maxParameterIndex)) { isLast = Boolean.TRUE; } return isLast; } COM: <s> returns true when last combination is remaining </s>
funcom_train/9139845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean findTerm(int _termId) { try { idToOffsetFile.seek((long)_termId * 8L); return seekEntry((int) (idToOffsetFile.readLong()/(long)lexiconEntryLength)); } catch(IOException ioe) { logger.error("Input/Output exception while reading the lexicon index file for termid "+_termId+": ", ioe); } return false; } COM: <s> finds the term given its term code </s>
funcom_train/41234399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeUIComponents() { ProjectIssuesTableModel model = new ProjectIssuesTableModel(); _mantisIssues.setModel(model); TableColumnModel columnModel = _mantisIssues.getColumnModel(); columnModel.getColumn(0).setPreferredWidth(50); columnModel.getColumn(1).setPreferredWidth(325); columnModel.getColumn(2).setPreferredWidth(75); _mantisIssuesPane.setViewportView(_mantisIssues); setData(_controller); } COM: <s> components were already created were just resetting column sizes and stuff </s>
funcom_train/44841951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInstanceOf(String anInstance, String aClass, boolean proper){ Object o = invoke(isInstanceOf_0, new String[]{"anInstance", "aClass", "proper"}, new Object[]{anInstance, aClass, Boolean.valueOf(proper)}); return ((Boolean)o).booleanValue(); } COM: <s> check that a uri is an instance of a class </s>
funcom_train/3543026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean selectLast(boolean forceJump) { boolean ret = canSwitchToChoices() && (forceJump || (historyList.getSelectedIndex() == (historyModel.getSize() - 1))); if (ret) { focusChoices(); } return select(focusedList.getModel().getSize() - 1) || ret; } COM: <s> selects the last element in the focused list </s>
funcom_train/11393522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int run(String[] args) throws Exception { int exitCode = 0; exitCode = init(args); if (exitCode != 0) { return exitCode; } genDirStructure(); output(new File(outDir, DIR_STRUCTURE_FILE_NAME)); genFileStructure(); outputFiles(new File(outDir, FILE_STRUCTURE_FILE_NAME)); return exitCode; } COM: <s> the main function first parses the command line arguments </s>
funcom_train/14520407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initGlobalConfigurationBaseURL(Admin admin, String computername, String applicationpath) { trace(">initGlobalConfigurationBaseURL()"); GlobalConfiguration gc = this.loadGlobalConfiguration(admin); gc.setComputerName(computername); gc.setApplicationPath(applicationpath); this.saveGlobalConfiguration(admin, gc); trace("<initGlobalConfigurationBaseURL()"); } // initGlobalConfigurationBaseURL COM: <s> sets the base url in the global configuration </s>
funcom_train/26623144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connect() throws RPCConnectionBus.ConnectionRefusedException { try { _rpc = _manager.createRPCConnection(_remote, IApplicationNetlet.class); _rpc.addConnectionListener(this); _netlet = (IApplicationNetlet)_rpc.getRemoteObject(); } catch (Exception e) { throw new RPCConnectionBus.ConnectionRefusedException(); } } COM: <s> connect to the remote netlet </s>
funcom_train/8484106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ATTable base_explode() throws InterpreterException { ATObject[] chars = new ATObject[javaValue.length()]; char[] rawchars = javaValue.toCharArray(); for (int i = 0; i < chars.length; i++) { chars[i] = NATText.atValue(new Character(rawchars[i]).toString()); } return NATTable.atValue(chars); } COM: <s> explodes a text string into a table of constinuent characters </s>
funcom_train/20875097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeInitialValue() { if (iInitialValue == null) return; if (iValues == null) return; if (getAssignment() != null && getAssignment().equals(iInitialValue)) unassign(0); iValues.remove(iInitialValue); if (iModel != null) iModel.invalidateVariablesWithInitialValueCache(); iInitialValue = null; } COM: <s> permanently remove the initial value from the variables domain for </s>
funcom_train/25369613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyRulesListeners(BatchAssociationRulesEvent are) { Vector<BatchAssociationRulesListener> l; synchronized (this) { l = (Vector<BatchAssociationRulesListener>)m_rulesListeners.clone(); for (int i = 0; i < l.size(); i++) { l.get(i).acceptAssociationRules(are); } } } COM: <s> notify all batch association rules listeners of </s>
funcom_train/46730092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDeletedInd(int deletedInd) { if (!(this.deletedInd == deletedInd)) { int olddeletedInd= 0; olddeletedInd = this.deletedInd; this.deletedInd = deletedInd; setModified("deletedInd"); firePropertyChange(String.valueOf(MEDITEMCOMPONENTS_DELETEDIND), olddeletedInd, deletedInd); if (deletedInd==1) { setNotActive(); } } } COM: <s> deleted indicator 1 deleted 0 not deleted </s>
funcom_train/36431692
/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) { // TODO: get current time Object object = null; try { object = proceedingJoinPoint.proceed(); } catch (final Throwable e) { throw new TechnicalException( MonitoringMethod.MBK_PROC_JOINPOINT_MONITORING_ERROR, "Exception while proceeding to the next target method", e); } // TODO: record execution time // consolidate time per method/object // check the performance threshold to identify slow methods return object; } COM: <s> around advice can be used to measure proceeding method time </s>
funcom_train/46752571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPackageName(String packageName) { if (Converter.isDifferent(this.packageName, packageName)) { String oldpackageName= null; oldpackageName = this.packageName; this.packageName = packageName; setModified("packageName"); firePropertyChange(String.valueOf(DATABASETABLES_PACKAGENAME), oldpackageName, packageName); } } COM: <s> package source code is generated into </s>
funcom_train/9643697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintSubgroupTargetShare(Graphics g) { if (subgroupTargetShare < 0) { return; } g.setColor(selected ? SUBGROUP_TARGET_SHARE_SELECTION_COLOR : SUBGROUP_TARGET_SHARE_COLOR); Insets insets = getInsets(); int width = getWidth() - insets.left - insets.right; width = (int) (width * subgroupTargetShare); g.drawLine(width, 0, width, getHeight() - 1); } COM: <s> paint subgroup target share </s>
funcom_train/302040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { // The location of the properties file. String strPropLocation = System.getProperty( "user.home" ) + System.getProperty( "file.separator" ) + ".simulacrum"; // Store the settings of the GUI if ( !this.storeProperties(strPropLocation) ) { System.out.println( "Error storing properties!" ); } } COM: <s> the applet stop method </s>
funcom_train/20970187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopServices() { for (Iterator iter = services.iterator(); iter.hasNext();) { TcpService service = (TcpService) iter.next(); log.info("Stoping service [" + service.getName() + "]"); service.stopService(); log.info("Service [" + service.getName() + "] stoped"); } // Remove all services from the list services.clear(); } COM: <s> stops all services </s>
funcom_train/4972037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ComplexArray multiply(ComplexScalar rhs) { ComplexArray result = new ComplexArray(this.getLength()); for (int i = 0; i < this.re.length; i++) { result.setElement(this.getElement(i).multiply(rhs), i); } return result; } COM: <s> multiply this complex array by a complex scalar this performs the </s>
funcom_train/16394409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRolePermission(AccessControlledEntry object, Role role, Long permission) { if (null == getRolePermission(object, role, permission)) { Permission p = (Permission)session.get(Permission.class, permission); RoleAccessRule entry = new RoleAccessRule(); entry.setAccessControlEntry(object); entry.setRole(role); entry.setPermission(p); session.save(entry); } } COM: <s> sets role permission for an object nothing happens if the permission already exists </s>
funcom_train/17772450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ StringBuffer sb = new StringBuffer(); sb.append("Field: ").append(field); sb.append("\nPattern:").append(getPattern()); sb.append("\nCgString:").append(getCgString()); return sb.toString(); } COM: <s> returns a string representation of the current state of a </s>
funcom_train/7296879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProtocolVersion forVersion(int major, int minor) { if ((major == this.major) && (minor == this.minor)) { return this; } if ((major == 2) && (minor == 0)) { return SIP_2_0; } // argument checking is done in the constructor return new SipVersion(major, minor); } COM: <s> obtains a specific sip version </s>
funcom_train/17567709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onSensorPlug(String idSensor) { //Logs the sensor has been pluged. ui.writeLog("Sensor: "+idSensor+". Event: Plugged."); try { //Start capturing from plugged sensor. GrFingerJava.startCapture(idSensor, this, this); } catch (GrFingerJavaException e) { //write error to log ui.writeLog(e.getMessage()); } } COM: <s> this function is called every time a fingerprint reader is plugged </s>
funcom_train/8278370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isUsePass(CullContext ctx, RenderPass p) { if( ( renderQueueMode & p.getQueueFilter() ) != 0 && ((1<<p.getId()) & ctx.passfilter & this.renderPassMode) != 0) { // the element passed for at least one return true; } return false; } COM: <s> returns if this element is to be rendered within the given queue </s>
funcom_train/47747557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateCell(String workgroup, RGB color) { int pos = hasPosition(workgroup); if (pos != -1) { tab[pos] = new ColorWorkgroup(color, workgroup); // link with the database String query = "UPDATE color SET color = '" + returnColorString(color) + "' WHERE workgroup ='" + workgroup + "'"; jdbc.JDBCexecuteQuery(query); // tabToDisplay(); } } COM: <s> update a cell into the tab </s>
funcom_train/44850964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object inObject) { if (inObject == null) return false; if (!(inObject instanceof QueryStatement)) return false; String lSQLofCompared = ((AbstractQueryStatement)inObject).getSQLString(); if (getSQLString() != null) { return getSQLString().equals(lSQLofCompared); } else { return (lSQLofCompared == null); } } COM: <s> query statements are equal if their sql statements are equal </s>
funcom_train/28417739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void blockUpdate() { tiger.reset(); tiger.update((byte)0); // leaf prefix tiger.update(buffer,0,bufferOffset); if((bufferOffset == 0) && (nodes.size() > 0)) // fix by jonelo return; // don't remember a zero-size hash except at very beginning nodes.addElement((Object)tiger.getByteArray()); } COM: <s> update the internal state with a single block of size 1024 </s>
funcom_train/19895343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createRadioPanel(){ JPanel radioPanel = new JPanel(); radioPanel.add(singleThreaded); singleThreaded.setSelected(true); radioPanel.add(multiThreaded); ButtonGroup threadGroup = new ButtonGroup(); threadGroup.add(singleThreaded); threadGroup.add(multiThreaded); return radioPanel; } COM: <s> creates the panel for the radio buttons </s>
funcom_train/7971672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean needsTranslation(Language lang) { for (int i = 0; i < parties.size(); i++) if (parties.get( i ).getAbbrev( lang ).equals( "" ) || parties.get( i ).getName( lang ).equals( "" )) return true; return false; } COM: <s> returns true if there are missing translations in the list of parties </s>
funcom_train/5001802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addVectorToWorkspace(String variableName, DoubleArrayList vector) throws RWorkspaceException { vector.trimToSize(); double[] vald = vector.elements(); try { connection.assign(variableName, vald); } catch (REngineException e) { throw new RWorkspaceException(e); } Log.txm.finest("DOUBLE_VECTOR_ADDED_TO_WORKSPACE"+ new Object[]{vald.length, variableName}); //$NON-NLS-1$ } COM: <s> add a vector into the workspace and link it to a name </s>
funcom_train/13188056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj instanceof DefaultBoxAndWhiskerCategoryDataset) { DefaultBoxAndWhiskerCategoryDataset dataset = (DefaultBoxAndWhiskerCategoryDataset) obj; return ObjectUtilities.equal(this.data, dataset.data); } return false; } COM: <s> tests this dataset for equality with an arbitrary object </s>
funcom_train/42664666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkLevel(TalIo io) { int middle = one_level>>2; if (cntValid) { for (level=1; level<levelPos.length; ++level) { // @WCA loop=14 if (cnt < levelPos[level]-middle) { break; } } } else { level = 0; } for (int i=0; i<io.led.length; ++i) { // @WCA loop=14 io.led[i] = (i == level-1); } } COM: <s> check current level and set leds </s>
funcom_train/8484645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JavaMethod get(Class cls, String methName, boolean isStatic) { CacheKey key = new CacheKey(cls, methName, isStatic); SoftReference ref = (SoftReference) cache_.get(key); if (ref == null) { return null; // cache miss } else { JavaMethod entry = (JavaMethod) ref.get(); if (entry != null) { // cache hit return entry; } else { // entry was garbage-collected, clean up the mapping cache_.remove(key); return null; // cache miss } } } COM: <s> retrieve a java method entry from the cache </s>
funcom_train/41825166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSvnRemote(int index, String svnRemote) { Element svnRoot = getChild(root,"scm"); Element svnLocations = getChild(svnRoot,"locations"); Element parent = getChildren(svnLocations,"hudson.scm.SubversionSCM_-ModuleLocation",index); getChild(parent,"remote").setText(svnRemote); } COM: <s> sets the svn remote </s>
funcom_train/4857023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void giveToVariant(double drCube) { if (!this.hasVariant) { return; } // Parameters.out.println("Giving " + drCube + " to " + this.variant + " the variant of " + this); this.variant.addToBuffer(drCube * this.density / this.variant.density); this.bufferAmount -= drCube; } COM: <s> transfers the given amount to the parent material </s>
funcom_train/14608791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent action) { if (action.getSource().equals(buttonPanel.getOkButton())) { if (getData() != null) { okButtonPressed = true; setVisible(false); } } else { okButtonPressed = false; setVisible(false); } } COM: <s> a button has been activated </s>
funcom_train/2549272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SequencerRun getSequencerRunBySequencerRunId(Integer sequencerRunID) { SequencerRun sequencerRun =null; /* a Hibernate session */ Session session = null; /* we always need a transaction */ Transaction tx = null; session = HibernateSessionFactory.getSession(); tx = session.beginTransaction(); sequencerRun = (SequencerRun) session.get(SequencerRun.class, sequencerRunID); tx.commit(); return sequencerRun; } COM: <s> get sequencer run by sequencer run id </s>
funcom_train/43098694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEntry(Object handle, Object value) { if (handle instanceof MState && (value == null || value instanceof MAction)) { ((MState) handle).setEntry((MAction) value); return; } throw new IllegalArgumentException("handle: " + handle + " or value: " + value); } COM: <s> sets the entry action of some state </s>
funcom_train/16221765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerPropertyExclusion( Class target, String propertyName ) { if( target != null && propertyName != null ) { Set set = (Set) exclusionMap.get( target ); if( set == null ){ set = new HashSet(); exclusionMap.put( target, set ); } if( !set.contains( propertyName )){ set.add(propertyName ); } } } COM: <s> registers a exclusion for a target class </s>
funcom_train/48456291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Process startStdinStderrInstance(String tag) throws IOException { start(); out = OutputPiper.createOutputPiper(tag+ "-stdout", p.getInputStream(), System.out); err = OutputPiper.createOutputPiper(tag+ "-stderr", p.getErrorStream(), System.err); return p; } COM: <s> like calling start but uses </s>
funcom_train/38380580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void receiveGraphpadElementname(String name) { // check if exactly one cell selected if ((jTable.getSelectedColumnCount() != 1) || (jTable.getSelectedRowCount() != 1) || (jTable.getSelectedColumn() != 1)) return; // insert name into selected cell jTable.setValueAt(name, jTable.getSelectedRow(), 1); } COM: <s> if a single cell on the right side of the table is selected </s>
funcom_train/38417290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrentTool(Tool newTool) { //this.getPhysicalSpace().setCurrentTool(newTool); //this.getVirtualSpace().setCurrentTool(newTool); //this.mVSpace.setCurrentTool(newTool); //this.mPSpace.setCurrentTool(newTool); this.getCurrentWorkspace().setCurrentTool(newTool); } COM: <s> stores the tool currently being used by the designer </s>
funcom_train/34589403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Type getSubtype(Type.Code code, int...indices) { Type type = getSubtype(indices); if (type.getCode() != code) { throw new RuntimeException( "Type mismatch: expecting " + code + " at " + Arrays.toString(indices) + " but found " + type.getCode() + " instead."); } return type; } COM: <s> extracts the subtype from this data object at the specified location </s>
funcom_train/37586766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBlockIndent2 () throws BadLocationException { _doc.insertString(0, " x;\n y;\n", null); safeIndentLines(0, _doc.getLength()); _assertContents("x;\ny;\n", _doc); } COM: <s> regression test for bug in drjava 20010802 1020 </s>
funcom_train/39487693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSimpleArrayCopy () { int[] a = { 0, 1, 2, 3, 4, 5, 6, 7 }; int[] b = new int[a.length]; System.arraycopy(a, 0, b, 0, a.length); for (int i=0; i<a.length; i++){ assert b[i] == i; } } COM: <s> just needs a gazillion more cases different sizes slices overruns </s>
funcom_train/31625917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Output getViewComment(Map params) throws DBException { Output result = null; if (hasCustomHandler()) { result = getCustomHandler().getViewComment(params); } if (result == null) { result = new Output(Attribute.ATTRIBUTE_COMMENT, AddNodeAction.str(getAttribComment())); } return result; } COM: <s> retrieve the view comment as an output </s>
funcom_train/18021112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refresh(CompletionResultSet resultSet) { assert (SwingUtilities.isEventDispatchThread()); assert !cancelled : "refresh() called on canceled task"; // NOI18N if (queryInvoked) { assert (resultSet != null); synchronized (this) { refreshResultSet = resultSet; } refreshImpl(); } else { query.preQueryUpdate(component); } } COM: <s> called by completion infrastructure in awt thread once there </s>
funcom_train/40092139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadInvestigationTypes(String facilityName) { for (TFacility facility : facilityNames) { if (facility.getName().compareToIgnoreCase(facilityName) == 0) utilityService.getInvestigationTypes(facility.getName(), new InvestigationTypeCallback(facility.getName(), this)); } } COM: <s> this method loads investigation types for a facility from top cat service </s>
funcom_train/35487069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder sb = new StringBuilder(); sb.append("[id=" + pID + ",len=" + pLength + ",data=0x"); for(int x = 0;x < pLength;x++) { sb.append(byteToHex(buffer[x], true)); } sb.append("]"); return sb.toString(); } COM: <s> returns this packet in string form </s>
funcom_train/42371419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected URL urlFor(String controller, String action, Object... parameters) { Map<String, Object> options = new HashMap<String, Object>(); options.put("controller", controller); options.put("action", action); options.put("parameters", parameters); url.rewrite(options); return url; } COM: <s> create a url </s>
funcom_train/646731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { fCodeScanner = null; fMultilineCommentScanner = null; fSinglelineCommentScanner = null; fStringScanner = null; fPartitionScanner = null; if (fColorManager != null) { fColorManager.dispose(); fColorManager = null; } if (fPreferenceStore != null) { fPreferenceStore.removePropertyChangeListener(fPreferenceListener); fPreferenceStore = null; fPreferenceListener = null; } } COM: <s> disposes all the individual tools of this tools collection </s>
funcom_train/37077408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sortAnnotations(Comparator comparator) { Object[] oldSet = getAnnotations().toArray(); Arrays.sort(oldSet, comparator); setAnnotations(new ArrayList<SeqFeatureI>(oldSet.length)); for (Object result : oldSet) { getAnnotations().add((SeqFeatureI) result); } } COM: <s> sorts the annotation list using the given comparator </s>
funcom_train/10888941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void readBytes(byte[] buffer, int position) throws NTLMEngineException { if (messageContents.length < position + buffer.length) throw new NTLMEngineException("NTLM: Message too short"); System.arraycopy(messageContents, position, buffer, 0, buffer.length); } COM: <s> read a bunch of bytes from a position in the message buffer </s>
funcom_train/25646243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double sphericalLength() { double length = 0d; int i = 0; Point previous = points.get(0); do { final Point current = points.get(++i); length += Util.greatCircleArcLength(previous, current) * SPHERICAL_EARTH_RADIUS; previous = current; } while (i < nodes - 1); return length; } COM: <s> calculates the spherical length of this geometry segment </s>
funcom_train/19752000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { m_state[0] = 0x67452301; m_state[1] = 0xefcdab89; m_state[2] = 0x98badcfe; m_state[3] = 0x10325476; m_state[4] = 0xc3d2e1f0; m_lCount = 0; m_digestBits = new byte[20]; m_nBlockIndex = 0; } COM: <s> initializes or resets the hasher for a new session respectively </s>
funcom_train/45617183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValue(String tag) { if (tag == null) { throw new IllegalArgumentException("tag can not be null"); } TagValueEntry tve = values.get(tag.toLowerCase()); if (tve != null) { return tve.getValue(); } for (BibTeXEntry xref : crossrefs.values()) { String val = xref.getValue(tag); if (val != null) { return val; } } return null; } COM: <s> return the value for a certain tag cross references will be followed </s>
funcom_train/31936284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WorkbenchWizardElement findWizard(String searchId) { Object[] wizards = getWizards(); for (int i = 0; i < wizards.length; ++i) { WorkbenchWizardElement currentWizard = (WorkbenchWizardElement)wizards[i]; if (currentWizard.getID().equals(searchId)) return currentWizard; } return null; } COM: <s> returns this collections associated wizard object corresponding to the </s>
funcom_train/30229204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPlayerNames(String[] names) { if (names == null) { return; } for (int i = Math.min(MAX_PLAYERS, names.length) - 1; i >= 0; i--) { if (names[i] != null) { playerNames[i] = names[i]; } } } COM: <s> setter for property player names </s>
funcom_train/47270287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel buildLogPanel() { JPanel panel = new JPanel(); panel.setLayout(new BorderLayout()); m_taLog = new JTextArea(); m_taLog.setRows(6); m_taLog.setEditable(false); panel.add(new JLabel("Log"), BorderLayout.NORTH); panel.add(new JScrollPane(m_taLog), BorderLayout.CENTER); return panel; } COM: <s> creates and initializes the panel containing the log text area </s>
funcom_train/3371954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Icon getDisabledIcon() { if (!disabledIconSet && disabledIcon == null && defaultIcon != null) { disabledIcon = UIManager.getLookAndFeel().getDisabledIcon(this, defaultIcon); if (disabledIcon != null) { firePropertyChange("disabledIcon", null, disabledIcon); } } return disabledIcon; } COM: <s> returns the icon used by the label when its disabled </s>
funcom_train/46618562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void verifySettings() { if (dateTime == null && millis < 0) { setError("You must provide a datetime or the number of " + "milliseconds."); } else if (millis < 0) { setError("Date of " + dateTime + " results in negative milliseconds value" + " relative to epoch (January 1, 1970, 00:00:00 GMT)."); } } COM: <s> this is a consistency check to ensure the selectors required </s>
funcom_train/33826542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BufferedImage takeDesktopScreenshot() { Rectangle screen = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()); JTextComponent textComponent = findFocusOwnerAndHideItsCaret(); try { return robot.createScreenCapture(screen); } finally { if (textComponent != null) showCaretOf(textComponent); } } COM: <s> takes a screenshot of the desktop </s>
funcom_train/1958569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resizeWire(float factor) { x1 *= factor; y1 *= factor; x2 *= factor; y2 *= factor; float[] dashArray = wireStroke.getDashArray(); if(dashArray != null){ for(int i = 0; i < dashArray.length; i++){ dashArray[i]*=factor; } } wireStroke = new BasicStroke( wireStroke.getLineWidth()*factor, wireStroke.getEndCap(), wireStroke.getLineJoin(), wireStroke.getMiterLimit(), dashArray, wireStroke.getDashPhase()); } COM: <s> resizes the wire </s>
funcom_train/21776569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toOutputString() { StringBuffer retval = new StringBuffer(id.toString()); retval.append("\t").append(partialPlan.getId()).append("\t").append(name).append("\t"); retval.append(type).append("\n"); return retval.toString(); } COM: <s> code to output string code step n </s>
funcom_train/7272153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void saveAndDisposeWindow() { if (tabbedPane.hasDataChanged()) { MetaDataSaver saver = new MetaDataSaver(tabbedPane.getFileDesc(), tabbedPane.getSchema(), tabbedPane.getInput()); saver.saveMetaData(); } disposeWindow(); } COM: <s> if changes were made save changes then close window </s>
funcom_train/4684694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLinkStrength(Datagram dg) { if (dg instanceof Radiogram) { int rssi = ((Radiogram)dg).getRssi(); if (rssi < -49) { // for SPOT CC2420 RSSI ranges from -50 to 30 rssi = -49; } else if (rssi > 50) { rssi = 50; } return (rssi + 50); // maps to [1, 100] } else { return -1; } } COM: <s> returns the link strength for the received datagram </s>
funcom_train/42062053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getAvailablePort(){ int i = 0; synchronized(SALSpotConnectionImpl.getUsedPorts()){ List<String> list = SALSpotConnectionImpl.getUsedPorts(); int[] used = new int[list.size()]; for(String p: list) used[i++] = Integer.parseInt(p); Arrays.sort(used); for(i=32;i<255;i++) if(Arrays.binarySearch(used, i)<0 && i!=BROADCAST_PORT){ list.add(String.valueOf(i)); return i; } } return -1; } COM: <s> this method returns the next available port or 1 if there is none </s>
funcom_train/46825007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawMousePlacingCursor(Graphics g) { int seatNum = model.getSeatNum(); if (seatNum == Player.NOT_SEATED) return; if (this.model.stillPlacingShips(seatNum)) { Point p = this.model.getBoardPlacingPoint(); if (p != null) drawShip(g, model.getPlacingShipName(seatNum), p.x, p.y, model.isShipPlacedHorizontally(seatNum)); } } COM: <s> draw mouse placing cursor </s>
funcom_train/5395748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSerializeTime() { System.out.println("getSerializeTime"); GZipProcess instance = null; long expResult = 0L; long result = instance.getSerializeTime(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get serialize time method of class org </s>
funcom_train/21218368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startRecording() { if (!isRecording()) { try { fileWriter = new FileWriter("output.raw"); } catch (IOException ioe) { Logger.getLogger(this.getClass()).error("Could not open file for recording.", ioe); System.out.println("Could not open file for recording"); } setRecording(true); } } COM: <s> start sound recording to wav file </s>
funcom_train/5413721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateUnread(int delta) throws ServiceException { if (delta == 0 || !trackUnread()) return; markItemModified(Change.MODIFIED_UNREAD); // update our unread count (should we check that we don't have too many unread?) mData.unreadCount += delta; if (mData.unreadCount < 0) throw ServiceException.FAILURE("inconsistent state: unread < 0 for item " + mId, null); } COM: <s> updates the in memory unread count for the item </s>
funcom_train/19310444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean validOffset(final PropertyValue pv) { if (pv instanceof FoPropertyKeyword) { final FoValue keyword = ((FoPropertyKeyword) pv).getValue(); if (keyword == FoValue.AUTO) { return true; } return false; } if (pv instanceof DtLength) { return true; } return false; } COM: <s> tests the validity of a given offset </s>
funcom_train/6476098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printHelpMesg() { printVersion(); System.out.println("Please See the Agent Factory Manual for Detailed Documentation"); System.out.println("Basic Usage:"); System.out.println(" agentfactory -config <config_file> [-script <script_name> | " + "-port <port_number> ] [-output <output_file> ]"); } COM: <s> print a simple help message to standard out </s>
funcom_train/11651441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getSendFileAsPostBody() { // If there is one file with no parameter name, the file will // be sent as post body. HTTPFileArg[] files = getHTTPFiles(); return (files.length == 1) && (files[0].getPath().length() > 0) && (files[0].getParamName().length() == 0); } COM: <s> determine if the file should be sent as the entire post body </s>
funcom_train/51337631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_newTx_readOnly_timestampInFuture() { final MockTransactionService service = newFixture(); try { /* * Note: The commit time log is empty so anything is in the future. */ try { service.newTx(10); fail("Expecting: "+IllegalStateException.class); } catch(IllegalStateException ex) { log.info("Ignoring expected exception: "+ex); } } finally { service.destroy(); } } COM: <s> verify that you can not create a read only transaction using a timestamp </s>
funcom_train/28362792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setProblem(Problem problem) { _problem = problem; final List<Variable> variables = _problem.getVariables(); final MutableTrialPoint trialPoint = new MutableTrialPoint(variables.size()); final Iterator<Variable> variableIter = variables.iterator(); while (variableIter.hasNext()) { final Variable variable = variableIter.next(); final double value = variable.getInitialValue(); trialPoint.setValue(variable, value); } reset(trialPoint.getTrialPoint()); } COM: <s> sets the problem </s>
funcom_train/22029349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createVar(String name, ThingReference tr) throws VisADException { FormulaVar v; try { v = getVarByName(name); } catch (FormulaException exc) { v = null; } if (v != null) { throw new FormulaException("The variable " + name + " already exists."); } Vars.add(new FormulaVar(name, this, tr)); } COM: <s> add a variable to the database that uses tr as its thing reference </s>
funcom_train/10980815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParse() { testParseBase("-//Apache Software Foundation//DTD Struts Configuration 1.2//EN", "/org/apache/struts/resources/struts-config_1_2.dtd", "/org/apache/struts/config/struts-config.xml"); } COM: <s> test parsing of a struts config </s>
funcom_train/3374074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAccessibleSelection(int i) { if (JTable.this.cellSelectionEnabled) { int column = getAccessibleColumnAtIndex(i); int row = getAccessibleRowAtIndex(i); JTable.this.removeRowSelectionInterval(row, row); JTable.this.removeColumnSelectionInterval(column, column); } } COM: <s> removes the specified child of the object from the objects </s>
funcom_train/15487584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonSave() { if (jButtonSave == null) { jButtonSave = new JButton(); jButtonSave.setText(Application.messages.getString("BUTTON_SAVE")); jButtonSave.setBounds(new java.awt.Rectangle(105,5,90,25)); jButtonSave.setName("jButtonSave"); jButtonSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { saveTextFile(); } }); } return jButtonSave; } COM: <s> this method initializes j button save </s>
funcom_train/22950206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void optimize(MultivariateFunction f, double[] xvec, double tolfx, double tolx) { if (optimiser_ == null || xvec.length != currentNumberOfParameters_) { optimiser_ = new DifferentialEvolution(xvec.length); this.currentNumberOfParameters_ = xvec.length; } optimiser_.optimize(f,xvec,tolfx, tolx); } COM: <s> the actual optimization routine </s>
funcom_train/13856420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void apply(FiddlerImpl fiddlerImpl) { logInfoPersist("Log recovery: apply cancelling leases " +"corresponding to "+registrationIDs.length +" registration IDs"); /* Because unknown leases were not weeded out, exceptions can * occur and be propagated upward, but they can be ignored. */ fiddlerImpl.cancelLeasesDo(registrationIDs, leaseIDs); } COM: <s> modifies this services state by canceling each of the leases </s>
funcom_train/7965123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parseCommandLine(String[] args) throws IOException { CmdLineParser parser = new CmdLineParser(this); try { parser.parseArgument(args); } catch (CmdLineException e) { parser.printUsage(System.out); } if ("".equals(dataSource)) { parser.printUsage(System.out); System.exit(-1); } } COM: <s> parses command line arguments </s>
funcom_train/6507580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateGameOptions() throws OneFlagException, NonContiguousMapException { getGameOptions(); // create them if they didn't exist Location dim = tileRaster.getSpielfeldSize(); gameOptions.setX(dim.x); gameOptions.setY(dim.y); gameOptions.setBoard(tileRaster.getBoard()); gameOptions.setFlags(tileRaster.getRFlaggen()); } COM: <s> after everything is chosen update the game options </s>
funcom_train/1406425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBarChartWidthAndSpacingParameter(final int width, final int spaceBetweenBarsInGroup, final int spaceBetweenGroups) { parameterMap.put(BarChartWidthAndSpacingParameter.class, new BarChartWidthAndSpacingParameter(width, spaceBetweenBarsInGroup, spaceBetweenGroups)); } COM: <s> sets the bar chart width and spacing parameter </s>
funcom_train/15562440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLocks() { MessageQueue queue = new MessageQueue(); Date start = new Date(); Runnable writer = new MessageQueueTestWriter(queue); Thread writerThread = new Thread(writer); writerThread.start(); try { queue.readMessage(); } catch (InterruptedException e) { e.printStackTrace(); } Date end = new Date(); // Check that queue waited 1 sec to deliver the message. long timespand = end.getTime() - start.getTime(); assertTrue(timespand > 1000); } COM: <s> test that the receiver thread will lock until it receives a message </s>
funcom_train/34838304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GlueWebService createWebService(String identifier, String content) throws GlueException { if ((identifier==null)||(identifier=="")) return null; if (langType.equalsIgnoreCase(wsml_lang)) return ((GlueWebService) new WSML_GlueWebService(identifier,content)); //if (langType.equalsIgnoreCase(rdf_lang)) return new (identifier); return null; } COM: <s> create a new glue web service </s>
funcom_train/17717959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean persist(String fileName,List<Object> obj) throws Exception{ boolean result = true; String path = sWorkPath + fileName + ".txt"; validateFile(path); File file = new File(path); FileWriter writer = new FileWriter(file); BufferedWriter out = new BufferedWriter(writer); String ioAccessImpl = ioConfig.get(fileName); DataAccessI ioAccess = (DataAccessI)Class.forName(ioAccessImpl).newInstance(); ioAccess.writeObjectsToWriter(obj, out); out.close(); return result; } COM: <s> write data to specified properties file </s>
funcom_train/11380485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int next() { switch (n) { case 0: return -1; case 1: { int index = mapping.get(0); --n; return index; } default: { int pos = rand.nextInt(n); int index = mapping.get(pos); mapping.swap(pos, --n); return index; } } } COM: <s> select the next random number </s>
funcom_train/3086199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _refreshFileContents() throws IOException { int len = (int) file.length(); this.length = len; filebuffer = new char[len]; FileInputStream in = new FileInputStream(_getFile()); InputStreamReader reader = new InputStreamReader(in, _getEncoding()); int pos = 0; while (pos < len && pos != -1) { pos += reader.read(filebuffer, pos, len - pos); } } COM: <s> reads the file into the file buffer </s>
funcom_train/48268325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TableRow addRowForUiEvent(UiEvent e, boolean append) { EventWaterfallRow row = append ? appendRow(e) : prependRow(e); row.createDetails(); recordMap.put(e.getSequence(), row); // Add mouse over listener row.addMouseOverListener(e, rowListener); row.addClickListener(row, rowListener); return row; } COM: <s> this method adds a row to the table for a given ui event </s>
funcom_train/10208953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Polygon2D translated(double xOffset, double yOffset) { double[] x_ = new double[npoints]; double[] y_ = new double[npoints]; for (int i = 0; i < npoints; i++) { x_[i] = xpoints[i] + xOffset; y_[i] = ypoints[i] + yOffset; } return new Polygon2D(x_, y_, npoints); } COM: <s> return a new polygon2 d translated by offset </s>
funcom_train/25222091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGeophysGridFilename(String geophysGridFilename) { String oldGeophysGridFilename = this.geophysGridFilename; if ( !oldGeophysGridFilename.equals(geophysGridFilename) ) { this.geophysGridFilename = geophysGridFilename; firePropertyChange(PROP_GEOPHYSGRIDFILENAME, oldGeophysGridFilename, this.geophysGridFilename); setRunPrepared(false); } } COM: <s> set the value of geophys grid filename </s>
funcom_train/39802994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintDayOfMonth(Graphics g, Rectangle bounds, Calendar calendar, CalendarState state) { JComponent comp = getRenderingHandler().prepareRenderingComponent(monthView, calendar, state); rendererPane.paintComponent(g, comp, monthView, bounds.x, bounds.y, bounds.width, bounds.height, true); } COM: <s> paints a day which is of the current month with the given state </s>
funcom_train/35323899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flush() throws IOException { if (syncFlush && !def.finished()) { int len = 0; while ((len = def.deflate(buf, 0, buf.length, Deflater.SYNC_FLUSH)) > 0) { out.write(buf, 0, len); if (len < buf.length) break; } } out.flush(); } COM: <s> flushes the compressed output stream </s>
funcom_train/14330188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addResolver(Resolver resolver) { synchronized ( resolverMutex ) { Resolver[] newResolvers = new Resolver[resolvers.length + 1]; if ( resolvers.length > 0 ) System.arraycopy(resolvers, 0, newResolvers, 0, resolvers.length); newResolvers[newResolvers.length-1] = resolver; resolvers = newResolvers; } println("Resolver: " + resolver.getClass().getName()); } COM: <s> add resolver adds a resolver to the broker </s>
funcom_train/130929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getImage () { try { sendHeader (PLAYER_MSGTYPE_REQ, PLAYER_CAMERA_REQ_GET_IMAGE, 0); os.flush (); } catch (IOException e) { throw new PlayerException ("[Camera] : Couldn't send PLAYER_CAMERA_REQ_GET_IMAGE " + "command: " + e.toString(), e); } } COM: <s> request reply get current image frame </s>
funcom_train/50560578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getCompressedJavaScript(InputStream inputStream) throws IOException { InputStreamReader isr = new InputStreamReader(inputStream); JavaScriptCompressor compressor = new JavaScriptCompressor(isr, new CompressorFilterErrorReporter()); inputStream.close(); StringWriter out = new StringWriter(); compressor.compress(out, lineBreakPos, munge, warn); out.flush(); StringBuffer buffer = out.getBuffer(); return buffer.toString(); } COM: <s> note that the input stream is closed </s>
funcom_train/15626412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int runPlugin(@NotNull final String plugin, final ErrorView errorView, final Iterable<String> args, @NotNull final PluginExecutor<G, A, R> pluginExecutor) { checkForErrors(errorView); waitDialog(errorView); try { pluginExecutor.executePlugin(plugin, args); } catch (final PluginExecException ex) { System.err.println(ex.getMessage()); return 1; } return 0; } COM: <s> executes a plugin </s>
funcom_train/2573174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void showURL(String url) { if (context == null) { System.err.println("URLFilter: no url-viewer available\n"); return; } try { context.showDocument(new URL(url), "URLFilter"); } catch (Exception e) { System.err.println("URLFilter: cannot load url: " + e); } } COM: <s> show a url if the applet context is available </s>
funcom_train/47833286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Template getCopy() { // this.increaseCC(); Template replica = new Template(this); // replica.increaseCC(); // String tId = replica.getFormulaId(); // replica.setFormulaId(tId.substring(0, tId.indexOf("-")) + "-R" + replica.getCC()); return replica; } COM: <s> returns a true copy not a reference of this template </s>