__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/21733523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ReturnValue execute() { ReturnValue statementReturnValue; for (Statement statement : statements) { statementReturnValue = statement.execute(); // Check if the action should be verified if (statement.getVerification() != VerificationType.GO_ON) { troubles.addAll(statement.getTroubles()); } if (statementReturnValue.isMoreSevere(testResult)) { testResult = statementReturnValue; } if (testResult != ReturnValue.OK) { return testResult; } } return testResult; } COM: <s> execute the action </s>
funcom_train/39105107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int readChildren(String foreignKeyName, String foreignKeyValue, DataModel childTemplate, ArrayModel result) throws Exception { StringBuffer whereClauseBuffer = new StringBuffer(foreignKeyName); whereClauseBuffer.append('='); whereClauseBuffer.append(foreignKeyValue); return search(whereClauseBuffer.toString(), childTemplate, result); } COM: <s> same as search fkey 12345 child template result </s>
funcom_train/9543465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void colorByAttribute(Attribute attribute, ExampleSet set, float[] attrvalues) { if (attribute == null) { return; } colorbyattribute = true; this.colorattr = attribute; this.colorvalues = attrvalues; if (Utils.isNumeric(colorattr)) { this.colorattr_min = (float) set.getStatistics(attribute, Statistics.MINIMUM); this.colorattr_max = (float) set.getStatistics(attribute, Statistics.MAXIMUM); } } COM: <s> sets the color mode </s>
funcom_train/45277713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void saveUser() { if(nameFld.getText().equals("")||passwordFld.getText().equals("")) return; mainPanel.getFrame().user.setName(nameFld.getText()); mainPanel.getFrame().user.setPassword(passwordFld.getText()); StorageImpl.getInstance().updateUser(mainPanel.getFrame().user); updateUsersList(); } COM: <s> updates user information of existing users </s>
funcom_train/40105683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getTok() { if (selection != null && selection.isEmpty() == false && selection instanceof IStructuredSelection) { IStructuredSelection ssel = selection; if (ssel.size() > 1) { return; } Object obj = ssel.getFirstElement(); if (obj instanceof IResource) { IResource resource = (IResource) obj; tok = ToK.getProjectToK(resource.getProject()); } } } COM: <s> gets the tok </s>
funcom_train/32909455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArtifactList getStepChildren(int parentId, ArtifactLevelGroup group, ComponentTypeGroup componentGroup, ServiceCall call) throws java.rmi.RemoteException, DataAccessException, Exception { try { startService(call); ArtifactList list = ada.getStepChildren(parentId, group, componentGroup); setReference(list, list.getFirst().getArtifactRefId()); stopService(call); return list; } catch (Exception e) { Debug.LogException(this, e); throw e; } } COM: <s> return the list of steps for the artifact </s>
funcom_train/37233689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String placeText(boolean shortPlace) { String retString = " "; Iterator iter = this.getPlacepartSet().iterator(); while (iter.hasNext()) { Placepart curPlacePart = new Placepart(); curPlacePart = (Placepart) iter.next(); retString = retString + curPlacePart.placePartText(shortPlace); } return retString; } COM: <s> provides place as a string suitable for display </s>
funcom_train/42639387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected LinAESolver initLinAESolver() { LinAESolver solver = null; solver = (linAESolver == null) ? new DirectAESolver() : linAESolver; //To call method to initiate an algorithm. Algorithm algorithm = new SimpleGaussAEAlgorithm(new PrincipalInMatrixElement()); //To solve with out problems. solver.setAlgorithm(algorithm); return solver; } COM: <s> creation of default solver of ae system </s>
funcom_train/20881168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeStates() { log.info("Initializing states"); game = Game.getGame(); new WelcomeMenuState(); new MovingState(); new CreditProjectManagerState(); new CreditStoryState(); new CreditLeadDeveloperState(); new CreditDevelopersState(); new CreditGraphicsState(); new CreditThanksToState(); log.info("States initialized"); } COM: <s> initialize the states </s>
funcom_train/16792096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRecordings(List<RecordingDescription> recordings) { List<Timer> old = this.recordings; this.recordings = new ArrayList<Timer>(4); for (RecordingDescription recording: recordings) this.recordings.add(new Timer(this, recording, this.recordings.size())); this.firePropertyChange("recordings", old, this.recordings); } COM: <s> set the recording list </s>
funcom_train/45896025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String get(long time) { if (time < lastTime) { for (int i = lastIndex; i >= 0; i--) { SubEntry e = entries.get(i); if (e.isIn(time)) { lastIndex = i; lastTime = time; return e.text; } } } else { for (int i = lastIndex; i < entries.size(); i++) { SubEntry e = entries.get(i); if (e.isIn(time)) { lastIndex = i; lastTime = time; return e.text; } } } return null; } COM: <s> get a subtitle entry for the given time </s>
funcom_train/50846013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHashCode() throws Exception { byte[] bytes = StringConverter.hexStringToByteArray("02b7abfe"); RowId rid = newRowId("02b7abfe"); int expResult = Arrays.hashCode(bytes); int result = rid.hashCode(); assertEquals(expResult, result); } COM: <s> test of hash code method of interface java </s>
funcom_train/14312957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void expandSpecialTokens(Node n,boolean recursive) { List<Token>expandedList=getAllTokens(n,true,false); n.clearChildren(); for(Node child : expandedList) { n.addChild(child); if (recursive&&child.getChildCount()>0) { expandSpecialTokens(child,true); } } } COM: <s> expands in place a nodes children to include any comment tokens hanging </s>
funcom_train/16953421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractSprite getSprite(String ref) { // if we've already got the sprite in the cache // then just return the existing version if (abstractSprites.get(ref) != null) { return abstractSprites.get(ref); } AbstractSprite abstractSprite; if (isAnimation(ref)) { abstractSprite = loadAnimatedSprite(ref); } else { abstractSprite = loadSprite(ref); } abstractSprites.put(ref, abstractSprite); return abstractSprite; } COM: <s> retrieve a sprite from the store </s>
funcom_train/3294507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSearchAge() { int val=30; String sval = getElementValue("builder.searchage"); if (sval.equals("") && (parentBuilder!=null)) { sval=parentBuilder.getSearchAge(); } try { val=Integer.parseInt(sval); } catch(Exception f) {} return val; } COM: <s> retrieves the search age </s>
funcom_train/7309509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Graphics g, JComponent c) { if (!ClearLookUtils.hasCheckedBorder(c)) { Border oldBorder = ClearLookManager.replaceBorder((JPanel) c); ClearLookUtils.storeBorder(c, oldBorder); } super.update(g, c); } COM: <s> replaces the code border code if appropriate then updates </s>
funcom_train/30168072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttribute(int[] path, String name, String value) { if (name.equals("code")) { this.setCode(path, value); } else if (name.equals("name")) { this.setName(path, value); } else { System.out.println( " only attributes 'code' or 'name' can be set!!!"); } } COM: <s> method to set an attribute at a particular path </s>
funcom_train/28763231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExternalRequesterClassName(java.lang.String value) throws com.intersys.objects.CacheException { com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value); mInternal.setProperty(ii_ExternalRequesterClassName, jj_ExternalRequesterClassName,kk_ExternalRequesterClassName, com.intersys.objects.Database.RET_PRIM, "ExternalRequesterClassName", dh); return; } COM: <s> sets new value for code external requester class name code </s>
funcom_train/39062085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDescriptionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IMarkingExtensionNode_description_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IMarkingExtensionNode_description_feature", "_UI_IMarkingExtensionNode_type"), MarkingPackage.eINSTANCE.getIMarkingExtensionNode_Description(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the description feature </s>
funcom_train/8685664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object createDynamicElement(String uri, String name, String qName) { Element e = null; if (uri.equals("")) { e = doc.createElement(name); } else { e = doc.createElementNS(uri, qName); } fragment.appendChild(e); return new Child(e); } COM: <s> creates a nested element </s>
funcom_train/25741426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SVNRepository setup(String url, String userName, String password) throws SVNException { DAVRepositoryFactory.setup(); SVNRepositoryFactoryImpl.setup(); /** svn:// et svn+xxx:// */ FSRepositoryFactory.setup(); /** file:// */ SVNRepository myRepository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(url)); myRepository.setAuthenticationManager(SVNWCUtil.createDefaultAuthenticationManager(userName, password)); myRepository.setTunnelProvider(SVNWCUtil.createDefaultOptions(true)); return myRepository; } COM: <s> this method has to be called before using any svnkit function it </s>
funcom_train/45775444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setZipFilename() { SystemDialog sd = getZipDialog(); String zipFile = sd.callStoreDialog(settings.cp_DefaultSession.cp_OutDirectory, resources.resDefaultArchiveFilename); setPublishUrl(ZIP_PUBLISHER, zipFile, 4); getPublisher(ZIP_PUBLISHER).overwriteApproved = true; } COM: <s> the user clicks the zip </s>
funcom_train/17694937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void multipleComparatorsTestI() { final Collection<Comparator<Person>> comparators = new LinkedList<Comparator<Person>>(); comparators.add(new NameComparator()); comparators.add(new AgeComparator()); final ComposedComparator<Person> fixture = new ComposedComparator<Person>(comparators); Collections.sort(persons, fixture); Assert.assertSame(JANE_10, persons.get(0)); Assert.assertSame(JILL_30, persons.get(1)); Assert.assertSame(JOHN_10, persons.get(2)); Assert.assertSame(JOHN_20, persons.get(3)); } COM: <s> checks a sorting using two different comparators the first one </s>
funcom_train/16951495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rule addAntecedent(Variable variable, String termName, boolean negated) { if( variable.getMembershipFunction(termName) == null ) throw new RuntimeException("RuleTerm '" + termName + "' does not exists in variable '" + variable.getName() + "'"); RuleTerm fuzzyRuleTerm = new RuleTerm(variable, termName, negated); antecedents.add(fuzzyRuleTerm); return this; } COM: <s> add a condition </s>
funcom_train/20530536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int set(int pos) { while (pos >= capacity) { doubleCapacity(); } if (pos >= limitPos) { limitPos = pos + 1; } int windex = pos >> 5; int mask = 0x80000000 >>> (pos & 0x1F); int word = map[windex]; int result = (word & mask) == 0 ? 0 : 1; map[windex] = (word | mask); return result; } COM: <s> sets pos and returns old value </s>
funcom_train/9769517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void validCardNonMhing() { Card c = new Card(6, Card.TYPE_BAMBOO, 5); assertEquals(6, c.getID()); assertEquals(Card.TYPE_BAMBOO, c.getType()); assertEquals(5, c.getValue()); assertFalse(c.isMhing()); } COM: <s> checks the constructor for a valid non mhing card </s>
funcom_train/3596245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadReliability(NLayer top, NLayer top_common, String coder_attribute_name, String path, List observations) throws NOMException { loadReliability(top, top_common, coder_attribute_name, path, observations, null); } COM: <s> load data for the purpose of comparing different coders </s>
funcom_train/37826889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDefaultReturnStatement() { if (!fullyQualifiedReturnType.equals("void")) { if (isIntegerPrimitive(fullyQualifiedReturnType)) { return "return 0;"; } else if (isFloatingPointPrimitive(fullyQualifiedReturnType)) { return "return 0.0;"; } else if (isBooleanPrimitive(fullyQualifiedReturnType)) { return "return false;"; } else { return "return null;"; } } return ""; } COM: <s> returns a default return statement suitable for this method </s>
funcom_train/8077386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeRangesEmpty(int numAtt, double[][] ranges) { for (int j = 0; j < numAtt; j++) { ranges[j][R_MIN] = Double.MAX_VALUE; ranges[j][R_MAX] = Double.MIN_VALUE; ranges[j][R_WIDTH] = Double.MIN_VALUE; } } COM: <s> used to initialize the ranges </s>
funcom_train/2919259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTargetCharLiteralFromANTLRCharLiteral( CodeGenerator codegen, String literal) { int c = Grammar.getCharValueFromGrammarCharLiteral(literal); String prefix = "'"; if( codegen.grammar.getMaxCharValue() > 255 ) prefix = "L'"; else if( (c & 0x80) != 0 ) // if in char mode prevent sign extensions return ""+c; return prefix+escapeChar(c)+"'"; } COM: <s> convert from an antlr char literal found in a grammar file to </s>
funcom_train/41488881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { // nothing to do if no bluetooth available if (!isBTReady) { return; } // ok, start processor now processor = new ClientProcessor(); // ok, start accepting connections then while (!isClosed) { StreamConnection conn = null; try { conn = notifier.acceptAndOpen(); System.out.println("new conneccion: " + conn.toString()); } catch (IOException e) { // wrong client or interrupted - continue anyway continue; } processor.addConnection(conn); } } COM: <s> accepts a new client and send him her a requested image </s>
funcom_train/16673690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BasicDBObject findByID(String id) { BasicDBObject findByIdQuery = new BasicDBObject(); findByIdQuery.put(Recipe.ID, new ObjectId(id)); BasicDBObject result = (BasicDBObject) dbCol.findOne(findByIdQuery); if (result != null) { return result; } else { return null; } } COM: <s> this method get one basic dbobject it find </s>
funcom_train/49339664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void providerStateChanged(LocationProvider provider, int newState) { // let the canvas know the state of the provider if (provider.getState() == LocationProvider.AVAILABLE) { validLocation = true; followingCanvas.locationValid(validLocation); } else { validLocation = false; followingCanvas.locationValid(validLocation); } } COM: <s> a location listener interface method </s>
funcom_train/48153881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(){ super.update(); double[] record = new double[sampleSize + 1]; record[0] = getTime(); urn.setValues(sample); urn.setBallColor(GREEN); for (int i = 0; i < sampleSize; i++){ if (urn.getBall(i).getValue() == value){ urn.getBall(i).setBallColor(RED); } record[i + 1] = orderedSample[i]; } urn.setDrawn(true); recordTable.addRecord(record); orderGraph.repaint(); orderTable.repaint(); } COM: <s> this method updates the experiment including the ball panel the random variable and </s>
funcom_train/1320783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MenuItem addEntry(MenuItem parent, Entry<String, String> entry) { MenuItem menuItem = new MenuItem(); menuItem.setValue(entry.getValue()); menuItem.setId(entry.getKey()); menuItem.addActionListener(new DynamicMenuActionListener()); parent.getChildren().add(menuItem); return menuItem; } COM: <s> adds a single entry to any sub menu </s>
funcom_train/44703241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void quit() { if (LOG.isInfoEnabled()) { LOG.info(version + " shutdown"); } quitExitCode = EXIT_CODE_SHUTDOWN; doQuit = true; quitServer(quitMessage.replace("VERSION", version)); // System.exit() is called from onDisconnect() with the chosen exit code } COM: <s> exits the jvm </s>
funcom_train/16476111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireFileSavedStateChanged(BenchmarkFile e) { // System.out.println("Fire FileSavedStateChanged: " + e.toString()); // DEBUG final BenchmarkFileEvent event = new BenchmarkFileEvent(e); fireEvent( new EventHandler<BenchmarkFileEvent>(event) { @Override protected void dispatch(FileEventListener listener, BenchmarkFileEvent event) { listener.fileSavedStateChanged(event); } }); } COM: <s> fire an event to note that the given file was changed or saved </s>
funcom_train/3373168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL getImageURL() { String src = (String)getElement().getAttributes(). getAttribute(HTML.Attribute.SRC); if (src == null) { return null; } URL reference = ((HTMLDocument)getDocument()).getBase(); try { URL u = new URL(reference,src); return u; } catch (MalformedURLException e) { return null; } } COM: <s> return a url for the image source </s>
funcom_train/27701977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateArray(String columnName, java.sql.Array x) throws SQLException { System.out.println("ResultSetAdapter.updateArray(String columnName, java.sql.Array x)"); if(dbResultSet != null) dbResultSet.updateArray(columnName, x); else throw(new SQLException("not implemented")); } COM: <s> updates the designated column with a code java </s>
funcom_train/13120052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List listAddresses(int numberOfAddressesToList) throws PersistentException, SQLException { SqlMapClient sqlMap = SqlMapBooksConfig.getSqlMap(); try { sqlMap.startTransaction(); List list = sqlMap.queryForList("getAllAddresses", null); sqlMap.commitTransaction(); return list; } catch (Exception e) { sqlMap.endTransaction(); throw (SQLException) e.fillInStackTrace(); } } COM: <s> return list with addresses </s>
funcom_train/2053345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOrientation(String orientation) { if ("portrait".equals(orientation)) { getElement().removeClassName("landscapeConsole"); getElement().addClassName("portraitConsole"); } else { getElement().removeClassName("portraitConsole"); getElement().addClassName("landscapeConsole"); } this.orientation = orientation; setPosition(BrowserUtils.getWindowWidth(), BrowserUtils.getWindowHeight()); } COM: <s> adjusts the css class to either landscape or portrait </s>
funcom_train/19241994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyMediaToPlaylist() throws IOException { if (null == targetPlaylistName) { throw new IllegalArgumentException("No target playlist selected"); } MediaManager manager = getManager(); Playlist pl = manager.findPlaylistByName(targetPlaylistName, mediaType); MediaId[] ids = MediaId.fromStringArray(selectedMediaIds); manager.addMediaToPlaylist(pl, ids); } COM: <s> copy media from one playlist to another </s>
funcom_train/9371710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getLong(String property, long def) { Object value = super.get(property); if (value == null) { return def; } if (value instanceof Long) { return ((Long)value).longValue(); } throw new TypeException(property, value, "long"); } COM: <s> returns the value of a long property or the default if the property </s>
funcom_train/13503279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createTable(TableSpec spec) throws SQLException { Statement s = createStatement(); Iterator<String> iter = m_converter.getDDL(spec).iterator(); while (iter.hasNext()) { String updateSQL = iter.next(); s.executeUpdate(updateSQL); } } COM: <s> creates a table in the target database </s>
funcom_train/26659897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAuthorPersonMapping(String s) { if ( s == null || s.trim().length() < 1) return; usr2author.clear(); if ( s.indexOf('=') == -1) { metadataProps.setProperty(AUTHOR_PERSON, s); //NO mapping user -> authorPerson; use fix authorPerson instead } else { this.addMappingString(s, usr2author); } } COM: <s> set either a fix author person or a mapping user to author person </s>
funcom_train/17988323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FooterPanel getFooterPanel() { // Scan the vertical panels... for (Widget w: m_verticalPanels) { // ...and if we find a footer panel... if ((null != w) && (w instanceof FooterPanel)) { // ...return it. return ((FooterPanel) w); } } // If we get here, a footer panel isn't defined. Return null. return null; } COM: <s> scan the defined tool panels for a footer panel and returns it </s>
funcom_train/50083921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReactionSet(IReactionSet sor) { if (this.setOfReactions != null) this.setOfReactions.removeListener(this); this.setOfReactions = sor; if (this.setOfReactions != null) this.setOfReactions.addListener(this); notifyChanged(); } COM: <s> sets the reaction set contained in this chem model </s>
funcom_train/9490019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawCircleArcNotDashed(float x, float y, float R, float startAngle, float endAngle){ int nsides = 16; //TODO use thickness int rings = (int) (60*(endAngle-startAngle)) +2; drawTorusArc(x, y, R, startAngle, endAngle, nsides, rings); } COM: <s> draw a dashed circle with center x y and radius r </s>
funcom_train/34135007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XElement getSelectedElement() { XElement result = null; DesignerNode node = getSelectedNode(); if ( node != null) { if ( node instanceof ElementNode) { result = ((ElementNode)node).getElement(); } else if ( node instanceof AttributeNode) { result = ((AttributeNode)node).getParentElementNode().getElement(); } } return result; } COM: <s> returns the currently selected element or parent element </s>
funcom_train/18825704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createTableCheck() throws SQLException { if (isTable()) { String sExceptionText = "createTable - class already has a table."; log.debug(sExceptionText); throw new SQLException(sExceptionText); } if (!isData()) { String sExceptionText = "createTable - class has no data representation. Cannot create table."; log.debug(sExceptionText); throw new SQLException(sExceptionText); } } COM: <s> does some base class level checks for before creating a table </s>
funcom_train/21951932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getColumnNameString() { StringBuffer nameString = new StringBuffer(); DataColumn[] columns = getDataColumns(); for (int n=0; n < columns.length;n++) { nameString.append(columns[n].getName()); if (n < columns.length-1) nameString.append(COMMA); } return nameString.toString(); } COM: <s> gets the name of the column </s>
funcom_train/4079521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SessionFactory lookupSessionFactory() { // if (logger.isDebugEnabled()) { // logger.debug("Using SessionFactory '" + getSessionFactoryBeanName() + "' for OpenSessionInViewFilter"); // } // return (SessionFactory)ApplicationContextHolder.getBean(sessionFactoryBeanName); if(sessionFactory == null) throw new IllegalStateException("'sessionFactory' property must be not null"); return sessionFactory; } COM: <s> look up the session factory that this filter should use </s>
funcom_train/20688582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeOut(String message){ try { BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(logfile, true))); out.write( message ); out.newLine(); out.close(); } catch (Exception ex) { ex.printStackTrace(); } } COM: <s> writes the log message to the log file </s>
funcom_train/16770653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long create_video_media_header_atom(MP4DataStream bitstream) throws IOException { create_full_atom(bitstream); if ((size - readed) == 8) { graphicsMode = (int) bitstream.readBytes(2); opColorRed = (int) bitstream.readBytes(2); opColorGreen = (int) bitstream.readBytes(2); opColorBlue = (int) bitstream.readBytes(2); readed += 8; } return readed; } COM: <s> loads mp4 video media header atom atom from the input bitstream </s>
funcom_train/38863699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTargetPackageName(TargetSpecification specification) { String path, targetURI = specification.getTargetPath().toString(); path = KnownProperties.FinalName.get(this, targetURI); int p = path.lastIndexOf('?'); if (p != -1) path = path.substring(0, p); p = path.lastIndexOf('/'); if (p != -1) path = path.substring(p + 1); return path; } COM: <s> returns the target package name for the given specification </s>
funcom_train/10810093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateCloneAndSerializeOptimized() throws Exception { OMElement root = createTestMTOMMessage(); // Create a clone of root OMElement root2 = root.cloneOMElement(); // Write out the source checkSerialization(root, true); // Write out the clone checkSerialization(root2, true); } COM: <s> test reading a message containing xop </s>
funcom_train/20515992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SocketAndStreams checkout(SocketDestination destination) { try { // time checkout long start = System.nanoTime(); SocketAndStreams sas = pool.checkout(destination); updateStats(System.nanoTime() - start); return sas; } catch(Exception e) { throw new UnreachableStoreException("Failure while checking out socket for " + destination + ": ", e); } } COM: <s> checkout a socket from the pool </s>
funcom_train/2539767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unLockAllCursors(){ //we should also unlock the cursors that have input_ended, so that processors with lower priority can start the gesture and end it correctly aferwards // List<InputCursor> activeCursorsOnComp = acp.getActiveComponentCursors(); List<InputCursor> activeCursorsOnCompWithENDED = this.activeCursorsWithEndedOnes; for (InputCursor inputCursor : activeCursorsOnCompWithENDED) { if (inputCursor.isLockedBy(this)){ unLock(inputCursor); } } } COM: <s> releases all cursors that this component input processor currently holds a lock on </s>
funcom_train/5306117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTimeZone(TimeZone zone) { if (zone == null) { throw new IllegalArgumentException("Null 'zone' argument."); } this.timeZone = zone; // FIXME: this calendar may need a locale as well this.calendar = Calendar.getInstance(zone); notifyListeners(new AxisChangeEvent(this)); } COM: <s> sets the time zone that is used to convert the time periods into </s>
funcom_train/251522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCanHandleNonExistentCommand() { ReadEvent nonExistentReadEvent = new ReadEvent(("LoadOfRubbish\r\n") .getBytes(), null); assertTrue(machine.parseRequest(nonExistentReadEvent)); StateMachineRequestConnection nextState = machine.getNextState(); assertTrue(nextState instanceof ErrorStateMachineRequestConnection); assertTrue(nextState.parseRequest(nonExistentReadEvent)); assertTrue(nextState.getDeliveryObject() instanceof ErrorCacheCommand); assertNotNull(nextState.getDeliveryObject()); } COM: <s> check that a non existent command does not cause issues </s>
funcom_train/28199617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init(Object lock) { this.LOCK = lock; this.registeredThreads = new HashMap<Thread,ThreadInfo>(7); this.waiters = new LinkedList<QueueCell>(); this.cnt = counter++; if (LOG.isLoggable(Level.FINE)) { LOG.log(Level.FINE, "[" + cnt + "] created here", new Exception()); } } COM: <s> initiates this mutex </s>
funcom_train/40901871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void playerUpdate(Player player, String event, Object eventData) { if(event.equals(PlayerListener.END_OF_MEDIA)) { if((! myShouldPause) && (! myGamePause)) { try { myPlayer.start(); } catch(Exception e) { // the music isn't necessary, so we ignore exceptions. } } } } COM: <s> if we reach the end of the song play it again </s>
funcom_train/46787077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addReleasePropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Task_release_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_Task_release_feature", "_UI_Task_type"), EZRealtimePackage.Literals.TASK__RELEASE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the release feature </s>
funcom_train/42061178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void warmUp() { int id = 0; for (int i = 0; i < Config.WARM_UP_METHOD_CALLS; i++) { id = messageId++; switch (PTClient.datatype) { case SHORTSTRING: sendString(id, "string"); break; case LONGSTRING: sendString(id, "string"); break; case INTEGER: sendInt(id, 1); break; case LONG: sendLong(id, 1L); break; case BOOLEAN: sendBool(id, true); break; case OBJECT: sendObject(id, new TestObject()); break; case BYTES: sendBytes(id, new byte[1]); break; default: break; } } } COM: <s> to initialize the test a certain number of requests are sent to the </s>
funcom_train/15616501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceParameter(int index, String parameter) { if (this.params == null || this.params.length <= index) { throw new IllegalArgumentException("Attempt to replace index " + index + " for an array that has " + ((this.params == null) ? "0" : this.params.length) + " parameters"); } this.params[index] = new WikiMessageParam(this.escapeHtml4(parameter)); } COM: <s> utility method for replacing a specified wiki message paramter </s>
funcom_train/42709962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Coordinate toKmlCoord(double easting, double northing) throws TransformException { if(trans == null) return new Coordinate(easting, northing); else { DirectPosition p = trans.transform(new DirectPosition2D(crs_src, easting, northing), null); return new Coordinate(p.getOrdinate(crs_kml_x), p.getOrdinate(crs_kml_y)); } } COM: <s> translate kml and return as kml coordinate object </s>
funcom_train/18229310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean remove(Object o) { if (o == null) { if (nullCount > 0) { nullCount--; modcount++; size--; } return true; } Entry e = object2Entry(o); if (e != null) { modcount++; size--; e.remove(); rehash(); return true; } return false; } COM: <s> removes the given element from this set if it is present </s>
funcom_train/43245254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetECOneRelationship() { System.out.println("getECOneRelationship"); EmergencyContactDG3Object instance = new EmergencyContactDG3Object(); String expResult = ""; String result = instance.getECOneRelationship(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get econe relationship method of class org </s>
funcom_train/12922396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Predicate groundPredicate(ArrayList<String> subst) { StringBuffer signature = new StringBuffer(name); String obj; for (int i = 0; i < objList.size(); i++) { // the thing that you're supposed to replace... obj = subst.get(i); if (obj != null) signature.append(' ').append(obj); else signature.append(' ').append(objList.get(i)); } return (Predicate) problem.getFactory().make(Predicate.class, signature.toString()); } COM: <s> ground the predicate used when grounding predicates c ground map </s>
funcom_train/12379819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseClicked(java.awt.event.MouseEvent e) { if (this.isEnabled()) { if ((popupMenu == null || popupMenu.getComponentCount() == 0) && mouseInPopupArea) { actionPerformed(new ActionEvent(this, 0, "")); } else if (mouseInPopupArea || e.isPopupTrigger()) { popupMenu.setVisible(true); popupMenu.show(this, 0, getHeight()); } } } COM: <s> invoked when the mouse button has been clicked pressed and released on </s>
funcom_train/40139048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(final FilterConfig filterConfig) throws ServletException { this.filterConfig = filterConfig; this.encoding = filterConfig.getInitParameter("encoding"); final String value = filterConfig.getInitParameter("ignore"); if (value == null) this.ignore = true; else if (value.equalsIgnoreCase("true")) this.ignore = true; else if (value.equalsIgnoreCase("yes")) this.ignore = true; else this.ignore = false; } COM: <s> place this filter into service </s>
funcom_train/22290377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void decode(Decoder decoder) throws CodingException { TextStyleRun nextRun; int i; _format = (TextParagraphFormat)decoder.decodeObject(FORMAT_KEY); _runVector = (Vector)decoder.decodeObject(RUNVECTOR_KEY); i = _runVector.count(); while (i-- > 0) { nextRun = (TextStyleRun)_runVector.elementAt(i); nextRun.setParagraph(this); } } COM: <s> decodes a text paragraph instance </s>
funcom_train/35323400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int size() { int count = 0; for (Node<E> p = first(); p != null; p = succ(p)) if (p.item != null) // Collection.size() spec says to max out if (++count == Integer.MAX_VALUE) break; return count; } COM: <s> returns the number of elements in this deque </s>
funcom_train/16677768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createPList() { /* * Use 16x16 icons in XPList! */ pList = new XPList(form, PList.BORDER, XPList.ListType.SIMPLE); SWTUtil.setGridData(pList, true, true, SWT.FILL, SWT.FILL, 1, 1); } COM: <s> creates the navigation list on the left side </s>
funcom_train/39362093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reopen(boolean continueOldTasks) { assert(isClosed()); this.closing = false; if(!continueOldTasks) { this.taskQueue.clear(); } for(int i = 0, j = Math.min(this.size, this.taskQueue.size());i<j;i++) { startNewThread(); } } COM: <s> reopens the thread pool after it has been closed </s>
funcom_train/8630670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEvaluatable() { if (expression != null) { return expression.isEverything(ExpressionVisitor.EVALUATABLE); } if (expressionList != null) { for (Expression e : expressionList) { if (!e.isEverything(ExpressionVisitor.EVALUATABLE)) { return false; } } return true; } return expressionQuery.isEverything(ExpressionVisitor.EVALUATABLE); } COM: <s> check if the expression can be evaluated </s>
funcom_train/34492144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Value subbinary(Value val, int index1, int index2) throws SdaiException { StaticFields staticFields = StaticFields.get(); if (index2 == Integer.MIN_VALUE) { index2 = index1; } if (val == null) { printWarningToLogoValidate(AdditionalMessages.EE_NAVA); throw new SdaiException(SdaiException.VA_NEXS); } return subbinary(staticFields, val, index1, index2); } COM: <s> implements binary indexing operator of express language </s>
funcom_train/50501957
/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(super.equals(other)) return true; else if(other instanceof IMethodInfo){ return this.getClassInfo().equals(((IMethodInfo)other).getClassInfo()) && getName().equals(((IMethodInfo)other).getName()); } else return false; } COM: <s> overwrites equals method in object </s>
funcom_train/26415951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetKeyMap() { Map map = Droid.getKeyMap(); assertNotNull("map null", map); assertEquals("key 'a' did not map", new Integer(KeyEvent.VK_A), map.get(new Character('a'))); assertSame("not same map", map, Droid.getKeyMap()); } COM: <s> see that get key map returns the static keymap </s>
funcom_train/12155785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer getPatientExamId() { logger.debug("Entering getId()."); Integer patientExamId = this.patientExamId; if (logger.isDebugEnabled()) { logger.debug("Exiting getId(); RV = " + (patientExamId != null ? "[" + patientExamId + "]" : null) + "."); } return patientExamId; } COM: <s> gets the patient exam id </s>
funcom_train/43382904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFolder(DandiConfigFolder dcf) { for(DandiConfigFolder d: folders) { if(d.getIndex() == dcf.getIndex()) { int c = folders.indexOf(d); folders.remove(c); this.fireIntervalRemoved(this, c, c); return; } } } COM: <s> removes a folder from the this method does not assume identity but </s>
funcom_train/9708570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unregisterOperationContext(String messageID) { if (messageID == null) { if (log.isDebugEnabled()) { log.debug("messageID is null."); } } else { OperationContext opCtx = (OperationContext)operationContextMap.remove(messageID); contextRemoved(opCtx); } } COM: <s> unregisters the operation context associated with the given message id </s>
funcom_train/37587195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _commentLine() { // Insert "// " at the beginning of the line. // Using null for AttributeSet follows convention in this class. try { insertString(_currentLocation, "//", null); } catch (BadLocationException e) { throw new UnexpectedException(e); } } COM: <s> comments out a single line with wing comments </s>
funcom_train/43579913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getExtractor() { if (extractor == null) { extractor = new JButton(); extractor.setBounds(new Rectangle(181, 65, 74, 22)); extractor.setText("Go"); extractor.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ExtractorURLDefinerWindow definerWindow = new ExtractorURLDefinerWindow(); definerWindow.setVisible(true); hideMe(); } }); } return extractor; } COM: <s> this method initializes extractor </s>
funcom_train/3562544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void linkDataToEditor(Long dataID, Integer editorID) throws DbException { LinkedList parmList; parmList = new LinkedList(); addIfNotNull(parmList, "dataID", dataID); addIfNotNull(parmList, "editorID", editorID); simpleRequest(LINK_DATA_TO_EDITOR_PAGE, "Cannot link data to editor", parmList); } COM: <s> assigns a data to an editor </s>
funcom_train/12804325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUID() { DecimalFormat decimalFormat = new DecimalFormat(); decimalFormat.applyPattern("0000000000000"); String uid = decimalFormat.format(System.currentTimeMillis()); synchronized(this){ if(currentIndex >= 99999) currentIndex = 0; decimalFormat.applyPattern("00000"); uid += decimalFormat.format(currentIndex++); } return uid; } COM: <s> provide the caller with unique id values </s>
funcom_train/2577389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long calculateSegmentNumber(long millis) { if (millis >= SegmentedTimeline.this.startTime) { return (millis - SegmentedTimeline.this.startTime) / SegmentedTimeline.this.segmentSize; } else { return ((millis - SegmentedTimeline.this.startTime) / SegmentedTimeline.this.segmentSize) - 1; } } COM: <s> calculates the segment number for a given millisecond </s>
funcom_train/1379770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPnlRicerca() { if (pnlRicerca == null) { lblFiltro = new JLabel(); lblFiltro.setText("Filtro"); FlowLayout flowLayout = new FlowLayout(); flowLayout.setAlignment(FlowLayout.LEFT); pnlRicerca = new JPanel(); pnlRicerca.setLayout(flowLayout); pnlRicerca.setPreferredSize(new Dimension(0, 30)); pnlRicerca.add(lblFiltro, null); pnlRicerca.add(getTxtFiltro(), null); } return pnlRicerca; } COM: <s> this method initializes pnl ricerca </s>
funcom_train/1939868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initLookAndFeel() { log.debug("init look and feel"); try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); // configure defaults UIDefaults defaults = UIManager.getDefaults(); // use same font for text area and text field defaults.put("TextArea.Font", defaults.getFont("TextField.font")); } catch (Exception e) { log.error("init look and feel error", e); } } COM: <s> initializes the look feel </s>
funcom_train/8367618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand() { if (okCommand == null) {//GEN-END:|84-getter|0|84-preInit // write pre-init user code here okCommand = new Command("Speichern", Command.OK, 0);//GEN-LINE:|84-getter|1|84-postInit // write post-init user code here }//GEN-BEGIN:|84-getter|2| return okCommand; } COM: <s> returns an initiliazed instance of ok command component </s>
funcom_train/22380278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int nextPoisson(double lambda) { double elambda = Math.exp( -1 * lambda); double product = 1; int count = 0; int result = 0; while (product >= elambda) { product *= nextDouble(); result = count; count++; // keep result one behind } return result; } COM: <s> the poisson distribution is a discrete distribution which takes on the </s>
funcom_train/1228305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupBoard(int difficulty) { //setup the game board try { _gameBoard = new CelldokuCanvas(difficulty, this); _gameBoard.addCommand(_exitCmd); _gameBoard.setCommandListener(this); Display.getDisplay(this).setCurrent(_gameBoard); } catch (IOException e) { loadCrash("UPAckage is corrupt. Please reinstall.", "Opps!"); } } COM: <s> inits the board with the given difficulty </s>
funcom_train/45542764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isLessThanOperator(IDocument document, int offset) throws BadLocationException { if (offset < 0) return false; JSCHeuristicScanner scanner= new JSCHeuristicScanner(document, IJSCPartitions.JSC_PARTITIONING, TextUtilities.getContentType(document, IJSCPartitions.JSC_PARTITIONING, offset, false)); return !isTypeParameterBracket(offset, document, scanner); } COM: <s> returns true if the character at the specified offset is a </s>
funcom_train/3525789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(Component c) { // Check our children first if (components.contains(c)) return true; // recurse child containers Iterator iter = components.iterator(); while (iter.hasNext()) { Object item = iter.next(); if (item instanceof Container) { if (((Container)item).contains(c)) return true; } } return false; } COM: <s> recursively searches for given component and returns true if found </s>
funcom_train/37650418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Button buildEnablePMDButton(Composite parent) { Button button = new Button(parent, SWT.CHECK); button.setText(getMessage(StringKeys.PROPERTY_BUTTON_ENABLE)); button.setSelection(model.isPmdEnabled()); button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { adjustControls(); } }); return button; } COM: <s> create the enable pmd checkbox </s>
funcom_train/51792380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getItemWidth(int itemNumber) { switch (getItemType(itemNumber)) { case IMAGE: return ((Image)items.elementAt(itemNumber)).getWidth(); case TEXT: return itemsFont.getStringWidth((String)items.elementAt(itemNumber)); default: //other types of objects don't supported yet return -1; } } COM: <s> obtain the width of item string or image </s>
funcom_train/44627991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testJmlKeywordsInJml() { helpScanner("/*@requires ensures pure */", new Enum<?>[]{REQUIRES,ENSURES,PURE,EJML,}, new int[]{3,11,12,19,20,24,25,27}); } COM: <s> tests that jml keywords are found in a jml comment </s>
funcom_train/2904690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startBroadcast(String hostname, int port, String req, int period, int initDelay){ GroupBroadcaster gb = new GroupBroadcaster(hostname, port, req.getBytes()); Timer t = new Timer(period, gb); t.setInitialDelay(initDelay); if(period <= 0){ t.setRepeats(false); } t.start(); String k = hostname+":"+port; Vector v = null; synchronized(broadcastConnection){ v = (Vector)broadcastConnection.get(k); if(v == null){ v = new Vector(); } v.add(t); broadcastConnection.put(k, v); } } COM: <s> setup and start the broadcast timer </s>
funcom_train/45053061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addActiveColor(int color) { if(color == Palette.NON_COLOR_INDEX) { nonColorActive = true; } else { if(((color < 0) || (color >= activeColors.length))) { throw new IllegalArgumentException("Illegal color " + color); } activeColors[color] = true; } } COM: <s> add a color to list of active colors </s>
funcom_train/2399050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isDropAllowed(DropTargetDragEvent e) { if (isUploading()) { return false; } for (DataFlavor df : e.getCurrentDataFlavors()) if (DataFlavor.javaFileListFlavor.equals(df) || DataFlavor.stringFlavor.equals(df)) { return (e.getSourceActions() & DnDConstants.ACTION_COPY) != 0; } return false; } COM: <s> check if drop allowed </s>