__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/4502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSide(String side){ //test the params if(side == null){ throw new IllegalArgumentException("Null parameter given."); } //make sure a valid side selected String lowerside = side.toLowerCase(); if( !(lowerside.equals(GoalFeature.c_SIDE_LEFT)) && !(lowerside.equals(GoalFeature.c_SIDE_RIGHT))){ throw new IllegalArgumentException("Invalid side given for goal."); } //save the side this.m_side = lowerside; } COM: <s> set the side to either l left or r right </s>
funcom_train/19655651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchMarket(long rowId) throws SQLException { Cursor mCursor = mDb.query(true, DB_TABLE, new String[] { KEY_ID, KEY_TITLE, KEY_STREET, KEY_PLZ, KEY_LOCALITY }, KEY_ID + "=" + rowId, null, null, null, null, null); if (mCursor != null) { mCursor.moveToFirst(); } return mCursor; } COM: <s> return a cursor positioned at the market that matches the given row id </s>
funcom_train/18959143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initGUI() { // set title setTitle(""); Dimension d = new Dimension(150, 230); missionPanel missionpanel = new missionPanel(); missionpanel.setPreferredSize(d); missionpanel.setMinimumSize(d); missionpanel.setMaximumSize(d); missionpanel.addMouseListener(this); getContentPane().add(missionpanel); addWindowListener( new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { exitForm(); } } ); } COM: <s> initialises the gui </s>
funcom_train/23160457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLatestVersion(String website) { String latestVersion = ""; try { URL url = new URL(website + "/version"); BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(url.openStream())); String string; while ((string = bufferedReader.readLine()) != null) { latestVersion = string; } bufferedReader.close(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { // ignore } return latestVersion; } COM: <s> get product latest version </s>
funcom_train/36534368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDestination(String registration) { String dest = ""; try { String selectStatement = "SELECT DestID FROM vehicle WHERE Registration=?;"; PreparedStatement pstmt = con.prepareStatement(selectStatement); pstmt.setString(1, registration); ResultSet result = pstmt.executeQuery(); while (result.next()) { int destid = result.getInt(1); dest = ddb.getName(destid); } result.close(); pstmt.close(); } catch(SQLException sqle) { System.out.println(sqle); } return dest; } COM: <s> returns the current destination of the given vehicle </s>
funcom_train/1529527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toGeoCurveCartesian(GeoCurveCartesian curve) { curve.setFunctionY((Function)fun.deepCopy(kernel)); varFun = new Function(new ExpressionNode(kernel,fun.getFunctionVariable()),fun.getFunctionVariable()); curve.setFunctionX(varFun); double min = bApp.getEuclidianView().getXminForFunctions(); double max = bApp.getEuclidianView().getXmaxForFunctions(); curve.setInterval(min, max); } COM: <s> converts this function to cartesian curve and stores result to given curve </s>
funcom_train/50158723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadNewReaderAndSearcher() { try { IndexReader newReader = IndexReader.open(luceneIndexDir); IndexSearcher newSearcher = new IndexSearcher(newReader); IndexReader oldReader = myReader; IndexSearcher oldSearcher = mySearcher; myReader = newReader; mySearcher = newSearcher; if (oldReader != null) { oldReader.close(); oldReader = null; } if (oldSearcher != null) { oldSearcher.close(); oldSearcher = null; } } catch (Throwable t) { prtlnErr("Unable to load a new reader or searcher: " + t); } } COM: <s> creates and loads a new index reader and index searcher </s>
funcom_train/51644219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasAccessMode(FlowContext context, IVariableBinding local, int mode) { boolean unusedMode= (mode & UNUSED) != 0; if (fAccessModes == null && unusedMode) return true; int index= context.getIndexFromLocal(local); if (index == -1) return unusedMode; return (fAccessModes[index] & mode) != 0; } COM: <s> checks whether the given local variable binding has the given access </s>
funcom_train/32943492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Profile aProfile) { profileDao.delete(aProfile); auditor.audit(AuthUtil.getRemoteUserObject(), Profile.class.getName(), aProfile.getOid(), Auditor.ACTION_DELETE_PROFILE, "The profile " + aProfile.getName() + " has been deleted form " + aProfile.getOwningAgency().getName()); } COM: <s> delete the profile </s>
funcom_train/8826731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testSalvar() { System.out.println("salvar"); Comarca comarca = new Comarca(); comarca.setNome("Campina Grande"); ComarcaDAO instance = new ComarcaDAO(); instance.salvar(comarca); Comarca comarca2 = new Comarca(); comarca2.setNome("João Pessoa"); instance.salvar(comarca2); } COM: <s> test of salvar method of class comarca dao </s>
funcom_train/19351975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OWLOntology doReplication() throws OWLException,InterruptedException { try { setUpModelMappings(); processConcepts(); processProperties(); processInstances(); return m_targetOWLOntology; } finally { m_logicalToPhysicalURIs=null; m_sourceOWLOntology=null; m_targetOWLOntology=null; m_targetOWLConnection=null; m_changeEvents=null; } } COM: <s> starts the replication of the source model to the target model </s>
funcom_train/32367864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMapping(Character symbol,Character[] symbolArray,Map<Character, HashSet<Character>> result) { HashSet<Character> symbolSet = new HashSet<Character>(symbolArray.length); for ( int i = 0; i < symbolArray.length; i++ ) { symbolSet.add(symbolArray[i]); } result.put(symbol, symbolSet); } COM: <s> helper method for populating the underlying map object </s>
funcom_train/49144412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dog createDog(String name, String nickName, Date birthDay, int color, int peel, int sex, double size, double weight) { Dog dog = new Dog(); dog.setBirthDay(birthDay); //dog.setBreedingId(breedingId); dog.setColor(color); dog.setPeel(peel); dog.setName(name); dog.setNickName(nickName); //dog.setSaleInfos(saleInfos); dog.setSize(size); dog.setWeight(weight); dog.setSex(sex); DogDAO.update(dog); return dog; } COM: <s> create a dog </s>
funcom_train/17004569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EnvelopeDocument createEnvDocument(String source, String sink) { EndpointReferenceType sourceEpr = wsaEprCreator.createEpr(source); EndpointReferenceType sinkEpr = wsaEprCreator.createEpr(sink); FromDocument from = FromDocument.Factory.newInstance(); from.setFrom(sourceEpr); ActionDocument action = null; RelatesToDocument relatesTo = null; EnvelopeDocument envelopeDocument = wsaEnvelopeCreator.createSoapEnvelope(sinkEpr, from, action, relatesTo); return envelopeDocument; } COM: <s> creates envelope document by using source and sink adresses </s>
funcom_train/32079727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear (int start, int end) { checkWidget (); if (start > end) return; if (!(0 <= start && start <= end && end < itemsCount)) { error (SWT.ERROR_INVALID_RANGE); } for (int i = start; i <= end; i++) { items [i].clear (); } updateHorizontalBar (); redrawItems (start, end, false); } COM: <s> removes the items from the receiver which are between the given </s>
funcom_train/33368345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doAfterBody() throws JspException { BodyContent bc = getBodyContent(); Tag parent = getParent(); if (parent == null) { throw new JspException("TableHeader tags may only appear inside " + "Table tags."); } ((Table) parent).setHeader(bc.getString()); ((Table) parent).setHbgcolor(bgcolor); ((Table) parent).setHalign(align); init(); return SKIP_BODY; } COM: <s> sets the parent tables header to the body of this tag </s>
funcom_train/18551060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClassDataExtractor_resolveFullPathNameFN() { ClassDataExtractor classDataExtractor = new ClassDataExtractor(); Object obj = null; try { obj = PrivateAccessor.invoke( classDataExtractor, "resolveFullPathName", new Class[] { String.class }, new Object[] { testpackage }); } catch (Throwable e) { fail(); } assertEquals(obj, returnedClass); } COM: <s> tests the resolve full path name functionality </s>
funcom_train/13646518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put( final String KEY, String value ){ if( value == null || value.length() == 0 ) this.preferences.remove( KEY ); else this.preferences.put( KEY, value ); try{ this.preferences.flush(); } catch( BackingStoreException ignore ){ } } COM: <s> stores a value in the preferences </s>
funcom_train/17707960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doComplete() { String selectedValue = (String) list.getSelectedValue(); if (selectedValue != null) { selectedValue = selectedValue.trim(); try { if (this.context == TAG_CONTEXT) { completeTag(selectedValue); } else { completeAttribute(selectedValue); } } catch(BadLocationException e1) { e1.printStackTrace(); } } } COM: <s> action for auto complete items </s>
funcom_train/37238395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Comparator getComparator(String comparatorName) { String tmpComparatorName = comparatorName.toLowerCase(); Comparator result = (Comparator) comparators.get(tmpComparatorName); if (result == null) { if (typesByName.containsKey(tmpComparatorName)) { result = new FieldComparator(tmpComparatorName); } } return (result); } COM: <s> returns the requested comparator </s>
funcom_train/31818223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createStoryGridHeader() { this.setBorderWidth(1); this.setText(0, 1, "Name"); this.setText(0, 2, "Description"); this.setText(0, 3, "Best"); this.setText(0, 4, "Most"); this.setText(0, 5, "Worst"); this.setText(0, 6, "Actual"); } COM: <s> creates the header line for the storycards </s>
funcom_train/41329728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUGOToRWXString() { System.out.println("UGOToRWXString"); boolean[] ugoPerm = {false,false,false}; ugoPerm[Permissions.PERM_X]=true; String expResult = "--x"; String result = Permissions.UGOToRWXString(ugoPerm); assertEquals(expResult, result); } COM: <s> test of ugoto rwxstring method of class info </s>
funcom_train/570781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize( ) { try { setName( "JTableSearchDialog" ); setDefaultCloseOperation( javax.swing.WindowConstants.DISPOSE_ON_CLOSE ); setSize( 283, 89 ); setTitle( "Suchen" ); setContentPane( getJDialogContentPane( ) ); initConnections( ); } catch ( java.lang.Throwable ivjExc ) { handleException( ivjExc ); } } COM: <s> initialize the class </s>
funcom_train/1753559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean verify(final List target) { if (chunk == null) { return true; } if (last() > target.size()) { return false; } for (int i = 0; i < count; i++) { if (!target.get(anchor + i).equals(chunk.get(i))) { return false; } } return true; } COM: <s> verifies that this chunks saved text matches the corresponding text in </s>
funcom_train/7278117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void verifyFiles(List<TorrentFile> l) { int lastSet; synchronized(this) { lastSet = verifiedBlocks.length(); } for (TorrentFile f : l) { for (int i = Math.max(lastSet,f.getBegin()); i <= f.getEnd(); i++) VERIFY_QUEUE.execute(new VerifyJob(i),context.getMetaInfo().getURN()); } } COM: <s> verifies all the chunks that are associated with a list of files </s>
funcom_train/27719957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSort_Locale_LocalizableArr() { System.out.println("sort"); LocalizedString[] localizables = getLocalizedTestStringArray(); Localizables.sort(LOCALE, localizables); assertTrue(Arrays.equals(EXPECTED_LOCALIZED_STRINGS_ARRAY_DEFAULT, localizables)); } COM: <s> test of sort method of class localizables </s>
funcom_train/6476022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getAvailableMTSServices() { Vector mtsServices = new Vector(); if (serviceList == null) { return mtsServices; } PlatformService service = null; for (int i=0; i < serviceList.size(); i++) { service = (PlatformService) serviceList.get(i); if (service instanceof MessageTransportService) { mtsServices.addElement(service); } } return mtsServices; } COM: <s> return the services available </s>
funcom_train/50714595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void hookDnD() { // accept any operation as long as it's COPY final DropTarget target = new DropTarget(panel, DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK | DND.DROP_DEFAULT); target.setTransfer(new Transfer[] { LocalSelectionTransfer .getInstance() }); target .addDropListener(new ObjBenchDropTargetListener(panel .getShell())); } COM: <s> facilitates drag and drop functionality </s>
funcom_train/11763984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rebuildTree() { //if this graph gas a tree of itself.. if (getMainFrame() != null) { getMainFrame().getAtomicUnitsTree().clearAtomicTreeNodes(); Iterator states = getModels().iterator(); while (states.hasNext()) { addToTree((AbstractUnit)states.next()); } Iterator ports = getPorts().iterator(); while (ports.hasNext()) { addToTree((AbstractPort)ports.next()); } Iterator links = getLinks().iterator(); while (links.hasNext()) { addToTree((AbstractLink)links.next()); } } } COM: <s> rebuilds the tree based on the data i have </s>
funcom_train/34633118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BaseMergeNode addBaseMergeRole(final Node core, final Tree<BaseMergeNode> baseTree){ if (core == null) throw new ArgumentNullException("core"); if (baseTree== null) throw new ArgumentNullException("baseTree"); return new BaseMergeNodeImpl(core, baseTree); } COM: <s> attatch a base merge role </s>
funcom_train/12171655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SelectedVariant getSelectedVariant() { if (selectedVariant == SELECTED_VARIANT_NOT_SET) { RuntimePolicyReference reference = getPolicyReference(); if (reference == null) { selectedVariant = null; } else { selectedVariant = assetResolver.selectBestVariant(reference, null); } } return selectedVariant; } COM: <s> get selected variant </s>
funcom_train/17680249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JdbcColumn getLockRowColumn() { if (lockRowColumn == null) { lockRowColumn = pk[0]; for (int i = cols.length - 1; i >= 0; i--) { lockRowColumn = chooseLockRowCol(cols[i], lockRowColumn); } } return lockRowColumn; } COM: <s> get the column that is the best choice for dummy update locking </s>
funcom_train/36647584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addWorkout(Workout workout, String message) { Entry entry = new Entry(); entry.setMessage(StringUtils.stripToEmpty(message)); entry.setWorkout(workout); try { addEntry(entry); } catch (Exception e) { throw new RuntimeException("Unable to add workout", e); } } COM: <s> add a workout </s>
funcom_train/10796536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Value findVariable(String alias) { Value var = getVariable(alias); if (var != null) return var; for (Context p = parent; p != null; ) { var = p.getVariable(alias); if (var != null) return var; p = p.parent; } return null; } COM: <s> given an alias find the variable in jpql contexts </s>
funcom_train/38867188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String buildKey(HashMap imDescr) { String imageId = ( (String) imDescr.get("imageId")).trim(); try { return imageId.substring(3) + "_" + imageId.substring(0, 3); // return imageId; } catch (Exception e) { return "UNDEF"; } } COM: <s> builds a key for the image </s>
funcom_train/47804635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stackTokenStarting(Token[] pTokens) { //iterate over the input tokens and for(Token t:pTokens) { //add it to the starting tile where //old array references null for(int i=0;i<9;i++) { if (this.tokens[i]==null) { this.tokens[i]=t; break; } } } this.stackStrength= getTokenCount(); } COM: <s> special case stacking for the starting tile </s>
funcom_train/2325577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dht3() { if (content instanceof DenseLargeFloatMatrix3D) { if (this.isNoView == true) { ((DenseLargeFloatMatrix3D) content).dht3(); } else { DenseLargeFloatMatrix3D copy = (DenseLargeFloatMatrix3D) copy(); copy.dht3(); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } } COM: <s> computes the 3 d discrete hartley transform dht of this matrix </s>
funcom_train/20504701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeSession () throws HibernateException { java.util.Stack sessionStack = (java.util.Stack) threadedSessions.get(); if (null != sessionStack) { Object[] arr = (Object[]) sessionStack.peek(); String cf = (String) arr[0]; if (null == cf) { Session session = (Session) arr[1]; session.close(); sessionStack.pop(); } else { String configurationFile = getConfigurationFileName(); if (null != configurationFile && configurationFile.equals(cf)) { Session session = (Session) arr[1]; session.close(); sessionStack.pop(); } } } } COM: <s> close the session </s>
funcom_train/20245357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTotalCount(int totalCount) { if (totalCountTF != null) { String totalCountText = "" + totalCount; if (SwingUtilities.isEventDispatchThread()) { totalCountTF.setText(totalCountText); } else { final String finalText = totalCountText; SwingUtilities.invokeLater(new Runnable() { public void run() { totalCountTF.setText(finalText); } }); } } } COM: <s> set the total count </s>
funcom_train/11662745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createId() throws XMLDBException { checkOpen(); try { Hashtable params = new Hashtable(); params.put(RPCDefaultMessage.COLLECTION, collPath); return (String) runRemoteCommand("CreateNewOID", params); } catch (Exception e) { throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e); } } COM: <s> creates a new unique id within the context of the code collection code </s>
funcom_train/13850407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean removeTask(Task t, int min) { for (int i = tasks.size(); --i >= min; ) { if (tasks.get(i) == t) { tasks.remove(i); if (i < firstPending) { firstPending--; for (int j = threads.size(); --j >= 0; ) { TaskThread thread = (TaskThread)threads.get(j); if (thread.task == t) { if (thread != Thread.currentThread()) thread.interrupt(); break; } } } return true; } } return false; } COM: <s> remove a task if it has index min </s>
funcom_train/29614935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String searchByCategoryAction() { this.templateType = FacesUtils .getRequestParameter(RequestParamNames.TEMPLATE_TYPE); if (this.templateType == null || this.templateType.equals("")) { return NavigationResults.PRODUCT_LIST; } else { // catalog Map categoryProductBeans = (Map) this.productBeansMap .get(this.templateType); // set current category name this.currentCategoryName = FacesUtils.getApplicationBean() .getCategoryName(this.templateType); return NavigationResults.CATALOG; } } COM: <s> backing bean action to search products by category </s>
funcom_train/9196837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceMissingValues() { for (int i = 0; i < features.size(); i++) feature_missing_values.add(features.get(i).getMissingValue()); for (Instance instance : instances) { for (int j = 0; j < features.size(); j++) { if (instance.isMissing(j)) instance.setValue(j, features.get(j).getMissingValue()); } } } COM: <s> replace missing values of instances with the most common values in the </s>
funcom_train/45256462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load() { // Load the registries. loadPredefined(); loadCustom(); // Get default perspective. // Get it from the R1.0 dialog settings first. Fixes bug 17039 IDialogSettings dialogSettings = WorkbenchPlugin.getDefault() .getDialogSettings(); String str = dialogSettings.get(ID_DEF_PERSP); if (str != null && str.length() > 0) { setDefaultPerspective(str); dialogSettings.put(ID_DEF_PERSP, ""); //$NON-NLS-1$ } verifyDefaultPerspective(); } COM: <s> loads the registry </s>
funcom_train/28922255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJmniSave() { if (jmniSave == null) { jmniSave = new JMenuItem(); jmniSave.setText("Save"); jmniSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed() } }); } return jmniSave; } COM: <s> this method initializes j menu item </s>
funcom_train/26216645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float goalDistanceEstimate(BSPPathBox nodeGoal) { float xd = (float)x - (float)nodeGoal.x; float yd = (float)y - (float)nodeGoal.y; float zd = (float)z - (float)nodeGoal.z; return ((xd * xd) + (yd * yd) + (zd * zd)); } // END goalDistanceEstimate COM: <s> heres the heuristic function that estimates the distance from a node </s>
funcom_train/2580054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RectangleEdge getDomainAxisEdge(int index) { RectangleEdge result = null; AxisLocation location = getDomainAxisLocation(index); if (location != null) { result = Plot.resolveDomainAxisLocation(location, this.orientation); } else { result = RectangleEdge.opposite(getDomainAxisEdge(0)); } return result; } COM: <s> returns the edge for a domain axis </s>
funcom_train/37823179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void finishNewDoubleEdge(int endNode) { // check if it is a circle edge if(selectedNode.getId() == endNode) { // there are no bidirectional circle edges, add a simple circle edge addEdge(endNode, endNode); } else { // add bidirectional edge addDoubleEdge(selectedNode.getId(), endNode); } // remove selection and leave edit mode DRAW_DOUBLE_EDGE selectedNode = null; setEditMode(EditMode.START_DOUBLE_EDGE); } COM: <s> finish a new bidirectional edge </s>
funcom_train/10050123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TabItem createTab(final IPropertyEntry contents, TabFolder parent) { TabItem item = new TabItem(parent, SWT.NULL); item.setText(contents.getTitle()); if (contents.getTooltip() != null) { item.setToolTipText(contents.getTooltip()); } return item; } COM: <s> creates a tabitem showing the title as set in the properties </s>
funcom_train/32791180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPCodeGenTab() { if (jPCodeGenTab == null) { jPCodeGenTab = new JPanel(); jPCodeGenTab.setLayout(new BorderLayout()); jPCodeGenTab.add(getJPInputPane(), BorderLayout.NORTH); jPCodeGenTab.add(getJSpOutputPane(), BorderLayout.CENTER); } return jPCodeGenTab; } COM: <s> this method initializes j pcode gen tab </s>
funcom_train/9449270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean createNewFile() throws IOException { SecurityManager security = System.getSecurityManager(); if (security != null) { security.checkWrite(path); } if (path.length() == 0) { throw new IOException(Msg.getString("KA012")); //$NON-NLS-1$ } return createNewFileImpl(pathBytes); } COM: <s> creates a new empty file on the file system according to the path </s>
funcom_train/12541058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMarker() { IResource resource= getResource(); if (resource == null) return; Map attributes= getInitialAttributes(); if (fAskForLabel) { if (!askForLabel(attributes)) return; } try { MarkerUtilities.createMarker(resource, attributes, fMarkerType); } catch (CoreException x) { handleCoreException(x, TextEditorMessages.getString("MarkerRulerAction.addMarker")); //$NON-NLS-1$ } } COM: <s> creates a new marker according to the specification of this action and </s>
funcom_train/1387425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onDestroy(){ super.onDestroy(); mNtf.cancel(NOTIFICATION_ID1); Intent alarmIntent = new Intent(getApplicationContext(), OneTimeAlarmReceiver.class); PendingIntent pendingIntentAlarm = PendingIntent.getBroadcast( getApplicationContext(), PENDING_INTENT_REQUEST_CODE1, alarmIntent, PendingIntent.FLAG_CANCEL_CURRENT); pendingIntentAlarm.cancel(); Log.d("ALARMSERVICE", "current alarm is destroyed"); // this is for performance testing, (author: Pyong Byon) //Debug.stopMethodTracing(); } COM: <s> when cancel button is pressed on the confirmation page this method </s>
funcom_train/45877418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int longestEntryLength() { for (int i = _entries.size()-1; i >= 0; i--) { if (_entries.get(i).size() - _usedEntries.get(i).size() > 0) { return i+2; } } return 0; // Board is empty. } COM: <s> returns the length of the longest available entry in the board </s>
funcom_train/50983478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVerticalAlignment( final int alignment ) { log("setVerticalAlignment(" + alignment + ")" ); switch ( alignment ) { case TableLayout.TOP: case TableLayout.BOTTOM: case TableLayout.CENTER: case TableLayout.JUSTIFY: verticalAlignment_ = alignment; break; default: throw new DetailedIllegalArgumentException( "alignment", new Integer(alignment) ); } } COM: <s> set the vertical alignment </s>
funcom_train/5901973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int smartUpdatePaging() { //We update all attributes at once, because //1) if pgsz <= 1, none of them are generated (to save HTML size) final int pgcnt = getPageCount(); smartUpdate("z.pgInfo", pgcnt+","+getActivePage()+","+getPageSize()); return pgcnt; } COM: <s> updates paging related information </s>
funcom_train/2626388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { try { final byte[] ser = PObjectOutputStream.toByteArray(this); return new ObjectInputStream(new ByteArrayInputStream(ser)).readObject(); } catch (final IOException e) { return null; } catch (final ClassNotFoundException e) { return null; } } COM: <s> the copy method copies this node and all of its descendants </s>
funcom_train/39983698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set setupAction() throws URISyntaxException { HashSet action = new HashSet(); // this is a standard URI that can optionally be used to specify // the action being requested URI actionId = new URI("urn:oasis:names:tc:xacml:1.0:action:action-id"); // create the action action.add(new Attribute(actionId, null, null, new StringAttribute(actionIdValue))); return action; } COM: <s> creates an action specifying the action id an optional attribute </s>
funcom_train/8661913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL find(String classname) { if(this.classname.equals(classname)) { String cname = classname.replace('.', '/') + ".class"; try { // return new File(cname).toURL(); return new URL("file:/ByteArrayClassPath/" + cname); } catch (MalformedURLException e) {} } return null; } COM: <s> obtains the url </s>
funcom_train/25601820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertQueueNotFull() throws ParseException, XMLStreamException { while (isFull() && System.currentTimeMillis() < timeOutEnd) { queueListener.notifyQueueWaitingForTranslatedEvent(); QueueItem item; while ((item = pollTranslated()) != null) { writeItemOut(item); } if (isFull()) { try { Thread.sleep(config.getSleepTimeMilliSec()); } catch (InterruptedException e) { /** * On interruption proceed. */ break; } } } } COM: <s> sleeps and tries to write to the output writer at intervals until the </s>
funcom_train/1927521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Chain genCopyFromArray(LocalGeneratorEx localgen, Local fromArray, int index, Local to) { Type elemType = ((ArrayType)fromArray.getType()).baseType; Local temp = localgen.generateLocal(elemType, "arrayTemp"); Stmt getstmt = Jimple.v().newAssignStmt( temp, Jimple.v().newArrayRef(fromArray, IntConstant.v(index))); Chain c = genCopy(localgen, temp, to); c.addFirst(getstmt); return c; } COM: <s> copy an array cell into a local autoboxing unboxing </s>
funcom_train/39318875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() throws IOException { m_logger.info("beginning startup"); int numMessageSenders = 9; m_shutdown = false; new TopLevelListener().start(); // m_hsm.start(); // TODO reinsert this. m_logger.info("started"); } COM: <s> runs the server </s>
funcom_train/50612270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPageType(PageModel pageType) { if (this.pageType != null) this.pageType.deleteObserver(this); if (pageType != null) pageType.addObserver(this); this.pageType = pageType; notifyEvent(new ModelEvent(this, SET_GENERICTYPE, this.pageType)); notifyEvent(new ModelEvent(this, SET_PAGETYPE, this.pageType)); } COM: <s> sets the page type of this superplace </s>
funcom_train/23631183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInPlace(BasicWorker worker, int x, int y) { if (worker.isFleeing()) { return false; } Int2D location = this.workersGrid.getObjectLocation(worker); return ((location.getX() == x) && (location.getY() == y)); } COM: <s> check if this worker is in ia place </s>
funcom_train/7713485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJbAcceptar() { if (jbAcceptar == null) { jbAcceptar = new JButton(); jbAcceptar.setBounds(new Rectangle(630, 345, 174, 34)); jbAcceptar.setText(TDSLanguageUtils.getMessage("client.resultats.PantallaFeedBack10")); jbAcceptar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { if (canvisFets) ActualitzarResultats(); dispose(); } }); } return jbAcceptar; } COM: <s> this method initializes jb acceptar </s>
funcom_train/37518652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void write(ConstantPool cp, DataOutput out) throws IOException { out.writeShort(attr.getIndex()); out.writeInt(getSize() - 6); out.writeShort(annotations.size()); for (int i = 0; i < annotations.size(); i++) { ((Annotation)annotations.get(i)).write(cp, out); } } COM: <s> write this attribute into the file out getting data position from </s>
funcom_train/25290361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDiffuseColor(float r, float g, float b, float a) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_COMPONENT_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("Material0")); if (isLive()) ((MaterialRetained)this.retained).setDiffuseColor(r,g,b,a); else ((MaterialRetained)this.retained).initDiffuseColor(r,g,b,a); } COM: <s> sets this materials diffuse color plus alpha </s>
funcom_train/3391936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void navLinkPrevious() { if (prev == -1) { printText("doclet.Prev_Letter"); } else { printHyperLink("index-" + prev + ".html", "", configuration.getText("doclet.Prev_Letter"), true); } } COM: <s> print the previous unicode character index link </s>
funcom_train/9495512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double probability(int x) { double ret; if (x < 0) { ret = 0.0; } else { ret = MathUtils.binomialCoefficientDouble(x + getNumberOfSuccesses() - 1, getNumberOfSuccesses() - 1) * Math.pow(getProbabilityOfSuccess(), getNumberOfSuccesses()) * Math.pow(1.0 - getProbabilityOfSuccess(), x); } return ret; } COM: <s> for this distribution x this method returns p x x </s>
funcom_train/44162936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected EuropeanAIPlayer getEuropeanAIPlayer() { Player player = getUnit().getOwner(); if (!player.isEuropean()) { throw new IllegalArgumentException("Not a European player: " + player); } return (EuropeanAIPlayer)getAIMain().getAIPlayer(player); } COM: <s> convenience accessor for the owning european ai player </s>
funcom_train/47491085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { isRunning = true; if (isWatch) { platform.start(); } else { master.setPlatformWatchRunning(true); } /*WatchModel runWatch =*/ new WatchModel(this); if (isWatch) { rcw.start(); connectToServer(); } while (isRunning) { try { sleep(500); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } if (!isWatch) { master.setPlatformWatchRunning(false); } System.out.println("Watch done, master.getPlatformWatchRunning = " + master.getPlatformWatchRunning()); } COM: <s> entry point for watch </s>
funcom_train/3655830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canHandle(Class clazz) { Assert.notNull(clazz, "clazz"); if (null == handledClasses) { return false; } for (int ii = 0; ii < handledClasses.length; ii++) { if (handledClasses[ii].isAssignableFrom(clazz)) { return true; } } return false; } COM: <s> checks whether this type can handle the given class of data </s>
funcom_train/1448646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String updateReserveFees() throws Exception{ if (logger.isDebugEnabled()) { logger.debug("updateReserveFees() - start"); //$NON-NLS-1$ } for (ReserveAuctionsListingFees reserveAuctionListingFee : this.reserveAuctionListingFeesMap.values()) { ReserveAuctionListingFeesServiceDelegator.updateReserveAuctionListingFees(reserveAuctionListingFee); } if (logger.isDebugEnabled()) { logger.debug("updateReserveFees() - end"); //$NON-NLS-1$ } return SUCCESS; } COM: <s> update reserve fees </s>
funcom_train/31028578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEntityID(EntityID entityID, ActionType actionType) { EntityIDCollection col = (EntityIDCollection)this.observers.get(actionType); if(col == null) { col = new EntityIDCollection(); this.observers.put(actionType, col); } if(!col.contains(entityID)) { col.addEntityID(entityID); } } COM: <s> adds a new entity id to the store </s>
funcom_train/44165775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(List<AbstractOption<T>> value) { final List<AbstractOption<T>> oldValue = this.value; this.value = value; if (!value.equals(oldValue) && isDefined) { firePropertyChange(VALUE_TAG, oldValue, value); } isDefined = true; } COM: <s> sets the value of this code list option code </s>
funcom_train/35690776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getData() { if (data != null) { return data; } ValueBinding vb = getValueBinding("data"); if (vb != null) { return vb.getValue(getFacesContext()); } else { if(!Beans.isDesignTime()){ setChartTitle(getChartTitle() + " with default data"); } return DEFAULT_DATA; } } COM: <s> p return the value of the code data code property </s>
funcom_train/5232361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveUpIndex(int index)throws IndexOutOfBoundsException{ if (index >= 1 && index < (data.size())){ VisualPageListItem tmpElement = data.get(index); data.set(index, data.get((index-1))); data.set((index-1), tmpElement); fireContentsChanged(this,index-1, index); } } COM: <s> moves up a item at the given index fire to listeners </s>
funcom_train/47950701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectItem(String key, String name) { SelectionAtom s = new SelectionAtom(name, key, this.dataSource, this.displayKeyOrName, createQuestionClone()); elements.put(key, s); String[] x = new String[elements.size()]; this.keyElements = elements.keySet().toArray(x); } COM: <s> create a new selection atom for the specified selection </s>
funcom_train/21810563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processTimerEvent ( TimerEvent e ) { boolean properClass = e instanceof TimerEvent; assertEquals ("Received Event not a TimerEvent" + e, properClass, true ); boolean equivalent = ((TimerEvent)e).equals(expectedTimerEvent); assertEquals ("Received Event not equivalent to expected", equivalent, true ); numberOfTimerEvents++; } COM: <s> catch all timer events and check against expected </s>
funcom_train/13953551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { Enumeration enumeration = baseBindingList().objectEnumerator(); while (enumeration.hasMoreElements()) { String key = (String) enumeration.nextElement(); takeValueForKey(null, key); } enumeration = additionalBindingList().objectEnumerator(); while (enumeration.hasMoreElements()) { String key = (String) enumeration.nextElement(); takeValueForKey(null, key); } } COM: <s> resets the values pulled from the wocomponent to null </s>
funcom_train/2400256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Font createFont (String alias, int size, boolean bold, boolean italic) { int style = Font.PLAIN; if (bold && italic) { style = Font.BOLD | Font.ITALIC; } else if (bold) { style = Font.BOLD; } else if (italic) { style = Font.ITALIC; } return new Font (alias, style, size); } COM: <s> returns new tt java </s>
funcom_train/48535868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getTotalSLOC() { float totalSLOC = -3; if (this.totalSLOC == -2) { totalSLOC = 0; // Recursively get the subfolder's total SLOC for (SFolder folder : subFolders) { totalSLOC += folder.getTotalSLOC(); } // Get the all the file's total SLOC for (SFile file : allFiles) { totalSLOC += file.getSourceLines(); } if (totalSLOC == 0){ totalSLOC = -1; } } return totalSLOC; } COM: <s> gets the total sloc recursively looks at all subfolder and files </s>
funcom_train/12860930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_SaveAggregation_0() throws Exception { beginTransaction(); initEntities(); getEntityManager().persist(aggregated); getEntityManager().persist(aggregating); commitTransaction(); assertNotNull(aggregated.getId()); assertNotNull(aggregating.getId()); } COM: <s> saving a many to many aggregation </s>
funcom_train/43000274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { try { Logger.getLogger(UniSessionWrapper.class.getName()+":"+account).log(Level.INFO, "closing session"); session.disconnect(); } catch (UniSessionException ex) { Logger.getLogger(UniSessionWrapper.class.getName()+":"+account).log(Level.SEVERE, null, ex); } } COM: <s> clean up resources by clossing the session </s>
funcom_train/19288718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Survey convertSurvey(String dbname) { Vector<Page> pages = null; try { Hashtable choices = getQuestionChoices(); Vector<Question> questions = getQuestions(choices); pages = getPages(questions); return new Survey(dbname, pages); } catch (Exception e) { Dialogs d = new Dialogs(); d.doAlertDialog("Critical Error while parsing Data. Please ensure all fields are valid and present", "Error"); return null; } } COM: <s> method convert survey </s>
funcom_train/32057476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInstallKeyboardActions() { System.out.println("testInstallListeners"); JGraph jg=new JGraph(); BasicGraphUI x = new BasicGraphUI(); GraphLayoutCache g = new GraphLayoutCache( new DefaultGraphModel(),jg ); x.installUI(jg); x.installKeyboardActions(); assertNotNull(jg.getInputMap()); } COM: <s> test of install keyboard actions method of class basic graph ui </s>
funcom_train/7494730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DurationFormatterFactory setLocale(String localeName) { if (!localeName.equals(this.localeName)) { this.localeName = localeName; if (builder != null) { builder = builder.withLocale(localeName); } if (formatter != null) { formatter = formatter.withLocale(localeName); } reset(); } return this; } COM: <s> set the name of the locale that will be used when </s>
funcom_train/35194760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteMarkers(IFile file) { try { file.deleteMarkers(MARKER_TYPE, false, IResource.DEPTH_ZERO); } catch (CoreException ce) { ce.printStackTrace(); // No need to rethrow an exception here: failure to delete a marker // can never result in an invalid build proceeding without error. } } COM: <s> removes all joe e created markers from a file </s>
funcom_train/12561737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setVerticalScroll(int scrollPosition, int scrollProportion) { BodyLayer layer = null; if (alertLayer.isVisible()) { layer = alertLayer; } else if (bodyLayer.isVisible()) { layer = bodyLayer; } if (layer != null && layer.setVerticalScroll(scrollPosition, scrollProportion)) { setDirty(); sizeChangedOccured = true; return true; } return false; } COM: <s> set the current vertical scroll position and proportion </s>
funcom_train/49789683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFormHasNavigationButtons() throws Exception { Frame home = assertHasFrame(root, "Home"); InputForm form = assertHasInputForm(home, "view news"); Button next = assertHasButton(form, "Next"); Button previous = assertHasButton(form, "Previous"); Button first = assertHasButton(form, "First"); Button last = assertHasButton(form, "Last"); assertGenerated(next); assertGenerated(previous); assertGenerated(first); assertGenerated(last); // and a Label called 'Results' Label labelResults = assertHasLabel(form, "Results"); assertGenerated(labelResults); } COM: <s> the input form should have navigation buttons created </s>
funcom_train/4358512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSessionMaxInactiveCol(String sessionMaxInactiveCol) { String oldSessionMaxInactiveCol = this.sessionMaxInactiveCol; this.sessionMaxInactiveCol = sessionMaxInactiveCol; support.firePropertyChange("sessionMaxInactiveCol", oldSessionMaxInactiveCol, this.sessionMaxInactiveCol); } COM: <s> set the max inactive column for the table </s>
funcom_train/15677101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Box2D clip(Box2D box) { this.xmin = max(this.xmin, box.xmin); this.xmax = min(this.xmax, box.xmax); this.ymin = max(this.ymin, box.ymin); this.ymax = min(this.ymax, box.ymax); return this; } COM: <s> clip this bounding box such that after clipping it is totally contained </s>
funcom_train/26352968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Packet createFilteredFullEntitiesPacket(Player p) { final Object[] data = new Object[2]; data[0] = filterEntities(p, game.getEntitiesVector()); data[1] = game.getOutOfGameEntitiesVector(); return new Packet(Packet.COMMAND_SENDING_ENTITIES, data); } COM: <s> creates a packet containing all entities including wrecks visible to </s>
funcom_train/1042476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector3f mult(Vector3f vec, Vector3f store) { if (store == null) store = new Vector3f(); float vx = vec.x, vy = vec.y, vz = vec.z; store.x = m00 * vx + m01 * vy + m02 * vz + m03; store.y = m10 * vx + m11 * vy + m12 * vz + m13; store.z = m20 * vx + m21 * vy + m22 * vz + m23; return store; } COM: <s> code mult code multiplies a vector about a rotation matrix and adds </s>
funcom_train/22286037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g, int cx, int cy, int cw, int ch) { FontMetrics fm = g.getFontMetrics(hdrFont); if (cy < hdrHeight) { int y = fm.getAscent(); g.setColor(foreground); g.setFont(hdrFont); for (int c = 0 ; c < ncols ; c++) { ListColumn col = cols[c]; g.drawString(getKey(col.lbl), col.x + 5, y); } } } COM: <s> paint the widget </s>
funcom_train/21306008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton51() { if (jButton51 == null) { jButton51 = new JButton(new ImageIcon(getClass().getResource("/irudiak/g3.png"))); jButton51.setBackground(Color.blue); jButton51.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { if (jButton51.getBackground()==Color.blue) jButton51.setBackground(Color.yellow); else jButton51.setBackground(Color.blue); } }); } return jButton51; } COM: <s> this method initializes j button51 </s>
funcom_train/43897799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Filter filter) { LOGGER.finer("added a filter: " + filter.toString()); if (logicFactory != null) { LOGGER.finer("adding to nested logic filter: " + filter.toString()); logicFactory.add(filter); } else { LOGGER.finer("added to sub filters: " + filter.toString()); subFilters.add(filter); } } COM: <s> adds a filter to the current logic list </s>
funcom_train/20646409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JasperPrint renderReport() { JasperPrint print = null; try { print = JasperFillManager.fillReport( getReport(), getFields(), new JRTableModelDataSource( getDatasource() ) ); } catch (JRException e) { // empty, returning null default m_log.error( "renderReport caught exception", e ); } return print; } COM: <s> render the report into a device independent </s>
funcom_train/3120597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkLineForComments(String strLine) { //// modifies nonlocal variable iLinesOfComments if (isComment(strLine) || strLine.indexOf(COMMENT_EOLN) != -1) { //// Skip lines that have no meaningful comments if (! strLine.endsWith(COMMENT_CONTINUE) == true) iLinesOfComments++; } } // of method COM: <s> if the line contains a comment then increment the number of </s>
funcom_train/39895257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canDeleteProject(Project project){ return project.getUserRoleInProject().size()==0&&project.getTestcases().size()==0 &&project.getTestplans().size()==0&&project.getTestsuites().size()==0; } COM: <s> whether project can be deleted </s>