__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/29377914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean driverFound( String driverName ) { IEditorUtility editorUtility = EditorProjectManager.getEditorUtility(); URL[] urls = editorUtility.getProjectURLs( currentProject ); ClassLoader classLoader = new URLClassLoader( urls ); boolean driverFound = true; try { Class.forName( driverName, false, classLoader ); } catch( ClassNotFoundException ex ) { driverFound = false; } return driverFound; } COM: <s> tests whether the the specified tabase driver is in the projects </s>
funcom_train/41266303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Bodega entity) { EntityManagerHelper.log("saving Bodega instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved bodega entity </s>
funcom_train/9355778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateClientsLocked() { for (int i = 0, count = mClients.size(); i < count; i++) { try { mClients.get(i).setEnabled(mIsEnabled); } catch (RemoteException re) { mClients.remove(i); count--; } } } COM: <s> updates the state of </s>
funcom_train/32212733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void highlight(String clazz) { for (java.util.Enumeration e = ports.elements(); e.hasMoreElements();) { Port p = (Port) e.nextElement(); if ((p.CLASS.compareTo(clazz) == 0) && (p.TYPE != port.TYPE)) { p.highlight(); } } } COM: <s> part of highlighting matching ports for possible connections </s>
funcom_train/18255225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getType() { if (comparison == COMPARE_EQUALS) { return SEARCH_EQUAL; } else if (comparison == COMPARE_MIN) { return SEARCH_MIN; } else if (comparison == COMPARE_MAX) { return SEARCH_MAX; } else { //Shouldn't really happen since we can't set a bad value.. throw new RuntimeException("Bad search type rule: " + comparison); } } COM: <s> returns the search type used in any searches using this rule </s>
funcom_train/50773483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsDeadCode(){ StatementBlock block = null; if((pe == null) || (!(pe instanceof StatementBlock))){ try { block = factory.parseStatementBlock(new StringReader(source)); } catch (IOException e) { // TODO med - anyone - handling? e.printStackTrace(); } catch (ParserException e) { // TODO med - anyone - handling? e.printStackTrace(); } } else{ block = (StatementBlock)pe; } return containsUnreachableCode() || RecoderHelper.containsDeadCode(block); } COM: <s> checks whether the given fragment contains dead code that is </s>
funcom_train/19321894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String desc = "ModelMBeanNotificationInfo: " + getName() + " ; Description: " + getDescription() + " ; Descriptor: " + getDescriptor() + " ; Types: "; String[] types = getNotifTypes(); for (int i = 0; i < types.length; i++) desc += types[i] + ", "; return desc; } COM: <s> returns a human readable string containing model mbean notification info </s>
funcom_train/26414235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encode(OutputStream output, Indenter indenter) { PrintStream out = new PrintStream(output); String indent = indenter.makeString(); out.println(indent + "<VariableDefinition VariableId=\"" + variableId + "\">"); indenter.in(); expression.encode(output, indenter); out.println("</VariableDefinition>"); indenter.out(); } COM: <s> encodes this class into its xml representation and writes this </s>
funcom_train/50155970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteRecordsDestructive(String[] ids) { for (int i = 0; i < ids.length; i++) { String path = getFilepathFromId(ids[i]); File f = new File(path); try { f.delete(); } catch (Exception e) { String msg = "Repository Manager unable to delete file:"; msg += "\n\t" + path; msg += "\n\t" + e; prtln(msg); } } clearRecordList(); return true; } COM: <s> destructively deletes records from suggestion data base </s>
funcom_train/44588553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isPositionedCorrectly(IJavaElement element) { ListItem oldListItem = this.getOldPosition(element); if (oldListItem == null) return false; ListItem newListItem = this.getNewPosition(element); if (newListItem == null) return false; IJavaElement oldPrevious = oldListItem.previous; IJavaElement newPrevious = newListItem.previous; if (oldPrevious == null) { return newPrevious == null; } else { return oldPrevious.equals(newPrevious); } } COM: <s> returns whether the elements position has not changed </s>
funcom_train/15607244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(GraphicContext gc) { if (intersectsDirtyArea(gc)) { Rectangle2D dirtyBounds = gc.dirtyBounds(); double pixw = gc.pixelWidth(); start = Math.max(0, dirtyBounds.getX() - pixw); end = Math.min(length(), dirtyBounds.getMaxX() + pixw); paintChildren(gc); } }; COM: <s> paint this ruler </s>
funcom_train/22285829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void layout() { layoutContainer(); Dimension pref = null; for (int i = 0, y = 1 ; i < getItemCount() ; i++) { PopupMenuItemWidget item = getItem(i); pref = item.getPreferredSize(); item.setBounds(1, y, container.content.width-2, pref.height); y += pref.height; } if (container.vert != null && pref != null) { container.vert.setLineSize(pref.height); } } COM: <s> layout the menu items </s>
funcom_train/32961293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getProductNameText( ) { List<StructuredProductType.Product> product = getProduct(); if (product==null || product.size()==0) return null; org.tolven.ccr.CodedDescriptionType productName = product.get(0).getProductName(); if (productName==null) return null; return productName.getText(); } COM: <s> helper method to get product name text </s>
funcom_train/16887873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isEqualToTableName(String typedWord) { for(int i=0;i<tables.length;i++){ if((typedWord.startsWith("#"))&&(typedWord.endsWith("#"))&&(typedWord.length()>1)){ if(typedWord.toLowerCase().contains(tables[i].toLowerCase())){ return true; } } } return false; } COM: <s> checking if the word is a table name </s>
funcom_train/46466810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getCurrentAmount() { double sum = 0; if(productList != null) { Collection<TransactionProduct> txProducts = productList.values(); for(TransactionProduct txProduct : txProducts) { Product product = Product.getByKey(txProduct.getProductId()); if(product == null) { System.out.println("ERROR: Unknown product id " + txProduct.getProductId()); } else { sum += txProduct.getQuantity() * product.getPrice(); } } } return ((double)Math.round(sum*100))/100; } COM: <s> get the amount of value for all the items of a transaction </s>
funcom_train/10766671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOutputStream(OutputStream os) { if (_outputStream != null) { try { _outputStream.close(); } catch (IOException ioex) { // ignore } } _outputStream = os; if (__log.isDebugEnabled()) { __log.debug("Sett output to stream " + os); } } COM: <s> set the output stream to which the compiled representation will be generated </s>
funcom_train/32370867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String printCaseInfo() { Collection<String> values = table.values(); String summary = ""; Object[] valuesArray = values.toArray(); for (Object entry : valuesArray) { summary += (String)entry + ","; } if (!summary.equals("")) { summary = summary.substring(0, summary.lastIndexOf(",")); } return removeTrailingChar(summary, ","); } COM: <s> prints general pup information usually suitable as a concise summary </s>
funcom_train/26388147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void alarm(WakeUp wakeUp, long delta) { if (thread != null) { synchronized (alarms) { Iterator<Alarm> iterator = alarms.iterator(); while (iterator.hasNext()) { Alarm alarm = iterator.next(); if (wakeUp.replaces(alarm.wakeUp)) { iterator.remove(); } } alarms .add(new Alarm(wakeUp, System.currentTimeMillis() + delta)); alarms.notifyAll(); } } } COM: <s> alarm for the element at the given time </s>
funcom_train/3873911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Group createGroup(Message groupId, GroupListener listener) { // avoid overriding existing group if (groups.containsKey(groupId)) return (Group)groups.get(groupId); //NEW:RETURN EXISTING GroupManager group = new GroupManager(this, groupId, listener); groups.put(groupId, group); this.listener.groupCreated(groupId); // core API callback listener.setGroup(group); // convenience callback return group; } COM: <s> creates a new empty client group with given id and event listener </s>
funcom_train/7427883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setShape(final Shape newShape) { shape = cloneShape(newShape); origShape = shape; updateShapePoints(newShape); firePropertyChange(PPath.PROPERTY_CODE_PATH, PPath.PROPERTY_PATH, null, shape); updateBoundsFromPath(); invalidatePaint(); } COM: <s> changes the underlying shape of this pswtpath </s>
funcom_train/48382326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void readFrom(Input in, int index, ReadContext readContext) { try { assert AlignmentUtils.isAligned(in.getCursor(), getItemType().ItemAlignment); this.offset = in.getCursor(); this.index = index; this.readItem(in, readContext); } catch (Exception ex) { throw addExceptionContext(ex); } } COM: <s> read in the item from the given input stream and initialize the index </s>
funcom_train/47731815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String generateLispFromCompetenceElement(CompetenceElement compElement) { String result = "(" + compElement.getName() + " " + generateLispFromTrigger(compElement.getTrigger()) + " " + compElement.getAction(); if (compElement.getRetries() > 0) result += " " + compElement.getRetries(); result += ")"; return result; } COM: <s> convert a competence element into its lisp representation </s>
funcom_train/33423267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long findCountByAnd(String entityName, Object... fields) throws GenericEntityException { return findCountByCondition(entityName, EntityCondition.makeCondition(UtilMisc.<String, Object>toMap(fields), EntityOperator.AND), null, null); } COM: <s> note 20080502 1 references all changed to use find count by condition </s>
funcom_train/37607389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean qbSFVeh0Right(Integer qnum, Integer lnum) { int qnbr = qnum.intValue(); int lnbr = lnum.intValue(); OFragment frag = ccc.useSt(street[qnbr][lnbr]).useFrag(fragment[qnbr][lnbr]); if (frag.getVehCount() > 0) { vehid[qnbr] = frag.useVeh(0).getVehID(); return frag.useVeh(0).getTurnPref() == 'R'; } else return false; } COM: <s> get the tt oquery tt first vehicle right turn state </s>
funcom_train/41624194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setWhereIAm() { HashMap<String, String> params = updateLocationAndProvideHttpParameters(); Log.d(LOG, "About to post a ping."); try { mHttpClientService.submit(URL_PING, params, mSetWhereIAmHttpCallback); } catch (URISyntaxException e) { // TODO Auto-generated catch block Log.d(LOG, Log.getStackTraceString(e)); } } COM: <s> connect to ping endpoint and request a get where ami i update </s>
funcom_train/44712618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OID getOID() { validate(); OID oid = new OID(m_type); for (Iterator it = m_type.getKeyProperties(); it.hasNext(); ) { Property prop = (Property) it.next(); String name = prop.getName(); oid.set(name, m_data.get(name)); } return oid; } COM: <s> returns the unique id of this object </s>
funcom_train/3388235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MessageHeader getEntry(String name) { Enumeration enum_ = entries(); while(enum_.hasMoreElements()) { MessageHeader mh = (MessageHeader)enum_.nextElement(); if (name.equals(mh.findValue("Name"))) { return mh; } } return null; } COM: <s> get the entry corresponding to a given name </s>
funcom_train/18860014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDomainResourcePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DiagramCanvas_domainResource_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DiagramCanvas_domainResource_feature", "_UI_DiagramCanvas_type"), VisualizerPackage.eINSTANCE.getDiagramCanvas_DomainResource(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the domain resource feature </s>
funcom_train/18099594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void increaseCapacity() { int currentCapacity = this.storedObjects.length; int newCapacity = currentCapacity + ((currentCapacity * this.growthFactor) / 100); if (newCapacity == currentCapacity ) { newCapacity++; } boolean[] newStore = new boolean[ newCapacity ]; System.arraycopy( this.storedObjects, 0, newStore, 0, this.size ); this.storedObjects = newStore; } COM: <s> increases the capacity of this list </s>
funcom_train/30186816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Chain getChain(String mappingName, Locale locale, Map chainMap) { ChainCollection chainCollection = (ChainCollection)chainMap.get(mappingName); if (chainCollection!=null) { log.debug("found chain collection for mapping name " + mappingName); Chain chain = chainCollection.get(locale); log.debug("found chain " + chain + " for mappingName " + mappingName + " and locale " + locale); return chain; } log.debug("Chain collection was null for mapping name " + mappingName); return null; } COM: <s> method get chain </s>
funcom_train/17004601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SOAPContext getSOAPContext(SOAPMessage soapMessage) { SOAPContext soapContext = null; try { SOAPContextFactory soapContextFactory = SOAPContextFactory.getInstance(); soapContext = soapContextFactory.newSOAPContext(soapMessage); } catch (DeploymentException dEx) { System.out.println(moduleName + " Exception is : " + dEx); dEx.printStackTrace(); } return soapContext; } COM: <s> this will return soapcontext from given soapmessage </s>
funcom_train/35607264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void moveMouse(int x, int y){ try { Robot robot = new Robot(); robot.mouseMove(x, y); } catch (AWTException ex) { logger.debug("Robot.moveMouse is currently not supported: " + ex.toString()); } logger.info("[moveMouse]: x=" + x +", y=" +y); } COM: <s> use robot class to move the mouse cursor to specific coordinate </s>
funcom_train/40299436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processAvailableData() { try { while (inStream.available() > 0) { int byteCount = inStream.read(readBuffer); receiveData(readBuffer, byteCount); } } catch (IOException e) { Debug.println(0, "UART: Error while reading available data. " + e); } } COM: <s> reads all available data from the serial port input stream </s>
funcom_train/44838574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List findPersons(String hqlStatement) throws RemoteException { List result = null; try { result = personManager.findPersons(hqlStatement); } catch (RemoteException rex) { System.out.println("Error on the remote server" + rex); throw new RemoteException("Error on the remote server" + rex); } return result; } COM: <s> find persons only a certain hql statement as parameter </s>
funcom_train/43132813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { GraphicalUserInterface gui = UserInterfaceFactory.getGraphicalUserInterface(); boolean confirmed = false; gui.confirmMessage("confirmQuit"); if (confirmed) { ActionEvent actionEvent = new ActionEvent(this, 0, "quit"); QuitAction.getInstance().actionPerformed(actionEvent); } } COM: <s> confirms the closure of the window </s>
funcom_train/47509546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(ArquivoAnexo entity) { EntityManagerHelper.log("saving ArquivoAnexo instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved arquivo anexo entity </s>
funcom_train/14093035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCalculateNorthEast() { MyTestClass myClass = new MyTestClass(); myClass.setPosition(NORTH_EAST); Point l = myClass.calculatePoint(new Rectangle(0, 0, 7, 7)); Point v = new Point(7, 0); assertEquals("NorthEast:", v, l); } COM: <s> test calculation of northeast position </s>
funcom_train/25333162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBuildCoordSystem() throws Exception { String featureKey = "transcriptbuild.level"; String level = "toplevel"; instanceWithCoords.setRegistry(reg); assertNull(instanceWithCoords.getBuildCoordSystem(FeatureType.gene.toString())); instanceWithCoords.setBuildLevel(featureKey, level); assertEquals(instanceWithCoords.getBuildCoordSystem(FeatureType.transcript.toString()),cs1); } COM: <s> test of get build coord system method of class dbsingle species core database </s>
funcom_train/39378438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onDeploy(ServletContext servletContext) { // Deploy DateField resources files for (int i = 0; i < CALENDAR_RESOURCES.length; i++) { String calendarFilename = "calendar" + CALENDAR_RESOURCES[i]; String calendarResource = "/net/sf/click/extras/control/calendar/" + calendarFilename; ClickUtils.deployFile(servletContext, calendarResource, "click/calendar"); } } COM: <s> deploy the calendar javascript and css resources to the web app </s>
funcom_train/14353842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPassword() { log.debug("UserAdminFace::getPassword()"); if(formFields.get("password") == null) { log.debug("UserAdminFace::getPassword()== NULL !!!!!!!!!!!!!!!"); return ""; }//endif else { String password = formFields.get("password").toString(); log.debug("UserAdminFace::getPassword() password =" +password); return password; }//endelse }// end of getPassword() COM: <s> method name get password </s>
funcom_train/5436847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(Packet packet) throws IOException, PcapException { if(packet == null) { throw new NullPointerException("Given packet is null."); } // Write the record's header. writeRecordHeader(packet); // Write the record's data. writeRecordData(packet); } COM: <s> writes the given packet to the output stream provided in the </s>
funcom_train/4300087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rollback() { if (isClosed) { return; } synchronized (database) { int i = transactionList.size(); while (i-- > 0) { Transaction t = (Transaction) transactionList.get(i); t.rollback(this, false); } if (!transactionList.isEmpty()) { try { database.logger.writeToLog(this, Token.T_ROLLBACK); } catch (HsqlException e) {} transactionList.clear(); } savepoints.clear(); } } COM: <s> rolls back any uncommited transaction this session may have open </s>
funcom_train/37449896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Query getObsoleteQuery(Class clazz) { Criteria crit = new Criteria(); // We only need obsolete items crit.addEqualTo("annotations.cvTopic.shortLabel", CvTopic.OBSOLETE ); ReportQueryByCriteria query = QueryFactory.newReportQuery(clazz, crit); // Limit to shortlabel query.setAttributes(new String[] { "ac" }); return query; } COM: <s> returns a query to get a list of obsolete acs </s>
funcom_train/41958174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processRsScore() { RsConnectHighscore personA = new RsConnectHighscore(); if (!RsBean.isConnectionMade()) { new Messages(001, 'E'); return; } else if (!RsBean.isValidRsName()) { rsScreenName.setBackground(Color.YELLOW); new Messages(002, 'W'); rsScreenName.requestFocusInWindow(); return; } else { rsScreenName.setBackground(Color.WHITE); } new RsScoreFrame(); } COM: <s> process rs score </s>
funcom_train/33607005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void recomputeAtTime(Visometry<C> vis, VisometryGraphics<C> canvas, TimeClock clock) { for (Plottable p : plottables) if (p instanceof AnimatingPlottable && ((AnimatingPlottable) p).isAnimationOn()) ((AnimatingPlottable) p).recomputeAtTime(vis, canvas, clock); } COM: <s> tells only animating subclasses to recompute </s>
funcom_train/38299993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean fetchAndVerifyBoolean(String aKey) throws PropertiesException { String value = argProp.getProperty(aKey); if (value != null) { if (value.equalsIgnoreCase("true")) { return true; } if (value.equalsIgnoreCase("false")) { return false; } throw new PropertiesException("The value of the attribute " + aKey + " must be either true or false."); } return false; } COM: <s> fetch and verify a boolean attribute </s>
funcom_train/38514523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJbtnContextHelp() { if (jbtnContextHelp == null) { jbtnContextHelp = new JButton(); jbtnContextHelp.setIcon(new ImageIcon(getClass().getResource("/org/hplcsimulator/images/help.gif"))); jbtnContextHelp.setSize(new Dimension(33, 25)); jbtnContextHelp.setLocation(new Point(496, 132)); } return jbtnContextHelp; } COM: <s> this method initializes jbtn context help </s>
funcom_train/32137829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MenuManager createFakeFileMenu() { LogManager.logDebug("Start createFakeFileMenu:", this); MenuManager menu = new MenuManager(Localization.getString("ApplicationActionBarAdvisor.File"), IWorkbenchActionConstants.M_FILE); menu.setVisible(false); LogManager.logDebug("End createFakeFileMenu:", this); return menu; } COM: <s> creates the file menu different from the standard eclipe edition </s>
funcom_train/7660786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToMillis() { for (long t = 0; t < 10; ++t) { assertEquals(1000 * t, TimeUnit.SECONDS.toMillis(t)); assertEquals(t, TimeUnit.MILLISECONDS.toMillis(t)); assertEquals(t, TimeUnit.MICROSECONDS.toMillis(t * 1000)); assertEquals(t, TimeUnit.NANOSECONDS.toMillis(t * 1000000)); } } COM: <s> to millis correctly converts sample values in different units to </s>
funcom_train/29036620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEditNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Connection_editName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Connection_editName_feature", "_UI_Connection_type"), SystemPackage.Literals.CONNECTION__EDIT_NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the edit name feature </s>
funcom_train/7616054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setArc(Point2D point, Dimension2D size, double start, double extent, int type) { setArc(point.getX(), point.getY(), size.getWidth(), size.getHeight(), start, extent, type); } COM: <s> sets the data that defines the arc </s>
funcom_train/23246906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean parseFixed(final String strFixed) { if (strFixed.equals("1") || strFixed.equals("2") || strFixed.equals("A")) { return true; } else if (strFixed.equals("0") || strFixed.equals("V")) { return false; } return false; } COM: <s> parse gps on fix state from gga and rmc sentences </s>
funcom_train/627449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Classifier resolveSimpleClassifier(String qName) { // case 1: type is predefined String typeName = this.removeSpaces(qName); Classifier nodeType = this.resolvePredefinedSimpleClassifier(typeName); // case 2: type is model type if (nodeType == null) { Type t = this.resolveModelElement(typeName); if (t instanceof Classifier) { nodeType = (Classifier) t; } } return nodeType; } COM: <s> resolves a non collection classifier predefined or model type </s>
funcom_train/13548145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean optimize(BlockGraph graph_BlockGraph) { for (Iterator vIt = graph_BlockGraph.getAllNodes().iterator(); vIt.hasNext();) { BlockNode node = (BlockNode) vIt.next(); CalculateII iICalc_CalculateII = new CalculateII(); iICalc_CalculateII.calculateTheII(node, GlobalOptions.chipDef); } return true; } COM: <s> call calculate the ii from calculate ii </s>
funcom_train/32759908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void actuatorsParked() { // Empty the active monitor pool mplScanEvts.emptyPool(); // String notification getLogger().logInfo(this.getClass(), "Actuators parked: " + Calendar.getInstance().getTime().toString()); // Notify the registered scan complete event handlers for (IDaqControllerListener hndlr : lstLsnCtlEvts) hndlr.scanActuatorsParked(); } COM: <s> perform cleanup after all daq actuators are parked </s>
funcom_train/37557107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawLine (int x1, int y1, int x2, int y2) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (OS.IsWinCE) { int [] points = new int [] {x1, y1, x2, y2}; OS.Polyline (handle, points, points.length / 2); } else { OS.MoveToEx (handle, x1, y1, 0); OS.LineTo (handle, x2, y2); } OS.SetPixel (handle, x2, y2, OS.GetTextColor (handle)); } COM: <s> draws a line using the foreground color between the points </s>
funcom_train/17685136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void promptForExit() { if (inReplay) { gameManager.closeSocket(); System.exit(0); } else { int exit = JOptionPane.showConfirmDialog(breakthrough, rb.getString("exitConfirmation"), rb.getString("exit"), JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE); if (exit == JOptionPane.YES_OPTION) { gameManager.closeSocket(); System.exit(0); } } } COM: <s> prompt for exit </s>
funcom_train/16975244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ValueExpression getValueExpression(JroveContext ctx, Class<?> type) { try { ExpressionFactory f = ctx.getExpressionFactory(); return new TagValueExpression(this, f.createValueExpression(ctx, this.value, type)); } catch (Exception e) { throw new TagAttributeException(this, e); } } COM: <s> create a value expression using this attributes literal value and the </s>
funcom_train/264947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt(Object obj, int row, int col) { if (displayNumbering) { if (col > 0) model.setValueAt(obj, indexList[row], col - 1); } else model.setValueAt(obj, indexList[row], col); } COM: <s> implements table model by forwarding the message set value at substitutes </s>
funcom_train/2344790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { BorderLayout borderLayout = new BorderLayout(); borderLayout.setHgap(0); jContentPane = new JPanel(); jContentPane.setLayout(borderLayout); jContentPane.add(getScrollpaneLeft(), BorderLayout.WEST); jContentPane.add(getScrollpaneRight(), BorderLayout.EAST); jContentPane.add(getJTabbedPane(), BorderLayout.CENTER); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/19435649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector testPath(File fTemp) { System.out.println(fTemp.toString()); StringTokenizer sttPath = new StringTokenizer(fTemp.toString(), File.separator, false); Vector<String> vecTemp = new Vector<String>(); while (sttPath.hasMoreTokens()){ vecTemp.add(sttPath.nextToken()); } return vecTemp; } COM: <s> this method breaks up a path into components and places them </s>
funcom_train/2920214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void _visit(Object t, Object parent, int childIndex, int ttype, ContextVisitor visitor) { if ( t==null ) { return; } if ( adaptor.getType(t)==ttype ) { visitor.visit(t, parent, childIndex, null); } int n = adaptor.getChildCount(t); for (int i=0; i<n; i++) { Object child = adaptor.getChild(t, i); _visit(child, t, i, ttype, visitor); } } COM: <s> do the recursive work for visit </s>
funcom_train/3420604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean rowUpdated() throws SQLException { // make sure the cursor is on a valid row checkCursor(); if (onInsertRow == true) { throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.invalidop").toString()); } return(((Row)getCurrentRow()).getUpdated()); } COM: <s> indicates whether the current row of this code cached row set impl code </s>
funcom_train/24606780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OutputStream openOutputStream(String contentType, String filename) throws IOException { // Set the content type of the output stream if (contentType != null) httpServletResponse.setContentType(contentType); // Set the filename of the response if (filename != null) httpServletResponse.setHeader("Content-Disposition", "attachment; filename="+filename); // Abort any further processing this.setModuleProcessingAborted(true); return httpServletResponse.getOutputStream(); } COM: <s> this method hijacks the output stream that will be sent to the client </s>
funcom_train/42773033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getExpanded(Object element) { Widget[] items = findItems(element); if (items != null && items.length > 0) { //just choose the first item. There is really no better way to do it. if (!items[0].isDisposed() && items[0] instanceof IExpandableItem) { return ((IExpandableItem)items[0]).isExpanded(); } } return false; } COM: <s> returns the expanded state of the given element </s>
funcom_train/43166706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAction( SIFEvent.Action action ) { if ( message.getSIFEvent().getSIFObjectData() == null) return; if ( message.getSIFEvent().getSIFObjectData().getSIFEventObject() == null) return; message.getSIFEvent().getSIFObjectData().getSIFEventObject().setAction(action.toString()); } COM: <s> sets the action for this event </s>
funcom_train/13439685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawPanels() { mapDayPanels = null; resetAddrPosition(); mainFrame.setCursorWait(); setMonthNavigationEnabled(); try { pnMain.removeAll(); } catch (Exception e) { } startDay = null; endDay = null; if (isListView()) drawListPanel(); else drawCalendarPanel(); actualizeText(); mainFrame.setCursorDefault(); } COM: <s> draws the panels for the single days </s>
funcom_train/25332436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetParentStop() { FeatureQuery instance = new FeatureQuery(); Integer expResult = new Integer(5); Integer result = instance.getParentStop(); assertNull(result); instance.setParentStop(expResult); result = instance.getParentStop(); assertEquals(expResult, result); } COM: <s> test of get parent stop method of class feature query </s>
funcom_train/1958950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element setNodeType(Element node, String service, String impl) { Element nodetype = node.getChild("nodetype", VerinecNamespaces.NS_TRANSLATION); assertNotNull("no nodetype in node", nodetype); Element serv = new Element("service", VerinecNamespaces.NS_TRANSLATION); serv.setAttribute("name", service); serv.setAttribute("translation", impl); serv.addContent(new Element("target", VerinecNamespaces.NS_TRANSLATION)); nodetype.removeContent(); nodetype.addContent(serv); return node; } COM: <s> set the nodetype element for this node </s>
funcom_train/18107828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(String inputFilePath, String outputFilePath) throws ParseContentException { try{ String plainText = parse(inputFilePath); // read from string into file FileUtil.writeString(outputFilePath, plainText); } catch(Exception e){ log.error("Error occured in RTFParser ", e); e.printStackTrace(); throw new ParseContentException(e); } } COM: <s> parse content of rtf file to txt file </s>
funcom_train/3116777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Control getControlBefore(final DeviceType deviceType) { final List/*<Control>*/ controls = getPageRegion(deviceType).getControls(); final int index = controls.indexOf(this); if (index == 0) { return null; } else { return (Control)controls.get(index - 1); } } COM: <s> returns the control that is before this one for the specified </s>
funcom_train/123360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(char cbuf[], int off, int len) throws IOException { final int off_plus_len = off + len; for (int i = off; i < off_plus_len;) { char c = cbuf[i++]; if (c < 0x80) { _byteBuffer.put((byte) c); } else { write(c); } } } COM: <s> writes a portion of an array of characters </s>
funcom_train/23695627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isMeltingInformationOption(String [] args){ for (int i = 0;i < args.length; i++){ String option = args[i]; if (isAnOptionValue(option) == false){ if (option.equals(meltingHelp)){ return true; } else if (option.equals(legalInformation)){ return true; } else if (option.equals(dataPathway)){ return true; } else if (option.equals(versionNumber)){ return true; } } } return false; } COM: <s> to check if the user just wants to know some information about melting </s>
funcom_train/38552276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setThreadManager(ThreadManager threadManager) { Cube42NullParameterException.checkNull(threadManager, "threadManager", "setThreadManager", this); if(this.threadManager != null) { throw new Cube42RuntimeException( ThreadSystemCodes.ATTEMPTED_THREAD_MANAGER_RESET); } this.threadManager = threadManager; } COM: <s> sets the thread manager for the job queue </s>
funcom_train/47906361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prepareComponent() { if (!captionSynced || !layoutSynced) { int captionLineWidth = width - 2 * padding; captionLines = TextManager.getLines(caption, captionLineWidth, font); height = captionLines.length * font.getHeight() + 2 * padding; captionSynced = true; layoutSynced = true; } } COM: <s> prepares the layout of the label </s>
funcom_train/33605938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addColumn(Vector<V> col) throws ArrayIndexOutOfBoundsException { if(col.size()!=getNumRows()){throw new ArrayIndexOutOfBoundsException();} for(int i=0;i<getNumRows();i++){data.get(i).add(col.get(i));} } COM: <s> adds a column to the matrix </s>
funcom_train/45038481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFails() throws Exception { Start[] asts = OclDirectoryParser.parseDirectory( "test_files" + File.separator + "context_checker" + File.separator + "uml14" + File.separator + "fails"); UmlMDRepository umlRep = new UmlMDRepository(UmlMDRepository.UML_V14); UmlFacade facade = new UmlFacade(umlRep); ContextChecker cc = new ContextChecker(facade); for (int i = 0; i < asts.length; i++) { Start start = asts[i]; try { //System.out.println(start); cc.checkContext(start); fail( "' " + asts[i] + "' didn't fail during the context check as expected."); } catch (OclContextException oce) { } } } COM: <s> tests files containing constraints that are malformed </s>
funcom_train/9045014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setListOfClasses(){ listOfClasses = theProject.getAllClasses(); Log.printParentChildLinker("Set a list of " + listOfClasses.size() + " classes"); for(int i = 0; i < listOfClasses.size(); i++){ Log.printParentChildLinker("Class:(" + i + ") " + listOfClasses.get(i).getName()); } } COM: <s> fill the list of classes </s>
funcom_train/8326129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void trimToSize() { // * 1.2 because open addressing's performance // exponentially degrades beyond that point // so that even rehashing the table can take very long int newCapacity = nextPrime((int)(1 + 1.2*size())); if (values.length > newCapacity) { rehash(newCapacity); } } COM: <s> reduce the size of the internal arrays to a size just big </s>
funcom_train/12155291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AssociationBeanList getAssociationBeanList() { logger.debug("Entering getAssociationBeanList()"); AssociationBeanList associationBeanList = this.associationBeanList; if (logger.isDebugEnabled()) { logger.debug("Exiting getAssociationBeanList(); RV = " + (associationBeanList != null ? "[" + associationBeanList + "]" : null) + "."); } return associationBeanList; } COM: <s> gets the actual list of associations of this acceptor </s>
funcom_train/14072414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProviderDescriptor getMetaFactoryDefault() { Iterator<ProviderDescriptor> it = availableProviders.values().iterator(); ProviderDescriptor provider; while (it.hasNext()) { provider = it.next(); if (provider.getID().equals(factoryDefaultProviderID)) { return provider; } } return null; } COM: <s> returns the flexi providers meta provider </s>
funcom_train/48051670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OffsetDateTime toOffsetDateTime() { if (getClass() == GregorianCalendar.class) { Instant instant = Instant.ofEpochMilli(getTimeInMillis()); ZoneOffset offset = ZoneOffset.ofTotalSeconds((zoneOffsets[0] + zoneOffsets[1]) / 1000); return OffsetDateTime.ofInstant(instant, offset); } return toZonedDateTime().toOffsetDateTime(); } COM: <s> converts this object to a code offset date time code </s>
funcom_train/34856272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void optionallySaveModel() { if (config.isSaveOnSuspend()) { TransactionUtil.runSafely(new Runnable() { public void run() { try { modelResource.save(null); outputStream.writeString("Model saved.\n"); } catch (IOException ioe) { throw new RuntimeException("Could not save model after suspension."); } } }, editingDomain); // modelResource.save(null); // outputStream.writeString("Model saved.\n"); } } COM: <s> saves the model if </s>
funcom_train/28761501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCsssubsubheadsize(String newVal) { if ((newVal != null && this.csssubsubheadsize != null && (newVal.compareTo(this.csssubsubheadsize) == 0)) || (newVal == null && this.csssubsubheadsize == null && csssubsubheadsize_is_initialized)) { return; } this.csssubsubheadsize = newVal; csssubsubheadsize_is_modified = true; csssubsubheadsize_is_initialized = true; } COM: <s> setter method for csssubsubheadsize </s>
funcom_train/10199172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleAddCollection(Collection collection) { if (traced() != null && collection instanceof TracingCollection) { TracingCollection tracingCollection = (TracingCollection) collection; boolean setTrace = traced().booleanValue(); if (setTrace) { tracingCollection.setTrace(); } else { tracingCollection.unsetTrace(); } } } COM: <s> this method will be called in descendants on lazy collection instanciation </s>
funcom_train/23875302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEndedPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DateType_ended_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DateType_ended_feature", "_UI_DateType_type"), MetadataPackage.Literals.DATE_TYPE__ENDED, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the ended feature </s>
funcom_train/13502599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOnArbitraryBytes() throws IOException { // create the source file and fill it. File source = createTempFile(); OutputStream os = new FileOutputStream(source); for (int i = Byte.MIN_VALUE; i <= Byte.MAX_VALUE; i++) { os.write(i); } os.close(); // process the file and test. encodeAndDecodeWithAssertions(source); } COM: <s> generate a temporary file with all possible bytes in it </s>
funcom_train/25075287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStandardLabelExpressionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RichReferenceFigure_standardLabelExpression_feature"), getString("_UI_RichReferenceFigure_standardLabelExpression_description"), GraphdescPackage.Literals.RICH_REFERENCE_FIGURE__STANDARD_LABEL_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_AppearancePropertyCategory"), null)); } COM: <s> this adds a property descriptor for the standard label expression feature </s>
funcom_train/12368907
/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) { jTabbedPane = new JTabbedPane(); jTabbedPane.addTab("Colors", null, getJPanelColorSettings(), null); jTabbedPane.addTab("Properties", null, getJPanelProperties(), null); jTabbedPane.addTab("View Settings", null, getJPanelViewSettings(), null); } return jTabbedPane; } COM: <s> this method initializes j tabbed pane </s>
funcom_train/38808986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Collection getMatchingRules(String path, Attributes attrs) { Collection matchingRules = null; for (Iterator i = this.listeners.iterator(); i.hasNext();) { XPathMatcher rule = (XPathMatcher) (i.next()); if (rule.match(path, attrs)) { if (matchingRules == null) { matchingRules = new ArrayList(); } matchingRules.add(rule); } } return (matchingRules); } COM: <s> returns the list of rules that match the element path and attributes </s>
funcom_train/7924700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRangeQuery() throws Exception { RangeQuery rq = new RangeQuery( new Term("sorter", "b"), new Term("sorter", "d"), true); Query filteredquery = new FilteredQuery(rq, filter); Hits hits = searcher.search(filteredquery); assertEquals(2, hits.length()); QueryUtils.check(filteredquery,searcher); } COM: <s> this tests filtered querys rewrite correctness </s>
funcom_train/33849078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FieldDescriptor getFieldDescriptor(@SlashedClassName String className, String name, String signature, boolean isStatic) { FieldDescriptor fieldDescriptor = new FieldDescriptor(className, name, signature, isStatic); FieldDescriptor existing = fieldDescriptorMap.get(fieldDescriptor); if (existing == null) { fieldDescriptorMap.put(fieldDescriptor, fieldDescriptor); existing = fieldDescriptor; } return existing; } COM: <s> get a field descriptor </s>
funcom_train/48495823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addObservationInRange(double observation) { double fraction = 0; if ((maximum - minimum) > 0) fraction = (observation - minimum) / (maximum - minimum); if (fraction < 0.0) { fraction = 0.0; } int binIndex = (int) (fraction * numberOfBins); // rounding could result in binIndex being out of bounds if (binIndex >= numberOfBins) { binIndex = numberOfBins - 1; } getBin(binIndex).increment(); } COM: <s> add new observation if it is between minimum and maximum </s>
funcom_train/22347504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onCreate() { values = new HashMap(); optionElements = new HashMap(); Element inputEl = this.getInput(); Iterator options = inputEl.elementIterator("option"); while(options.hasNext()) { Element optionEl = (Element) options.next(); String id = optionEl.attributeValue("id"); if(optionEl.attributeValue("default") != null) values.put(id, BOOLEAN_TRUE); else values.put(id, BOOLEAN_FALSE); optionElements.put(id, optionEl); } } COM: <s> init procedures executed on creation </s>
funcom_train/6267500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected long getParameterAsLong(String parameterName) { if (this.getParameterValue(parameterName) != null) { try { if (this.getParameterValue(parameterName) instanceof String) { return Long.parseLong(this.getParameter(parameterName)); } else { return ((Long) getParameterValue(parameterName)) .longValue(); } } catch (NumberFormatException ex) { return -1; } } else return -1; } COM: <s> get the parameter as a long value </s>
funcom_train/2675632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCredentials(String userid, String password) { Map<String, String> data = new HashMap<String, String>(); data.put("userid", userid); data.put("password", password); RemotingHeader header = new RemotingHeader(RemotingHeader.CREDENTIALS, true, data); headers.put(RemotingHeader.CREDENTIALS, header); } COM: <s> send authentication data with each remoting request </s>
funcom_train/51099667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void entityRemoved(EntityEvent e) { if (e.getSource() == this) { return; } // remove from DataMap tree removeNode(new Object[] { mediator.getCurrentDataDomain(), mediator.getCurrentDataMap(), e.getEntity() }); } COM: <s> event handler for obj entity and db entity removals </s>
funcom_train/25034775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(Graphics g) { //System.err.println("ECGPanel.paintComponent"); //Rectangle r = this.getBounds(); Rectangle r = new Rectangle(width,height); if (imageOfRenderedPlot == null) { imageOfRenderedPlot = createAppropriateBufferedImageToDrawInto(r); renderPlotToGraphics2D((Graphics2D)(imageOfRenderedPlot.getGraphics()),r,true/*fillBackgroundFirst*/); } g.drawImage(imageOfRenderedPlot,0,0,this); } COM: <s> p draw the data onto the supplied graphic with the specified background </s>
funcom_train/14034615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRole2User(User user) throws RoleUpdateAddException { try { rdao.addRole2User(user); } catch (RoleUpdateAddException ruaex) { Logger.debug("Couldn't add role for user : " + user.getUserName(), ruaex); throw new RoleUpdateAddException("Couldn't add role for user : " + user.getUserName()); } }// end addRole2User() COM: <s> add roles for specific user </s>
funcom_train/25395830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTag(final int aTag, final boolean aAffectChildren) { setTag(aTag); // update children if (aAffectChildren) { for (int i = 0; i < childrens.size(); i++) { childrens.get(i).setTag(aTag, true); } } } COM: <s> set the tag for this object and optionally for my children </s>