__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/4916712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNoInputManagedObjectConfiguration() { final RawManagingOfficeMetaData<?> inputMo = this .createMock(RawManagingOfficeMetaData.class); // Record no Input ManagedObject configuration this.recordReturn(inputMo, inputMo.getInputManagedObjectConfiguration(), null); // Construct this.replayMockObjects(); this.constructRawBoundManagedObjectMetaData(0, inputMo); this.verifyMockObjects(); } COM: <s> ensure not create binding if no </s>
funcom_train/14653406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int isBufferFull() { int index = 0; boolean isBufferFull = true; int chunks_size = chunks.size(); while (isBufferFull && index < chunks_size) { isBufferFull = !(isChunkAtIndexEmpty(index)); if (isBufferFull) index++; } return index; } COM: <s> gives the number of the spaces that are filled </s>
funcom_train/38808671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_TCM__int_hashCode() throws JHuPeDOMException { String publicID = "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"; String systemID = "FILE://temp/test.dtd"; DocType theDocType = jhupeDomFactory.newDocType("anElement", publicID, systemID); int i = theDocType.hashCode(); // assuming no exception was thrown, an integer was created. } COM: <s> look for a integer hash code </s>
funcom_train/2518852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateComboForValue(String value) { fValue = value; for (int i = 0; i < fEntryNamesAndValues.length; i++) { if (value.equals(fEntryNamesAndValues[i][1])) { fCombo.setText(fEntryNamesAndValues[i][0]); return; } } if (fEntryNamesAndValues.length > 0) { fValue = fEntryNamesAndValues[0][1]; } } COM: <s> set the name in the combo widget to match the specified value </s>
funcom_train/8608051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyEffect() { if (skillTemplate.getEffects() == null || sucessEffects.isEmpty()) return; synchronized (sucessEffects) { for (EffectTemplate template : sucessEffects) { template.applyEffect(this); template.startSubEffect(this); } } /** * broadcast final hate to all visible objects */ if (effectHate != 0) effector.getController().broadcastHate(effectHate); } COM: <s> apply all effect templates </s>
funcom_train/34104880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isCommand(){ boolean flag = true; if ( isKeyWord(KeyWord.WRITE) ){ checkWriteCommand(); }else if ( isKeyWord(KeyWord.IF) ){ checkIfCommand(); }else if ( isKeyWord(KeyWord.WHILE) ){ checkWhileCommand(); }else if ( isSignal(Signal.IDENTIFIER) ){ pushNewToken(); //array if (isSignal(Signal.OPENING_BRACKET)){ pushNewToken(); if (isSignal(Signal.NUMBER)||isSignal(Signal.IDENTIFIER)){ pushNewToken(); checkSignal(Signal.CLOSING_BRACKET); } } checkAtributionCommand(); }else{ flag = false; } return flag; } COM: <s> verify if the next token represents a command </s>
funcom_train/15955391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StateVertex deepClone(StateMachine globalLevel, Region region, CompositeState container) { DefaultStubState lNew = new DefaultStubState(fName, fBehavior, fIndex, fGlobalIndex, globalLevel,region,container, fIncomming, fOutgoing, fReferenceState,fReferencedGlobalIndex); /* Attach to global */ globalLevel.makeGlobalIndex(lNew); return lNew; } COM: <s> clones this stub state and replaces sub machine states with referenced sm </s>
funcom_train/26130537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getInt(byte[] buf, int offset) { return ((buf[offset + 0] & 0xff) << 24) | ((buf[offset + 1] & 0xff) << 16) | ((buf[offset + 2] & 0xff) << 8) | (buf[offset + 3] & 0xff); } COM: <s> get an integer from an array </s>
funcom_train/34748547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getNumTests() { if(_numTestsPerEvictionRun >= 0) { return Math.min(_numTestsPerEvictionRun, _pool.size()); } else { return(int)(Math.ceil(_pool.size()/Math.abs((double)_numTestsPerEvictionRun))); } } COM: <s> returns the number of tests to be performed in an evictor run </s>
funcom_train/6494072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void recurseDirectory( File dir ) { if ( dir == null || !dir.isDirectory() ) return ; File[] files = dir.listFiles(); for ( int i = 0; i < files.length; i++ ) { File f = files[ i ]; if ( f.isDirectory() ) recurseDirectory( f ); else runTests( f ); } } COM: <s> recurses down through the given directory checking each class file found </s>
funcom_train/12841901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createTableViewer() { tableViewer = new TableViewer(table); tableViewer.setUseHashlookup(true); tableViewer.setColumnProperties(getColumnNamesArray()); // Create the cell editors CellEditor[] editors = new CellEditor[colsDef.length]; for(int x=0;x<colsDef.length;x++) { editors[x]=colsDef[x].getCellEditor(table); } // Assign the cell editors to the viewer tableViewer.setCellEditors(editors); // Set the cell modifier for the viewer tableViewer.setCellModifier(new CellModifier(this)); } COM: <s> create the table viewer </s>
funcom_train/12687801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceKeyCertificate(String alias, Certificate cert) throws Exception { if (keyStore.isKeyEntry(alias)) { Certificate[] chain = { cert }; addKeyEntry((PrivateKey) keyStore.getKey(alias, unwrapKeyPassword()), chain, alias); // must re-wrie SSL keystores createSSLKeystore(true, true, unwrapStorePassword(), unwrapKeyPassword()); } } COM: <s> replaces a certifcate associated with a key entry with a new certficate </s>
funcom_train/39184210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGeneAlias(boolean contains, String name){ crit6CheckBox.setSelected(true); crit6ComboBox.setSelectedIndex(contains?0:1); crit6TextField.setText(name); crit6ComboBox.setEnabled(true); crit6TextField.setEnabled(true); crit6Label.setEnabled(true); } COM: <s> changes the settings for the gene alias criteria </s>
funcom_train/33010324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContent(List<Bluprint> content) { this.content.clear(); for (Bluprint bluprint : content) { List<Bluprint> list = this.content.get(bluprint.getName()); if (list == null) { list = new ArrayList<Bluprint>(); this.content.put(bluprint.getName(), list); } list.add(bluprint); } } COM: <s> sets the content of this bluprint </s>
funcom_train/14421894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List columns() { final int columnCount = columnCount(); return syncExec(new ListResult() { public List run() { String columns[] = new String[columnCount]; for (int i = 0; i < columnCount; i++) columns[i] = getControl().getColumn(i).getText(); return new ArrayList(Arrays.asList(columns)); } }); } COM: <s> gets the columns of this tree </s>
funcom_train/22588210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Channel getChannel(Pircology server, String channelName) { if (!mPircologyChannels.containsKey(channelName)) { Channel newChannel = new ConstructableChannel(server, channelName); mPircologyChannels.put(channelName, newChannel); } return mPircologyChannels.get(channelName); } COM: <s> provide a channel object associated with server and chan name </s>
funcom_train/2804763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { if (sharedThisData) { // If the value is set and is shared data then it was set from // this object and needs to be cleared. //i.shareData(sharedDataKey,null); sharedThisData = false; } inputField = null; gotValue = false; value = null; } COM: <s> reset any state variables that were modified at run time </s>
funcom_train/16452790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doUpdateGallery(boolean preview) { if (preview) { if (Global.preview == null) Global.preview = new PreviewScreen(); Global.preview.setScreenImage(dirpath + "/" + selectedSlideFile, false, selectedTransition); } else { if (Global.pbs == null) Global.pbs = new PresentationScreen(); Global.pbs.setScreenImage(dirpath + "/" + selectedSlideFile, false, selectedTransition); } } COM: <s> do update gallery </s>
funcom_train/8399863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String join(String separator) { int len = length(); StringBuffer sb = new StringBuffer(); for (int i = 0; i < len; i += 1) { if (i > 0) { sb.append(separator); } sb.append(JSONObject.valueToString(this.myArrayList.get(i))); } return sb.toString(); } COM: <s> make a string from the contents of this jsonarray </s>
funcom_train/18505605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataColumn getColumnByName(String colName, boolean errorIfNotFound) { DataColumn col = null; col = (DataColumn)columns.get(colName); if (errorIfNotFound && col == null) { throw new FHException("Column \"" + colName + "\" cannot be found", logger); } return col; } COM: <s> returns with the data column identified by its name </s>
funcom_train/49778255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doTrackMissing(final Track track) { if (track instanceof ITunesTrack && Properties.getBool(Property.DELETE_MISSING)) { logAction(Action.DELETED, track, null); } else { logAction(Action.MISSING, track, track.getLocation()); } } COM: <s> performed when a track is missing from a collection </s>
funcom_train/48588032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CalendarEventFeed getEventByTextQuery(String query, String domainName, String calendarId) throws ServiceException, IOException, Exception { prepareCalendarService(domainName, calendarId); Query myQuery = new Query(new URL(EVENT_FEED_URL)); myQuery.setFullTextQuery(query); return service.query(myQuery, CalendarEventFeed.class); } COM: <s> prints the titles of all events matching a full text query </s>
funcom_train/7343323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void configure(Properties properties) throws DaoException { // Get the name of the session and create it String sessionName = null; try { SessionManager manager = SessionManager.getManager(); // Get the name of the session and create it sessionName = properties.getProperty("session.name"); server = (Server) manager.getSession(sessionName, ToplinkDaoTransactionManager.class.getClassLoader()); } catch (Exception e) { throw new DaoException( "Error configuring Toplink environment for session: " + sessionName); } } COM: <s> called by the dao framework upon instantiation to set configuration </s>
funcom_train/32733453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doEndService(Customer customer) { firePropertyChange("timeInSystem", customer.getTimeSinceStamp()); firePropertyChange("numberAvailableServers", numberAvailableServers, ++numberAvailableServers); if (getNumberInQueue() > 0) { waitDelay("StartService", 0.0, Priority.HIGH); } } COM: <s> increments number of available servers </s>
funcom_train/50612088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public FuzzySet complement(){ FuzzySet result = new DefaultFuzzySet("NOT_"+name, universe); java.util.List new_values = new Vector(); for(int i=0;i<universe.getPartitions()+1;i++) new_values.add(new Double(1-((Double)values.get(i)).doubleValue())); result.setValues(new_values); return result; } COM: <s> calculates the complement of this fuzzy set </s>
funcom_train/23754564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSWTGraphics() { //we need this temp Rect just to instantiate an swt image in order to keep //state, the size of this Rect is of no consequence and we just set it to //such a small size in order to minimize memory allocation org.eclipse.swt.graphics.Rectangle tempRect = new org.eclipse.swt.graphics.Rectangle(0, 0, 10, 10); image = new Image(Display.getDefault(), tempRect); GC gc = new GC(image); swtGraphics = new SWTGraphics(gc); } COM: <s> this is a helper method used to create the swt graphics object </s>
funcom_train/19617093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsExecutable() throws IOException { boolean containsExecutable = false; if (super.getType() == ExecutableType.JAVA) { containsExecutable = nemaZipFile.containsClass(getExecutableName()); } else if (super.getType()==ExecutableType.MATLAB){ containsExecutable =nemaZipFile.containsExt(".m")||nemaZipFile.containsExt(".p"); } else { containsExecutable = nemaZipFile.containsFile(getExecutableName()); } return containsExecutable; } COM: <s> validate the uploaded file contains the specified executable </s>
funcom_train/13994024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String computeClassName(final File file) { String absPath = file.getAbsolutePath(); String packageBase = absPath.substring(startPackageName, absPath .length() - 6); String className; className = packageBase.replace(File.separatorChar, '.'); return className; } COM: <s> given a file name guess the fully qualified class name </s>
funcom_train/3720844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPostCondition(PostCondition postCondition) throws java.beans.PropertyVetoException { PostCondition oldPostCondition = this.postCondition; vetoableChangeSupport.fireVetoableChange("postCondition", oldPostCondition, postCondition); this.postCondition = postCondition; propertyChangeSupport.firePropertyChange("postCondition", oldPostCondition, postCondition); } COM: <s> setter for property post condition </s>
funcom_train/810773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDefaultDataProcessingRefPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SpectrumListType_defaultDataProcessingRef_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SpectrumListType_defaultDataProcessingRef_feature", "_UI_SpectrumListType_type"), MzmlPackage.Literals.SPECTRUM_LIST_TYPE__DEFAULT_DATA_PROCESSING_REF, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the default data processing ref feature </s>
funcom_train/3389949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scanString() throws IOException { token = STRINGVAL; count = 0; ch = in.read(); // Scan a String while (true) { switch (ch) { case EOF: env.error(pos, "eof.in.string"); stringValue = bufferString(); return; case '\r': case '\n': ch = in.read(); env.error(pos, "newline.in.string"); stringValue = bufferString(); return; case '"': ch = in.read(); stringValue = bufferString(); return; case '\\': { int c = scanEscapeChar(); if (c >= 0) { putc((char)c); } break; } default: putc(ch); ch = in.read(); break; } } } COM: <s> scan a string </s>
funcom_train/13750275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canBreak() throws OneWireIOException, OneWireException { try { //synchronized (conn) { // send beginExclusive command getDataOutputStream().writeByte(CMD_CANBREAK); getDataOutputStream().flush(); // check return value for success checkReturnValue(); // next parameter should be the return from beginExclusive return getDataInputStream().readBoolean(); //} } catch (IOException ioe) { throw new OneWireException(COMM_FAILED + ioe.getMessage()); } } COM: <s> returns whether adapter can physically support 0 volt break mode </s>
funcom_train/15552177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelCenter() { if (jPanelCenter == null) { GridLayout gridLayout = new GridLayout(); gridLayout.setRows(1); gridLayout.setColumns(2); jPanelCenter = new JPanel(); jPanelCenter.setLayout(gridLayout); jPanelCenter.add(getJPanelBefore(), null); jPanelCenter.add(getJPanelAfter(), null); } return jPanelCenter; } COM: <s> this method initializes j panel center </s>
funcom_train/5420139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unzip(String path) throws IOException { ZipEntry e; while((e=zin.getNextEntry())!= null) { if( e.isDirectory() ) { File f = new File( getFullPath(path, e.getName() ) ); f.mkdir(); } else unzip(path , e.getName()); } } COM: <s> unzips the zip content to the path </s>
funcom_train/16380819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected EObject createInitialModel() { EClass eClass = ExtendedMetaData.INSTANCE.getDocumentRoot(ctePackage); EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(initialObjectCreationPage.getInitialObjectName()); EObject rootObject = cteFactory.create(eClass); rootObject.eSet(eStructuralFeature, EcoreUtil.create((EClass)eStructuralFeature.getEType())); return rootObject; } COM: <s> create a new model </s>
funcom_train/19054749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addComponentToSelectedMenuPaneAt(QComponent component, int index) { QMenu menu = getSelectedMenu(); QMenuPane pane = getSelectedMenuPane(); if(pane != null && menu != null) { pane.add(index, component); Vector path = new Vector(); Vector comp = new Vector(); path.add(this); path.add(menuList); path.add(menu); path.add(pane); comp.add(component); insertionData = new QInsertionData(path, index, comp); setSelectedComponent(component); modified(); } } COM: <s> adds a component to a specified index in the menupane list </s>
funcom_train/26630709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Widget setProperty(int key, Object value) { if (props == null) { props = new Object[key + 2]; } else if (key >= props.length) { Object[] old = props; props = new Object[key + 2]; System.arraycopy(old, 0, props, 0, old.length); } props[key] = value; return this; } COM: <s> sets a property </s>
funcom_train/14329381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_loginTimeout() { String fieldName = "loginTimeout"; String messageKey = Driver.LOGINTIMEOUT; String expectedValue = DefaultProperties.LOGIN_TIMEOUT; assertDefaultPropertyByServerType(URL_SQLSERVER, messageKey, fieldName, expectedValue); if (!isOnlySqlServerTests()) { assertDefaultPropertyByServerType(URL_SYBASE, messageKey, fieldName, expectedValue); } } COM: <s> test the code login timeout code property </s>
funcom_train/7270035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setupConstants() { MAIN_PANEL = new PaddedPanel(I18n.tr("Playlist")); DATA_MODEL = MODEL = new PlaylistModel(); TABLE = new LimeJTable(DATA_MODEL); // TABLE.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); BUTTON_ROW = (new PlaylistButtons(this)).getComponent(); STORE_RENDERER = new StoreNameRendererEditor(); STORE_EDITOR = new StoreNameRendererEditor(); TABLE_NUMBER_RENDERER = new NumberTableCellRenderer(); } COM: <s> set up the necessary constants </s>
funcom_train/4744262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePermissionFromUserGroup(int permID) { Right found = this.getPermissionFromCollection( createUserGroupData.getPermissions(), permID); if (found != null) { createUserGroupData.getPermissions().remove(found); createUserGroupData.getSavedPermissions().remove(found); this.rights.remove(found); removeQuota(found); } } COM: <s> removes an permission from the selected user group </s>
funcom_train/3023313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void reportAveragePublicMethods(ProjectMetrics projectData) { // Public Methods double top = projectData.getPublicMethodTotal(); double bottom = projectData.getClassTotal(); System.out.println("[001] " + projectData.getPublicMethodTotal() + " total public methods in " + projectData.getClassTotal() + " classes."); System.out.println("[001] " + "Average: " + (top / bottom)); } COM: <s> reports on the average number of public methods </s>
funcom_train/29837001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void framesDeselect() { if (frames != null) { // MainFrame mf=getInstance().getMainFrame(); // Session currentSession=mf.getActiveSession(); for (JInternalFrame frame : frames) { try { if (frame instanceof GraffitiInternalFrame) { frame.setSelected(false); } } catch (PropertyVetoException e) { // ignore, no problem } } } } COM: <s> unselects all editor frames in the main view </s>
funcom_train/51596369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasSameData(Event other, double epsilon) { for (int i = 0; i < eventScaleData.length; ++i) { if (other.eventScaleData[i] < (eventScaleData[i] - epsilon) || other.eventScaleData[i] > eventScaleData[i] + epsilon) return false; } return true; } COM: <s> determines if the other event has the same data within an epsilon </s>
funcom_train/3157916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getMillisLeft() { final double progressRatio = (double) (_progress - _progressMin) / (double) (_progressMax - _progressMin); if (progressRatio <= 0.0) { return -1L; } final double millisTotal = _millisElapsed / progressRatio; final double millisLeft = millisTotal - _millisElapsed; return Math.round(millisLeft); } COM: <s> returs the estimated tiome in milliseconds needed to finish the task </s>
funcom_train/40559103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fetchNext() { if (null != this.pendingUtc_ || this.done_) { return; } DateValue dUtc = this.generateInstance(); // check the exit condition if (null != dUtc && this.condition_.apply(dUtc)) { this.pendingUtc_ = dUtc; this.yearGenerator_.workDone(); } else { this.done_ = true; } } COM: <s> calculates and stored the next date in this recurrence </s>
funcom_train/37197756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object handle ( ResultSet rs ) throws SQLException { Variant retVal ; if ( rs.next() ) { if ( this.columnName == null ) { retVal = new BasicVariant(rs.getObject(this.columnIndex)) ; } else { retVal = new BasicVariant(rs.getObject(this.columnName)) ; } } else { retVal = null ; } return retVal ; } COM: <s> returns one code result set code column as an object via the </s>
funcom_train/12189615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTailProcessEmptyPipeline() throws Exception { // get hold of a XMLPipelineProcess XMLPipelineProcess pipeline = (XMLPipelineProcessImpl)createTestableProcess(); IllegalStateException ise = null; try { pipeline.getTailProcess(); } catch (IllegalStateException e) { ise = e; } assertNull("getTailProcess() should throw an IllegalStateException" + " if the pipeline is empty", ise); } COM: <s> test that ensures the get tail process method throws an </s>
funcom_train/4210238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrentState(ChatState newState, Chat chat) throws XMPPException { if(!updateChatState(chat, newState)) { return; } Message message = new Message(); ChatStateExtension extension = new ChatStateExtension(newState); message.addExtension(extension); chat.sendMessage(message); } COM: <s> sets the current state of the provided chat </s>
funcom_train/29031297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void anticheat_updateMoney(long tick) { int numberOfHappenedRounds = (int)(((tick /*+ IConstants.USER_ACTION_DELAY*/) - this.anticheatLastTickWhereHappendSomething) / IConstants.INCOME_TIME); this.anticheatLastTickWhereHappendSomething = tick; this.anticheatCurrentMoney += this.anticheatCurrentIncome * numberOfHappenedRounds; } COM: <s> update money of this client </s>
funcom_train/41817217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand1 () { if (okCommand1 == null) {//GEN-END:|29-getter|0|29-preInit // write pre-init user code here okCommand1 = new Command ("Export to xl", Command.OK, 0);//GEN-LINE:|29-getter|1|29-postInit // write post-init user code here }//GEN-BEGIN:|29-getter|2| return okCommand1; } COM: <s> returns an initiliazed instance of ok command1 component </s>
funcom_train/35213750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Subject authenticate(Object credentials) { Subject subject = null; if(credentials instanceof String[]) { String[] stringCredentials = (String[])credentials; if(stringCredentials.length==2 && username.equals(stringCredentials[0]) && password.equals(stringCredentials[1])) { subject = new Subject(); } } if(subject==null) { throw new SecurityException("Bad credentials"); } return subject; } COM: <s> not explicitly documented </s>
funcom_train/20750210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void store(Comparable id, Serializable obj, Continuation c) { if (id == null || obj == null) { c.receiveResult(new Boolean(false)); return; } currentSize += getSize(obj); storage.put(id, obj); c.receiveResult(new Boolean(true)); } COM: <s> stores the object under the key code id code </s>
funcom_train/43920357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List buildLinksForPageType(Class bookmarkablePageInfoClass) { // TODO: make sure the bookmarkable page info class is a subclass of // BookrmakablePageInfo List result = new ArrayList(); List infos = getGeoserverApplication().getBeansOfType( bookmarkablePageInfoClass); for (Iterator it = infos.iterator(); it.hasNext();) { BookmarkablePageInfo info = (BookmarkablePageInfo) it.next(); result.add(buildPageLink(info)); } return result; } COM: <s> standard behaviour is that all pluggable sub pages are built from </s>
funcom_train/8630748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SearchRow getSearchRow(Row row) { SearchRow r = table.getTemplateSimpleRow(columns.length == 1); r.setKeyAndVersion(row); for (int j = 0; j < columns.length; j++) { int idx = columns[j].getColumnId(); r.setValue(idx, row.getValue(idx)); } return r; } COM: <s> create a search row for this row </s>
funcom_train/16481035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void terminalToNt(String name) { for (Node n : nodes) { if (n.sym != null && n.sym.name.equals(name)) { n.typ = NodeType.NONTERM; } } for (Symbol s : terminals) { if (s.name.equals(name)) { nonterminals.add(s); terminals.remove(s); break; } } } COM: <s> converts the terminal with a given name to a non terminal </s>
funcom_train/21848035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void componentAdded(ContainerEvent e) { /** * ignore table cell renderers because the JTable creates/destroys these * objects quite often */ Object child = e.getChild(); if (child instanceof javax.swing.table.TableCellRenderer || child instanceof javax.swing.ListCellRenderer) { return; } if (child instanceof Container) { buildNames((Container) child); } else if (child instanceof Component) { registerComponent((Component) child); } } COM: <s> a component was added to the container </s>
funcom_train/46382758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ButtonId getButton() { ButtonId ret = ButtonId.NOBUTTON; int button = ((MouseEvent) awtEvent).getButton(); switch (button) { case MouseEvent.BUTTON1: ret = ButtonId.BUTTON1; break; case MouseEvent.BUTTON2: ret = ButtonId.BUTTON2; break; case MouseEvent.BUTTON3: ret = ButtonId.BUTTON3; break; default: assert (button == MouseEvent.NOBUTTON); } return ret; } COM: <s> returns which if any of the mouse buttons has changed state </s>
funcom_train/27727091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CalDate GPS2UTC(){ // get the current mjd double mjd = this.mjd(); // convert the current time to CalDate format CalDate out = new CalDate(this); // compute the difference between GPS and UTC int utc_gps = TAI_GPS - TimeUtils.tai_utc(mjd); // convert from GPS time to UTC time out.increment(utc_gps); return out; } COM: <s> convert gps time to utc time </s>
funcom_train/45638325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean exists(Connection c) { try { return new QueryRunner().query(c, "select * from user_db_links where db_link=?", getGlobalName(), new MapHandler()) != null; } catch (SQLException e) { return false; } } COM: <s> tests the existense of the link </s>
funcom_train/316357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(java.awt.event.ActionEvent e) { try { //productsRecordEditor.getProductsRecord().getPeer().doDelete(productsRecordEditor.getProductsRecord()); recordEditorAbstract.recordDataDeletedEvent(); } catch (Exception exc) { exc.printStackTrace(); } } COM: <s> the action to preform </s>
funcom_train/31251319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mergeWith(IdDef newDef) { Map newProps = newDef.getProperties(); Iterator newKeys = newProps.keySet().iterator(); while (newKeys.hasNext()) { String key = (String)newKeys.next(); // add the property if not exist in this if (!this._properties.containsKey(key)) { this.setProperty(key, (String)newProps.get(key)); } } } COM: <s> merges any properties that do not already exist </s>
funcom_train/37817603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetGraphVisuals() { for (Node node : m_curGraph.getNodeList()) { node.getVisual().setControllerMode(getEditingMode()); node.getVisual().update(); } for (Edge edge : m_curGraph.getEdgeList()) { edge.getVisual().setControllerMode(getEditingMode()); edge.getVisual().update(); } } COM: <s> updates the visual components of the graph elements </s>
funcom_train/29614261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getAddData() { if (addData == null) {//GEN-END:|21-getter|0|21-preInit // write pre-init user code here addData = new Command("Ok", Command.OK, 0);//GEN-LINE:|21-getter|1|21-postInit // write post-init user code here }//GEN-BEGIN:|21-getter|2| return addData; } COM: <s> returns an initiliazed instance of add data component </s>
funcom_train/26489301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCredits(OID user){ int credits = 0; boolean ok = false; DBConnection con = null; try { con = allocateConnection(); PreparedStatement ps = con.prepareStatement("select credits from pay_User_Credits where user_oid=?"); ps.setBigDecimal(1, user); ResultSet rs = ps.executeQuery(); if(rs.next()) credits = rs.getInt("credits"); } catch (SQLException e) { } finally { if (con!=null) { try { con.reset(); } catch(SQLException e) {} con.release(); } } return credits; } COM: <s> returns the users total amount of credits </s>
funcom_train/24088344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String makeOutputFilename(ToolConfig config, long time) { String outputFile = tempDir + "out" + time; if (config.getOutEnding() != null && !"".equals(config.getOutEnding())) { outputFile = tempDir + "in" + time+"."+config.getOutEnding(); } return outputFile; } COM: <s> this generates the file name for the outputfile </s>
funcom_train/1559207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initAngleUnitPanel() { angleUnitPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); angleUnitButtonGroup = new ButtonGroup(); angleUnitRadioDegree = new JRadioButton(); angleUnitRadioDegree.addActionListener(this); angleUnitPanel.add(angleUnitRadioDegree); angleUnitButtonGroup.add(angleUnitRadioDegree); angleUnitRadioRadian = new JRadioButton(); angleUnitRadioRadian.addActionListener(this); angleUnitPanel.add(angleUnitRadioRadian); angleUnitButtonGroup.add(angleUnitRadioRadian); } COM: <s> initialize the angle unit panel </s>
funcom_train/7443695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long readChunkSize() throws IOException { String line = readChunkSizeLine(); final int index = line.indexOf(';'); line = index == -1 ? line : line.substring(0, index); try { return Long.parseLong(line.trim(), 16); } catch (NumberFormatException ex) { throw new IOException("<" + line + "> is an invalid chunk size"); } } COM: <s> reads the chunk size from the current line </s>
funcom_train/43580424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCancel() { if (cancel == null) { cancel = new JButton(); cancel.setBounds(new Rectangle(105, 172, 118, 26)); cancel.setText("Cancel"); cancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { hideMe(); } }); } return cancel; } COM: <s> this method initializes cancel </s>
funcom_train/16628243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateFontIfNecessary() { Font font = getUnitsFont(); if (unitsFont != font) { fontHeight = fontAscent = 0; if (font != null) { Toolkit tk = getToolkit(); if (tk != null) { FontMetrics fm = tk.getFontMetrics(font); if (fm != null) { fontHeight = fm.getHeight(); fontAscent = fm.getAscent(); unitsFont = font; } } } } } COM: <s> updates font height information </s>
funcom_train/47546256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCaretLineNumber () { checkWidget (); if ((style & SWT.SINGLE) != 0) return 1; byte [] position = new byte [ITER_SIZEOF]; int /*long*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); OS.gtk_text_buffer_get_iter_at_mark (bufferHandle, position, mark); return OS.gtk_text_iter_get_line (position); } COM: <s> returns the line number of the caret </s>
funcom_train/48143716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ComplexVector conjugate() { final double arrayIm[]=new double[3]; arrayIm[0]=-vectorIm[0]; arrayIm[1]=-vectorIm[1]; arrayIm[2]=-vectorIm[2]; return new Complex3Vector(vectorRe,arrayIm); } COM: <s> returns the complex conjugate of this vector </s>
funcom_train/20812621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(String basePath) throws WebCompilerException, IOException { this.basePath = basePath; this.flexPath = this.basePath + File.separator + "flex"; this.createFlexDir(); this.configFile = new File(this.flexPath, "flex-config.xml"); if(!this.configFile.exists()) { throw new WebCompilerException("Missing flex-config.xml file"); } } COM: <s> initialize flex webcompiler </s>
funcom_train/10911441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renderPage(PageViewport pageViewport) throws IOException { rememberPage((PageViewport)pageViewport.clone()); //The clone() call is necessary as we store the page for later. Otherwise, the //RenderPagesModel calls PageViewport.clear() to release memory as early as possible. currentPageNumber++; } COM: <s> this method override only stores the page viewport in a list </s>
funcom_train/48502238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object getSmallestValue(Collection<?> collection) { if (collection.size() == 0) { return null; } if (collection.size() == 1) { return collection.iterator().next(); } Object[] array = collection.toArray(); Arrays.sort(array); return array[0]; } COM: <s> returns the smallest value of the collection </s>
funcom_train/51590288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removedService(ServiceReference reference, Object service) { Object obj = context.getService(reference); boolean serviceRemoved = false; String[] objClassName = (String[]) reference.getProperty(Constants.OBJECTCLASS); if (servicesMap.get(objClassName[0]).equals(obj)) { servicesMap.remove(objClassName[0]); serviceRemoved = true; } if (hasStarted() && serviceRemoved) { try { doStop(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } started = false; } } COM: <s> used by osgi to signal that a service was removed </s>
funcom_train/51782526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSegmentHorizontal(int index) { Point2D p1 = getConnection().getPoints().get(index); Point2D p2 = getConnection().getPoints().get(index + 1); return GeometryUtil.getInstance().getSegmentOrientation(p1, p2) == Orientation.HORIZONTAL; } COM: <s> determines whether the segment defined by the point at the specified index </s>
funcom_train/43590448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getExitMenuItem() { if (exitMenuItem == null) { exitMenuItem = new JMenuItem(); exitMenuItem.setText("Exit"); exitMenuItem.addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(java.awt.event.MouseEvent e) { ZensesApplication.getApplication().exit(); } }); } return exitMenuItem; } COM: <s> this method initializes exit menu item </s>
funcom_train/39890141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { if (other instanceof GeoPoint) { GeoPoint gp = (GeoPoint) other; double deltaLat = ABS(gp.getLatitude() - this.getLatitude()); double deltaLon = ABS(gp.getLongitude() - this.getLongitude()); return ((deltaLat < EPSILON) && (deltaLon < EPSILON)); } else { return false; } } COM: <s> compares the current geo point with another </s>
funcom_train/12777966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CAstEntity visit(EnumConstantDeclaration decl, WalkContext context) { return new FieldEntity(decl.getName().getIdentifier(), decl.resolveVariable().getType(), enumQuals, makePosition(decl .getStartPosition(), decl.getStartPosition() + decl.getLength())); } COM: <s> only called from create class declaration </s>
funcom_train/31093001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void check(WebResponse response) throws SAXException, IOException { TestServlet.postCount=0; WebForm form = response.getFormWithID("bug"); form.setParameter("handle", "steve"); form.setParameter("brainz", "has none"); form.submit(); int expected=1; assertTrue("The postcount should be "+expected+" but is "+TestServlet.postCount,TestServlet.postCount==expected); } COM: <s> check the webresponse </s>
funcom_train/31105553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void copyAntecedentsToAgenda ( IAntecedentIterator antecedents ) { IGoal[] subgoals = new IGoal[antecedents.size()]; int ndx = 0; while (antecedents.hasNext()) { IGoalifiable antecedent = antecedents.nextAntecedent(); subgoals[ndx++] = antecedent.goalify(inferenceContext(), this); } // Push goals onto the agenda in reverse order. for ( ; ndx > 0; ) mAgenda.push(subgoals[--ndx]); } COM: <s> copies the specified subgoal to the agenda </s>
funcom_train/18728177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetGreekLetter() { assertEquals(JaxoGreek.ALPHA, JaxoGreek.getCharacter("\\alpha")); assertEquals(JaxoGreek.UPPER_OMEGA, JaxoGreek.getCharacter("\\Omega")); assertEquals('\u0000', JaxoGreek.getCharacter("")); } COM: <s> test of get greek letter method of class jaxo draw </s>
funcom_train/1648261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFirstTag() { if (!"#".equals(name)) { return name; } for (int childIndex = 0, childCount = children.size(); childIndex < childCount; childIndex++) { HTMLNode childNode = children.get(childIndex); String tag = childNode.getFirstTag(); if (tag != null) { return tag; } } return null; } COM: <s> returns the name of the first real tag found in the hierarchy below </s>
funcom_train/16891662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopListeningTo (Control ...controls ) { for(Control control : controls) { control.removeListener(SWT.FocusOut, this); if (isModifyBasedControl(control)) { control.removeListener(SWT.Modify, this); } if (isSelectionBasedControl(control)) { control.removeListener(SWT.Selection, this); control.removeListener(SWT.DefaultSelection, this); } control.removeListener(SWT.KeyDown, this); } } COM: <s> unregisters this change helper from a control previously passed to </s>
funcom_train/19382455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doRandomConfiguration() { // prepare a blank configuration prepareConfiguration(); // add test charges for(int i = 0; i < randTests; i++) { baseModel.addTestCharge( new Charge( getRandomCharge(), getRandomX(), getRandomY() ) ); } //finalize finalizeConfiguration(); } COM: <s> creates a random configuration </s>
funcom_train/48667382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleStopSession() { try { this.viewContainer.getAppWorker().runJob(new UIWorkerJobDefault( viewContainer.getAppFrame(), Cursor.WAIT_CURSOR, MessageRepository.get(Msg.TEXT_STOPPINGSESSION)) { public void work() throws Exception { rmsMonitoringSession.stopAllAgents(); } public void finished(Throwable ex) { if(ex == null) { actionStopSession.setEnabled(false); actionStartSession.setEnabled(true); } } }); } catch(Exception e) { UIExceptionMgr.userException(e); } } COM: <s> handles the stop session event </s>
funcom_train/35355850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean run() { boolean stop = false; // for each system in the list for (TrjSys sys : sysList) { // run the system if (stop = sys.RunTasks()) { break; // break out if the system indicates. } } // get the power consumption Pdemand = 0; // initialize // for each system in the consumer list for (Consumer cc : consumList) { // get the power and add it to the aggregate Pdemand += cc.getP(); } return stop; } COM: <s> runs the edu </s>
funcom_train/3751215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createNewDataSource() { DataSourceDialog dataSourceDialog = new DataSourceDialog(WindowManager.getDefault().getMainWindow(), true, new DataSource()); dataSourceDialog.setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); dataSourceDialog.setVisible(true); } COM: <s> creates a new data source </s>
funcom_train/16738299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector3D sub(final Vector3D subtrahend) throws Vector3DUndefinedException { if (this.isUndefined() || subtrahend.isUndefined()) { throw new Vector3DUndefinedException(); } else { return new Vector3D(this.getX() - subtrahend.getX(), this.getY() - subtrahend.getY(), this.getZ() - subtrahend.getZ()); } } COM: <s> substraction of another vector </s>
funcom_train/14179784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBannerClick() { gf.getGamestate().setState(State.Endmove); gf.getGamestate().setActivePlayer(player1); assertEquals(1, province1.getBanner().getSamurai()); assertEquals(0, province1.getUnit(UnitType.Samurai)); gc.bannerClick(0, 0, 1); assertEquals(0, province1.getBanner().getSamurai()); assertEquals(1, province1.getUnit(UnitType.Samurai)); assertTrue(gf.getChangesFlag() == 1); } COM: <s> tests the banner click method </s>
funcom_train/47450161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User findUserByName(String username) throws NotExistException { try { User r = (User)this.getHibernateTemplate().find("from User u where u.username =?", username).get(0); return r; } catch (IndexOutOfBoundsException e) { throw new NotExistException(); } catch (Exception ex) { throw new NotExistException(); } finally { } } COM: <s> find user by name </s>
funcom_train/40712646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SimpleMark getSimpleMark(int x, int y) { ArrayList<NodeMark> mks = board.getMarks(); for(NodeMark mk : mks) { if (mk instanceof SimpleMark) { SimpleMark sm = (SimpleMark) mk; Point p = sm.getPoint(); if(p.x == x && p.y == y) return sm; } } return null; } COM: <s> gets the first simple mark on the board at x y </s>
funcom_train/50879242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Envelope getEnvelope(){ if (myEnvelope == null){ if (myPolygons != null){ EnvelopeBuffer tempEnvelopeBuffer = new EnvelopeBuffer(); for (int i = 0; i < myPolygons.length; i++) { tempEnvelopeBuffer.expandToInclude(myPolygons[i].getEnvelope()); } myEnvelope = tempEnvelopeBuffer.getEnvelope(); } } return myEnvelope; } COM: <s> return the envelope of this multipolygon </s>
funcom_train/36793098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List taskDBQuery(int userId, int projId){ List taskIds = new ArrayList(); try { PreparedStatement ps = getConn().prepareStatement(getTaskIdSQL); ps.clearParameters(); ps.setInt(1, userId); ps.setInt(2, projId); //System.out.println("PS "+ps.toString()); ResultSet rs = ps.executeQuery(); while (rs.next()){ Integer task = rs.getInt(1); taskIds.add(task); } }catch (SQLException se){ System.out.println("SQL Exception thrown.."); } return taskIds; } COM: <s> intent supporting method for task detail operations get tasks projects method </s>
funcom_train/33142170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextPane getText() { if (text == null) { text = new JTextPane(); text.setEditable(false); text.setContentType("text/html"); text.setEditable(false); text.setBackground(java.awt.SystemColor.info); } return text; } COM: <s> this method initializes text area </s>
funcom_train/4867801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(TimeStep timeStep) { List<Player> players = this.playerManager.getPlayers(); /* * Apply the updated player state */ for(int i = 0; i < players.size(); i++ ) { Player player = players.get(i); if ( player != null ) { EntityController controller = getEntityController(player.getCharacter()); if ( controller != null ) { applyUsercmd(controller, player.getCurrentState()); } } } } COM: <s> apply the remote user commands </s>
funcom_train/44075366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Serializable doGetObjectForNullId() { if (createNewObjectWhenIdIsNull) { try { if (!Serializable.class.isAssignableFrom(objectClass)) { throw new WicketRuntimeException( "only serializable classes can be used with this strategy"); } return (Serializable) objectClass.newInstance(); } catch (InstantiationException e) { throw new WicketRuntimeException( "unable to create an object of type " + objectClass + ": ", e); } catch (IllegalAccessException e) { throw new WicketRuntimeException(e); } } else { return null; } } COM: <s> gets the object that is to be used when the id is null </s>
funcom_train/22345413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int setNewWaitlist (int req) { // locate the first available entry for (int i = 0; i < nbr_entries; i++) { // When available if (details[i] == 0) { // set in request details[i] = req; // bump count setTimesUsed(); // all done return 0; } // endif } // end-for // no available found return -1; } // end-method COM: <s> add an entry to the list </s>
funcom_train/41262445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextFieldContato() { if (jTextFieldContato == null) { jTextFieldContato = new JTextField(); jTextFieldContato.setBounds(new Rectangle(44, 16, 703, 33)); jTextFieldContato.setEditable(false); //jTextFieldContato.setText(this.contato.getNome() + " - " + this.contato.getEmail()); } return jTextFieldContato; } COM: <s> this method initializes j text field contato </s>
funcom_train/37829808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void inspectOffline(final Player admin, final String username) { try { Map<String, RPObject> characters = DAORegister.get().get(CharacterDAO.class).loadAllActiveCharacters(username); for (RPObject object : characters.values()) { inspect(admin, object); } } catch (SQLException e) { admin.sendPrivateText(NotificationType.ERROR, e.toString()); } catch (IOException e) { admin.sendPrivateText(NotificationType.ERROR, e.toString()); } } COM: <s> inspects offline players </s>