__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/48664272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resolveStyle(Style s) { String baseStyle = s.getStyle(); if (baseStyle != null) { // The name of a style to inherit is specified: look for it Style bs = fStyles.get(baseStyle); if(bs != null) { // First resolve the base style recursively resolveStyle(bs); // Now merge results into output style s.merge(bs); // And we're done return; } } } COM: <s> fully resolves the style by recursively merging with other </s>
funcom_train/18068528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IDfSysObject getSysObject(IDfSession session) throws DfException, DctmFileException { IDfSysObject sysObject = (IDfSysObject) session.getObjectByQualification( "dm_sysobject where i_chronicle_id='" + this.getId() + "'"); if (sysObject==null) { throw new DctmFileException("Could not find object with chronicle id " + this.getId()); } return sysObject; } COM: <s> retrieves the sysobject belonging to the known id </s>
funcom_train/3881865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element addElement(Object source, Element parentElement, Element childElement, boolean doSelect) { // Ascertain correct position int index = getInsertPositionOfElement(parentElement, childElement); return addElementAtIndex(source, parentElement, childElement, index, doSelect); } COM: <s> just add a new element </s>
funcom_train/39273588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Serializable obj) { try { if (LOG.isDebugEnabled()) { LOG.debug("update: Using Hibernate to update this BO " + obj); } mSession.update(obj); } catch (HibernateException ex) { LOG.error("Error updating a BO", ex); throw new TransactionException("Error updating a BO", ex); } } COM: <s> update a record in the applications persistent store based on a business </s>
funcom_train/12587653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ItemMeta buildItemMeta(AltIdType altIdType, ItemMetaProperty metaName) { if (altIdType != null) { ItemMeta meta = new ItemMeta(); meta.setIdentity(altIdType.getIdentity()); meta.setLiteral(altIdType.getValue()); meta.setProperty(metaName); meta.setType(altIdType.getType()); return meta; } return null; } COM: <s> build item meta from alt id type </s>
funcom_train/7655485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getHash(byte[] arr) { long hash = 0; for (int i=1; i<prefix_size; i++) { hash += (arr[i] & 0xFF); } // it takes about 2 bytes for prefix_size == 28 // shift to the correct place hash = hash << 32; return hash; } COM: <s> returns the hash code for the array </s>
funcom_train/13287637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVariable(String negID, String userName, String variableName, Object value) { JbpmContext jbpmContext = null; try{ JbpmConfiguration jbpmConfig = configLoader.getConfiguration(); jbpmContext = jbpmConfig.createJbpmContext(); long procID = getProcID(negID,userName); ProcessInstance processInstance = jbpmContext.loadProcessInstanceForUpdate(procID); processInstance.getContextInstance().setVariable(variableName,value); } finally { if (jbpmContext != null) jbpmContext.close(); } } COM: <s> sets the variable from context </s>
funcom_train/3919066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleNewMonitorAction() { DataComponent parent = (DataComponent)((IStructuredSelection)getSelection()).getFirstElement(); if(parent instanceof Environment) { String name = askNewComponentName("Monitor Service", "New Monitor"); if(name != null) { Monitor monitor = new Monitor(getDataModel(), name); addNewComponent(parent, monitor); } } } COM: <s> new monitor action </s>
funcom_train/28116497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() throws SAXException { Parser parser = Configuration.getDefaultParser(); if (parser == null) { throw new SAXException("Unable to create parser"); } DocumentHandler handler = new Expander(); parser.setDocumentHandler(handler); try { parser.parse(new InputSource(_reader)); } catch (IOException exception) { throw new SAXException(exception.getMessage(), exception); } } COM: <s> signals to start producing events </s>
funcom_train/34480058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInstanceCount() throws SdaiException { // synchronized (syncObject) { if (repository == null) { throw new SdaiException(SdaiException.MO_NEXS); } if ((mode & MODE_MODE_MASK) == NO_ACCESS || deleting) { throw new SdaiException(SdaiException.MX_NDEF, this); } provideAllInstancesIfNeeded(); int count = 0; for (int i = 0; i < lengths.length; i++) { count += lengths[i]; } return count; // } // syncObject } COM: <s> returns the number of instances contained in this model </s>
funcom_train/35357357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getBottom() { return Math.max(this.p[0].getY(), Math.max(this.p[1].getY(), Math.max(this.p[2].getY(), this.p[3].getY()))); } COM: <s> get bottom most extent of quadrilateral </s>
funcom_train/41621282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupController() { this.controller = new MD5Controller(this.modelMesh); this.controller.setActive(true); this.modelMesh.addController(this.controller); // Set proper starting animation. if(this.manual) this.resetAnimation(); else if(!this.manual){ if(this.animations.length > 0) { this.controller.setFading(this.animations[0], 0, false); this.controller.setRepeatType(Controller.RT_CLAMP); this.index = 1; } else if(this.baseAnimation != null) this.resetAnimation(); } } COM: <s> set the controller on the loaded model mesh </s>
funcom_train/14625766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String displayWin32Date(String win32FileTime) { GregorianCalendar win32Epoch = new GregorianCalendar(1601, Calendar.JANUARY, 1); Long lWin32Epoch = win32Epoch.getTimeInMillis(); Long lWin32FileTime = new Long(win32FileTime); return (DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL).format((lWin32FileTime / 10000) + lWin32Epoch)); } COM: <s> this is a helper method for the convert date test </s>
funcom_train/15407958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSinglePrimaryKeyColumn() { List<DeployBeanProperty> ids = propertiesId(); if (ids.size() == 1) { DeployBeanProperty p = ids.get(0); if (p instanceof DeployBeanPropertyAssoc<?>) { // its a compound primary key return null; } else { return p.getDbColumn(); } } return null; } COM: <s> return the primary key column assuming it is a single column not </s>
funcom_train/18788495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStart(Date start) { if (((this.start != null) && !this.start.equals(start)) || ((this.start == null) && (start != null))) { this.start = start; update.addUpdate(new PrimitiveFieldUpdate("start", start)); setModified(true); } } COM: <s> sets the new value of the simple property start </s>
funcom_train/25187563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetItems() throws Exception { System.out.println("setItems"); JSchema instance = new JSchema(); JSchema expResult = new JSchema(); assertNull(instance.getItems()); instance.setItems(expResult); assertEquals(expResult, instance.getItems()); } COM: <s> test of set items method of class jschema </s>
funcom_train/37083878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // protected AnnotationChangeLog getAnnotationChangeLog() { // //return AnnotationChangeLog.getAnnotationChangeLog(); // // shouldnt this do a getCurationState()? // if (curationState == null) { // logger.error("Cur state is null in AbstractApolloAdapter"); // return null; // } // return curationState.getAnnotationChangeLog(); // } COM: <s> retrieve singleton annotation change log </s>
funcom_train/3026837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object visit(ASTEnumDeclaration node, Object data) { // Convert the data into the correct form SummaryLoaderState state = (SummaryLoaderState) data; if (state.getCode() == SummaryLoaderState.IGNORE) { return super.visit(node, data); } int start = getLineCount() + 1; int oldCode = state.getCode(); state.setCode(SummaryLoaderState.LOAD_CLASSBODY); super.visit(node, data); state.setCode(oldCode); return data; } COM: <s> visits an enum declaration </s>
funcom_train/12557383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void ensureConnected() throws IOException { if (!isRoot(fileRoot)) { throw new IOException("Root is not accessible"); } if (fileHandler == null) { fileHandler = getFileHandler(); fileHandler.connect(fileRoot, filePath + fileName); //fileHandler.createPrivateDir(fileRoot); } } COM: <s> checks that the connection is already open </s>
funcom_train/9276721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUp() throws SQLException{ String sql = "create table t1(c1 int)"; Statement st = createStatement(); st.executeUpdate(sql); sql = "insert into t1 values 1, 2, 3"; assertEquals("Fail to insert into table", 3, st.executeUpdate(sql)); st.close(); } COM: <s> create the table t1 with 3 rows and two procedures </s>
funcom_train/5376834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void publishFrameworkEvent(int type, org.osgi.framework.Bundle bundle, Throwable throwable) { if (frameworkEvent != null) { if (bundle == null) bundle = systemBundle; final FrameworkEvent event = new FrameworkEvent(type, bundle, throwable); if (System.getSecurityManager() == null) { publishFrameworkEventPrivileged(event); } else { AccessController.doPrivileged(new PrivilegedAction() { public Object run() { publishFrameworkEventPrivileged(event); return null; } }); } } } COM: <s> deliver a framework event </s>
funcom_train/40671312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JClassType getSingleConcreteType(JType type) { if (type instanceof JReferenceType) { JReferenceType refType = (JReferenceType) type; if (refType.isAbstract()) { JClassType singleConcrete = getSingleConcrete((JReferenceType) type, implementors); assert (singleConcrete == null || program.typeOracle.isInstantiatedType(singleConcrete)); return singleConcrete; } } return null; } COM: <s> given an abstract type return the single concrete implementation of that </s>
funcom_train/26602022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeCharacterStringLiteralProductionRules(char c, ProductionRules production) { ArrayList arr = new ArrayList(1); CharacterStringLiteralProductionRules rule = new CharacterStringLiteralProductionRules(c, classLoader); rule.setProductionRuleName("SpecialHandlingRule"); rule.ruleKey = "SpecialHandlingRule"; arr.add(rule); production.setProductionRules(arr); } COM: <s> function for getting characterstringliteralproductionrules </s>
funcom_train/43657018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("BMSInterface".equals(portName)) { setBMSInterfaceEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/27905689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertMatchInElement(String elementID, String regexp) { assertTrue("Unable to locate element with id \"" + elementID + "\"", getTestingEngine().hasElement(elementID)); assertTrue("Unable to match [" + regexp + "] in element \"" + elementID + "\"", getTestingEngine().isMatchInElement( elementID, regexp)); } COM: <s> assert that a given element matches a specific regexp </s>
funcom_train/48620294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFieldsInformation() { if (userId != null) { IrUser user = userService.getUser(userId, false); researcher = user.getResearcher(); log.debug( "user " + user + " has role " + user.hasRole(IrRole.RESEARCHER_ROLE) ); if( !user.hasRole(IrRole.RESEARCHER_ROLE)) { return "accessDenied"; } } else { return "accessDenied"; } fields = fieldService.getAllFieldsNameOrder(); return SUCCESS; } COM: <s> get fields information </s>
funcom_train/31477221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renderComponent(Graphics g) { if (image != null) { g.drawImage(image, 0, 0, null); } if (mouseImage != null) { if (isPressed()) { g.drawImage(mouseImage, 1, 1, null); } else if (mouseIn) { g.drawImage(mouseImage, 0, 0, null); } } if (label != null) { drawString(label, g); } } COM: <s> renders the button to the given graphics object </s>
funcom_train/25936201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T getValue(Map<String, String> varMapping) { final String value; if(isVar) { value = varMapping.get(internalValue); if(value == null) { throw new IllegalStateException( String.format("Cannot find a valid value for variable '%s'", internalValue) ); } } else { value = internalValue; } return getValueInternal(value); } COM: <s> returns the value represented by this </s>
funcom_train/22603174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSessionMessage(String message){ if(!getSession().containsKey("sessionMessages")) getSession().put("sessionMessages", new ArrayList<String>()); ((List)getSession().get("sessionMessages")).add(message); } COM: <s> session scoped confirmation message </s>
funcom_train/22578257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEmpty() { try { Map<String, Double> tagCloud = new TreeMap<String, Double>(); new TagCloudException(null, null, tagCloud); fail("Should have thrown an exception by now"); } catch (IllegalArgumentException ex) { assertTrue(true); } } COM: <s> make sure tag cloud cant be empty </s>
funcom_train/25935628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private InputStream getResourceAsStream() { InputStream result; result = TikaMIMETypeDetector.class.getResourceAsStream(RESOURCE_NAME); if (result == null) { result = TikaMIMETypeDetector.class.getClassLoader().getResourceAsStream(RESOURCE_NAME); if (result == null) { result = ClassLoader.getSystemResourceAsStream(RESOURCE_NAME); } } return result; } COM: <s> loads the code tika code configuration file </s>
funcom_train/38543465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean produceItem() { boolean result = false; try { if (this.reader.ready()) { final String oneLine = this.reader.readLine(); publishItem(oneLine); result = true; } else { this.reader.close(); } } catch (IOException e) { e.printStackTrace(); } return result; } COM: <s> produces next item i </s>
funcom_train/20745602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRequestString() throws UnconfiguredRequestException { return "Valid-responses E M MT Mbinary Updated Created Update-existing Rcs-diff Checked-in ok error " + //NOI18N "Clear-static-directory Valid-requests Merged Removed " + //NOI18N "Copy-file Mod-time Template Set-static-directory " + //NOI18N "Module-expansion Clear-sticky Set-sticky New-entry\n"; //NOI18N } COM: <s> get the request string that will be passed to the server </s>
funcom_train/2676887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ensurePullAndPushRunning() { if (!isPullMode) { // We don't need this for live streams return; } if (pullAndPushFuture == null) { synchronized (this) { if (pullAndPushFuture == null) { // client buffer is at least 100ms pullAndPushFuture = getExecutor().scheduleWithFixedDelay(new PullAndPushRunnable(), 0, 10, TimeUnit.MILLISECONDS); } } } } COM: <s> make sure the pull and push processing is running </s>
funcom_train/2801387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void check() throws RaccoonException { if (mClassName == null) { throw new RaccoonException(ErrorCodes.RESOURCE_NOT_ASSIGNED, "Class name not set. Invoke setClassName(String) first"); } if (mRepoGenerator == null) { throw new RaccoonException(ErrorCodes.RESOURCE_NOT_ASSIGNED, "RepoGenerator not set. Invoke setRepoGenerator(RepoGeneratorBase) first"); } } COM: <s> checks if the required conditions are met for this instance to function </s>
funcom_train/25072255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSchema(Schema newSchema) { int idx = Collections.binarySearch(schemata, newSchema, SCHEMA_ID_COMPARATOR); if (idx >= 0) { throw new IllegalArgumentException("A schema with id=" + newSchema.getId() + " alredy exists in the application descriptor."); } schemata.insertElementAt(newSchema, -idx - 1); } COM: <s> adds code new schema code to the list of schemata in the application </s>
funcom_train/18548280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(TransferObject to, Connection c) throws DataAccessException { ResourceTaskAllocTO rtato = (ResourceTaskAllocTO)to; this.removeByResTaskAndSeq(rtato.getResourceTask(), rtato.getSequence().intValue(), null, c); this.insert(rtato, c); } COM: <s> remove all allocs and insert a new alloc into database </s>
funcom_train/46293222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doClose() throws IOException { // return deletedDocs bytes to bytesPool if (deletedDocs != null) { if (deletedDocsCopyOnWriteRef == null || deletedDocsCopyOnWriteRef.refCount() == 1) { bytesPool.returnObject(deletedDocs.getBits()); } } super.doClose(); } COM: <s> overridden to return the deleted docs byte array to the byte pool </s>
funcom_train/15452795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addOptions(Set options) { if (options != null) { Iterator itOptions = options.iterator(); while (itOptions.hasNext()) { Option option = (Option) itOptions.next(); option.setPoll(this); } if (this.options == null) { this.setOptions(options); } this.options.addAll(options); } } COM: <s> adds an option to option set </s>
funcom_train/22405772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SelectionAdapter NewPerson() { SelectionAdapter seladapt = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { Person newperson = new Person("Forename", "Surname"); persons.add(persons.size(), newperson); //show the new person personCount = persons.size()-1; //the composite is disposed and a new one is created composite.dispose(); composite = viewRenderer.createView(parentComposite, contr, persons.get(getPersonCount()), filename); parentComposite.layout(); } }; return seladapt; } COM: <s> implements the listner for the new person button </s>
funcom_train/4299520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHavingWithoutGroupBy1() throws SQLException { String sql = "select avg(salary), max(id) from employee " + "having avg(salary) > 1000 " + ""; Object[][] expected = new Object[][] { { new Double(65000), new Integer(23) }, }; compareResults(sql, expected, 0); } COM: <s> tests an unusual usage of the b having b clause without a </s>
funcom_train/25825130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void compileDisplayList(GL2 gl, GLU glu) { // Get a denominator for the display list displayList = gl.glGenLists(1); gl.glNewList(displayList, GL2.GL_COMPILE); // Save attribute states gl.glPushAttrib(GL2.GL_ALL_ATTRIB_BITS); for (SpaceComponent comp : spaceComponents) { comp.display(gl, glu); } // Restore attribute states gl.glPopAttrib(); gl.glEndList(); } COM: <s> compiles the space models display list </s>
funcom_train/50697271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doAfterBody() { try { BodyContent body = getBodyContent(); JspWriter out = body.getEnclosingWriter(); out.println(body.getString()); body.clearBody(); } catch (IOException e) { LOGGER.log(Level.WARNING, e.toString()); } return SKIP_BODY; } COM: <s> after each flip of the body get the next link in the </s>
funcom_train/37484971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StringBuffer generateReport() throws Exception { Graph[] gs = browser.getGraphs(); StringBuffer result = new StringBuffer(); Hashtable stats=new Hashtable(); for (int k = 0; k < gs.length; k++) { Graph g = gs[k]; this.generateADiagramReport(stats,g); } Object[] keys=new Vector(stats.keySet()).toArray(); Arrays.sort(keys); StringBuffer report=new StringBuffer(); for (int k=0;k<keys.length;k++){ String key=keys[k].toString(); report.append(key); for (int l=0;l<40-key.length();l++) report.append(" "); report.append(":"+stats.get(key)+"\n"); } return report; } COM: <s> generates the main report body </s>
funcom_train/12804691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPhase(int phase) { if (phase < 0) { throw new IllegalArgumentException("Phase cannot be negative"); } if (phase >= probManagers.size()) { throw new IllegalArgumentException("Specified non-existent phase index: " + phase + ", total phases=" + probManagers.size()); } currentPhase = phase; } COM: <s> changes the current phase of the randomized execute </s>
funcom_train/36061967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDatabaseName() throws SQLException, NoDatabaseConnectionException{ if( connectionBroker != null ){ Connection connection = null; try{ connection = connectionBroker.getConnection(); if( connection == null ) throw new NoDatabaseConnectionException(); DatabaseMetaData metaData = connection.getMetaData(); return metaData.getDatabaseProductName(); } finally{ if( connection != null ) connection.close(); } } //We should not have gotten here unless an exception occurred that prevented us from getting the database information throw new NoDatabaseConnectionException(); } COM: <s> get the name of the database that is being used </s>
funcom_train/14428165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double calculateStartTime() { double startTime = Double.MAX_VALUE; for (Section section : model.getSections().values()) { if (section != null) { for (SampleLine line : section.getLines()) { startTime = Math.min(line.getStartTime(), startTime); } } } if (startTime == Double.MAX_VALUE) { startTime = 0.0; } return startTime; } COM: <s> calculates the start time of the whole trace </s>
funcom_train/41039885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LinkedInApiUrlBuilder withParameterEnumSet(String name, Set<? extends FieldEnum> enumSet) { Set<String> values = new HashSet<String>(enumSet.size()); for (FieldEnum fieldEnum : enumSet) { values.add(encodeUrl(fieldEnum.fieldName())); } parametersMap.put(name, values); return this; } COM: <s> with parameter enum set </s>
funcom_train/3153934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetGetDescription() { ProcessorConfig config = new ProcessorConfig(); // the config shall return an empty string when no description was set assertEquals("", config.getDescription()); // the config shall return the same description as was set config.setDescription("test"); assertEquals("test", config.getDescription()); } COM: <s> gui test dialog and modal dialog the functionality for set and get description </s>
funcom_train/8362815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int drawUnselectedText( Graphics g, int x, int y, int start, int end) throws BadLocationException { return XMLViewUtilities.drawUnselectedText( this, scanner, context, g, x, y, start, end); } COM: <s> renders the given range in the model as normal unselected text </s>
funcom_train/39281122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enqueue_many(IElement[] bufarr) throws SinkException { if (isClosed()) throw new SinkClosedException("ATcpConnection closed"); for (int i = 0; i < bufarr.length; i++) { if (bufarr[i] == null) throw new BadElementException("ATcpConnection.enqueue_many got null element", bufarr[i]); ASocketMgr.enqueueRequest(new ATcpWriteRequest(this, (BufferElement) bufarr[i])); } } COM: <s> enqueue a set of outgoing packets to be written to this socket </s>
funcom_train/37866817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeToLog(Loggable loggable, DataPage page) { try { logManager.writeToLog(loggable); page.getPageHeader().setLsn(loggable.getLsn()); } catch (TransactionException e) { LOG.warn(e.getMessage(), e); } } COM: <s> write loggable to the journal and update the lsn in the page header </s>
funcom_train/7732635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean valid() { return fix && !Float.isNaN(speed) && speed >= MIN_SPEED && speed <= MAX_SPEED && course >= 0 && course <= 360 && altitude != Integer.MAX_VALUE && altitude >= MIN_ALTITUDE && altitude <= MAX_ALTITUDE; } COM: <s> check if the waypoint is valid </s>
funcom_train/19288193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getCellBounds(int index0, int index1) { Rectangle rect0 = table.getCellRect(index0, 0, true); Rectangle rect1 = table.getCellRect(index1, 0, true); int y, height; if (rect0.y < rect1.y) { y = rect0.y; height = rect1.y + rect1.height - y; } else { y = rect1.y; height = rect0.y + rect0.height - y; } return new Rectangle(0, y, getFixedCellWidth(), height); } COM: <s> returns the bounds of the specified range of items in jlist coordinates </s>
funcom_train/19604817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopAnimation(final boolean jumpToTarget) { final AbstractAnimationRunner currentAnimationRunner = this.mCurrentAnimationRunner; if(currentAnimationRunner != null && !currentAnimationRunner.isDone()){ currentAnimationRunner.interrupt(); if(jumpToTarget) this.mOsmv.setMapCenter(currentAnimationRunner.mTargetLatitudeE6, currentAnimationRunner.mTargetLongitudeE6); } } COM: <s> stops a running animation </s>
funcom_train/37421181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeRoom (int roomID) { try { Room r = rooms.remove (new Integer(roomID)); logger.debug("removing :" + r.getName()); game.getAdministration().removeRoom(r); r.removeFromDB(); } catch (Exception e) { logger.warn("removeRoom failed. DB was not altered."); } } COM: <s> remove a room from this area and destroy it </s>
funcom_train/37015672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeTool(Tool window) { //System.out.println("WorkspaceDesktop.removeTool"); //this.remove((JInternalFrame)window); //this.repaint(); //this.updateUI(); System.out.println("WorksapceDesktop.removeTool - done"); } COM: <s> removes the window from the workspaces desktop </s>
funcom_train/18043567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String format(Collection<Assignment> activities) { String ret = ""; ret += "BEGIN:VCALENDAR\n"; ret += "VERSION:2.0\n"; for(Assignment a : activities) { ret += a.getActivity().Format(formatter); } ret += "END:VCALENDAR\n"; return ret; } COM: <s> b todo b needs work </s>
funcom_train/10590729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void marshalMessageToSAX(Message message) { try { messageEnvelopeToSAX(this.contentHandler, message); partToSAX(this.contentHandler, message, 0); } catch (Exception e) { getLogger().error("Cannot generate SAX events from message ", e); } } COM: <s> emit a message envelope and message content as a sequence of sax events </s>
funcom_train/42435726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ensureStrings(Map<String, Object> map) { if (map == null || map.size() == 0) return; Set<String> keys = map.keySet(); for (String key : keys) { if (!(map.get(key) instanceof String)) { throw new IllegalArgumentException( key + " is not a String. JSON stateless session only support string data."); } } } COM: <s> throw illegal argument exception if the map does not contains only string </s>
funcom_train/47945941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExtractFilename(String extractFilename) { this.extractFilename = extractFilename; StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append(this.extractFilename); stringBuffer.append(NetCdfWriter.NETCDF_FILE_EXTENSION_EXTRACT); this.extractFilenameTemp = stringBuffer.toString(); } COM: <s> setter of the property tt extract filename tt </s>
funcom_train/18398000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getObjectSize(String objName, Object obj) { int size = 0; ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(obj); size = baos.size(); } catch (IOException ioe) { log.warn("Unable to calculate the size of object with name " + objName); } return size; } COM: <s> gets the size of a serialized object </s>
funcom_train/44846994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispatchPopup(Noteable note, String description) { PFrame f = new PFrame(note.getSubject()); if (description == null) { f.setMessage("<html>" + formatString(note, "")); } else { f.setMessage("<html>" + formatString(note, description)); } f.pack(); f.setVisible(true); f.toFront(); f.requestFocus(); } COM: <s> dispatches a popup </s>
funcom_train/20608961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { singleton = this; this.constants = GWT.create(CNStatsFrontConstants.class); ilInfo = new InlineLabel(); ilInfo.setStyleName("appInfo"); RootPanel.get().add(ilInfo); this.showLoading(true); AjaxLoader.loadVisualizationApi(new VisLoaded(), AreaChart.PACKAGE, BarChart.PACKAGE, ColumnChart.PACKAGE, LineChart.PACKAGE, PieChart.PACKAGE, Table.PACKAGE); } COM: <s> this is the entry point method </s>
funcom_train/22093207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendScore() { if (! _bScoreSent) { int iScore = computeMeanScore(); if (DEBUG) _log.info( "mean score for domain "+_strDomain+" is : "+iScore ); sendScore( iScore, ImagePolicy.computeScore( iScore, _strDomain ) ); _bScoreSent = true; } } COM: <s> compute the mean score for this domain and send it inside a score </s>
funcom_train/28754080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCy3pmtgain(Long newVal) { if ((newVal != null && this.cy3pmtgain != null && (newVal.compareTo(this.cy3pmtgain) == 0)) || (newVal == null && this.cy3pmtgain == null && cy3pmtgain_is_initialized)) { return; } this.cy3pmtgain = newVal; cy3pmtgain_is_modified = true; cy3pmtgain_is_initialized = true; } COM: <s> setter method for cy3pmtgain </s>
funcom_train/33265082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedForeground(Color c) { Color cur = selectedForeground; if ( ( c != cur ) && ( ( c == null ) || ( c == transparent ) || ( cur == transparent ) || ( c == defaultColor ) || ( cur == defaultColor ) || ( ! c.equals( cur ) ) ) ) { selectedForeground = c; repaint(); } } COM: <s> sets the selected foreground color </s>
funcom_train/174997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void waitFor(long nanos) throws InterruptedException, TimeoutException { if (nanos < 0) throw new IllegalArgumentException(); if (isDone()) return; long deadline = Utils.nanoTime() + nanos; while (nanos > 0) { TimeUnit.NANOSECONDS.timedWait(this, nanos); if (isDone()) return; nanos = deadline - Utils.nanoTime(); } throw new TimeoutException(); } COM: <s> waits for the task to complete for timeout nanoseconds or throw </s>
funcom_train/45622517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTypeLibFilesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_UnregisterAssemblyType_typeLibFiles_feature"), getString("_UI_PropertyDescriptor_description", "_UI_UnregisterAssemblyType_typeLibFiles_feature", "_UI_UnregisterAssemblyType_type"), MSBPackage.eINSTANCE.getUnregisterAssemblyType_TypeLibFiles(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the type lib files feature </s>
funcom_train/9395226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int codePointCount(int beginIndex, int endIndex) { if (beginIndex < 0 || endIndex > count || beginIndex > endIndex) { throw new StringIndexOutOfBoundsException(); } return Character.codePointCount(value, beginIndex, endIndex - beginIndex); } COM: <s> calculates the number of unicode code points between </s>
funcom_train/36658774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeChildrenAndEntries() { AppContext.getDataManager().markForUpdate(this); modifications++; TaskManager taskManager = AppContext.getTaskManager(); if (isLeafNode()) { taskManager.scheduleTask(new RemoveNodeEntriesTask(this)); table = null; } else { taskManager.scheduleTask(new RemoveNodesTask<K, V>(this)); nodeDirectory = null; } } COM: <s> recursively removes the children and entries of this node performing </s>
funcom_train/47821557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void process(IContext context, IResultSet result, WebDriver client, WebElement element) throws PluginException { if (!(element instanceof Locatable)) { throw new PluginException("The given element is not a Locatable instance."); } process(context, result, client, (Locatable) element); } COM: <s> method delegation which receives the selected element to be used by </s>
funcom_train/26665108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTempDir(String tempDir) throws IOException { if (!StringUtils.hasText(tempDir)) throw new IllegalArgumentException("tempDir must be not null and not blank, but was <" + tempDir + ">"); this.tempDir = FileUtils.toFile(tempDir); validateOrMkTempDir(); } COM: <s> sets the temporary directory to retrieve files to </s>
funcom_train/45311000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(BundleContext context) throws Exception { super.start(context); getPreferenceStore().setDefault(JSGFMainPreference.todo_tag_id,"TODO;FIXME"); configureParserWithExtensions(); try { IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects(); for (IProject project : projects) { if(project.isOpen()) if(project.getNature(JSGFNature.NATURE_ID)!=null){ project.build(IncrementalProjectBuilder.FULL_BUILD,null); } } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> this method is called upon plug in activation </s>
funcom_train/44513182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeVisible() { // alle ge?ffneten ProfileGuis anzeigen (nach vorne holen) Enumeration profiles = profiletable.elements(); while (profiles.hasMoreElements()) { BuddyProfileGui bpg = (BuddyProfileGui) profiles.nextElement(); bpg.show(); } if (helpgui != null) { helpgui.show(); } if (aboutgui != null) { aboutgui.show(); } if (autoresponder != null) { autoresponder.show(); } if (searchgui != null) { searchgui.show(); } } COM: <s> makes all opened windows visible when maingui has been maximized </s>
funcom_train/28350832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateTraceSourceDisplay() { final OrQualifier typeQualifier = new OrQualifier(); final Iterator typeIter = _traceSourceTypesToDisplay.iterator(); while ( typeIter.hasNext() ) { final String type = (String)typeIter.next(); typeQualifier.append( new KeyValueQualifier( TraceSource.TYPE_KEY, type ) ); } displayOnlyQualifiedTraceSources( typeQualifier ); } COM: <s> update the trace source display based on the filters that have been applied </s>
funcom_train/49630658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocale(final String localeName) { String[] parts = localeName.split("_"); if (parts.length == 1) { locale = new Locale(parts[0]); } else if (parts.length == 2) { locale = new Locale(parts[0], parts[1]); } else if (parts.length == 3) { locale = new Locale(parts[0], parts[1], parts[2]); } else { throw new IllegalArgumentException("Locale " + localeName + " not valid"); } } COM: <s> sets the locale to be used </s>
funcom_train/12307753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Explanation explain(int doc) throws IOException { Explanation res = new Explanation(); res.setDescription("At least " + minimumNrMatchers + " of"); Iterator ssi = subScorers.iterator(); while (ssi.hasNext()) { res.addDetail( ((Scorer) ssi.next()).explain(doc)); } return res; } COM: <s> gives and explanation for the score of a given document </s>
funcom_train/21466067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CellState getValueForLocalMapFrom(int x, int y) { int newX = x; //- dx; int newY = y; //- dy; if (newX >= 0 && newX < elements.length && newY >= 0 && newY < elements[0].length) { if (elements[newX][newY] == null) return CellState.UNKNOWN; else return elements[newX][newY].getLocalMapCellValue(); } return CellState.UNKNOWN; } COM: <s> returns the cell value for local map in the specified coordinate null if </s>
funcom_train/37061931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IErgoProgram getProgramByNumber( int progNumber ) { Iterator it = fixPrograms.iterator(); while (it.hasNext()) { IErgoProgram fp = (IErgoProgram)it.next(); if (fp.getNumber() == progNumber) { return fp; } } return null; } COM: <s> returns a reference to the fix program with the given number </s>
funcom_train/28592796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void recalcValue() { if ((fieldType != FieldType.FIELD_TYPE_STRING.getType()) && formatted) { setText(extractNumber(getText(), false)); } if (fieldType != FieldType.FIELD_TYPE_STRING.getType() && formatted) { setText(formatValue(getText())); } } COM: <s> recalculate the data of a field </s>
funcom_train/28274054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyPrimaryAddressBook(AddressBook address){ this.customersCompany = address.getEntryCompany(); this.customersStreetAddress = address.getEntryStreetAddress(); this.customersSuburb = address.getEntrySuburb(); this.customersCity = address.getEntryCity(); this.customersPostcode = address.getEntryPostcode(); this.customersState = address.getEntryState(); this.customersCountry = address.getCountry().getCountriesName(); this.customersName = address.getEntryFirstname()+" "+address.getEntryLastname(); } COM: <s> apply primary address book </s>
funcom_train/49050643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAlternativesToAuditory(String inPrimaryURI) { AlternativesToAuditoryElementType altsToAud = getAlternativesToAuditory(inPrimaryURI); if (altsToAud != null) { EquivalentType equiv = getEquivalentFor(inPrimaryURI); JAXBPath.deleteJaxbObject ("/Content/AlternativesToAuditory", equiv); } } COM: <s> remove the alternatives to auditory element from the code accessibility code metadata </s>
funcom_train/13380272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(char[] cbuf, int off, int len) throws IOException { int amountRead = 0; if (!doneReading) { for (int i = off; i < len + off; i++) { int ch = read(); if (ch == -1) { doneReading = true; break; } cbuf[i] = (char) ch; amountRead++; } } if (amountRead == 0) { return -1; } else { return amountRead; } } COM: <s> read into the buffer code cbuf code </s>
funcom_train/13967739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String entityName() { String entityName = _entityName; if (entityName == null) { ERXRoute route = route(); if (route != null) { entityName = route.entityName(); } } if (entityName == null) { throw new IllegalStateException("Unable to determine the entity name for the controller '" + getClass().getSimpleName() + "'. Please override entityName()."); } return entityName; } COM: <s> returns the name of the entity that this controller is currently handling </s>
funcom_train/15954418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAppendDouble() throws BMLException{ String lsValue = "Good"; DataString ldString = new DataString(fBlank); ldString.setString(lsValue); double lDouble = 1.7; ldString.append(lDouble); assertEquals("Good1.7",ldString.toString()); } COM: <s> test of append method using double </s>
funcom_train/1304894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFirstText(String patternString, Tree<XmlLite.Data> node, String attribute) { if (patternString == null) return null; final String[] pattern = splitPatternAttribute(patternString); final XPath xpath = getXPath(pattern); return xpath.getFirstText(node, attribute); } COM: <s> convenience method for getting the first matching nodes attribute value </s>
funcom_train/16711531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String retrieveSignature() { final StringBuffer sb = new StringBuffer(); sb.append(getName()).append(" "); for (final ApplicationInterfaceMethodParameter parameter : getParameters()) { sb.append("(".concat(parameter.getName()).concat(")")); } return sb.toString(); } COM: <s> retrieve the method signature </s>
funcom_train/48721037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPosition(int particle, double[] position) { hive[particle][3] = hive[particle][0]; hive[particle][4] = hive[particle][1]; hive[particle][5] = hive[particle][2]; hive[particle][0] = position[0]; hive[particle][1] = position[1]; hive[particle][2] = position[2]; } COM: <s> sets a new position of specified particle </s>
funcom_train/1440697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClearSpyUserData() { System.out.println("clearSpyUserData"); SpyUserData data = new SpyUserData(1L); ServerDataContainerImpl instance = new ServerDataContainerImpl(); instance.addSpyUserData(data); assertFalse(instance.getSpyUserData(1L).isEmpty()); instance.clearSpyUserData(1L); assertTrue(instance.getSpyUserData(1L).isEmpty()); } COM: <s> test of clear spy user data method of class server data container impl </s>
funcom_train/37090178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeWorldInfo(String title, String info) throws IOException { writeLine("WorldInfo {"); writeLine(" title \"" + title + "\""); writeLine(" info \"" + info + "\""); writeLine("}"); writeLine(""); } COM: <s> writes world info to the vrml file </s>
funcom_train/810895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStartTimeStampPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RunType_startTimeStamp_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RunType_startTimeStamp_feature", "_UI_RunType_type"), MzmlPackage.Literals.RUN_TYPE__START_TIME_STAMP, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the start time stamp feature </s>
funcom_train/49789950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDefaultRole() throws Exception { IFile sitemap = doStandardLoginAs("default@openiaml.org", "test123"); assertNoProblem(); try { gotoSitemapWithProblem(sitemap, "target"); fail("Did not expect to get into 'target' page"); } catch (FailingHttpStatusCodeException e) { // expected checkExceptionContains(e, "User of type 'current instance' did not have permission 'a different permission'"); } } COM: <s> log in as default role fails </s>
funcom_train/20350904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printDebts() { Log.printLine("*****PowerDatacenter: "+this.getName()+"*****"); Log.printLine("User id\t\tDebt"); Set<Integer> keys = getDebts().keySet(); Iterator<Integer> iter = keys.iterator(); DecimalFormat df = new DecimalFormat("#.##"); while (iter.hasNext()) { int key = iter.next(); double value = getDebts().get(key); Log.printLine(key+"\t\t"+df.format(value)); } Log.printLine("**********************************"); } COM: <s> prints the debts </s>
funcom_train/18597404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void searchForRelated(Element params, KeywordRelation request, String... languages) throws Exception { //System.out.println("KeywordsSearcher searchBN"); // TODO : Add geonetinfo elements. String id = Util.getParam(params, "id"); String sThesaurusName = Util.getParam(params, "thesaurus"); searchForRelated(id, sThesaurusName, request, languages); } COM: <s> find keywords that are related to the keyword with the provided id </s>
funcom_train/46058298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doLearningGroupList(UserRequest ureq, WindowControl wControl) { // 1) initialize list controller and datamodel initGroupListCtrAndModel(false, ureq); // 2) load data into model updateGroupListModelLearninggroups(); // 3) set correct page main.setPage(Util.getPackageVelocityRoot(this.getClass()) + "/learning.html"); // 4) update toolboxe columnLayoutCtr.hideCol2(true); } COM: <s> prepare everything and show all learning groups </s>
funcom_train/50543665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIntProperty(String name) { String value=this.getProperty(name); try{ if(value==null){ return Integer.MAX_VALUE; } return Integer.parseInt(value); } catch(NumberFormatException nfe){ Log.error(this,"Stored value '"+value+"' for '"+name+"' is not an integer."); return Integer.MAX_VALUE; } } COM: <s> access to a integer property </s>
funcom_train/26151941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleBrowseButtonPressed() { FileDialog dialog = new FileDialog(getContainer().getShell(), SWT.SAVE); dialog.setFilterExtensions(new String[] {FILE_EXPORT_MASK}); dialog.setFileName(WAR_FILE_EXTENSION); String fileName = dialog.open(); if (fileName != null) { if (fileName.endsWith(WAR_FILE_EXTENSION)) { fileNameField.setText(fileName); } else { fileNameField.setText(fileName + WAR_FILE_EXTENSION); } } } COM: <s> an event handler for handling the browse button being pressed </s>
funcom_train/14307785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeArtifacts(Collection objects, boolean delete) { for(Iterator i = objects.iterator(); i.hasNext(); ) { Object o = i.next(); if(o instanceof ProjectFile) { removeFile((ProjectFile)o, delete); } else if(o instanceof ProjectDirectory) { removeDirectory((ProjectDirectory)o, delete); } } } COM: <s> analyze the list of objects passed and removes any project file and </s>
funcom_train/47443842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateActuators() { abstract_robot.setSteerHeading(ctime, nextmove.t); abstract_robot.setSpeed(ctime, nextmove.r); if (attemptkick) { if (abstract_robot.canKick(ctime)) abstract_robot.kick(ctime); } recordLocation(); recordBall(); updatePositions(nextposition); recordPosition(nextposition); } COM: <s> executes moves for player </s>