__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/47212912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean syncState(String app) { SpottingSoap_Stub service = new SpottingSoap_Stub(); try { BlackSpot bsTemp = service.getBlackSpot(getGuid(), app); setState(bsTemp.getStatus().getValue()); } catch (RemoteException ex) { ex.printStackTrace(); return false; } return true; } COM: <s> synchronises the state with the server </s>
funcom_train/22711178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNumberOfPercentageFractionDigits(int fractionDigits) { if(fractionDigits < 0) { throw new IllegalArgumentException("Fraction digits must be positive (or 0)."); //$NON-NLS-1$ } this.precision = (int)Math.pow(10, fractionDigits+2); } COM: <s> sets the number of percentage fractions </s>
funcom_train/23271631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setXAxisPositiveArrowVisible(boolean visible) { XYPlot plot = (XYPlot) this.chart.getPlot(); if (plot != null) { ValueAxis axis = plot.getDomainAxis(); boolean old = axis.isPositiveArrowVisible(); axis.setPositiveArrowVisible(visible); firePropertyChange("xAxisPositiveArrowVisible", old, visible); } } COM: <s> sets the flag that controls whether or not an arrow head is displayed </s>
funcom_train/39289600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCreateCommand(CreateRequest request) { CreateContaintedElementCmd cmd = null; try { if ( request.getNewObject() instanceof BasicNodeElement ) { return null; } if ( getHost().getModel() instanceof BasicGroupElement ) { cmd = new CreateContaintedElementCmd( (BasicGroupElement)getHost().getModel(), (ServiceFunctionality)request.getNewObject() ); } else { return null; } } catch (Exception e) { e.printStackTrace(); } return cmd; } COM: <s> it allows the creation addition of a basic node element in the </s>
funcom_train/38553137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructor() throws RemoteException { try { RemoteUpdaterImpl rui = new RemoteUpdaterImpl(null); fail("Cube42NullParameterException should be thrown"); } catch(Cube42NullParameterException e) { assertEquals(e.getParameters().toArray()[0], "updateClass"); } } COM: <s> test the constructor of the remote updater impl </s>
funcom_train/23239723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getSymbolByAddr(int addr) { Symbol sym; String s; int l = symboltable.size(); for (int i = 0; i < l; i++) { sym = symboltable.elementAt(i); if (sym.match(addr)) return sym.getSymbolName(); } return get3Hex(addr); } COM: <s> returns the first if any symbol for an address </s>
funcom_train/12071455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SpinalNode getFoot() { Iterator iter = this.getSpine().getAllNodes().iterator(); SpinalNode current; while (iter.hasNext()) { current = (SpinalNode) iter.next(); if (current.isFoot()) { this.foot = current; return current; } } this.foot = null; return null; } COM: <s> returns the node representing the foot node if any of this tree </s>
funcom_train/20170274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean beginBuilding(UnitType uType) { if (this.building == null) { MainScreen.writeToConsole("Base: Unit " + uType.toString() + " began building.", Color.GREEN); this.building = uType; this.mpLeft = uType.manpower(); return true; } else { MainScreen.writeToConsole("Base: Base is already building a " + building, Color.GREEN); return false; } } COM: <s> request this base begin building the unit type passed </s>
funcom_train/22121833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent evt) { // clears any previously selected files setSelectedFile(null); // gets, displays, and records the selected file // from the chooser JFileChooser chooser = getChooser(); chooser.setCurrentDirectory(getCurrentDir()); chooser.setSelectedFile(getDefaultFile()); int result = chooser.showOpenDialog(getOwner()); if (result == JFileChooser.APPROVE_OPTION) { setSelectedFile(chooser.getSelectedFile()); } } COM: <s> displays a file open chooser when the action is invoked </s>
funcom_train/32769827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getComboBoxViews() { if (comboBoxViews == null) { comboBoxViews = new JComboBox(); comboBoxViews.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { System.out.println("itemStateChanged()"); // TODO Auto-generated Event stub itemStateChanged() } }); } return comboBoxViews; } COM: <s> this method initializes combo box views </s>
funcom_train/1327618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected UserContainer getUserContainer(HttpServletRequest request) { UserContainer userContainer = (UserContainer) getSessionObject(request, IConstants.USER_CONTAINER); // Create a UserContainer for the user if it doesn't exist already if (userContainer == null) { userContainer = new UserContainer(); HttpSession session = request.getSession(true); session.setAttribute(IConstants.USER_CONTAINER, userContainer); } return userContainer; } COM: <s> retrieve the user container for the user tier to the request </s>
funcom_train/45018489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDistancePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NXsource_distance_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NXsource_distance_feature", "_UI_NXsource_type"), NexusPackageImpl.Literals.NXSOURCE__DISTANCE, true, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the distance feature </s>
funcom_train/49124156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateWidgetTitle(String type, String title) throws Exception { try { WidgetConf conf = widgetConfDAO.get( type ); Element confEl = conf.getElement(); confEl.setAttribute("title", title); conf.setElement( confEl ); widgetConfDAO.update( conf ); } catch (Exception e) { log.error("update of widet configuration \"" + type + "\" failed.", e); throw e; } } COM: <s> update title of specified widget conf </s>
funcom_train/32322107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rowSelectionListener(RowSelectorEvent event) { // clear our list, so that we can build a new one selectedRows.clear(); // build the new selected list TableRow row; for(int i = 0; i < rows.size(); i++){ row = (TableRow)rows.get(i); if (row.isSelected()) { selectedRows.add(row); } } } COM: <s> selection listener bound to the ice row selector component </s>
funcom_train/50913092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeHTML(Writer w) throws IOException { w.write("\n<tr>"); CMLElements<CMLTableHeaderCell> tableHeaderCells = this.getTableHeaderCellElements(); for (CMLTableHeaderCell tableHeaderCell : tableHeaderCells) { tableHeaderCell.writeHTML(w); } w.write("</tr>"); } COM: <s> write header to html table </s>
funcom_train/24157526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { if (selection != null && selection.isEmpty() == false && selection instanceof IStructuredSelection) { IStructuredSelection ssel = (IStructuredSelection) selection; if (ssel.size() > 1) return; Object obj = ssel.getFirstElement(); if (obj instanceof IResource) { IContainer container; if (obj instanceof IContainer) container = (IContainer) obj; else container = ((IResource) obj).getParent(); } } } COM: <s> tests if the current workbench selection is a suitable container to use </s>
funcom_train/10498143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unregister(String path,ZKMBeanInfo bean) throws JMException { if(path==null) return; if (!bean.isHidden()) { try { mBeanServer.unregisterMBean(makeObjectName(path, bean)); } catch (JMException e) { LOG.warn("Failed to unregister MBean " + bean.getName()); throw e; } } } COM: <s> unregister the mbean identified by the path </s>
funcom_train/3345325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(String file) throws IOException { final FSDirectory parentDirectory = getParentDirectoryEntry(file); if (parentDirectory == null) { throw new IOException("Parent of " + file + " not found"); } parentDirectory.remove(getName(file)); entryCache.removeEntries(file); } COM: <s> delete the given file </s>
funcom_train/9431880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertNameLookupForNickname(long rawContactId, long dataId, String nickname) { if (TextUtils.isEmpty(nickname)) { return; } insertNameLookup(rawContactId, dataId, NameLookupType.NICKNAME, NameNormalizer.normalize(nickname)); } COM: <s> normalizes the nickname and inserts it in the name lookup table </s>
funcom_train/12913018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public double max(double[] value) { double max = 0.0; if (value.length > 0) max = value[0]; for (int i = 0; i < value.length; ++i) { if (value[i] > max) max = value[i]; } return max; } COM: <s> find the maximum of an array of numbers </s>
funcom_train/22361978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection units() { // note that there is a consistency problem here. If units is // null now we create an empty collection, but if units are // added later we have to create a new collection object // see addUnit() if(units == null) { return CollectionFactory.EMPTY_COLLECTION; } if(unitCollection == null) { unitCollection = CollectionFactory.unmodifiableCollection(units); } return unitCollection; } COM: <s> returns an unmodifiable collection of all the units in this container </s>
funcom_train/22166487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { setSize(WINDOW_SIZE); Toolkit toolkit = Toolkit.getDefaultToolkit(); Dimension screenSize = toolkit.getScreenSize(); Dimension size = getSize(); int x = (screenSize.width - size.width) / 2; int y = (screenSize.height - size.height) / 2; setLocation(x, y); setVisible(true); } COM: <s> description of the method </s>
funcom_train/27843753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object put(Object key, Object value) { checkNullContents(); Object oldValue = _contents.put(key, value); if (!ObjectUtils.equals(oldValue, value)) { registerElement(value, key); _mcsSupport.valueChanged(PointerFactory.getMappedPointer(key)); } return oldValue; } COM: <s> associates the specified value with the specified key in this map </s>
funcom_train/4257000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Parameter readFirstParameter(String name) throws IOException { Parameter param = readNextParameter(); Parameter result = null; while ((param != null) && (result == null)) { if (param.getName().equals(name)) { result = param; } param = readNextParameter(); } this.stream.close(); return result; } COM: <s> reads the first parameter with the given name </s>
funcom_train/4690227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeColor(int index, int newColor ){ //dagColors[index] = newColor; ((DAGNode) dagNodes.get(index)).status = newColor;//inserida vindn 9/05 //win.changeColorNode(((DAGNode)(this.dagNodes.get(index))).nodeName, colorToString(newColor)); } COM: <s> change node color status </s>
funcom_train/18895128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClone() { try { ModelResource res1 = new ModelResource(new URI("rmi://foo/server1#_")); ModelResource res2 = (ModelResource) res1.clone(); assertNotSame("Resources should be different instances", res1, res2); assertTrue("Resources should be equal", res1.equals(res2)); } catch (Exception e) { e.printStackTrace(); } } COM: <s> test clone of two resources </s>
funcom_train/4882847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getMotivoFalta () { if (motivoFalta == null) {//GEN-END:|289-getter|0|289-preInit // write pre-init user code here motivoFalta = new TextField ("Motivo:", "caguei...", 200, TextField.ANY);//GEN-LINE:|289-getter|1|289-postInit // write post-init user code here }//GEN-BEGIN:|289-getter|2| return motivoFalta; } COM: <s> returns an initiliazed instance of motivo falta component </s>
funcom_train/39528589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List removeChildren(int a, int b) { List l = new ArrayList(b - a); l.addAll(children.subList(a, b)); for (int i = b - 1; i >= a; i--) { EmbeddedModelElement child = (EmbeddedModelElement) children.get(i); children.remove(i); child.detachFromContainer(); } fixSlibings(a); notifyModelElementObservers(new Deletion(this, a, b)); return l; } COM: <s> suppress all elements between indexes a and b </s>
funcom_train/47303307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearNonPlayPenSelections() { if (getSelectionPaths() == null) return; for (TreePath tp : getSelectionPaths()) { SPObject obj = (SPObject) tp.getLastPathComponent(); if (!(obj instanceof SQLTable || obj instanceof SQLRelationship || obj instanceof SQLColumn || obj instanceof SQLRelationship.SQLImportedKey)) { removeSelectionPath(tp); } } } COM: <s> removes all selections of objects that are not represented on the playpen </s>
funcom_train/39024178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetClassCriterion() { System.out.println("setClassCriterion"); Class className = null; BasicSearchCriteria instance = new BasicSearchCriteria(); BasicSearchCriteria expResult = instance; BasicSearchCriteria result = instance.setClassCriterion(className); assertEquals(expResult, result); } COM: <s> test of set class criterion method of class basic search criteria </s>
funcom_train/40017092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUserEnrollment(UserEnrollment userEnrollment) { this.userEnrollment = userEnrollment; // // We set the foreign key property so it can be used by Hibernate search by Example facility. if (userEnrollment != null) { setUserEnrollmentId(userEnrollment.getId()); } // when null, we do not propagate it to the pk. } COM: <s> set the users without adding this authorities instance on the passed users </s>
funcom_train/7375082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isBatchEmpty() throws FrontendException { if (currDAG == null) { int errCode = 1083; String msg = "setBatchOn() must be called first."; throw new FrontendException(msg, errCode, PigException.INPUT); } return currDAG.isBatchEmpty(); } COM: <s> returns whether there is anything to process in the current batch </s>
funcom_train/50279129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getBooleanValue(String sectionName, String keyName) throws SectionNotFoundException, KeyNotFoundException, ValueNotFoundException { String value = getStringValue(sectionName, keyName); if(value.equalsIgnoreCase("TRUE")) { return(true); } else if(value.equalsIgnoreCase("FALSE")) { return(false); } else { throw new IllegalArgumentException(keyName); } } COM: <s> returns the boolean value of the key value pair </s>
funcom_train/20028962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand() { if (backCommand == null) {//GEN-END:|23-getter|0|23-preInit // write pre-init user code here backCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|23-getter|1|23-postInit // write post-init user code here }//GEN-BEGIN:|23-getter|2| return backCommand; } COM: <s> returns an initiliazed instance of back command component </s>
funcom_train/33753478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if ( (o instanceof Tuple) && (((Tuple)o).length == length) && (((Tuple)o).hashCode == hashCode) ) { return Arrays.equals( ((Tuple)o).getValues(), getValues() ); } return false; } COM: <s> a tuple is equal to another tuple if it has the same length </s>
funcom_train/48183743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { if (_varMap != null) { return _hashCode; } _varMap = new TObjectIntHashMap(); _hashCodeNoLF = hashCodeNoLF(_varMap); _hashCode = _hashCodeNoLF; if (_lf != null) { _hashCode += _lf.hashCode(_varMap); } return _hashCode; } COM: <s> returns a hash code for this category </s>
funcom_train/17398034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void require(Token token) { if (recovering) { Token t = lexer.currentToken(); while (t != Token.END_TOKEN && !token.matches(t)) t = lexer.nextToken(); lexer.nextToken(); recovering = false; } else if (!lexer.stepToken(token)) error("Required token " + token + " not found"); } COM: <s> verify that the current token matches a specified token </s>
funcom_train/13601393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ExpressionSession getExpressionSession() { JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext(); if (jbpmContext==null) { throw new RuntimeException("no active JbpmContext for resolving assignment expression'"+expression+"'"); } return new IdentitySession(jbpmContext.getSession()); } COM: <s> serves as a hook for customizing the way the identity session is retrieved </s>
funcom_train/38878691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateUserEvents(int[] collectEvents) { Intent i = new Intent(context.getString(R.string.intentUserEvents)); i.putExtra("calls", collectEvents[0]); i.putExtra("sms", collectEvents[1]); i.putExtra("email", collectEvents[2]); context.sendOrderedBroadcast(i, null); } COM: <s> sends broadcast with user events counters so that </s>
funcom_train/35541493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWrongInputArgument() { try { Cob2XsdMain main = new Cob2XsdMain(); Options options = main.createOptions(); main.collectOptions(options, new String[] { "-i nope" }); fail(); } catch (Exception e) { assertEquals( "java.lang.IllegalArgumentException: Input file or folder nope not found", e.toString()); } } COM: <s> test with bad input file </s>
funcom_train/13287202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { try { Topic topic = (Topic) obj; return new EqualsBuilder() .append(this.getName(), topic.getName()) .append(this.getBlog(), topic.getBlog()) .isEquals(); } catch (ClassCastException e) { // The given object is not a topic, therefore they are not equal. return false; } } COM: <s> compares this topic with the given object for equality </s>
funcom_train/12655658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInfluence(Variable from, Variable to, int influence) { if (from == to) return; // Make sure we got the necessary map structure and set the value if (!influences.containsKey(from)) { influences.put(from, new HashMap<Variable, Integer>()); } HashMap<Variable, Integer> mapTo = influences.get(from); mapTo.put(to, influence); } COM: <s> sets the influence from one variable to another </s>
funcom_train/16937337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send(Object o) { ObjectOutputStream oos = null; ByteArrayOutputStream bos = null; try { bos = new ByteArrayOutputStream(); oos = new ObjectOutputStream(new BufferedOutputStream(bos)); oos.writeObject(o); oos.flush(); byte[] obs = bos.toByteArray(); send(obs); } catch (IOException e) { log(sm.getString("multicastSender.sendException", e.toString())); } } COM: <s> send an object using a multicast socket </s>
funcom_train/22278647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int minItemHeight() { int i, minHeight, height, count; minHeight = 0; count = menu.itemCount(); for (i = 0; i < count; i++) { height = menu.itemAt(i).minHeight(); if (height > minHeight) { minHeight = height; } } return minHeight; } COM: <s> returns the largest b min height b of all of the menu views </s>
funcom_train/24627758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean eventNode(AWTEvent e, Point rel) { super.eventNode(e, rel); // let people get to close button //if (java.awt.event.MouseEvent.MOUSE_CLICKED == e.getID()) remove(); // take any click? double click? ////System.out.println("eventNode "+e+" "+rel); return true; // short-circuit: events to own tree only } COM: <s> block events to rest of tree </s>
funcom_train/29706084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propertyChange(PropertyChangeEvent event) { // Only for autoplay properties String key = event.getProperty(); if(key.startsWith(AUTOPLAY_PREFIX)) { // Delay if(AUTOPLAY_DELAY.equals(key)) { // Update delay _countDown = ((Integer)event.getNewValue()).intValue(); } // Otherwise, check for activity else { checkForActivity(); } } } COM: <s> react to property events </s>
funcom_train/8980133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextFieldUserName() { if (jTextFieldUserName == null) { jTextFieldUserName = new JTextField(); jTextFieldUserName.setBounds(new Rectangle(178, 35, 138, 29)); jTextFieldUserName.setFont(new Font("Tahoma", Font.PLAIN, 12)); } return jTextFieldUserName; } COM: <s> this method initializes j text field user name </s>
funcom_train/23712294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream getResource(String resourceName) throws IOException { /* InputStream is = null; String baseName; if (resourceName.isEmpty()) { return null; } if (resourceName.startsWith("/")) { baseName = resourceName.substring(1); } else { baseName = resourceName; resourceName = "/" + resourceName; } */ return null; } COM: <s> todo not yet implemented </s>
funcom_train/45692425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMemFreeInBytesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EsxFile_memFreeInBytes_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EsxFile_memFreeInBytes_feature", "_UI_EsxFile_type"), EsxPackage.Literals.ESX_FILE__MEM_FREE_IN_BYTES, false, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the mem free in bytes feature </s>
funcom_train/35228639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getExpenses(int forMonth) { Map paramMap = new HashMap(1); paramMap.put("month", forMonth); return HibernateUtil.getData("from org.ranjith.jspent.data.Expense where month(date)=:month ORDER BY id asc", paramMap); } COM: <s> get list of expenses as code expense code objects </s>
funcom_train/27863478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void orderRestackWindow(int window, int nextWindow,int transientFor, int unmanagedFor, int grabWindow,int duplicateFor, int facadeReal, int flags) { send(new RestackMsg(window, nextWindow, transientFor, unmanagedFor, grabWindow, duplicateFor, facadeReal, flags)); } COM: <s> sends a restack window message to the zvtm client </s>
funcom_train/45017683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void render() { if (canvas == null) return; if (rendering) return; rendering = true; Display.getCurrent().asyncExec(new Runnable() { public void run() { // [4/5/06 tla]: // do not render if display is diposed (program exit) if (Display.getCurrent().isDisposed()) { return; } activateContext(); drawScene(); canvas.swapBuffers(); rendering = false; } }); } COM: <s> renders the next scene </s>
funcom_train/38953134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Type binaryNumericPromotion(Type t, Type s) { if (!t.tag.isDescendantOf(NUMBER) || !s.tag.isDescendantOf(NUMBER)) { return error; } return t.tag == DOUBLE ? t : s.tag == DOUBLE ? s : t.tag == FLOAT ? t : s.tag == FLOAT ? s : t.tag == LONG ? t : s.tag == LONG ? s : integer; } COM: <s> if either operand is not a numeric type an error type is returned </s>
funcom_train/51616110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTransformation() throws TransformerException, InitialisationException { StringWriter writer = new StringWriter(); XMLWritable writable = new TestData(); writable = new XMLTransformation(writable, getStylesheet1()); writable.write(new StreamResult(writer)); assertEquals("<doc><b>hello</b></doc>", writer.toString()); } COM: <s> tests transformation of test data object through stylesheet1 </s>
funcom_train/46156072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setAnnotationDisplayMode(AnnotationEntity ent, DisplayMode mode){ ent.setDisplayMode(mode); // hide the corresponding hud component if necessary if(mode == DisplayMode.HIDDEN){ HUDComponent hc = hudComponents.get(ent.getAnnoID()); hc.setVisible(false); hc.setWorldVisible(false); } } COM: <s> helper function some routines can call this directly </s>
funcom_train/18525175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getSuffix(java.io.File f) { String s = f.getPath(); String suffix = null; int i = s.lastIndexOf('.'); if (i > 0 && i < s.length() - 1) { suffix = s.substring(i + 1).toLowerCase(); } return suffix; } COM: <s> get the file suffix </s>
funcom_train/45539694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String computeDescription(IWorkbenchPart part, ISelection selection, IJSCElement inputElement, IProgressMonitor localASTMonitor) { long flags; if (inputElement instanceof ILocalVariable) flags= LOCAL_VARIABLE_TITLE_FLAGS; // else if (inputElement instanceof ITypeParameter) // flags= TYPE_PARAMETER_TITLE_FLAGS; else flags= TITLE_FLAGS; return JSCElementLabels.getElementLabel(inputElement, flags); } COM: <s> computes the contents description that will be displayed for the current element </s>
funcom_train/17850160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanel createSettingsPanel() { mPanel = new CapturePluginPanel(mOwner, mCloneData); mPanel.setBorder(Borders.createEmptyBorder(Sizes.DLUY5,Sizes.DLUX5,Sizes.DLUY5,Sizes.DLUX5)); mPanel.setSelectedTab(mCurrentPanel); return mPanel; } COM: <s> returns the plugin panel </s>
funcom_train/13666244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearNonPersistentRoles() { List<UserSpaceRole> toRemove = new ArrayList<UserSpaceRole>(); for(UserSpaceRole usr : userSpaceRoles) { if(usr.isGuest()) { toRemove.add(usr); } } userSpaceRoles.removeAll(toRemove); } COM: <s> used because there is a rare chance that after a principal refresh </s>
funcom_train/49250539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected long getFileSize() { if (link.getSize() > 0) { return link.getSize(); } else if (connection == null) { return 0; } else { Logger.getRootLogger().debug("reading file size from connection"); int contentLength = connection.getContentLength(); if (contentLength < 1) { Logger.getRootLogger().warn("file doesn't exist " + url.toString()); contentLength = 0; } return contentLength; } } COM: <s> for internal purposes </s>
funcom_train/10820609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createLogicPartitionDir() throws IOException { logicPartitionDir = new File(baseDir, "logicPartitionDir"); assertTrue(logicPartitionDir.mkdirs()); // for each logic partition create a directory for (String partition : logicPartitions) { File logicPartition = new File(logicPartitionDir, partition); assertTrue(logicPartition.mkdirs()); for (TYPE fileType : fileTypes) { writeFile(logicPartition, fileType); } } } COM: <s> write out logical partitioned directories with one file per file type type </s>
funcom_train/13398648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node parse(Lexer l, int prec) throws ParseError { int i; if(prec == -1) prec = MAX_PRECEDENCE; for(i=prec; i>=0 && operators[i]==null; --i) ; if(i < 0) throw new ParseError("no matching operator definition found"); return operators[i].parse(l, this); } COM: <s> parses input provided by a </s>
funcom_train/51617891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void bindingChanged( BindingEvent e ) { Object curValue = e.getBinding().getValue(); //if it has no value now, set the hash to null too if( curValue == null ) prevHashValue = null; //store the hash code of this object else prevHashValue = curValue.hashCode(); } COM: <s> determine the hash of the loaded value </s>
funcom_train/10766836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CompilationMessage errUndeclaredMessagePart(String varName, QName messageType, String partName) { return this.formatCompilationMessage("Attempt to reference undeclared part \"{2}\"" + " for variable \"{0}\": the WSDL message type \"{1}\" does not declare \"{2}\".", varName, messageType, partName); } COM: <s> attempt to reference undeclared part 2 for variable 0 the wsdl </s>
funcom_train/50150657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMenu getJMenu(String key) { int count=keyL.size(); currentUI=key; jMenuLF=new JMenu("Look & Feel"); jMenuLF.setMnemonic('L'); setUI(key); for (int i=0;i<count;++i) { JMenuItem item=new JMenuItem((String)keyL.get(i)); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JMenuActionDoer(e.getActionCommand()); } }); jMenuLF.add(item); } return jMenuLF; } COM: <s> get a jmenu of the valid uis available and working </s>
funcom_train/31529555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processProperties(XMLProperties pProperties) { //Get Show Title Property this.setShowTitle(pProperties.getPropertyBoolean(SHOW_TITLE_ATTR)); this.setTitle(pProperties.getPropertyString(TITLE_ATTR)); this.setShortTitle(pProperties.getPropertyString(NAME_ATTR)); this.setDescription(pProperties.getPropertyString(DESC_ATTR)); } COM: <s> process properties from xml </s>
funcom_train/26474896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printRow(Object row, int rowIdx) throws Exception { Table table = (Table) this.viewModel; int idx = 1; if (table.isSelectable()) { this.printSelector(row, rowIdx); this.writer.write("<td>&nbsp;</td>"); } for (Iterator iter = this.colGroups.iterator(); iter.hasNext(); idx++) { ColumnGroupLayoutHTML element = (ColumnGroupLayoutHTML) iter.next(); element.printValues(row, rowIdx); if (iter.hasNext()) this.writer.write("<td>&nbsp;</td>"); } } COM: <s> prints the specified row </s>
funcom_train/14265258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String limitedDesc() { if(limitedTo.size() == 0) return "Open"; Iterator iter = limitedTo.iterator(); StringBuffer sb = new StringBuffer(); while(iter.hasNext()) { sb.append(iter.next()); if(iter.hasNext()) sb.append(','); } return sb.toString(); } COM: <s> get a string listing the limits </s>
funcom_train/38350576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPropertyProb(Double prob) { if (prob.doubleValue() >= 0 && prob.doubleValue() <= 1) { this.prob = prob.doubleValue(); nextPos = -1; logbasis = Math.log(1 - this.prob); if (logbasis == 0) { doubleImprecision = Integer.MAX_VALUE; } else { doubleImprecision = (int)Math.floor(Math.log(Math.pow(2, -47)) / logbasis); } } } COM: <s> sets the probability that each position becomes a crossing point </s>
funcom_train/50775450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkNamespaceTree() { checkSourcesTree(); if (namespaceSelectedClassTree == null) namespaceSelectedClassTree = getNamespaceSelectedClassTree(); if (sourcesSelectedTree.isChanged() || namespaceSelectedClassTree.isChanged()) { boolean success = collectAndUseAllSelectedClasses( namespacePossibleClassTree, namespaceSelectedClassTree); if (success) { namespaceSelectedClassTree.setUnchanged(); } return success; } else { return true; } } COM: <s> checks the sources tree for correct values </s>
funcom_train/40536281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLastIndexOf() { StringBuffer x = new StringBuffer("abcdeabcdef"); assertEquals(9, x.lastIndexOf("e")); assertEquals(10, x.lastIndexOf("f")); assertEquals(-1, x.lastIndexOf("f", 1)); } COM: <s> this method tests code last index of code </s>
funcom_train/42272987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resched_nod_other_proc(Nod node){ int cpuID ; if((cpuID = getOtherProc(node))==-1) cpuID = node.indexProc; DAGTask task = new DAGTask(cpuID, node); task.setCatalog(catalog); catalog.changeStatus(node.index, 2); System.out.println("End node!!!"); MainSim.scheduler.send( 0, ownerFarm.getID(), Scheduler.clock() + node.initTime, Event.TAG_START_JOB, task); System.out.println(catalog.taskStatus.elementAt(node.index) + ".............."+node.index); } COM: <s> this method reschedule a node on other processor </s>
funcom_train/50253231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProcessInstance getProcessInstance(long processInstanceId) { try { ProcessInstance processInstance = (ProcessInstance) session.get(ProcessInstance.class, new Long(processInstanceId)); return processInstance; } catch (Exception e) { log.error(e); jbpmSession.handleException(); throw new JbpmException("couldn't get process instance '" + processInstanceId + "'", e); } } COM: <s> gets a process instance from the database by the identifier </s>
funcom_train/37042950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean validateURLPattern(String urlPattern) { if (urlPattern == null) return (false); if (urlPattern.startsWith("*.")) { if (urlPattern.indexOf('/') < 0) return (true); else return (false); } if (urlPattern.startsWith("/")) return (true); else return (false); } COM: <s> validate the syntax of a proposed code lt url pattern gt code </s>
funcom_train/24475869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createObject(RegistryService regService, BeanObject serviceObject) throws GfacException { String serviceMapStr = serviceXMLRequest(regService, (ServiceBean) serviceObject, null); RegistryUtil.registerServiceMapFromStr(regService, serviceMapStr); // String servicewsdl = // RegistryUtil.createAwsdl4ServiceMap(serviceMapStr); return ((ServiceBean) serviceObject).getServiceName(); } COM: <s> to create service </s>
funcom_train/1959941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { search = true; try { ArrayList modules = InterfaceUtility.getClassResources("verinec.gui.IVerinecModule"); if (search) { moduleC.updateFoundClasses(modules); } sdialog.setVisible(false); } catch (IOException e) { e.printStackTrace(); } } COM: <s> searches for the iverinec modules and updates them in the config </s>
funcom_train/31056273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration listAllConnections() { final Enumeration e = dg.edges(); return new Enumeration() { public boolean hasMoreElements() { return e.hasMoreElements(); } public Object nextElement() { Edge edge = (Edge)e.nextElement(); return new AgentGraphEdge( (Agent)edge.getSource(), (Agent)edge.getDestination() ); } }; } COM: <s> enumerate through all the edges in the agent graph </s>
funcom_train/13685020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void compose(PluginCompositionAPI compAPI) { UpdateMultiset updateSet1 = compAPI.getAllUpdates(1); UpdateMultiset updateSet2 = compAPI.getAllUpdates(2); for (Update ui1: updateSet1) { if (!locUpdated(updateSet2, ui1.loc) && isBasicUpdate(updateSet1, ui1)) compAPI.addComposedUpdate(ui1, this); } for (Update ui2: updateSet2) { if (isBasicUpdate(updateSet2, ui2)) compAPI.addComposedUpdate(ui2, this); } } COM: <s> this is the basic update composer </s>
funcom_train/10875552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sync() { while (true) { MergeThread toSync = null; synchronized (this) { for (MergeThread t : mergeThreads) { if (t.isAlive()) { toSync = t; break; } } } if (toSync != null) { try { toSync.join(); } catch (InterruptedException ie) { throw new ThreadInterruptedException(ie); } } else { break; } } } COM: <s> wait for any running merge threads to finish </s>
funcom_train/48978406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Variable getVariable() { if (variable != null && variable.eIsProxy()) { InternalEObject oldVariable = (InternalEObject)variable; variable = (Variable)eResolveProxy(oldVariable); if (variable != oldVariable) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, IotaPackage.REFERENCE__VARIABLE, oldVariable, variable)); } } return variable; } COM: <s> returns the value of the em b variable b em reference </s>
funcom_train/8232470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand11() { if (okCommand11 == null) {//GEN-END:|140-getter|0|140-preInit // write pre-init user code here okCommand11 = new Command("Nueva Busqueda", Command.OK, 0);//GEN-LINE:|140-getter|1|140-postInit // write post-init user code here }//GEN-BEGIN:|140-getter|2| return okCommand11; } COM: <s> returns an initiliazed instance of ok command11 component </s>
funcom_train/9047791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean setTileIfValid(int x, int y, int value) { int tiles[] = getUsedTiles(x, y); if (value != 0) { for (int tile : tiles) { if (tile == value) return false; } } setTile(x, y, value); calculateUsedTiles(); return true; } COM: <s> change the tile only if its a valid move </s>
funcom_train/47928487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAiProf2() { menuCharSelect.setAISlot2(arr1, 1); menuCharSelect.setAISlot2(arr2, 2); menuCharSelect.setAISlot2(arr3, 3); menuCharSelect.setAISlot2(arr4, 4); menuCharSelect.setAISlot2(arr5, 5); } COM: <s> set characters ai opponent 2 </s>
funcom_train/2801007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(Object pInstance, Object pData) throws RaccoonException { Method method = setter(); try { method.invoke(pInstance, new Object[]{pData}); } catch (Exception e) { String msg = AbsBeanMessages.propertyWriteError(method, pInstance, pData); throw new RaccoonException(ErrorCodes.PARAMETER_BAD_VALUE, msg, e); } } COM: <s> sets the value of this object </s>
funcom_train/25289953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDecreasingAlphaRampDuration(long decreasingAlphaRampDuration) { decreasingAlphaRamp = decreasingAlphaRampDuration; decAlphaRampInternal = (float) decreasingAlphaRampDuration * .001f; if (decAlphaRampInternal > (0.5f * decreasingAlpha)) { decAlphaRampInternal = 0.5f * decreasingAlpha; } VirtualUniverse.mc.sendRunMessage(Ding3dThread.RENDER_THREAD); } COM: <s> set this alphas decreasing alpha ramp duration to that specified </s>
funcom_train/43915201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean nodeNameEqual(Node n, String name) { if (n.getNodeName().equalsIgnoreCase(name)) { return true; } String nname = n.getNodeName(); int idx = nname.indexOf(':'); if (idx == -1) { return false; } if (nname.substring(idx + 1).equalsIgnoreCase(name)) { return true; } return false; } COM: <s> returns true if this node is named name </s>
funcom_train/25203329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void pushBack(char value) { if (pushbackEnd >= pushbackBuffer.length) { char[] b = new char[pushbackBuffer.length // + LINE_SIZE_INCREMENT]; System.arraycopy(pushbackBuffer, 0, b, 0, pushbackBuffer.length); pushbackBuffer = b; } pushbackBuffer[pushbackEnd++] = value; } COM: <s> add a character to the push back list </s>
funcom_train/41240871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rollback() { // prevent rollback more than once: if (hasRollback) return; hasRollback = true; // start rollback: if (log.isDebugEnabled()) log.debug("Transaction rollback."); try { connection.rollback(); } catch(SQLException e) { throw new TransactionException("Rollback transaction failed.", e); } finally { txManager.clean(); } } COM: <s> rollback the transaction </s>
funcom_train/37790593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public Dimension getPreferredSize() { // Dimension prefSize = super.getPreferredSize(); // if (null != prefSize && closeButton != null) { // Dimension newPrefSize = new Dimension(prefSize.width + closeButton.getWidth(), // prefSize.height); // prefSize = newPrefSize; // } // return prefSize; // // hmmm, doesn't work at the moment. // } COM: <s> the label must take some additional space if the closebutton is layouted </s>
funcom_train/6489129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(Graphics g) { if ((origin != null) && (current != null)) { Rectangle r = pointsToRect(origin, current); if (tooSmall(r)) return; g.setColor(getForeground()); g.drawRect(r.x,r.y,r.width,r.height); } } COM: <s> draw this panel </s>
funcom_train/21973943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showDialog(){ JFileChooser fileChooser = new JFileChooser(); if(settings.getSpiceFile() != null){ File file = settings.getSpiceFile(); fileChooser.setSelectedFile(file); } if(fileChooser.showDialog(this,"Select") == JFileChooser.APPROVE_OPTION){ //the user has selected a file spiceFile = fileChooser.getSelectedFile(); System.out.println("EdaSimSettingsPanel.showDialog file is: "+spiceFile.getAbsolutePath()); updateButton(); } } COM: <s> shows the file dialog so the user can select the spice executable </s>
funcom_train/5374551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image (Device device, InputStream stream) { if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); // init(device, new ImageData(stream)); // if (device.tracking) device.new_Object(this); String url = null; if (stream != null) /** * @j2sNativeSrc * url = stream.url; * @j2sNative * c = b.url; */ {} this.url = url; } COM: <s> constructs an instance of this class by loading its representation </s>
funcom_train/24150153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Hits getHits(String query) { Query q; try { q = _parser.parse(query); // ricorda : private QueryParser _parser; - VEDI INDICIZZAZIONE LUCENE return _searcher.search(q); // ricorda : private Searcher _searcher; - VEDI INDICIZZAZIONE LUCENE } catch (ParseException ex) { ex.printStackTrace(); } catch (IOException ex) { ex.printStackTrace(); } return null; } COM: <s> returns the list of documents that fulfill the given query </s>
funcom_train/593413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void tryFlush(PageContext pageContext) { try { if (pageContext != null) pageContext.getOut().flush(); } catch (IOException e) { // This seems to happen once at the beginning and once at the end. Don't know why. log.debug("Failed to flush buffer: ", e.getMessage()); } } COM: <s> try to flush the page contexts output buffer </s>
funcom_train/28992759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean processName(PortalMediator pm, ContentMediator cm, Map m) { String s = UpdateContentMediator.validateNodeDescription( cm.getContent(), getParameterValue("description")); // Valid description if (s == null) { return false; } m.put(CPK_MESSAGE, s); return true; } COM: <s> checks for duplicate content name in tree </s>
funcom_train/18284519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setShort(int parameterIndex, short x) throws DAOException { try { parms.put("" + parameterIndex, "" + x); this.preparedStatement.setShort(parameterIndex, x); } catch (SQLException e) { _log.error("Exception in setShort() method", e); this.setTransactionRollbackOnly(); } } COM: <s> sets the designated parameter to short value </s>
funcom_train/7630382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getStreamMaxVolume(int streamType) { IAudioService service = getService(); try { return service.getStreamMaxVolume(streamType); } catch (RemoteException e) { Log.e(TAG, "Dead object in getStreamMaxVolume", e); return 0; } } COM: <s> returns the maximum volume index for a particular stream </s>
funcom_train/1554481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateLocalVar(int index) { // set local variable to given value for (int i = 0; i < varCount; i++) vars[i].set(over[i].get(index)); // update var's algorithms until we reach expression if (expressionParentAlgo != null) { // update all dependent algorithms of the local variable var this.setStopUpdateCascade(true); for (int i = 0; i < varCount; i++) vars[i].getAlgoUpdateSet().updateAllUntil(expressionParentAlgo); this.setStopUpdateCascade(false); expressionParentAlgo.update(); } } COM: <s> sets value of the local loop variable of the sequence and updates all </s>
funcom_train/14009444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNextMonthName() { StringBuffer result = new StringBuffer(); _calendar.getCalendar().add(Calendar.MONTH, 1); result.append(_calendar.getMonthName(_calendar.getCalendar().get(Calendar.MONTH))); _calendar.getCalendar().add(Calendar.MONTH, -1); return result.toString(); } COM: <s> get the name for navigating to the next month </s>
funcom_train/40359964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAliases() throws Exception { Map<String, List<Value>> expectedProps = createProperties(); expectedProps.put("foo", expectedProps.get(PROP1)); expectedProps.put("bar", expectedProps.get(PROP3)); checkDocument(createFilter(), expectedProps); } COM: <s> test aliases should return all the values of the original property </s>