__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/4906428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileSearch getFileSearch(BackupGroup group, StaticBackupFolder path) { if (isPageComplete()) { FileSearch search = new FileSearch(searchName.getText(), group.getName(), path.getURI() + searchName.getText(), true); return search; } return null; } COM: <s> create the backup group with the settings specified </s>
funcom_train/5345358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void parse(String xml) { DOMParser parser = new DOMParser(); InputSource is = new InputSource(new StringReader(xml)); try { parser.parse(is); } catch (IOException ioe) { return; } catch (SAXException saxe) { return; } parseDocument(parser.getDocument().getDocumentElement()); } COM: <s> parses the content encryption xml </s>
funcom_train/10766419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Kind getKind() { if (getAttribute("messageType", null) != null) return Kind.MESSAGE; if (getAttribute("type", null) != null) return Kind.SCHEMA; if (getAttribute("element", null) != null) return Kind.ELEMENT; return null; } COM: <s> get the type of declaration one of </s>
funcom_train/50251450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Permission getPermission(long mask) throws PermissionNotFoundException { Permission[] p = getAllPermissions(); for (int i = 0; i < p.length; i++) { if (mask == p[i].getMask()) { return p[i]; } } throw new PermissionNotFoundException(name); } COM: <s> return permission with specified mask if found throws </s>
funcom_train/8325533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSignature(String name, int returnType, int[] argTypes) { // e.g. "StripCalculatedMembers(<Set>)" return (returnType == Category.Unknown ? "" : getTypeDescription(returnType) + " ") + name + "(" + getTypeDescriptionCommaList(argTypes, 0) + ")"; } COM: <s> returns a description of the signature of a function call for </s>
funcom_train/886772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputStream os) throws IOException { OutputStreamWriter osw = new OutputStreamWriter(os,"UTF-8"); osw.write("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"); write(getContentDOM().getDocumentElement(),0,osw); osw.flush(); osw.close(); } COM: <s> write out content to the supplied code output stream code </s>
funcom_train/17544690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBreakpointLine(int index, java.lang.String value) { // Make sure we've got a place to put this attribute. if (size(BREAKPOINT) == 0) { addValue(BREAKPOINT, java.lang.Boolean.TRUE); } setValue(BREAKPOINT, index, java.lang.Boolean.TRUE); setAttributeValue(BREAKPOINT, index, "Line", value); } COM: <s> sets the line for a breakpoint at given index </s>
funcom_train/25528885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadDataStringFromFile(String sFilename) { try { Histogram.loadDataStringFromFile(sFilename); // Graph.loadDataStringFromFile(sFilename); } catch (IOException ioe) { ioe.printStackTrace(); Histogram.setDataString(""); Graph.setDataString(""); } } COM: <s> uses the given file to load the initial text to represent </s>
funcom_train/35812093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getSequenceValue(String sequenceName) { long result = -1; if (sequenceExists(sequenceName)) { PreparedStatement pr = null; ResultSet rs = null; try { pr = conn .prepareStatement("select seq from sqlite_sequence where name=?;"); pr.setString(1, sequenceName); rs = pr.executeQuery(); if (rs.next()) { result = rs.getLong(1); } } catch (Exception e) { // nothing todo here } finally { Cleanup(pr, rs); } } return result; } COM: <s> gets sequence current value by its name </s>
funcom_train/9713299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generatePortType() { this.portType = this.wsdlDefinition.createPortType(); this.portType.setUndefined(false); this.portType.setQName(new QName(this.service.getNamespace(), this.service.getName() + "PortType")); this.wsdlDefinition.addPortType(portType); } COM: <s> generates the port type for the wsdl </s>
funcom_train/50311867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void contextInitialized(ServletContextEvent event) { String ApplicationName; // Name of this application Vector SessionList; // List of active sessions in the context. this.context = event.getServletContext(); ApplicationName = this.context.getServletContextName(); SessionList = new Vector(); // Initialize the session list this.context.setAttribute("sessionlist", SessionList); log("contextInitialized(" + ApplicationName + "): Initialization completed successfuly."); } COM: <s> record the fact that this web application has been initialized </s>
funcom_train/45228528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void compileAllProjects(Integer points) { // TODO: jdobies,Dec 31, 2008: Need a way to aggregate errors List<Project> projects = gradeBook.getProjects(); for (Project project : projects) { if (points == null) { project.compile(); } else { project.compile(points); } } } COM: <s> requests each project compile itself </s>
funcom_train/34996937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init(Component display, TreeExpander expander, TreeGroup group) { // Init Effects // expandEffect = new Resize(Dimension.fromString("100%", null)); // collapseEffect = new Resize(Dimension.fromString("100%", "0px")); this.setDisplay(display); this.setExpander(expander); this.setGroup(group); this.setNodes(null); this.setSelectable(null); this.initUI(); } COM: <s> initialize component using the supplied display expander and group </s>
funcom_train/13915567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSessionIdentifierMap(int pos) { if (this.identifiers == 0) this.identifier = new int[this.identifiers + 1]; else { int[] tmp = new int[this.identifiers + 1]; System.arraycopy(this.identifier, 0, tmp, 0, this.identifiers); this.identifier = tmp; } this.identifier[this.identifiers++] = pos; } COM: <s> adds the session identifier map </s>
funcom_train/18244016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getRightGapmostSequenceFivePrimeward() throws AssemblerException { if (this.rightGapwardAnalysis == null) { String message = ResourceUtil.getResource(TigrAssemblerResultsAnalysis.class, "text.no_distinct_right_flanking_assembly"); throw new AssemblerException(message); } return this.rightGapwardAnalysis.getFivePrimeFacesGap(); } COM: <s> does the most gapward sequence on the right flanking assembly </s>
funcom_train/16380029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateNegativePointsType_Min(float negativePointsType, DiagnosticChain diagnostics, Map<Object, Object> context) { boolean result = negativePointsType >= NEGATIVE_POINTS_TYPE__MIN__VALUE; if (!result && diagnostics != null) reportMinViolation(CTEPackage.Literals.NEGATIVE_POINTS_TYPE, new Float(negativePointsType), new Float(NEGATIVE_POINTS_TYPE__MIN__VALUE), true, diagnostics, context); return result; } COM: <s> validates the min constraint of em negative points type em </s>
funcom_train/43100143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeConstraint(Object handle, Object cons) { if (handle instanceof MModelElement && cons instanceof MConstraint) { ((MModelElement) handle).removeConstraint((MConstraint) cons); return; } throw new IllegalArgumentException("handle: " + handle + " or cons: " + cons); } COM: <s> remove the given constraint from a given model element </s>
funcom_train/28289791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print() { System.out.println("Input Stream of Process:"); System.out.println(input); System.out.println("Error Stream of Process:"); System.out.println(error); System.out.println("Exit Value of Process: " + exitValue); } COM: <s> simple print method used for debugging </s>
funcom_train/12196021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvalidSetValues() { try { DefaultOrderedSetPolicyValue value = new DefaultOrderedSetPolicyValue( new DefaultIntPolicyType(), "1,2,3.14259265,4,5"); fail("A DeviceRepositoryException should have been thrown"); } catch (DeviceRepositoryException e) { // This exception should be thrown. } } COM: <s> tests that an ordered set cannot be constructed from invalid values </s>
funcom_train/9647426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIlleagalInputStream(){ byte[] bytes = new byte[] {1,2,3,4,5,6,7,8}; try { new UnzippingFileProvider(new ByteArrayInputStream(bytes)); fail("shoud have thrown exception"); //$NON-NLS-1$ } catch (UnzipNotSupportedException e) { // TOdO deal with this } } COM: <s> test the illegal input stream </s>
funcom_train/9036620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object secureObject(Object value) { StatefulSession session = null; try { session = ruleBase.newStatefulSession(); SecuritySupport securitySupport = new SecuritySupport( value, permissionResolver, aclContext ); session.setGlobal("security", securitySupport ); FactHandle valueFact = session.insert(value); session.fireAllRules(); // if the object was retracted, value will be null value = session.getObject(valueFact); } finally { if ( session != null ) { session.dispose(); } } return value; } COM: <s> executes the security rules </s>
funcom_train/43486741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(boolean utc, boolean addDate, boolean addTime) { StringBuffer buf = new StringBuffer(); if (addDate) { append(buf, utc, Calendar.YEAR); buf.append('-'); append(buf, utc, Calendar.MONTH); buf.append('-'); append(buf, utc, Calendar.DAY_OF_MONTH); if (addTime) { buf.append(' '); } } if (addTime) { append(buf, utc, Calendar.HOUR_OF_DAY); buf.append(':'); append(buf, utc, Calendar.MINUTE); buf.append(':'); append(buf, utc, Calendar.SECOND); if (utc && addDate) { buf.append(" GMT"); } } return buf.toString(); } COM: <s> returns a string representation of the date stored in this object </s>
funcom_train/40729998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTunnelWithHttps() throws Exception { factory.setUsername("testUsername"); factory.setPassword("testPassword"); factory.setLivelinkCgi("/testLivelinkCgi/livelink"); factory.setHttpUsername("testHttpUsername"); factory.setHttpPassword("testHttpPassword"); factory.setHttps(true); factory.createClient(); } COM: <s> tests enabling https </s>
funcom_train/14589005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPlayType(String category) { if (category.equalsIgnoreCase(LibTxtfl.PASS) || category.equalsIgnoreCase(LibTxtfl.RUSH)) { playType = LibTxtfl.PASS_RUSH; // pass/run hard for defense to discern } else if (category.equalsIgnoreCase(OPTIONS)) { // Leave playType as originally // playType = ""; } else { // TODO: check if useful playType = category; } } COM: <s> sets the currently chosen play category </s>
funcom_train/44708910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasMember(Party party) { DataQuery members = getDataQuery("com.arsdigita.kernel.GroupMembers"); members.setParameter("groupID", getID()); members.addEqualsFilter("memberID", party.getID()); return (members.size() == 1); } COM: <s> checks whether a user is directly or indirectly a member of </s>
funcom_train/50775842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(DataOutput out) throws IOException { int numEntries = size(); out.writeShort(numEntries); for (short i = 1; i < numEntries; i++) { ConstPoolEntry entry = getEntryAtIndex(i); // blank entries after LONG and DOUBLE entries if (entry.isUnused()) { } else { entry.write(out, entry); } } } COM: <s> write out the constant pool to a stream </s>
funcom_train/32614060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperty(String localname, String namespace, String range) { HashMap<String, String> chosenVoc = view.getChosenVocabularies(); String property; String prefix = chosenVoc.get(namespace); if (prefix.equals("")) //prefix not defined property = "<" + namespace + localname + ">"; else property = prefix + ":" + localname; if (range.startsWith("http://www.w3.org/2001/XMLSchema#")) setType(range); tbPredicate.setText(property); } COM: <s> property that has been chosen </s>
funcom_train/3115692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object deepClone(DenimButtonInstance clone) { super.deepClone(clone); clone.inverse = (Patch)inverse.deepClone(); clone.border = (TimedStroke)border.deepClone(); clone.caption = (DenimText)caption.deepClone(); clone.createdByStamp = createdByStamp; return clone; } COM: <s> sets the clone parameter to a deep clone of this button instance </s>
funcom_train/39296843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean remove(Object item) { boolean found = items == null ? false : items.remove(item); if (found) { return true; } found = false; for (int i = 0; i < 4; i++) { AbstractNode subNode = getSubNode(i); if (subNode != null) { found = subNode.remove(item); if (found) { // trim subtree if empty if (subNode.isPrunable()) { subNodeIDs[i] = null; nodeRepository.removeNode(subNode); } break; } } } return found; } COM: <s> removes a tree item </s>
funcom_train/26487135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean addNews(String newsContent) { Connection cnx = null; try { if ((cnx = this.sqlCnx.open()) == null) { return false; } PreparedStatement query = cnx.prepareStatement("INSERT INTO news (news_content) VALUES (?)"); query.setString(1, newsContent); if (query.executeUpdate() > 0) { return true; } else { return false; } } catch (SQLException e) { return false; } finally { this.sqlCnx.close(cnx); } } COM: <s> method add news </s>
funcom_train/42403079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Bean getBean(final String id) { String resolvedId = id; // check if $id is actually an alias. Alias alias = (Alias) this.getAliases().get(id); if (null != alias) { resolvedId = alias.getBean(); } // now try and find the bean... final Bean bean = (Bean) this.getBeans().get(resolvedId); if (null == bean) { this.throwUnableToFindBean(id); } return bean; } COM: <s> retrieves a bean given an id searching both beans and alias to beans </s>
funcom_train/9701312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ICondition getIssetCondition(String propertyName,String value,final String issetProperty){ if (issetProperty==null){ throw new NullPointerException("The property tho be checked may not be null"); } ICondition cond = new AntCondition(propertyName,value) { public Element toElement() { Element e = createEmptyCondition(); Element ie = new Element("isset"); ie.setAttribute("property", issetProperty); e.addContent(ie); return e; } }; return cond; } COM: <s> create a condition that checks if a property is set </s>
funcom_train/8323984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void convertColumns(final RolapStar.Table rTable) { // add level columns for (RolapStar.Column column : rTable.getColumns()) { String name = column.getName(); MondrianDef.Expression expression = column.getExpression(); int bitPosition = column.getBitPosition(); Level level = new Level( name, expression, bitPosition, column); addLevel(level); } } COM: <s> convert a rolap star </s>
funcom_train/9202711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAsleep(boolean flag) { if (flag) { this.state |= Body.ASLEEP; this.velocity.zero(); this.angularVelocity = 0.0; this.clearForce(); this.clearTorque(); this.forces.clear(); this.torques.clear(); } else { // check if the body is asleep if ((this.state & Body.ASLEEP) == Body.ASLEEP) { // if the body is asleep then wake it up this.sleepTime = 0.0; this.state &= ~Body.ASLEEP; } // otherwise do nothing } } COM: <s> sets whether this </s>
funcom_train/46056404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getReferences(OLATResourceable source) { OLATResourceImpl sourceImpl = (OLATResourceImpl)resManager.findResourceable(source); if (sourceImpl == null) return new ArrayList(0); return DBFactory.getInstance().find( "select v from org.olat.resource.references.ReferenceImpl as v where v.source = ?", sourceImpl.getKey(), Hibernate.LONG); } COM: <s> list all references the source holds </s>
funcom_train/3675558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InteractableObjectState getActiveState() { Iterator stateIterator = this.myStates.iterator(); while (stateIterator.hasNext()) { InteractableObjectState interactableObjectState = (InteractableObjectState)stateIterator.next(); if (interactableObjectState.conditionsSatisfied()) { return interactableObjectState; } } return null; } COM: <s> p returns which of this objects interactable object state is the active </s>
funcom_train/35741730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CacheEntry getCacheEntry(Object key) { CacheEntryImpl foundEntry = (CacheEntryImpl) map.get(key); if (foundEntry == null) { return null; } // Leave the purgeability status alone but manage lru position if // purgeable. if (foundEntry.isLinked()) { lru.putLast(foundEntry); } return foundEntry; } COM: <s> return the cache entry if any associated with the given key </s>
funcom_train/46701786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { Person person = new Person(); // Writing: person.writeValue(Person.NAME, "John Smith"); person.writeValue(Person.MALE, Boolean.TRUE); person.writeValue(Person.BIRTH, new Date()); // Reading: String name = (String ) person.readValue(Person.NAME); Boolean male = (Boolean) person.readValue(Person.MALE); Date birth = (Date ) person.readValue(Person.NAME); } COM: <s> a sample of usage </s>
funcom_train/3887638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSequenceUsedPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LearningDesignType_sequenceUsed_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LearningDesignType_sequenceUsed_feature", "_UI_LearningDesignType_type"), ImsldV1p0Package.Literals.LEARNING_DESIGN_TYPE__SEQUENCE_USED, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the sequence used feature </s>
funcom_train/33970592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DisplayMode findFirstCompatibleMode(DisplayMode modes[]) { DisplayMode goodModes[] = device.getDisplayModes(); for (int i = 0; i < modes.length; i++) { for (int j = 0; j < goodModes.length; j++) { if (modes[i].equals(goodModes[j])) { return modes[i]; } } } throw new GameError("No display modes available"); } COM: <s> returns the first compatible mode in a list of modes </s>
funcom_train/23173224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String temperatureToString (short temperature) { numberFormat.setMaximumFractionDigits (0); switch (this.unitSystem) { case English: return numberFormat.format (ConvertUtils.convertCelsius2Fahrenheit ( temperature)) + " " + getTemperatureUnitName (); case Metric: default: return numberFormat.format (temperature) + " " + getTemperatureUnitName (); } } COM: <s> converts the temperature to a string in the correct unit </s>
funcom_train/8484980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ATObject base_try_using_finally_(ATClosure tryBlock, ATHandler handler, ATClosure finallyBlock) throws InterpreterException { try { return tryBlock.base_apply(NATTable.EMPTY); } catch(InterpreterException e) { ATObject exc = e.getAmbientTalkRepresentation(); if (handler.base_canHandle(exc).asNativeBoolean().javaValue) { return handler.base_handle(exc); } else { throw e; } } finally { finallyBlock.base_apply(NATTable.EMPTY); } } COM: <s> the tt try try block using handler finally finally block tt construct </s>
funcom_train/4272703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void chartTypeChange(ValueChangeEvent event) { String newChartType = (String) event.getNewValue(); if (newChartType != null) { currentChartType = newChartType; currentChartModel = (AbstractChartData)chartDataModels.get(newChartType); if (currentChartModel!= null) currentChartModel.renderOnSubmit = true; } } COM: <s> chart type change listener </s>
funcom_train/33068986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Rectangle getConstraint(AbstractEntityModel model){ for(int i=0;i<oldModels.size();i++){ Object obj = oldModels.get(i); if(obj.equals(model)){ return ((AbstractEntityModel)obj).getConstraint(); } } if(model instanceof ActionModel){ actionCount++; return new Rectangle(100,(actionCount-1) * 64,-1,-1); } else if(model instanceof PageModel){ pageCount++; return new Rectangle(300,(pageCount-1) * 64,-1,-1); } return null; } COM: <s> returns a constraint size and location of a visual model </s>
funcom_train/48579671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getScaledInstance() { // the scaled image is calculated the first time this method is called if (this.scaledImage == null) { scaledImage = ImageUtil .getScaledImage(getImageIcon().getImage(), DEFAULT_MINIATURE_DIMENSION.width, DEFAULT_MINIATURE_DIMENSION.height); } return scaledImage; } COM: <s> returns a scaled image of this photo with the default dimension </s>
funcom_train/41721833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getIdentityDistance() { double result = 0.0; for (String attributeName : cA.getIdentityAttributesNames()) { Object att1 = cA.getIdentityAttribute(attributeName); Object att2 = cB.getIdentityAttribute(attributeName); double weight = getIdentityWeight(attributeName); if (!att1.equals(att2)) result += weight; } return result; } COM: <s> return the identity distance between two simple cases </s>
funcom_train/31651746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addUserToRole(String roleName, String user) throws Exception { init( ); server.invoke( configuration.getStateManager(), "addUserToRole", new Object[] {roleName, user}, new String[]{ "java.lang.String", "java.lang.String" }); } COM: <s> add a user to a role </s>
funcom_train/37074723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getFeatures () { if (!canHaveChildren()) return new Vector(); else { logger.error(getName() + " a " + this.getClass().getName() + " says it can have children, but it is not a FeatureSetI"); return new Vector(); } } COM: <s> returns a vector of all the child features belonging to this </s>
funcom_train/5420246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getForwards(net.sf.hibernate.Session s) { try { String query = "SELECT f FROM Forwarding f WHERE f.id.groupName = ? ORDER BY f.id.email"; return s.find(query, name , Hibernate.STRING ); } catch( Exception e ) { Log.print(e); return null; } } COM: <s> return list of forwardings for this group </s>
funcom_train/12867967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean commentExists(RemotePage page, String commentText){ RemoteComment[] comments = null; if (commentText != null && !"".equals(commentText)){ try { comments = getComments(page); for (int i=0; i<comments.length;i++){ RemoteComment comment = comments[i]; if (comment.getContent().equals(commentText)){ return true; } } } catch (Exception e) { return false; } } return false; } COM: <s> checks whether a comment with the given comment exists for the given page </s>
funcom_train/9774034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Icon getScaledIcon(Icon icon, Object o) { List<ImageIcon> iconList = getIconList(icon); try { if (iconList != null && o != null && fishEyeZoom) { return iconList.get(getIndex(o)); } else if (iconList != null) { return iconList.get(getIndex()); } } catch (IndexOutOfBoundsException e) { e.printStackTrace(); } return null; } COM: <s> gets the scaled version of the icon </s>
funcom_train/8221929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initTable() { _conversationTableModel = new ConversationTableModel(_conversationModel); ColumnWidthTracker.getTracker("ConversationTable").addTable(conversationTable); _conversationTableSorter = new TableSorter(_conversationTableModel, conversationTable.getTableHeader()); conversationTable.setModel(_conversationTableSorter); conversationTable.setDefaultRenderer(Date.class, new DateRenderer()); } COM: <s> inits the table </s>
funcom_train/22497943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setColor(final Color color) { //System.out.println("ColorPanel setColor attributeKey=" + attributeKey + ", color=" + color); colorDisplay.setBackground(color); if (++setValCount < 2) { originalColor = color; } fireColorChanged(); } COM: <s> set the selected color </s>
funcom_train/26573593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLoad() { RequirementStateFactory factory = new RequirementStateFactory(conParam); RequirementState obj = null; try { obj = (RequirementState) factory.load(new java.lang.Long(1)); assertEquals(obj.getName(), "PROPOSED"); assertEquals(obj.getIcon(), "question.gif"); assertEquals(obj.getPK(), new java.lang.Long(1)); } catch (Exception e) { JEErrorHandler handler = new JEErrorHandler(conParam.getLogList()); handler.fatalError(e); assertNull(this); } } COM: <s> method test load </s>
funcom_train/12081402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand1() { if (okCommand1 == null) {//GEN-END:|36-getter|0|36-preInit // write pre-init user code here okCommand1 = new Command("Ok", Command.OK, 0);//GEN-LINE:|36-getter|1|36-postInit // write post-init user code here }//GEN-BEGIN:|36-getter|2| return okCommand1; } COM: <s> returns an initiliazed instance of ok command1 component </s>
funcom_train/3847277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getNumberOfColumns(String line, boolean countSeparators) { StringTokenizer tokenizer = new StringTokenizer(line,getColumnSeparator(),countSeparators); int nOfTok = 1; int nOfCol = 0; while( tokenizer.hasMoreTokens() ){ String next = tokenizer.nextToken(); if( next != null && next.length() > 0 ){ if( !next.equals( getColumnSeparator() ) ) nOfCol = nOfTok; else nOfTok++; } } return nOfCol; } COM: <s> creation date 20 05 2003 15 17 58 </s>
funcom_train/16357978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyInfo(Scan s) { //mass = s.getMass() ; wait = s.getWait(); tsc = s.getTimeStepControl(); dt = s.getDt(); t0 = s.getInitialTime(); // Feb 28, 2010 This part lead to some error because // the reference is copy. I try to comment this two // line and hope that it will not create problems. //if (tsc) time = null; //else time = s.getTime(); } COM: <s> copy intern informations </s>
funcom_train/14517642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getClearPassword(RequestAbstractType req, String dBPassword) { String retval = null; NotBoundAuthenticationType notBoundAuthenticationType = GeneralizedKRSSMessageHelper.getAuthenticationType(req).getNotBoundAuthentication(); if(notBoundAuthenticationType != null){ retval = new String(notBoundAuthenticationType.getValue()); }else{ resultMajor = XKMSConstants.RESULTMAJOR_SENDER; resultMinor = XKMSConstants.RESULTMINOR_MESSAGENOTSUPPORTED; } if(!retval.equals(dBPassword)){ resultMajor = XKMSConstants.RESULTMAJOR_SENDER; resultMinor = XKMSConstants.RESULTMINOR_NOAUTHENTICATION; retval = null; } return retval; } COM: <s> returns the password when having not bound authentication instead </s>
funcom_train/45277716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateUsersList() { listModel.clear(); messageList.clear(); List<User> l = StorageImpl.getInstance().getUsers(mainPanel.getFrame().party.getParty_id()); for (User dataModel : l) { messageList.addElement(dataModel); if (((User)dataModel).getAdmin()<1) listModel.addElement(((User)dataModel).getName()); else listModel.addElement(((User)dataModel).getName()+" [ADMIN]"); } } COM: <s> loads all users of the selected party </s>
funcom_train/33317554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPeriodKey(Date periodDate){ Date d = getBudgetPeriodType().getStartOfBudgetPeriod(periodDate); return getBudgetPeriodType().getName() + ":" + DateUtil.getYear(d) + ":" + DateUtil.getMonth(d) + ":" + DateUtil.getDay(d); } COM: <s> returns the key which is associated with the date contained within the </s>
funcom_train/39792694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getModeValue(char letter) { if (!on) { throw new IllegalStateException("Bot not on channel"); } try { String ret = ((ModeCommand.Entry) modes.get(new Character(letter))) .getString(); if (!ret.equals("")){ return ret; }else{ return null; } } catch (NullPointerException npe) { return null; } } COM: <s> returns the value of a mode </s>
funcom_train/39285902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void run(Shell shell) { // Add a listener for the close button doneButton.addSelectionListener(new SelectionAdapter() { // Close the view i.e. dispose of the composite's parent @Override public void widgetSelected(SelectionEvent e) { table.getParent().getParent().dispose(); } }); Display display = shell.getDisplay(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } } COM: <s> run and wait for a close event </s>
funcom_train/22215995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int computeDistanceTo(FingerPrint category) { int distance = 0; int count = 0; for (Entry<String, Integer> entry : this.entries) { String ngram = entry.getKey(); count++; if (count > 400) { break; } if (!category.containsNgram(ngram)) { distance += category.numNgrams(); } else { distance += Math.abs(this.getPosition(ngram) - category.getPosition(ngram)); } } return distance; } COM: <s> computes and returns the distance of this finger print to the </s>
funcom_train/50499488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void movePane() { int newValue; if ( right.isVisible() ) { newValue = right.getValue(); if ( newValue != offset.y ) { verticalScroll( newValue ); } } if ( bottom.isVisible() ) { newValue = bottom.getValue(); if ( newValue != offset.x ) { horizontalScroll( newValue ); } } //Vm.debug( "ScrollBox: movePanel, moved, new offset: " + offset ); } COM: <s> move content pane to new offset </s>
funcom_train/7718414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PromptElement nextQuestionPrompt() { nextRelevantIndex(); while (!isEnd()) { if (indexIsGroup(mCurrentIndex)) { nextRelevantIndex(); continue; } else { // we have a question return new PromptElement(mCurrentIndex, getForm(), getGroups()); } } return new PromptElement(PromptElement.TYPE_END); } COM: <s> returns the prompt associated with the next relevant question </s>
funcom_train/45255919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unhookDragSupport() { ToolBar bar = perspectiveBar.getControl(); if (bar == null || bar.isDisposed() || dragListener == null) { return; } PresentationUtil.removeDragListener(bar, dragListener); DragUtil.removeDragTarget(perspectiveBar.getControl(), dragTarget); dragListener = null; dragTarget = null; } COM: <s> remove any drag and drop support and associated listeners hooked for the </s>
funcom_train/35691119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getIcon() { if (wrapper.getChildCount() <= 0) { if (leafIcon != null) { return leafIcon; } } else if (isExpanded()) { if (branchExpandedIcon != null) { return branchExpandedIcon; } } else { if (branchContractedIcon != null) { return branchContractedIcon; } } return icon; } COM: <s> return the appropriate icon based on this nodes expanded collapsed state </s>
funcom_train/40729926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addProperty(String name, Value value) { List<Value> values = properties.get(name); if (values == null) { LinkedList<Value> firstValues = new LinkedList<Value>(); firstValues.add(value); properties.put(name, firstValues); } else values.add(value); } COM: <s> adds a property to the property map </s>
funcom_train/46453764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInitialConditions() { double[] state = ode.getState(); if(state==null) { return; } if(engineState==null||engineState.length!=state.length) { engineState = new double[state.length]; // create an engine state with the correct size } System.arraycopy(state, 0, engineState, 0, state.length); } COM: <s> sets the initial conditions using the current state of the ode </s>
funcom_train/14162631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkExistence(String pFieldName, String pMethodName) throws FocusConfigException { if (fDisplayNames.get(pFieldName) == null) { throw new FocusConfigException("The field \"" + pFieldName + "\" must be added to the RequestProfile before calling " + pMethodName); } } COM: <s> check if a field has been registered </s>
funcom_train/13275562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBasePlanItem(Boolean basePlanItem) { if (basePlanItem != this.basePlanItem) { Boolean oldMovable = this.basePlanItem; this.basePlanItem = basePlanItem; this.propertyChangeSupport.firePropertyChange(Property.BASE_PLAN_ITEM.name(), oldMovable, basePlanItem); } } COM: <s> sets whether furniture is a base plan item or not </s>
funcom_train/13546992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DependenceFlowNode findNode(Instruction i) { if(_inst2NodeMap.containsKey(i)) return (DependenceFlowNode)_inst2NodeMap.get(i); DependenceFlowNode tmpNode = _dfg.findNode(i); _inst2NodeMap.put(i, tmpNode); return tmpNode; } COM: <s> this method was written so that the dependence flow graph method find node </s>
funcom_train/7613182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStayOnSetting(int val) { mContext.enforceCallingOrSelfPermission(android.Manifest.permission.WRITE_SETTINGS, null); Settings.System.putInt(mContext.getContentResolver(), Settings.System.STAY_ON_WHILE_PLUGGED_IN, val); } COM: <s> set the setting that determines whether the device stays on when plugged in </s>
funcom_train/7660498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTake2() { ExecutorService e = Executors.newCachedThreadPool(); ExecutorCompletionService ecs = new ExecutorCompletionService(e); try { Callable c = new StringTask(); Future f1 = ecs.submit(c); Future f2 = ecs.take(); assertSame(f1, f2); } catch (Exception ex) { unexpectedException(); } finally { joinPool(e); } } COM: <s> take returns the same future object returned by submit </s>
funcom_train/37086726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIntegrationValues(ArrayList unsortedIntegrationValues){ String[] _temp = null; // Output of the String split operation String _tempString = new String(); Hashtable _tempTable = new Hashtable(); // Temp Storage for values extracted from the integration values string for(int i=0;i<unsortedIntegrationValues.size();i++){ _tempString = (String) unsortedIntegrationValues.get(i); _temp = _tempString.split(INTEGRATION_VALUES_DELIM); _tempTable.put(_temp[0],_temp[1]); } this._integrationValues = _tempTable; } COM: <s> method to create a code hash table code of integration curve area relationship </s>
funcom_train/1373343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ptoComputer(){ int x=0,y=0; int position; if(pFirst==false){ x=7; y=7; bpanel.updateBoard(x,y); bpanel.drawChess(x,y); beginFlag=true; }else{ beginFlag=true; } } COM: <s> do people play with computer </s>
funcom_train/4283935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int handle_stru(String line, StringTokenizer st) throws CommandException { checkLogin(); String arg = st.nextToken().toUpperCase(); try { if (arg.length() != 1) throw new Exception(); char stru = arg.charAt(0); switch (stru) { case 'F': dtp.setDataStructure(stru); break; default: throw new Exception(); } } catch (Exception e) { throw new CommandException(500, "STRU: invalid argument '" + arg + "'"); } return reply(200, "STRU " + arg + " ok."); } COM: <s> command handler for the stru command </s>
funcom_train/24251477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPreferenceListener(String key, PreferenceListener l) { synchronized (listeners) { List<PreferenceListener> list; if (listeners.containsKey(key)) { list = listeners.get(key); } else { list = new LinkedList<PreferenceListener>(); } list.add(l); listeners.put(key, list); } if (isLoaded && isSet(key)) { l.preferenceInitialized(new PreferenceEvent(preferenceNames .get(key), null)); } } COM: <s> adds a preference listener for the given key </s>
funcom_train/24538344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCTabItemFromLocation(IJavaObjectInstance location) { int retVal = -1; if (!isBeanProxyInstantiated()) return retVal; IBeanProxyHost proxyhost = getSettingBeanProxyHost(location); proxyhost.instantiateBeanProxy(); if (proxyhost.isBeanProxyInstantiated()) retVal = BeanSWTUtilities.invoke_ctabfolder_getItemFromLocation(getBeanProxy(), proxyhost.getBeanProxy()); revalidateBeanProxy(); return retVal; } COM: <s> gets the ctab item at the given location for this ctab folder </s>
funcom_train/1189033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseIntent(){ Intent ix = getIntent(); if(ix == null ){ return; } if(ix.getAction() != null){ String act = ix.getAction(); if(act.equals(Intent.ACTION_VIEW)){ Uri uri = ix.getData(); if(uri == null) return; if(!uri.getScheme().equals("dict")) return; String query = uri.getQuery(); setWord(query); fillData(); } } else { Bundle extras = this.getIntent().getExtras(); if(extras == null) return; word = extras.getString("WORD"); fillData(); } } COM: <s> parse the caller intent for different view </s>
funcom_train/27945540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean debugFailed (DebuggerException ex) { DebuggerType e = (DebuggerType)choose (getDebuggerType (entry), DebuggerType.class, ex); if (e == null) { return false; } else { try { setDebuggerType (entry, e); return true; } catch (IOException exc) { return false; } } } COM: <s> called when invocation of the debugger fails </s>
funcom_train/11673634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireSocketOpened(final String remoteInfo) { synchronized (listenerList) { for (Iterator iter = listenerList.iterator(); iter.hasNext();) { SocketNodeEventListener snel = (SocketNodeEventListener) iter.next(); if (snel != null) { snel.socketOpened(remoteInfo); } } } } COM: <s> notifies all registered listeners regarding the opening of a socket </s>
funcom_train/35233149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void connected( boolean reconnect ) { try { if (reconnect) reloadStatus(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (OmniNotConnectedException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (OmniInvalidResponseException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (OmniUnknownMessageTypeException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> override able method called when omni is successfully connected </s>
funcom_train/16107932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void flushQueue() throws InterruptedException { int queueSize = getQueueSize(); if (queueSize > 1) { List<LoggingEvent> events = new ArrayList<LoggingEvent>(queueSize); for (int i = 0; i < queueSize; i++) { events.add(queue.poll()); } addCollectionOfEvents(events); } else { /* * This will block the thread until there is a event in the * queue. If the thread was interrupted (such as by a call to * shutdown()), this call will throw an InterruptedException. */ addSingleMessage(queue.take()); } } COM: <s> writes the contents of the queue to hibernate </s>
funcom_train/39456802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateScriptTag() { PrintWriter out = new PrintWriter(pageContext.getOut()); HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); out.print("<script type=\"text/javascript\" src=\""); out.print(request.getContextPath()); out.print("/jsorb/interfaceGenerator"); out.print("?interface="); out.print(interfaceName); if (includeDependentClasses) { out.print("&amp;includeDependentClasses="); out.print(includeDependentClasses); } out.println("\"></script>"); } COM: <s> generates a script tag </s>
funcom_train/4659814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addBlocks(final XFFInfoBlock xInfoBlockHeader, final Collection<XFFInfoBlock> xInfoBlocks) { if(blocks == null) { blocks = new HashMap<XFFInfoBlock, Collection<XFFInfoBlock>>(); } if(xInfoBlockHeader != null) { blocks.put(xInfoBlockHeader, xInfoBlocks); } } COM: <s> adds a block to the block pool </s>
funcom_train/4312228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getJTabbedPane() { if (jTabbedPane == null) { // Create a tabbed pane jTabbedPane = new JTabbedPane(); jTabbedPane.setBackground(Color.red); jTabbedPane.setForeground(new Color(204, 0, 0)); jTabbedPane.setFont(new Font("Tahoma", Font.BOLD, 12)); } return jTabbedPane; } COM: <s> this method initializes j tabbed pane </s>
funcom_train/8469232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { data.rewind(); // Read off the rows, columns, and non-zero elements data.getInt(); data.getInt(); data.getInt(); // Reset the counters. curCol = 0; entry = 0; try { advance(); } catch (IOException ioe) { throw new IOError(ioe); } } COM: <s> resets the iterator to the start of the files data </s>
funcom_train/14402656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMessageState() { int result; switch (mMsgState) { case MSG_STATUS_FORMATTING: result = 1; // "FORMATTING ..."; break; case MSG_STATUS_NOT_VALIDATED: result = 2; // "NOT VALIDATED"; break; case MSG_STATUS_GENERATING_CIM_TREE: result = 3; // "GENERATION CIM TREE ..."; break; case MSG_STATUS_VALIDATION_CANCELED: result = 4; // "VALIDATION CANCELED"; break; case MSG_STATUS_VALIDATING: result = 5; // "VALIDATING ..."; break; case MSG_STATUS_VALIDATED: result = 6; // "VALIDATED"; break; case MSG_STATUS_ERROR: result = 7; // "ERROR OCCURRED"; break; default: result = 8; // "UNDEFINED"; } return result; } COM: <s> returns the actual state of the message </s>
funcom_train/50353323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getClearLogButton() { if (clearLogButton == null) { clearLogButton = new JButton(); clearLogButton.setText("Clear"); clearLogButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { logConsole.setText(""); } }); } return clearLogButton; } COM: <s> this method initializes clear log button </s>
funcom_train/32156240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSpinner getMinGridSize() { if (minGridSize == null) { minGridSize = new JSpinner(new SpinnerNumberModel(3, 1, 1000, 1)); minGridSize.setBounds(new Rectangle(235, 255, 60, 24)); gridSizeLabel = new JLabel(); gridSizeLabel.setBounds(new Rectangle(60, 255, 150, 22)); gridSizeLabel.setText("Grid sizes"); gridSizeLabel.setHorizontalAlignment(JLabel.RIGHT); } return minGridSize; } COM: <s> this method initializes min grid size </s>
funcom_train/50510293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSocket(SocketListener client, Socket socket) throws IOException { synchronized(this) { // construct a new request SocketRequest request = new SocketRequest(socket); request.setResponse(new SocketResponse(request)); _pendingRequests.add(new ListenerRequestPair(client, request)); notify(); // this will wake the thread } } COM: <s> after a client connection has been accepted the new socket is registered for </s>
funcom_train/11024194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExecuteWithSimpleFloatPropertyAndDoubleValue() { try { new BeanPropertyValueChangeClosure("floatProperty", expectedDoubleValue).execute(new TestBean()); fail("Should have thrown an IllegalArgumentException"); } catch (IllegalArgumentException e) { /* this is what we expect */ } } COM: <s> test execute with simple float property and double value </s>
funcom_train/18787771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MdrUmlClass getReturnType() { for (Object parameterObj:method.getParameter()) { Parameter parameter = (Parameter) parameterObj; if (ParameterDirectionKindEnum.PDK_RETURN == parameter.getKind()) { return new MdrUmlClass(parameter.getType()); } } return null; } COM: <s> returns the return type of the method </s>
funcom_train/41418627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void injectDependency(final Field field) { FieldWrapper fieldWrapper = new FieldWrapper(field); final boolean accessible = field.isAccessible(); field.setAccessible(true); try { field.set(component, fieldWrapper.createInstance()); } catch (IllegalAccessException e) { throw new RuntimeException("Cannot modify field " + field.getName() + " in class " + clazz.getName(), e); } field.setAccessible(accessible); } COM: <s> inject a dependency into a field </s>
funcom_train/27945095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CPUThreadMethodRef getSiblingCPU() { needConstructed(); if (!image.getAlwaysRefresh()) thread.refreshCPUThreadMethods(); List o=thread.getCPUThreadMethods(); return (CPUThreadMethodRef) image.filterByLocation(o, getLocationR()); } COM: <s> returns cputhread method ref of the same thread and the same method </s>
funcom_train/38335654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConflictResolutionStrategy(ConflictResolutionStrategy strat) { if (strat != null) { strategy = strat; // we need to recompute the activation list Queue<Activation> oldList = activations; int oldListSize = oldList.size(); int newInitialCapacity = oldListSize > 0 ? oldListSize : INITIAL_CAPACITY; activations = new PriorityQueue<Activation>(newInitialCapacity, strategy); activations.addAll(oldList); } else throw new NullPointerException(); } COM: <s> sets the conflict resolution strategy </s>
funcom_train/10671315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setUp() throws Exception { context = new BeanContextSupport(); context.add(bean); context.setDesignTime(true); context.setLocale(new Locale("rus")); for (int i = 0; i < 100; i++) { beans[i] = new BeanContextSupport(); context.add(beans[i]); } } COM: <s> adding the components and initialization </s>
funcom_train/35647649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CrudOutcome doUpdate() { logger.debug(String.format("doUpdate() called. About to call dao.store(entity) %s ", entity)); entity = dao.store(entity); logger.debug(String.format("dao.store(entity) was called from doUpdate() %s", entity)); state = CrudState.UNKNOWN; fireToggle(); return CrudOutcome.LISTING; } COM: <s> update the entity in the data store </s>
funcom_train/49319090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getEclipticLongitude() { double ra_rads = convert(fRa * 15, DEGREE, RADIAN); double dec_rads = convert(fDec, DEGREE, RADIAN); double beta = convert(getEclipticLatitude(), DEGREE, RADIAN); double lambda = Math.acos(Math.cos(dec_rads) * Math.cos(ra_rads) / Math.cos(beta)); return convert(lambda, RADIAN, DEGREE); } COM: <s> returns the ecliptic longitude of the position in degrees </s>