__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/35811613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connectEndForAndFor(EndIfNode endIfNode){ if (endIfNode.isEndForLoopNode(this)){ IfNode forNode = endIfNode.getIfNode(this); Edge edge = new Edge(endIfNode, forNode, GraphCommon.EdgeStatus.CONCRETE); if (!endIfNode.contains(edge)) endIfNode.addEdge(edge); } } COM: <s> this refinement connects all endfor with its corresponding for node </s>
funcom_train/4205941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ClassLoader findParentClassLoader() { ClassLoader parent = Thread.currentThread().getContextClassLoader(); if (parent == null) { parent = this.getClass().getClassLoader(); if (parent == null) { parent = ClassLoader.getSystemClassLoader(); } } return parent; } COM: <s> locates the best class loader based on context see class description </s>
funcom_train/41017768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getAgentId(MBeanServer mbeanServer) throws JMException { MBeanServerDelegateMBean mbeanServerDelegateMBean = (MBeanServerDelegateMBean) MBeanServerInvocationHandler .newProxyInstance(mbeanServer, new ObjectName( "JMImplementation:type=MBeanServerDelegate"), MBeanServerDelegateMBean.class, false); return mbeanServerDelegateMBean.getMBeanServerId(); } COM: <s> returns the agent id for an mbean server </s>
funcom_train/123754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(int index) { _qNames[index] = _qNames[--_length]; _values[index] = _values[_length]; TextBuilder tmp = _textBuilders[_length]; _textBuilders[_length] = _textBuilders[index]; _textBuilders[index] = tmp; } COM: <s> removes the attribute at the specified index </s>
funcom_train/19073899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeObject(ObjectOutputStream out) throws IOException { super.writeObjectBase(out); if (out.getClass().getName().indexOf("xstream") == -1) { out.writeObject(driverName); out.writeObject(dbURL); out.writeObject(SQLQuery); } } COM: <s> writes this jdbcsynapse input object to the object output stream out </s>
funcom_train/10521119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addItem(Item item) { LineItem lineItem = getLineItem(item.getItemId()); if(lineItem == null) { lineItem = new LineItem(); lineItem.setItem(item); lineItem.setQuantity(0); _itemList.add(lineItem); } lineItem.incrementQuantity(); } COM: <s> add an item to the cart </s>
funcom_train/17203174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int countNumSpillElements() { // Since spill locations are not determined until after // register allocation occurs, i.e., after the initial // IR-based maps are created, we actually count the // number of spills. int count = 0; for (GCIRMapElement elem : this) { count += elem.countNumSpillElements(); } return count; } COM: <s> calculates the number of spill entries in this gcirmap </s>
funcom_train/9162536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean remove( final int level, final E obj ) { if( obj == null ) { throw new IllegalArgumentException( "Null objects cannot be stored in a Hierarchy." ); } final Set<E> setAtLevel = getAll( level ); if( setAtLevel != null ) { return setAtLevel.remove( obj ); } return false; } COM: <s> removes an object from the supplied level of the code hierarchy code </s>
funcom_train/37730863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getMeasuredDistance(String measurerName) { // Cuidado: Pode ser que isto rode antes de alguma a??o que est? na fila // e que mexa // com a dist?ncia DistanceMeasurer measurer = (DistanceMeasurer) base .getByLabel(measurerName); if (measurer != null) { return measurer.getDistance(); } else { debugln("Requested measurer was null."); return -1.0; } } COM: <s> gets the measured distance attribute of the guicontrol object </s>
funcom_train/29063326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void userPause(long minimumPauseMillis, boolean sharp, long sharpPauseMillis) { try { if (isNightTime()) { nightPause(minimumPauseMillis, sharp, sharpPauseMillis); } else { dayPause(minimumPauseMillis, sharp, sharpPauseMillis); } } catch (Exception e) { log.error("Unexpected exception caught (ignored)", e); Util.sleep(5000); } } COM: <s> simulate a user that is away doing something else </s>
funcom_train/9984814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { TreeViewer viewer = getTreeViewer(); if (viewer != null) { Control control= viewer.getControl(); if (control != null && !control.isDisposed()) { control.setRedraw(false); viewer.setInput(fInput); viewer.expandToLevel(1); control.setRedraw(true); } } } COM: <s> updates the outline page </s>
funcom_train/49317509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireActionEvent() { Object[] listeners = _actionListenerList.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == ActionListener.class) { ((ActionListener) listeners[i + 1]).actionPerformed(new ActionEvent(this, 0, null)); } } } COM: <s> notify any action listeners </s>
funcom_train/6260331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void genGetterMethodForInnerPackage(MofPackage innerPkg) { if (innerPkg.getVisibility() == VisibilityKindEnum.PUBLIC_VIS) { sline("public " + jmi.javaInterfacePackage(innerPkg) + "."); print(jmi.nameOfInterface(innerPkg) + "Package "); println("get" + jmi.nameOfInterface(innerPkg) + "();"); } } COM: <s> generates corresponding getter method for inner package </s>
funcom_train/25523266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJmiProfile() { if(jmiProfile == null) { jmiProfile = new JMenuItem("Profile"); // Add an ActionListener. jmiProfile.addActionListener(new ActionListener() { /** * Called when an action is performed. * * @param e The ActionEvent. */ @Override public void actionPerformed(ActionEvent e) { // Request profile. new RequestAvatarProfile(Whisper.getClient().getConnection(), agent.getUUID(), agent.getName()).execute(); } }); } return jmiProfile; } COM: <s> get the profile menu item </s>
funcom_train/13258560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { JLabel component = (JLabel) value; if (component == null) { component = nullRenderer; } if (isSelected) { component.setBackground(list.getSelectionBackground()); component.setForeground(list.getSelectionForeground()); } else { component.setBackground(list.getBackground()); component.setForeground(list.getForeground()); } return component; } COM: <s> simply uses value param as a renderer as we pass a jlabel </s>
funcom_train/47998623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPlayer(String userName, String password, String email) throws SQLException { Connection con = getConnection(); Statement stmt = con.createStatement(); String sqlCommand = "INSERT INTO parasites_player VALUES( NULL, '" + userName + "', MD5('" + password + "'), '" + email + "', 0,0,0,0);"; stmt.executeUpdate(sqlCommand); stmt.close(); con.close(); } COM: <s> create a new player in db attributes and score are 0 </s>
funcom_train/28743273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createNewDeliverableJOrder(DeliverableJOrderInfo info) throws SimsException { errMsg = clsName + ".createNewDeliverableJOrder(): "; try { //Create DeliverableJOrder and return local object. local = this.createNewDeliverableJOrderLocal(info); } catch (RuntimeException e) { ctx.setRollbackOnly(); //Propagate. throw e; } } COM: <s> this method create a new deliverable object </s>
funcom_train/47307976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public E createRandom() { if (creators.isEmpty()) { return null; } else { int index = Randomizer.getRandomNumber(0, creators.size()-1); String name = (String)creators.keySet().toArray()[index]; return creators.get(name).create(); } } COM: <s> creates an instance from a randomly chosen creator </s>
funcom_train/25324394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeChild(OpenKeyValObject obj) throws IOException { log.debug("Removing child "+obj); if(children==null){ loadChildren(); } children.remove(Integer.valueOf(obj.getId())); save(); obj.delete(); log.debug("Child removed"); } COM: <s> remove the child with the specified id </s>
funcom_train/3286048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doCancel(RunData rundata) { rundata.getUser().removeTemp("columns"); ((JetspeedRunData)rundata).setCustomized(null); ((JetspeedRunData)rundata).setMode(JetspeedRunData.NORMAL); if (((JetspeedRunData)rundata).getCustomized()==null) { rundata.setScreenTemplate("Home"); } } COM: <s> clean up the customization state </s>
funcom_train/7276851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reinitialize() { setState(UploadStatus.CONNECTING); host = null; port = -1; synchronized (bwLock) { totalAmountUploadedBefore = 0; if (!ignoreTotalAmountUploaded) { totalAmountUploaded += amountUploaded; } ignoreTotalAmountUploaded = false; amountUploaded = 0; } firstReply = false; } COM: <s> reinitializes this uploader for a new request </s>
funcom_train/17755107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PrintWriter openOutputFile(String fileName) throws IOException { if( outputDir != "." ) { File out_dir = new File(outputDir); if( ! out_dir.exists() ) { out_dir.mkdirs(); } } return new PrintWriter(new PreservingFileWriter(outputDir + System.getProperty("file.separator") + fileName)); } COM: <s> this method is used by all code generators to create new output </s>
funcom_train/40104183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String readFile(String filename) { StringBuffer buff = new StringBuffer(); try { BufferedReader eReader = new BufferedReader(new InputStreamReader( Paths.getInputStream(filename), "UTF-8")); int nextChar = eReader.read(); while (nextChar != -1) { buff.append((char) nextChar); nextChar = eReader.read(); } eReader.close(); } catch (IOException e) { fail(Paths.FILE_NOT_FOUND_MESSAGE); } return buff.substring(1); // skipping the windows UTF-8 char } COM: <s> reads a file from the disk </s>
funcom_train/30275009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertItem(String item, String value, int index) { if (!isAutoSorted) { super.insertItem(item, value, index); } else { ListItemData itemData = new ListItemData(item, value); entries.add(itemData); Collections.sort(entries); super.insertItem(item, value, entries.indexOf(itemData)); } } COM: <s> if is auto sorted true than </s>
funcom_train/22447885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean testRunsOccurr(){ for (int i=0; i<6; i++){ if ( ( oneRunsOccurr[i] < minOccurr[i] ) || ( oneRunsOccurr[i] > maxOccurr[i] ) || ( zeroRunsOccurr[i] < minOccurr[i] ) || ( zeroRunsOccurr[i] > maxOccurr[i] ) ) return false; } return true; } COM: <s> test runs occurrencies according to nist specifications </s>
funcom_train/3524602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateComponentWithBoundAttributes() throws Exception { setupTestPage("TestPage1.html"); Component component = factory.createComponentForElement("Person__NODE", container.getDocumentAdapter().getElementById("Person__NODE"), holders); measureAreaInfo_NODE(component, null, 0); } COM: <s> test method create component for element case img bound element with bound </s>
funcom_train/14501765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EJBLocalHome getLocalHome(String jndiHomeName) throws ServiceLocatorException { EJBLocalHome home = (EJBLocalHome)ejbHomes.get(jndiHomeName); if (home == null) { home = (EJBLocalHome)getObject(jndiHomeName); ejbHomes.put(jndiHomeName, home); } return home; } COM: <s> return the ejb local home </s>
funcom_train/22498192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setTagFromType() { final int index = listType.getSelectedIndex(); if (index > 5) { listTag = HTML.Tag.UL.toString(); } else if (index > 0) { listTag = HTML.Tag.OL.toString(); } else { listTag = null; } } COM: <s> translate list types as per css attribute list style type into list </s>
funcom_train/22606954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == null) { return false; } try { CacheEntry ce = (CacheEntry) obj; return (getCache().equals(ce.getCache()) && entryKey.equals(createEntryKey(ce.getVendor(), ce.getTitle()))); } catch (ClassCastException e) { return false; } } COM: <s> compares two cache entries </s>
funcom_train/18189385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clear() { if (game != null && turn != null) { // remove all explosions Enumeration enum = turn.getExplosions(); while (enum != null && enum.hasMoreElements()) { turn.removeExplosion((Explosion)enum.nextElement()); enum = turn.getExplosions(); } } } COM: <s> clears data from the turn that we are going to update </s>
funcom_train/45832248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCurrentCronSetting() { LOG.trace("Getting current cront setting."); try { SchedulerFactory schedulerFactory = new StdSchedulerFactory(); CronTrigger t = (CronTrigger) schedulerFactory.getScheduler().getTrigger(getTriggerName(), SPRING_QUARTZ_GROUP_NAME); return t.getCronExpression(); } catch (Exception e) { LOG.error("Unable to get current cron trigger", e); } LOG.fatal("NULL CRON EXPRESSION!"); return null; } COM: <s> helper method to grab the schedulers impression of what the cron </s>
funcom_train/10814015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object jsEval(String name, String script) { try { return getContext().evaluateString(scope, script, name, 1, null); } catch (EcmaError e) { throw new RuntimeException("can't evaluate "+name+": "+script,e); } } COM: <s> evaluate a javascript string </s>
funcom_train/36611950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkValidity() { if (flightDepartureLoc.equals("") || flightArrivalLoc.equals("") || flightDepartureDate.equals("") || flightArrivalDate.equals("") || flightDepartureTime.equals("") || flightArrivalTime.equals("") || flightNoSeat.equals("")) { return false; } return true; } COM: <s> checks to see if the data is valid </s>
funcom_train/50162118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getIndexedIdMapperErrors() { if (index.getLastModifiedCount() > indexedIdMapperErrorsLastUpdate) { indexedIdMapperErrorsLastUpdate = index.getLastModifiedCount(); indexedIdMapperErrors = index.getTerms("idmaperrors"); if (indexedIdMapperErrors.contains("noerrors") && indexedIdMapperErrors.size() > 1) indexedIdMapperErrors.add(0, indexedIdMapperErrors.remove(indexedIdMapperErrors.indexOf("noerrors"))); } return indexedIdMapperErrors; } COM: <s> gets a list of all id mapper errors that have been indexed </s>
funcom_train/19064440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTextAlignment(int align) { // check if alignment is supported boolean supported; switch (align) { case StyleConstants.ALIGN_LEFT: supported = true; break; case StyleConstants.ALIGN_CENTER: supported = true; break; case StyleConstants.ALIGN_RIGHT: supported = true; break; default: supported = false; break; } if (!supported) { LOG.severe("Alignment not set - alignment=" + align + " not supported"); return; } // define attribute set corresponding to the requested format MutableAttributeSet attr = new SimpleAttributeSet(); StyleConstants.setAlignment(attr, align); // set alignment setParagraphFormat(attr); } COM: <s> sets alignment of the current paragraph to left center or right </s>
funcom_train/46728082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showChildProperties() throws Exception { if (this.lastTreeAction != null && lastTreeAction.getSelectedNodes() != null && lastTreeAction.getSelectedNodes().size() > 0) { // open view form ReferenceAction action = new ReferenceAction(getFrame()); action.setReference(getFirstSelectedReference()); action.setActionReference(ActionReference.OPENREFERENCEBUILDER); forward(ISEvent.EXECUTEACTION, action); } } COM: <s> open reference build for reference item </s>
funcom_train/37745427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { createRequest(); connect(); sendRequest(); readResponse(); if ( getContent ) readContent(); disconnect(); } catch (Exception e) { content = response + " " + e.toString(); e.printStackTrace(); } finally { connectionCompleted = true; complete(); } } COM: <s> run method thread entry point </s>
funcom_train/20605032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshAllPublishedCarsCache() { this.allPublishedCarsCache = new HashMap(); this.allPublishedCarsCache.put(RequestAttributeConstant.CAR_COUNT, this.serviceLocator.getCarService().findAll( 0, 1, true).getCount()); this.allPublishedCarsCache.put(RequestAttributeConstant.MAKE_COUNT, this.serviceLocator.getCarService() .countMakes(true)); } COM: <s> get all published cars </s>
funcom_train/50382476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getInputFile() { IPathEditorInput file = null; if (getEditorInput() instanceof IPathEditorInput) { file = getEditorInput(); } else { file = (IPathEditorInput) getEditorInput().getAdapter( IPathEditorInput.class); } if(file == null) { return null; } IPath path = file.getPath(); if(path == null) { return null; } return path.toFile(); } COM: <s> returns the editors input file or null if the input file is somehow </s>
funcom_train/33391805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Throwable extractCause(Throwable throwable) { for (Iterator iter = this.extractorMap.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry) iter.next(); Class throwableType = (Class) entry.getKey(); if (throwableType.isInstance(throwable)) { ThrowableCauseExtractor extractor = (ThrowableCauseExtractor) entry.getValue(); return extractor.extractCause(throwable); } } return null; } COM: <s> extracts the cause of the given throwable using an appropriate extractor </s>
funcom_train/7440518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAdvanceDenyIndex() throws ServletException, IOException { assertEquals(AdvanceDenyController.RETURN + ".index", invoke("/inters2/advanceDeny")); assertNull(request.getAttribute(SimpleInterceptor.AFTER_COMPLETION)); assertNull(request.getAttribute(AdvanceInterceptor.AFTER_COMPLETION)); } COM: <s> inters2 advance deny intercepted none </s>
funcom_train/31517324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { // Go do our whois lookup using our utility class. whoisData = Globals.gUtility.Whois(ipAddress); // By using the Display.getDefault API we will always get the // correct Display object whose asyncExec call should be used to // properly update our UI from a thread. Display.getDefault().asyncExec(new Runnable() { public void run() { whoisText.setText(whoisData); } }); } COM: <s> must implement method of the thread class </s>
funcom_train/50313197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaximum (int value) { checkWidget(); if (value < 0) return; int selection = minimum + Fox.FXScrollbar_getPosition(handle); if (0 <= minimum && minimum < value) { Fox.FXScrollbar_setRange(handle, value - minimum); int thumb = Fox.FXScrollbar_getPage(handle); if (selection + thumb > value) Fox.FXScrollbar_setPosition(handle, value - minimum - thumb); } } COM: <s> sets the maximum </s>
funcom_train/1487392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initialBriefTaxonConcept(Object modelObject, BriefTaxonConceptDTO briefTaxonConceptDTO, boolean allowLazyLoading){ if(modelObject instanceof TaxonConceptLite){ initializeWithLite((TaxonConceptLite) modelObject, briefTaxonConceptDTO, allowLazyLoading); } else if(modelObject instanceof TaxonConcept){ initializeWithFull((TaxonConcept) modelObject, briefTaxonConceptDTO, allowLazyLoading); } } COM: <s> sets the values in a brief taxon concept dto </s>
funcom_train/50446395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setYear(int year) { int oldyear = calendar.get(Calendar.YEAR); calendar.add(Calendar.YEAR, year - oldyear); int newYear = calendar.get(Calendar.YEAR); if (year != newYear) year = newYear; firePropertyChange("year", oldyear, year); } COM: <s> sets the year property </s>
funcom_train/1388158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String next(int n) throws JSONException { if (n == 0) { return ""; } char[] buffer = new char[n]; int pos = 0; while (pos < n) { buffer[pos] = next(); if (end()) { throw syntaxError("Substring bounds error"); } pos += 1; } return new String(buffer); } COM: <s> get the next n characters </s>
funcom_train/4025818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean processLine(String line) throws IOException { String[] arguments = extractArgs(line); if (isExit(arguments) && confirmExit()) { return false; } try { processCommand(arguments); } catch (IllegalArgumentException iae) { handleIllegalArgumentException(iae); } catch (Throwable t) { handleGenericException(t); } return true; } COM: <s> processes a single command line input </s>
funcom_train/3687821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Runnable getTask() throws InterruptedException { long waitTime = getMaxIdleTime(); if (waitTime >= 0) { return (Runnable) (handOff.get(waitTime)); } else { return (Runnable) (handOff.get()); } // if } // getTask() COM: <s> get a task from the handoff queue </s>
funcom_train/46986327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SummaryStatisticType findSummaryStatisticTypeByName(List<SummaryStatisticType> typeList,String name) { SummaryStatisticType type = null; for (Iterator<SummaryStatisticType> it = typeList.iterator(); it.hasNext();) { SummaryStatisticType elem = it.next(); if (elem.getName().equals(name)) { type=elem; break; } } return type; } COM: <s> find type from prefetched list </s>
funcom_train/29632259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putFingerprintSig(byte[] iFpr) throws OpenPGPCardException{ if(iFpr.length != 20) throw new IllegalArgumentException("Fingerprint must be exactly 20 bytes long"); putGenericData(TLV_FPR_SIG[0],TLV_FPR_SIG[1],iFpr,20); } COM: <s> stores the signature key fingerprint 20 bytes on the card </s>
funcom_train/19398327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_DataOutputBuffer_getKey() { DataOutputBuffer DataOutputBuffer = new DataOutputBuffer(5, new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }); byte[] key = DataOutputBuffer.toByteArray(); assertEquals(5, key.length); assertEquals(new byte[] { 1, 2, 3, 4, 5 }, key); } COM: <s> test ability to extract and return a key </s>
funcom_train/13848068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ServiceItem findItem(ServiceID sid, ServiceItem[] items) { if(items != null) { for(int i=0; i<items.length; i++) { if(items[i].serviceID.equals(sid) ) return items[i]; }//end loop }//endif return null; }//end LookupCacheImpl.findItem COM: <s> returns the element in the given items array having the given </s>
funcom_train/10914146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printStackTrace(java.io.PrintStream stream) { synchronized (stream) { super.printStackTrace(stream); if (getException() != null) { stream.println(EXCEPTION_SEPARATOR); getException().printStackTrace(stream); } if (getRootException() != null) { stream.println(EXCEPTION_SEPARATOR); getRootException().printStackTrace(stream); } } } COM: <s> prints this fop exception and its backtrace to the specified print stream </s>
funcom_train/19780222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String list(String dirname, boolean full) throws IOException, FTPException { String[] list = dir(dirname, full); StringBuffer result = new StringBuffer(); String sep = System.getProperty("line.separator"); // loop thru results and make into one string for (int i = 0; i < list.length; i++) { result.append(list[i]); result.append(sep); } return result.toString(); } COM: <s> list a directorys contents as one string </s>
funcom_train/24181505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInputLinksPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Element_inputLinks_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Element_inputLinks_feature", "_UI_Element_type"), ParallelJPackage.Literals.ELEMENT__INPUT_LINKS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the input links feature </s>
funcom_train/3812668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL readNext() { if (lastFile != null) { logger.finest("Finished processing of '" + lastFile.getFile() + '\''); for (AudioFileProcessListener fl : fileListeners) fl.audioFileProcFinished(new File(lastFile.getFile())); lastFile = null; } if (fileIt.hasNext()) lastFile = fileIt.next(); return lastFile; } COM: <s> returns the name of next audio file </s>
funcom_train/26221408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startHost() { // Start host. final int port = Config.getConfig().getInt("ServerPort", 15907); host = new Host(port); host.start(); // The host will never be shut down by regular means. // Therefore, listen to SIGUP. OS.registerShutdownHook(new Runnable() { public void run() { stopHost(); } }); } COM: <s> starts the host </s>
funcom_train/38501095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStartListFileName(String startListFileName) { if (_status != Status.STOPPED) { throw new IllegalStateException(); } File f = new File(startListFileName); if (!f.exists()) { throw new IllegalArgumentException("File " + startListFileName + " does not exist."); } _startListFileName = startListFileName; } COM: <s> sets the name of the startlist file </s>
funcom_train/3985870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawImpl(PGraphics g) { //System.out.println("drawing " + family); if (family == GROUP) { drawGroup(g); } else if (family == PRIMITIVE) { drawPrimitive(g); } else if (family == GEOMETRY) { drawGeometry(g); } else if (family == PATH) { drawPath(g); } } COM: <s> draws the svg document </s>
funcom_train/6332810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toXML( Object obj ) throws SAXException { // ch.startDocument(); writeObjStartTag( obj.getClass().getName(), getID( obj ), oaf.additionallyAtts( obj ) ); objCache.put( getID( obj ), getID( obj ) ); getMember( obj, obj.getClass() ); writeObjEndTag(); // ch.endDocument(); } COM: <s> to xml obj gets an object and serialize this object into xml </s>
funcom_train/12599837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSigAlgName() { Provider[] provs = Security.getProviders(); // // search every provider looking for a real algorithm // for (int i = 0; i != provs.length; i++) { String algName = provs[i].getProperty("Alg.Alias.Signature." + this.getSigAlgOID()); if (algName != null) { return algName; } } return this.getSigAlgOID(); } COM: <s> return a more meaningful representation for the signature algorithm </s>
funcom_train/19128851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStarted( Test test) { synchronized( message ) { message.setText( "Test " + test.getClass().getName() + "." + ((TestCase)test).getName() + " execution started"); message.setIcon(IconManager.getIcon( IconManager.runningIcon)); } repaint(); } COM: <s> called when a test has been started </s>
funcom_train/49898155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void moveFiles() { this.copyBinary("/data/data/android.hermes/conf/tiwlan.ini", R.raw.tiwlan_ini); //test file for transfer this.copyBinary("/data/data/android.hermes/files/test.txt", R.raw.test_txt); this.copyBinary("/data/data/android.hermes/files/test2.txt", R.raw.test2_txt); } COM: <s> copies the essential files to their places and makes some executable </s>
funcom_train/43852587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addChildren(NodeList children) { if (children != null) { for (int i=0; i<children.getLength(); i++) { Shape child = Shape.makeShape(this, children.item(i)); if (child != null) { this.children.add(child); } } } } COM: <s> add shapes created from the element nodes in the given node list </s>
funcom_train/32612440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void log(Collection<Statement> statements, String label) { if (dumpStatements) { System.out.println("----- BEGIN " + label + "-----"); for (Statement s : statements) { System.out.println(turtle(s)); } System.out.println("----- END " + label + "-----"); } } COM: <s> logger used for debugging purposes </s>
funcom_train/44772517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyNodeAdded(ChildNodeEntry added) { synchronized (listeners) { MapIterator iter = listeners.mapIterator(); while (iter.hasNext()) { NodeStateListener l = (NodeStateListener) iter.next(); if (l != null) { l.nodeAdded(this, added.getName(), added.getIndex(), added.getUUID()); } } } } COM: <s> notify the listeners that a child node entry has been added </s>
funcom_train/46701503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveCSV(File file, List<UJO> ujoList, Object context) throws IOException, InstantiationException, IllegalAccessException { final OutputStream os = getOutputStream(file); try { saveCSV(os, UTF_8, ujoList, context); } finally { os.close(); } } COM: <s> save ujo into csv format by codepage utf 8 </s>
funcom_train/50188964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireStartSourceDocument() { if (hasTraceListeners()) { // count of registered tracelisteners int countListener = traceListeners.size(); for (int i = 0; i < countListener; i++) { TraceListener currentListener = (TraceListener) traceListeners.elementAt(i); // call the according method on tracelistener currentListener.startSourceDocument(); } } } COM: <s> fire a start processing event open </s>
funcom_train/9550067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getAboutMenuItem() { if (aboutMenuItem == null) { aboutMenuItem = new JMenuItem(); aboutMenuItem.setText("About"); aboutMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JOptionPane.showMessageDialog(null, "DCF Creator v. 1.0", "DCF Creator", JOptionPane.INFORMATION_MESSAGE); } }); } return aboutMenuItem; } COM: <s> this method initializes j menu item </s>
funcom_train/4233891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restoreAutoRangeBounds() { Plot p = this.chart.getPlot(); if (p instanceof Zoomable) { Zoomable z = (Zoomable) p; // we need to guard against this.zoomPoint being null Point2D zp = (this.zoomPoint != null ? this.zoomPoint : new Point()); z.zoomRangeAxes(0.0, this.info.getPlotInfo(), zp); } } COM: <s> restores the auto range calculation on the range axis </s>
funcom_train/51172422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startDTD (String name, String publicId, String systemId) throws SAXException { try { out.writeEvent(START_DTD); out.writeString(name); out.writeString(publicId); out.writeString(systemId); } catch (Exception e) { throw new SAXException(e); } } COM: <s> report the start of dtd declarations if any </s>
funcom_train/37666307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetExecuteExternalProcessPosition() { _executeExternalDialog.setFrameState("default"); if (DrJava.getConfig().getSetting(DIALOG_EXTERNALPROCESS_STORE_POSITION).booleanValue()) { DrJava.getConfig().setSetting(DIALOG_EXTERNALPROCESS_STATE, "default"); } } COM: <s> reset the position of the execute external process dialog </s>
funcom_train/24038927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeConnection() { try { stmt.close(); } catch (SQLException e) { e.printStackTrace(); } finally { if (con != null) try { con.close(); } catch (SQLException e) { if (writelogfile) writeln("Can't close db connection"); e.printStackTrace(); } if (writelogfile) writeln("Connection closed"); } //if applicable, close log file if (writelogfile) try { if (output != null) output.close(); } catch (IOException e) { e.printStackTrace(); } } COM: <s> closes the db connection and if opened the log file </s>
funcom_train/8285676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveCourseToDeleted(CourseContainer cc) { moveClassToDeletedByCourse(cc.getCourseAssignedID()); delCourseTable.save(cc.getValidationItems(), new Item[] {cc.getCourseAssignedID()}, DBSQLAccessor.AND); courseTable.delete(new Item[] {cc.getCourseAssignedID()}, DBSQLAccessor.AND); } COM: <s> moves a course and any associated classes to the deleted table </s>
funcom_train/18935099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanel getPanel() { JPanel panel = new JPanel(); panel.setLayout( new GridLayout( 1, 1 ) ); TableColumn numberColumn = table.getColumnModel().getColumn( 0 ); numberColumn.setMaxWidth( 30 ); numberColumn.setMinWidth( 30 ); numberColumn.setPreferredWidth( 30 ); JScrollPane scroll = new JScrollPane( table ); panel.add( scroll ); return panel; } COM: <s> return jpanel with jscroll pane </s>
funcom_train/13390053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable { logger.fine(new StringBuilder(). append("JeriProxyAfterReturningAdvice called after invocation of method '").append(method.getName()). append("' of class [").append(target.getClass().getName()).append("]").toString()); } COM: <s> callback after a given method successfully returned </s>
funcom_train/33770366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createFAQPanel(Map faq){ Label title = new Label(I18n.getConstant().faq()); Borders.shadowBorder(title, 5, 4); title.addStyleName("main_pagetitle"); main.add(title); main.add(new HTML("<div style='height:5px;'>&nbsp;</div>")); main.add(new HTML(faq.get("bienvenue").toString())); main.add(new HTML("<div style='height:5px;'>&nbsp;</div>")); createStackPanel(faq); main.setWidth("100%"); main.add(stackPanel); } COM: <s> create the faq panel </s>
funcom_train/12175712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getTextFallbackFromLink(LinkAssetReference object) { String text = null; // if object must be a LinkComponentName if (object != null) { TextAssetReference textReference = object.getTextFallback(); if (textReference != null) { text = textReference.getText(TextEncoding.PLAIN); } } return text; } COM: <s> if the object paramemter is an intsance of link component name then </s>
funcom_train/36959957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean select(Viewer viewer, Object parent, Object element) { if (element instanceof IRubyElement) return true; if (element instanceof IResource) { IProject project= ((IResource)element).getProject(); return project == null || !project.isOpen(); } // Exclude all IStorage elements which are neither Ruby elements nor resources if (element instanceof IStorage) return false; return true; } COM: <s> returns the result of this filter when applied to the </s>
funcom_train/34799399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMessage(MessageInfo message) { if (messagesByName == null) { messagesByName = new TreeMap<String, MessageInfo>(); messagesById = new TreeMap<Integer, MessageInfo>(); } messagesById.put(message.getId(), message); messagesByName.put(message.getName(), message); } COM: <s> adds a message </s>
funcom_train/41425561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onByeEvent(RequestEvent event, ActivityContextInterface aci) { log.info("########## VOICE MAIL SBB: BYE ##########"); try { releaseState(); // Sending the OK Response to the BYE Request received. byeRequestOkResponse(event); } catch (FactoryException e) { log.severe(e.getMessage(), e); } catch (NullPointerException e) { log.severe(e.getMessage(), e); } } COM: <s> at any time a sip client can send a bye request </s>
funcom_train/5395322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCompareTo() { System.out.println("compareTo"); Stats o = null; Stats instance = new Stats(); int expResult = 0; int result = instance.compareTo(o); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of compare to method of class org </s>
funcom_train/48022796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Collection getCombinedRecords() { Collection callbackRecords = getCallbackRecords(); Collection combinedRecords = new ArrayList(callbackRecords.size()); for (Iterator iRecord = callbackRecords.iterator(); iRecord.hasNext();){ final Object record = iRecord.next(); combinedRecords.add(CallbackRecordsFactory.asCombinedArray(record)); } return combinedRecords; } COM: <s> acts as a private wrapper around </s>
funcom_train/8638873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGenerateAppearances(boolean generateAppearances) { this.generateAppearances = generateAppearances; PdfDictionary top = (PdfDictionary)PdfReader.getPdfObject(reader.getCatalog().get(PdfName.ACROFORM)); if (generateAppearances) top.remove(PdfName.NEEDAPPEARANCES); else top.put(PdfName.NEEDAPPEARANCES, PdfBoolean.PDFTRUE); } COM: <s> sets the option to generate appearances </s>
funcom_train/1927582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Chain genCopyCast(LocalGeneratorEx localgen, Local from, Local to) { Type fromType = from.getType(); Type toType = to.getType(); Chain c = new HashChain(); Stmt copyStmt; if (needCast(fromType, toType)) copyStmt = Jimple.v().newAssignStmt( to, Jimple.v().newCastExpr(from, toType)); else copyStmt = Jimple.v().newAssignStmt( to, from); c.add(copyStmt); return c; } COM: <s> copy one local to another inserting a cast if necessary </s>
funcom_train/3340920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setForeground(Color color_) { super.setForeground(color_); _contentPane.setForeground(color_); // Make the menubar (if it exists) inherit the JFrame's color // unless the menubar's color has already been set. if (_menubar != null && _menubar.getForeground() == null) _menubar.setForeground(color_); } COM: <s> sets the foreground color of this jframe and its content pane </s>
funcom_train/4375420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getResponseBodyAsString() throws IOException { byte[] rawdata = null; if (responseAvailable()) { rawdata = getResponseBody(); } if (rawdata != null) { return EncodingUtil.getString(rawdata, getResponseCharSet()); } else { return null; } } COM: <s> returns the response body of the http method if any as a </s>
funcom_train/38379765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParseValidCommandWithoutPrefix() { IrcCommand command = CommandParser.parseIrcCommand( VALID_IRC_COMMAND_WITHOUT_PREFIX); assertNotNull(command); assertNull(command.getPrefix()); assertEquals("PRIVMSG", command.getName()); assertNotNull(command.getParams()); assertEquals(1, command.getParams().size()); assertEquals("some_nick", command.getParam(0)); assertEquals("This is a test message.", command.getTrailing()); } COM: <s> tests the parsing of a valid irc command w o a prefix </s>
funcom_train/28930495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void configureGraph(JGraphEditor editor, JGraph graph) { ToolTipManager.sharedInstance().registerComponent(graph); graph.setTransferHandler(new JGraphpadTransferHandler(createVertex())); graph.setMarqueeHandler(new JGraphpadMarqueeHandler(editor)); graph.setInvokesStopCellEditing(true); graph.setJumpToDefaultPort(true); graph.setMoveOutOfGroups(true); graph.setMoveIntoGroups(true); graph.setDragEnabled(true); graph.setCloneable(true); graph.setOpaque(false); } COM: <s> hook for subclassers to configure a new graph </s>
funcom_train/26024923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reconstructRegion(ElementTreeNode node) { String value = node.getAttribute(ElementTreeNode.ATTRIBUTE_MEMBERS); String[] ids = value.split(","); int length = ids.length; ElementGraphCell[] members = new ElementGraphCell[length]; for (int i = 0; i < length; i++) { members[i] = mIdToCellMap.get(ids[i]); } mCurrentDiagram.getRegionManager().createRegion(mCurrentCell, members); } COM: <s> reconstructs a region given its root node </s>
funcom_train/12117123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoC38(java.util.EventObject arg1) { try { // user code begin {1} // user code end this.vediSVive_OkJButtonAction_actionPerformed(arg1); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } COM: <s> conn eto c38 vedi svive </s>
funcom_train/41812542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public KElement getElementClass(String name) { KElement el = null; for (Enumeration e = this.kelements.elements(); e.hasMoreElements();) { el = (KElement) e.nextElement(); if (el.getRchClass().equals(name)) { return el; } } return null; } COM: <s> returns a element with the given class </s>
funcom_train/13514511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLastCkp(Lsn lastCkp) { this.lastCkp.setFileId(lastCkp.getFileId()); this.lastCkp.setOffset(lastCkp.getOffset()); try { DBState.getInstance().setLatestCheckPoint(lastCkp); } catch (Exception e) { logger.error(e); } } COM: <s> sets the lsn of the last checkpoint </s>
funcom_train/40058757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize() { theCriteria = new WakeupCriterion[2]; WakeupOnCollisionEntry startsCollision = new WakeupOnCollisionEntry( collidingBg); WakeupOnCollisionExit endsCollision = new WakeupOnCollisionExit( collidingBg); // WakeupOnCollisionMovement moveCollision = new WakeupOnCollisionMovement( // collidingShape); theCriteria[0] = startsCollision; theCriteria[1] = endsCollision; // theCriteria[2] = moveCollision; oredCriteria = new WakeupOr(theCriteria); wakeupOn(oredCriteria); } COM: <s> this sets up the criteria for triggering the behaviour </s>
funcom_train/15600821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JoinConversation (Hashtable<String,Object> pattern){ friendID = new String((byte[])pattern.get("friendID")); convID = ((Long)pattern.get("convID")).intValue(); friendIDs = new ArrayList<Object>((List<Object>)pattern.get("friendIDs")); flag = ((Long)pattern.get("flag")).intValue(); } COM: <s> b purpose b constructor br </s>
funcom_train/12781816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void xor(FixedSizeBitVector set) { if (set == null) { throw new IllegalArgumentException("set is null"); } int setLength = set.bits.length; for (int i = setLength; i-- > 0;) { bits[i] ^= set.bits[i]; } } COM: <s> logically xors this bit set with the specified set of bits </s>
funcom_train/12562170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadIcon(MIDletSuiteStorage mss) { if (iconName != null) { icon = getIcon(suiteId, iconName, mss); } if (icon == null) { if (numberOfMidlets == 1) { icon = getDefaultSingleSuiteIcon(); } else { icon = getDefaultMultiSuiteIcon(); } } } COM: <s> loads an icon for this suite </s>
funcom_train/11317177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPubsubOwnerHandlers(ComponentStanzaProcessor dictionary) { ArrayList<StanzaHandler> pubsubOwnerHandlers = new ArrayList<StanzaHandler>(); pubsubOwnerHandlers.add(new PubSubOwnerConfigureNodeHandler(serviceConfiguration)); pubsubOwnerHandlers.add(new PubSubOwnerDeleteNodeHandler(serviceConfiguration)); dictionary .addDictionary(new NamespaceHandlerDictionary(NamespaceURIs.XEP0060_PUBSUB_OWNER, pubsubOwnerHandlers)); } COM: <s> inserts the handlers for the pubsub owner namespace into the handler dictionary </s>
funcom_train/51784498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValueStr(){ moveControlToValue(); String res = ""; VxConnect conn = VxConnect.getDefaultVxConn(); switch (getType()){ case 5: res = conn.getFormatInt(getVInt()); break; case 20: res = conn.getFormatStr(getVStr()); break; }; return res; } COM: <s> return sql value format depending field type and sgdb connection </s>
funcom_train/23235429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawNPC(final Graphics g, final Entity entity) { if (entity instanceof Sheep) { drawNPC(g, entity, Color.ORANGE); } else if (entity instanceof Creature) { drawNPC(g, entity, Color.YELLOW); } else if (entity instanceof NPC) { drawNPC(g, entity, Color.BLUE); } else { drawNPC(g, entity, new Color(200, 255, 200)); } } COM: <s> draws npc as rectangle to minimap selecting color by class of entity </s>