__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/49427981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setText(String text) { text = TextUtil.limitStringLength(text, maxTextLength); editBuffer.replace(0, editBuffer.length(), text); cursorPos = editBuffer.length(); selectionStart = 0; selectionEnd = 0; updateText(); scrollToCursor(true); } COM: <s> set a new text for this edit field </s>
funcom_train/7979570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeNonHeritable(String key) { List heritableKeys = (List) getObject(A_HERITABLE_KEYS); if(heritableKeys==null) { return; } heritableKeys.remove(key); if(heritableKeys.size()==1) { // only remaining heritable key is itself; disable completely remove(A_HERITABLE_KEYS); } } COM: <s> make the given key non heritable meaning its value will </s>
funcom_train/44622889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JCVariableDecl makeVariableDecl(Name name, Type type, @Nullable JCExpression init, int pos) { VarSymbol vsym = new VarSymbol(0, name, type, null); vsym.pos = pos; JCVariableDecl decl = factory.at(pos).VarDef(vsym,init); return decl; } COM: <s> makes a new variable declaration for helper variables in the ast translation </s>
funcom_train/21847232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List getUnknownImports() { ArrayList ret = new ArrayList(); for (int i = 0; i < infoList.size(); i++) { String unknownImport = ((Info) infoList.get(i)).unknownImport; if (unknownImport != null) { if (((Info) infoList.get(i)).star) unknownImport = unknownImport + ".*"; // NOI18N ret.add(unknownImport); } } return ret; } COM: <s> returns all imports that arent in parser db yet </s>
funcom_train/42114960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object eval(String s) throws JSException { Object obj = null; synchronized (evaluator) { try { ESValue value = evaluator.evaluate(s, object, false); // Can // return // null // ! if (value != null) obj = value.toJavaObject(); } catch (EcmaScriptException e) { throw new JSException(e.getMessage(), e); } } return obj; } COM: <s> implements the evaluation of a string with this object as the this </s>
funcom_train/29895989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImplementationArtifactType getTypeOf(ImplementationArtifactDefinition artifactDefinition) { if (artifactDefinition.getType() != null) { ArchitectureElement archElem = arch.getComponentOrConnectorByName(artifactDefinition.getParent().getName()); if (archElem != null) { ImplementableTypeMapping typeMapping = styleMapping.getImplementableTypeMapping(archElem.getStyleType()); if (typeMapping != null) { return typeMapping.getImplementationArtifactType(artifactDefinition.getType()); } } } return null; } COM: <s> returns the implementation artifact type of an artifact definition </s>
funcom_train/48337961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringBuffer validate(URL url) { // Generate file name StringBuffer name = new StringBuffer(url.getFile()); if (SEPARATOR == name.charAt(name.length() - 1)) { name.append(INDEX_FILE); } if (SEPARATOR != name.charAt(0)) { name.insert(0, SEPARATOR); } name.insert(0, docRoot); // Return the validated name return name; } COM: <s> creates a validated path from the url </s>
funcom_train/15491420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { ImageJ ij = IJ.getInstance(); if (ij==null || (ij!=null && !ij.isShowing())) new ImageJ(this); for (int i=1; i<=9; i++) { String url = getParameter("url"+i); if (url==null) break; ImagePlus imp = new ImagePlus(url); if (imp!=null) imp.show(); } } COM: <s> starts image j if its not already running </s>
funcom_train/3081587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Element renderBox(RenderingContext rc, Component component, Style fallbackStyle) { ComboBox combo = (ComboBox) component; rc.addLibrary(COMBOBOX_SERVICE); createInitDirective(rc, combo); CssStyle cssStyle = createListBoxStyle(rc, combo, fallbackStyle); Element divBox = rc.createE("div"); divBox.setAttribute("id", rc.getElementId() + "|Box"); divBox.setAttribute("style", cssStyle.renderInline()); return divBox; } COM: <s> this is called to render the popup floating box </s>
funcom_train/3026163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String removeCR(String input) { StringBuffer buffer = new StringBuffer(); int last = input.length(); for (int ndx = 0; ndx < last; ndx++) { char ch = input.charAt(ndx); if (ch == '\r') { // Do nothing } else { buffer.append(ch); } } return buffer.toString(); } COM: <s> remove r from buffer </s>
funcom_train/37819177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int paintString(String string, Font font, int offsetX, int offsetY) { graphics.setFont(font); graphics.drawString(string, offsetX, offsetY); return offsetX + (int)graphics.getFontMetrics(font).getStringBounds(string, graphics).getWidth(); } COM: <s> draws a string to the given coordinates </s>
funcom_train/36738826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getWord( ) { String theWord; try { System.out.println("Enter word: "); theWord = in.readLine( ); if (theWord == null || (theWord.length() == 1) && (theWord.charAt(0) == '!')) { // workaround for Eclipse EOF throw new IOException( ); } } catch (IOException e) { return "!"; } return theWord; } COM: <s> reads a word from the user and returns it </s>
funcom_train/28308476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerForwarder(Forwarder forwarder) { List<Forwarder> forwardersList = forwarders.get(forwarder.getName()); if (forwardersList == null) { forwardersList = new ArrayList<Forwarder>(); } forwardersList.add(forwarder); forwarders.put(forwarder.getName(), forwardersList); } COM: <s> registers a forwarder with this forwarder manager </s>
funcom_train/50355222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getGenerateAcctSessionIdCheckBox() { if (generateAcctSessionIdCheckBox == null) { generateAcctSessionIdCheckBox = new JCheckBox(); generateAcctSessionIdCheckBox.setText("Generate Unique Acct-Session-Id"); } return generateAcctSessionIdCheckBox; } COM: <s> this method initializes generate acct session id check box </s>
funcom_train/12774659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasExceptionalEdge(BasicBlock src, BasicBlock dest) { if (dest == null) { throw new IllegalArgumentException("dest is null"); } if (dest.isExitBlock()) { int srcNum = getNumber(src); return delegate.getExceptionalToExit().get(srcNum); } return delegate.hasExceptionalEdge(getUnderlyingBlock(src), getUnderlyingBlock(dest)); } COM: <s> has exceptional edge src dest </s>
funcom_train/10684268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void cacheArray(String[] array) { if(arrayIsCached(array)) { throw new IllegalArgumentException("Trying to cache an array that already exists"); } knownArrays.put(array, new CachedArray(array)); // Invalidate the cache-within-a-cache lastArray = null; } COM: <s> cache the array passed in as the argument </s>
funcom_train/43421289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getColumnCount() { int length = columnNames.length; int count = 0; for (int i=0; i<length; i++) { Boolean state = (Boolean) columns.get(new Integer(i)); if (state.booleanValue()) count++; } return count; } COM: <s> returns how many columns are currently selected and should be displayed </s>
funcom_train/22689027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName(Locale locale) { try { ResourceBundle res = ResourceBundle.getBundle("mt.org.linux.textcheck.EngineNames", locale); return res.getString(this.getEngineCode()); } catch (MissingResourceException e) { return getEngineCode(); } } COM: <s> returns the localised name of the engine in the specified locale </s>
funcom_train/10268302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RdrTree getTree(int treeType) { if (treeType == WorkletService.XTYPE_CASE_PRE_CONSTRAINTS) return _specPreTree ; else if (treeType == WorkletService.XTYPE_CASE_POST_CONSTRAINTS) return _specPostTree ; else if (treeType == WorkletService.XTYPE_CASE_EXTERNAL_TRIGGER) return _specExternalTree ; else return null ; } COM: <s> gets the previously loaded rdr tree for rules defined at the case level </s>
funcom_train/3583144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNotify() { super.addNotify(); Dimension layoutSize = model.getGraphLayout().getCurrentSize(); if (layoutSize != null) { Dimension mySize = new Dimension((int) (layoutSize.width * scalex), (int) (layoutSize.height * scaley)); setPreferredSize(mySize); initMouseClicker(); } } COM: <s> defers setting the perferred size until the component is </s>
funcom_train/1958847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exportConfig(Element e) throws VerinecException { Document d = translate(e); try { XMLOutputter out = new XMLOutputter(Format.getPrettyFormat()); FileOutputStream f = new FileOutputStream(new File(getExportPath(), e.getAttributeValue("hostname")+".xml")); out.output(d, f); } catch(Throwable t) { throw new VerinecException("Could not write XML result.", t); } } COM: <s> compile the configuration xml and write it out into a file </s>
funcom_train/21656339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtRegistrarLito() { if (btRegistrarLito == null) { btRegistrarLito = new JButton(); btRegistrarLito.setBounds(new Rectangle(313, 331, 163, 30)); btRegistrarLito.setMnemonic('r'); btRegistrarLito.setText("Registrar Litologia"); btRegistrarLito.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { guardarSustrato(); ControladorPrincipal.mostrarRegistroLitologico(); } }); } return btRegistrarLito; } COM: <s> this method initializes bt registrar lito </s>
funcom_train/39877520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateCursorControllerPositions() { if (mInsertionPointCursorController != null && mInsertionPointCursorController.isShowing()) { mInsertionPointCursorController.updatePosition(); } if (mSelectionModifierCursorController != null && mSelectionModifierCursorController.isShowing()) { mSelectionModifierCursorController.updatePosition(); } } COM: <s> update the positions of the cursor controllers </s>
funcom_train/40873589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Inheritance addParent(MDClass c) { Inheritance i = new Inheritance(c, this); // if the inheritance already exist, we must return the // one from the List to keep constraint consistency if(parents.contains(i)) { for(Inheritance i2 : parents) { if(i2.equals(i)) return i2; } // never reached return null; } else { parents.add(i); changed(new ModelChangeEvent(this, ModelChangeEvent.Type.ParentAdded)); return i; } } COM: <s> add the given class in the parent list of this class </s>
funcom_train/8367848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delete () { boolean success = true; List<Path> pathsCopy = new ArrayList<Path>(paths); Collections.sort(pathsCopy, LONGEST_TO_SHORTEST); for (File file : getFiles(pathsCopy)) { if (file.isDirectory()) { if (!deleteDirectory(file)) success = false; } else { if (!file.delete()) success = false; } } return success; } COM: <s> deletes all the files directories and any files in the directories </s>
funcom_train/17884811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void markStableState() throws HeapException { if (crashSafeMode) { try { HELPER_FILE_UTIL.touchFile(stateBackupOkFlagFile, maxFileOperationRetry, fileOperationRetryMsDelay); HELPER_FILE_UTIL.touchFile(stateOkFlagFile, maxFileOperationRetry, fileOperationRetryMsDelay); HELPER_FILE_UTIL.touchFile(globalStateFlagFile, maxFileOperationRetry, fileOperationRetryMsDelay); } catch (FileIOException exception) { throw new HeapException(exception); } } } COM: <s> mark files in stable state must be call if </s>
funcom_train/44452324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getResourceName(Resource res) { String nsName = ((TranslationBean) FacesContext.getCurrentInstance() .getExternalContext().getSessionMap().get("TranslationBean")) .getNamespace(res.getNameSpace()); if (nsName == null) { return res.getURI(); } else { return nsName + ":" + res.getLocalName(); } } COM: <s> returns uri of the supplied resource </s>
funcom_train/24933824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection sortClasses( Collection items) { ArrayList classes = new ArrayList( items ); if (classes.size() > 0) { switch (clsOrder) { case CLS_ALPHABETIC: Collections.sort(classes, new AlphabeticalClassComparator()); break; case CLS_USE_ORDER: Collections.sort(classes, new UseFileOrderClassComparator()); break; default: break; } } return classes; } COM: <s> calls the specific algorithem in which way the tree will be sorted </s>
funcom_train/35146841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshAutocalcOrderCost() { OrderCostCalculator calc = new OrderCostCalculator(); int totalCost = calc.getTotalOrderCostForNation(GameHolder.instance().getGame().getTurn(), getSelectedNationNo()); tranCarOrderCost = calc.getTotalTranCarOrderCostForNation(GameHolder.instance().getGame().getTurn(), getSelectedNationNo()); autocalcOrderCost.setText(String.valueOf(totalCost)); } COM: <s> refreshes the autocalc order cost field </s>
funcom_train/3361168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNullable(int columnIndex, int property) throws SQLException { if ((property < ResultSetMetaData.columnNoNulls) || property > ResultSetMetaData.columnNullableUnknown) { throw new SQLException("Invalid nullable constant set. Must be " + "either columnNoNulls, columnNullable or columnNullableUnknown"); } checkColRange(columnIndex); colInfo[columnIndex].nullable = property; } COM: <s> sets whether a value stored in the designated column can be set </s>
funcom_train/42476523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateFields() { if (mRowId != PackListDAO.INVALID_KEY_ROWID) { mTitleText.setText(mPl.getName()); mItemText.setText(null); } mListView.setAdapter( new ArrayAdapter<String>(this, R.layout.packlist_item, mPl.getList()) ); } COM: <s> populates the gui elements with the data in the pack list </s>
funcom_train/43563892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double f (Rep_ECOC code) { double fitness = 0; double d = 0; for (int i=0; i<code.matrix[0].length-1; i++) for (int j=i+1; j<code.matrix[0].length; j++) { d = hammingDistCol(i, j, code.matrix); fitness += d - Math.abs((d/dist[i][j])-code.value); } fitness /= Math.pow(code.matrix[0].length,2); //fitness += maxH; System.out.println("f=" + fitness); return fitness; } COM: <s> need for a good fitness function </s>
funcom_train/46336304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetParams() { System.out.println("getParams"); PlsqlCall instance = new PlsqlCall(); List<PlsqlCallParameter> expResult = new ArrayList<PlsqlCallParameter>(); List<PlsqlCallParameter> result = instance.getParams(); assertEquals(expResult, result); } COM: <s> test of get params method of class plsql call </s>
funcom_train/40337070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createMigrationRulePage() { MigrationRuleEditor migrationRuleEditor = new MigrationRuleEditor( getContainer(), migrationTask); int index = addPage(migrationRuleEditor.getControl()); setPageText(index, "Rule"); taskListeners.add(migrationRuleEditor); } COM: <s> create the migration rule editor </s>
funcom_train/16614025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int sourceLocationCompare( Location sl ) { if( sl.getSegRegionID() < sourceLocation.getSegRegionID()) return -1; if( sl.getSegRegionID() > sourceLocation.getSegRegionID()) return 1; if( sl.getEnd() < sourceLocation.getStart() ) return -1; if( sl.getStart() > sourceLocation.getEnd() ) return 1; return 0; } COM: <s> does given location overlap with this synteny region return 0 if so </s>
funcom_train/17983691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String alterColumnStatement(Column definition, String tableName) { Validator.notNull(definition, "Column definition can not be null"); Validator.notNull(tableName, "Table name can not be null"); StringBuffer retVal = new StringBuffer("ALTER TABLE "); retVal.append(wrapName(tableName)) .append(" MODIFY COLUMN ") .append(makeColumnString(definition)); return retVal.toString(); } COM: <s> alter table table name modify column existing definition </s>
funcom_train/2557563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeAttributes(OutputNode node) throws Exception { NodeMap<OutputNode> map = node.getAttributes(); for(String name : map) { OutputNode entry = map.get(name); String value = entry.getValue(); String prefix = entry.getPrefix(verbose); writer.writeAttribute(name, value, prefix); } active.remove(node); } COM: <s> this is used to write the attributes of the specified node to </s>
funcom_train/50079076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object set(String key, String value) { if (System.getProperties().contains(key)) { return System.setProperty(key, value); } else { synchronized (this) { if (value == null) { return this.deploymentProperties.remove(key); } else { return this.deploymentProperties.setProperty(key, value); } } } } COM: <s> this method sets deployment properties </s>
funcom_train/17529020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ControlFlow addControlFlow(Node from, Node to) { if (from == null || to == null) return null; Collection<Node> ss = new ArrayList<Node>(); ss.add(from); Collection<Node> ts = new ArrayList<Node>(); ts.add(to); if (!this.checkEdge(ss, ts)) return null; return new ControlFlow(this, from, to); } COM: <s> create a control flow </s>
funcom_train/1585578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void supprimerLogin() throws RemoteException { int choix = JOptionPane.showConfirmDialog(null, "Voulez-vous vraiment supprimer cette personne ?", "Confirmation", JOptionPane.YES_NO_OPTION); if (choix == 0) { String login = (String) jCBlogin.getSelectedItem(); root.supprimerPersonne(login); JOptionPane.showMessageDialog(null, "Personne supprimée ", "Information", JOptionPane.INFORMATION_MESSAGE); jCBlogin.removeAllItems(); loadLogin(); } } COM: <s> supprimer un login </s>
funcom_train/21847257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void documentModifiedAtPosition(int offset) { // if end of import section has already been found, then check // if change is in import section or not if (posEndOfImportSection != -1) { if (offset > posEndOfImportSection) { // reparing is not necessary, because change is after the import section disableReparsing = true; } else { // the document must be completely reparsed disableReparsing = false; posEndOfImportSection = -1; } } } COM: <s> optimalization for document parsing </s>
funcom_train/32055104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { try { int d = Integer.parseInt( JOptionPane.showInputDialog( Translator.getString("SizeDialog"))); //graph.setPortSize(d); } catch (NullPointerException npe) { // ignore } catch (Exception ex) { graphpad.error(ex.toString()); } } COM: <s> selects the port size </s>
funcom_train/48526789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(byte[] b, int offset, int length) throws IOException { reader.readStartTag("base64"); byte[] bytes = reader.readBase64(); int written = (length < bytes.length ? length : bytes.length); System.arraycopy(bytes, 0, b, offset, written); return written; } COM: <s> method which reads a array of bytes from the underlying output stream </s>
funcom_train/45502619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PlanPoint getOther( PlanPoint p ) throws IllegalArgumentException { if( p == source || p.equals( source ) ) return getTarget(); if( p == target || p.equals( target ) ) return getSource(); throw new IllegalArgumentException( ZLocalization.getSingleton().getString( "ds.z.NoCoindidesException" ) ); } COM: <s> returns the end point of the </s>
funcom_train/2772069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IRegion getTextBlockFromSelection(ITextSelection selection, IDocument document) { try { IRegion line= document.getLineInformationOfOffset(selection.getOffset()); int length= selection.getLength() == 0 ? line.getLength() : selection.getLength() + (selection.getOffset() - line.getOffset()); return new Region(line.getOffset(), length); } catch (BadLocationException x) { // should not happen VdmUIPlugin.log(x); } return null; } COM: <s> creates a region describing the text block something that starts at </s>
funcom_train/47734036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createMatchDisplayerList() { if (!matchDisplayerList.isGenerated()) { if (drawingWidth <= 0 || drawingHeight <= 0) { drawingWidth = this.getParent().getWidth() - 2 * border; drawingHeight = this.getParent().getHeight() - 2 * border; } matchDisplayerList .generateMatchDisplayerList(drawingWidth, drawingHeight); } if (matchDisplayerList.needsRegeneration()) { matchDisplayerList.regenerate(); } } COM: <s> creates the list of match displayers if necessary </s>
funcom_train/9642585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setup() { final IPreferenceStore store = Activator.getDefault() .getPreferenceStore(); store.addPropertyChangeListener(new IPropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent event) { final String pref = event.getProperty(); if (PreferenceConstants.ZOOMTABLE_ANIMATED_ZOOMING.equals(pref)) { duration = ((Boolean) event.getNewValue()) ? ZOOM_ANIMATION_DURATION_MIN : ZOOM_ANIMATION_DURATION_MAX; } } }); } COM: <s> sets up the animator according to the </s>
funcom_train/17901648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(String add) { try { int pos = textArea.getCaretPosition(); if (pos <= typingLocation && pos >= userLimit) outputDocument.insertString(pos, add, null); typingLocation += add.length(); } catch (BadLocationException ble) {} } COM: <s> adds a code string code to the current command line </s>
funcom_train/49435090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean validateEntry() { boolean valid = true; String username = txtUsername.getString().trim(); String password = txtPassword.getString().trim(); if ((null == username || "".equalsIgnoreCase(username)) || (null == password || "".equalsIgnoreCase(password))) { valid = false; } return valid; } COM: <s> validate user entry </s>
funcom_train/4518062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHours(int hours) { if (hours > 23) { throw new IllegalArgumentException("hour must not exceedd 23"); } Calendar cal = getCalendar(); cal.set(Calendar.HOUR_OF_DAY, hours); _date.setTime(cal.getTimeInMillis()); firePropertyChange(); } COM: <s> set the hour in day field of the date </s>
funcom_train/27720270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeUser(User u) { if (tunToUser.containsKey(u.getTransportUniqueName())) { tunToUser.remove(u.getTransportUniqueName()); nwsToUser.remove(u.getNickWithoutStatus()); nickToUser.remove(u.getNick()); return true; } return false; } COM: <s> removes the given user from this user manager object </s>
funcom_train/20833223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ScriptRunnerBase getScriptRunner() { ScriptRunnerBase runner = getRunner(); if (srcFile != null) { runner.setSrc(srcFile); } if (text != null) { runner.addText(text); } if (setBeans) { runner.bindToComponent(projectComponent); } else { runner.bindToComponentMinimum(projectComponent); } return runner; } COM: <s> create and set text on a script </s>
funcom_train/37854076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() throws SVNException { try { for (int i = 0; i < myCommitItems.length; i++) { if (myCommitItems[i] != null && myCommitItems[i].getWCAccess() != null) { myCommitItems[i].getWCAccess().close(); } } } finally { myIsDisposed = true; } } COM: <s> disposes the current object </s>
funcom_train/18429884
/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 (this == obj) { return true; } if (!(obj instanceof Size2D)) { return false; } final Size2D that = (Size2D) obj; if (this.width != that.width) { return false; } if (this.height != that.height) { return false; } return true; } COM: <s> compares this instance for equality with an arbitrary object </s>
funcom_train/42157228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getJMenu_TaskLists() { if (jMenu_TaskLists == null) { jMenu_TaskLists = new JMenu(); jMenu_TaskLists.setText("Task Lists"); jMenu_TaskLists.add(getJMenuItem_AddTaskProvider()); jMenu_TaskLists.add(getJMenuItem_SaveTaskProviders()); } return jMenu_TaskLists; } COM: <s> this method initializes j menu </s>
funcom_train/2577054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTickLabelPaint(Comparable category, Paint paint) { if (category == null) { throw new IllegalArgumentException("Null 'category' argument."); } if (paint == null) { this.tickLabelPaintMap.remove(category); } else { this.tickLabelPaintMap.put(category, paint); } notifyListeners(new AxisChangeEvent(this)); } COM: <s> sets the paint for the tick label for the specified category and sends </s>
funcom_train/2036184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearArea(boolean[][] btnArea) { for (int i = 0; i < cell.getColspan(); i++) { int x = cell.getPosX() + i; for (int j = 0; j < cell.getRowspan(); j++) { int y = cell.getPosY() + j; btnArea[x][y] = false; } } } COM: <s> clear the cell holds area </s>
funcom_train/13589393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNetworkChangeEvent(final NetworkChangeEvent event) { if (!this.factory.isTimeVariant()) { throw new RuntimeException( "Trying to set NetworkChangeEvents but NetworkFactory is not time variant"); } if (this.networkChangeEvents == null) { this.networkChangeEvents = new ArrayList<NetworkChangeEvent>(); } this.networkChangeEvents.add(event); for (Link link : event.getLinks()) { ((TimeVariantLinkImpl)link).applyEvent(event); } } COM: <s> adds a single network change event and applies it to the corresponding </s>
funcom_train/32986550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUnassignedText() throws TorqueException{ StringBuffer shifts=new StringBuffer(); List l=this.getDBSignals(); for(int i=0;i<l.size();i++){ if(((DBSignal)l.get(i)).getDBSignalDBAtoms().size()==0){ shifts.append(((DBSignal)l.get(i)).getFirstShift().getValue()+";"); } } if(shifts.toString().equals("")){ return ""; }else{ return("Unassigned shifts in this spectrum: "+GeneralUtils.removeLastComma(shifts)); } } COM: <s> gives a string with the unassigned shifts in this spectrum if none </s>
funcom_train/31688751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PrintWriter getWriter() throws IOException { if (writer != null) { return writer; } // make sure output stream has not already been initialized if (stream != null) { throw new IOException("OutputStream already in use"); } writer = new PrintWriter(new OutputStreamWriter(createOutputStream())); return writer; } COM: <s> get the replacement writer </s>
funcom_train/1748200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendActivationEmail(User user) { Contexts.getEventContext().set("inactiveNewUser", new InactiveNewUser(user, getLink(user))); getRenderer().render(getEmailTemplatePath(user) + "activation.xhtml"); log .info(interpolator .interpolate("Activation email sent to #{inactiveNewUser.user.email} for user '#{inactiveNewUser.user.userName}'.")); } COM: <s> this sends an activation email after the user has been successfully set </s>
funcom_train/9506952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void compositeLayer(Layer layer, Rectangle2D bounds, boolean repaint) { Graphics2D g = buffer.createGraphics(); g.drawImage(layer.getSubimage((int)bounds.getX(), (int)bounds.getY(), (int)bounds.getWidth(), (int)bounds.getHeight()), (int)bounds.getX(), (int)bounds.getY() ,this); if(repaint) repaint(); } COM: <s> composites a single layer on top of any existing pixels </s>
funcom_train/31529101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object run() { JNLPRuntime.initialize(getBaseDir(), null == getArgValue("-nosecurity")); try { new Launcher().launch(getFile()); } catch (Exception ex) { if (JNLPRuntime.isDebug()) ex.printStackTrace(); fatalError(ex.getMessage()); } return null; } COM: <s> the privileged part jdk1 </s>
funcom_train/9200978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SizeType fireDefineSize() { double size = Math.random(); if (size < 0.25) { return SizeType.SMALL; } else if (size < 0.5) { return SizeType.MEDIUM; } else if (size < 0.75) { return SizeType.BIG; } else { return SizeType.HUGE; } } COM: <s> defines a size for a fire </s>
funcom_train/46829073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean save(){ try { FileOutputStream out = new FileOutputStream(scheduleFile); XMLOutputter xmlout = new XMLOutputter(" ", false,"ISO-8859-1"); xmlout.output(doc, out); out.flush(); out.close(); } catch (Exception e) { e.printStackTrace(); return false; } return true; } COM: <s> stores the representation on disk </s>
funcom_train/10267877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String makeCSVNameList(List caseIDs) { String result = ""; Iterator itr = caseIDs.iterator(); while (itr.hasNext()) { if (result.length() > 0) result += ","; result += getWorkletName((String) itr.next()); } if (result.length() == 0) result = null ; return result ; } COM: <s> creates an ordered csv list of worklet names from case ids </s>
funcom_train/50702926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateConstraints() { SpringLayout layout = (SpringLayout) getLayout(); if (!children.isEmpty()) { updateChildrenPanelConstraints(); } SpringUtilities.alignHCenter(layout, Spring.constant(2), Spring .constant(2), this); SpringUtilities.alignVDistr(layout, Spring.constant(0), Spring .constant(18), Spring.constant(0), this); } COM: <s> updates the constraints for the springlayout of this hi family panel </s>
funcom_train/36192907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIndexOfExamples() { try { assertTrue(axcde.indexOf(cx) == 1); } catch (JMLSequenceException e) { fail("indexing here should not raise a JMLSequenceException"); } try { abcd.indexOf(cx); fail("indexOf should raise an exception in this case"); } catch (JMLSequenceException e) { // ok } } COM: <s> test the examples from the index of method </s>
funcom_train/46994975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getFileExitMenuItem() { if (fileExitMenuItem == null) { fileExitMenuItem = new JMenuItem(); fileExitMenuItem.setText("Exit"); fileExitMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { console.terminate(); } }); } return fileExitMenuItem; } COM: <s> this method initializes file exit menu item </s>
funcom_train/50872561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object copy() { OMReference copy = new OMReference(); copy.attributes = new Hashtable(); Enumeration enumeration = attributes.keys(); for(; enumeration.hasMoreElements(); ) { String key = (String) enumeration.nextElement(); String value = (String) attributes.get(key); copy.attributes.put(new String(key), new String(value)); } return copy; } COM: <s> create a copy of this omreference </s>
funcom_train/37744869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File dir, String name) { if (extensions == null) { throw new NullPointerException("extensions not set"); } boolean accept = false; if (maxAccepted()) { return accept; } int count = extensions.length; for (int i = 0; i < count; i++) { if (name.endsWith(extensions[i])) { acceptFile(); accept = true; break; } } return accept; } COM: <s> tests if a specified file should be included in a file list </s>
funcom_train/39541500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMedia(String str) { try { media = parser.parseMedia(str); } catch (Exception e) { String m = e.getMessage(); if (m == null) m = ""; String s =Messages.formatMessage ("media.error", new Object[] { str, m }); throw new DOMException(DOMException.SYNTAX_ERR, s); } } COM: <s> sets the media to use to compute the styles </s>
funcom_train/786093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(Iterator iter, Comparator c) { m_tuples.clear(); m_cmp = c; // populate tuple list while ( iter.hasNext() ) { Tuple t = (Tuple)iter.next(); m_tuples.add(t); } // sort tuple list Collections.sort(m_tuples, m_cmp); // create sorted iterator m_iter = m_tuples.iterator(); } COM: <s> initialize this iterator for the given source iterator and </s>
funcom_train/51788071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLowerValuePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MultiplicityElement_lowerValue_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MultiplicityElement_lowerValue_feature", "_UI_MultiplicityElement_type"), UMLPackage.Literals.MULTIPLICITY_ELEMENT__LOWER_VALUE, true, false, true, null, null, new String[] { "org.eclipse.ui.views.properties.expert" })); } COM: <s> this adds a property descriptor for the lower value feature </s>
funcom_train/1990359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void report(ValidationReport report, T form) { if (!report.isOk()) { StringBuffer displayedMessage = new StringBuffer(); for (ValidationError error : report.getValidationErrors()) { String errorMessage = error.getDetailedMessage(); String errorLine = MessageFormat.format(messageLine, errorMessage); displayedMessage.append(errorLine); } GUIUtils.getAlertManager().error((View)null, messageCode, displayedMessage); } } COM: <s> displays the errors in a message box </s>
funcom_train/12652577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCategory(long category) { // If not changed then return if (this.category == category) return; // Cache and update the value characteristic this.category = category; if (category == 2l) updateCategory(PREVENTION); else if (category == 8l) updateCategory(METASTATIC); else if (category == 16l) updateCategory(SURVIVOR); else if (category != 4l) updateCategory(null); // If metastatic updated then activate the diagnosis diagnoses[0].setDiagnosed(category == 8l); } COM: <s> stores the patients category and updates the diagnoses </s>
funcom_train/49248699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BranchAndBound (Graph g) { super(g,"BranchAndBound"); start = TSProblemModel.getInstance().getSourceNodeIndex(); goal = TSProblemModel.getInstance().getClient(0); visualFeedback = TSProblemModel.getInstance().isVisualFeedback(); measureExecution = TSProblemModel.getInstance().isExecutionMeasure(); openNodes = new LinkedList(); closedNodes = new LinkedList(); shortestPath = MAX_PATH_LENGTH; if (measureExecution) { executionTrace = ExecutionTrace.getInstance(); } } COM: <s> creates an instance of this algorithm </s>
funcom_train/28257454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void installPlayer(TrackModel tm, int index) { Debug.printObject("enter installPlayer : " + index); Track track = tracks.getTrack(index); Player player = track.getPlayer(); player.addControllerListener(this); synchronized (this) { nActiveTracks++; } if (viewingPanel != null) viewingPanel.addScreen(track.getMediaLocator().toString(), player, ViewingPanel.DISPLAY_BOTH); Debug.printObject("exit installPlayer : " + index); } COM: <s> in response to track model event add a player </s>
funcom_train/50776784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BackendTreeNode getChildAfter(BackendTreeNode aChild) { if (aChild == null) { throw new IllegalArgumentException("argument is null"); } int index = getIndex(aChild); // linear search if (index == -1) { throw new IllegalArgumentException("node is not a child"); } if (index < getChildCount() - 1) { return getChildAt(index + 1); } else { return null; } } COM: <s> returns the child in this nodes child array that immediately </s>
funcom_train/44447734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void edit(Object toEdit, RecordObjectEditor with) { try { IRecordObjectAdapter editor = with.getObjectAdapter(); editor.undoChanges(); // Defensive programming... editor.setInput(toEdit); } catch (UnableToSaveException e) { Logger.log().error(e, "Editor should not be dirty."); } } COM: <s> edit the specified object using the specified record object editor </s>
funcom_train/38726248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDistanceToCenter(double[] x, Kernel kernel){ double sum = 0; for(int j=0; j<nonZeroAlpha.size(); j++){ sum += nonZeroAlpha.get(j) * kernel.K(x, SVs.get(j)); } return kernel.K(x, x) - 2*sum + mainValue; } COM: <s> calculate the square distance from some point z to sphere center </s>
funcom_train/34673766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBeanshellUrlLoader() throws Exception { TestCommand command=(TestCommand)getCore().newCommand("TestBeanShellUrlLoader"); // Test the first rule in the base class (x<100 so r=x+y) command.setX(9); command.setY(10); command.invoke(); assertEquals(19, command.getR()); } COM: <s> the beanshell accessor supports the loading of scripts from urls </s>
funcom_train/37820189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setChangeElemListenerBack() { for (RenderElement re : renderMap.keySet()) { if (re instanceof RenderNullElem) { re.addMouseListener(changeColorToGreenListener); } else if (re instanceof RenderVariable || re instanceof RenderTerminal) { re.removeMouseListener(changeFillColorToListener); } else if (re instanceof RenderName) { re.removeMouseListener(changeBoldListener); } } } COM: <s> sets all changes from code set change elem listener code back </s>
funcom_train/32058069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreate() { System.out.println("testCreate"); ParentMap parentmap = new ParentMap(); ParentMap parentmap1 = new ParentMap(); GraphModel graphmodel = null; Object[] aobj = new Object[5]; boolean flag = false; assertTrue(parentmap.create(graphmodel, aobj, flag) != null); } COM: <s> this function tests create function of parent map class </s>
funcom_train/8638452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setWidths(float widths[]) { if (widths.length != cells.length) return false; System.arraycopy(widths, 0, this.widths, 0, cells.length); float total = 0; calculated = false; for (int k = 0; k < widths.length; ++k) { PdfPCell cell = cells[k]; cell.setLeft(total); int last = k + cell.getColspan(); for (; k < last; ++k) total += widths[k]; --k; cell.setRight(total); cell.setTop(0); } return true; } COM: <s> sets the widths of the columns in the row </s>
funcom_train/4122181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ServerPlayer getPlayer(Connection connection) { Iterator<Player> playerIterator = getGame().getPlayerIterator(); while (playerIterator.hasNext()) { ServerPlayer player = (ServerPlayer) playerIterator.next(); if (player.getConnection() == connection) { return player; } } return null; } COM: <s> gets a code player code specified by a connection </s>
funcom_train/31359919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close(){ endThread = true; // set to signal the thread that the occuring IOException is intentionally. log.debug("shutting down RegistrationThread (this object)."); try { if (objThread.isAlive()) serverSocket.close(); } catch (IOException e) { // this shouldn't happen because the thread should only be dead whenever the socket is closed. log.error("Trying to shut down ServerSocket while socket already closed.", e); } } COM: <s> shuts down the server socket as well as the listening thread </s>
funcom_train/2564908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkAllowedSubstate(MetaState newMetaState) { if (newMetaState instanceof MetaRealState) { MetaRealState newMetaRealState = (MetaRealState) newMetaState; if (isSubstate(newMetaRealState.getTag())) { throw ErrorMessages.newIllegalArgumentException( ErrorMessage.EXISTING_META_TAG, newMetaRealState .getTag(), this.getTag()); } } } COM: <s> verifies that a </s>
funcom_train/29290030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateFaq(FaqCMPData data) throws EJBException { try { FaqCMPLocal faqLocal = getFaqCMPLocalHome() .findByPrimaryKey(data.getFaq_id()); faqLocal.setFaq_answer(data.getFaq_answer()); faqLocal.setFaq_question(data.getFaq_question()); } catch (FinderException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> update faq business method </s>
funcom_train/37537499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeQuote(Quote o) { try { PreparedStatement ps = getStatement("removeQuote","DELETE FROM quotes WHERE quote = ? AND author = ?"); ps.setString(1,o.getQuote()); ps.setString(2,o.getAuthor()); ps.executeUpdate(); } catch (SQLException sqlEx) { throw new RuntimeException(sqlEx); } } COM: <s> removes the specified quote from the database </s>
funcom_train/1317698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void apply(float dt, SpringPoint node) { windDirection.x += dt * (FastMath.nextRandomFloat() - 0.5f); windDirection.z += dt * (FastMath.nextRandomFloat() - 0.5f); windDirection.normalize(); float tStr = FastMath.nextRandomFloat() * strength; node.acceleration.addLocal(windDirection.x * tStr, windDirection.y * tStr, windDirection.z * tStr); } COM: <s> called during the update of the cloth </s>
funcom_train/3831931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean evaluate (Feature feature) throws FilterEvaluationException { String id = feature.getId (); for (int i = 0; i < featureIds.size (); i++) { FeatureId featureId = (FeatureId) featureIds.get (i); if (id.equals (featureId.getValue ())) return true; } return false; } COM: <s> calculates the tt feature filter tt s logical value based on the id </s>
funcom_train/22122239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadScenarioMusic() { // Create any extension file filter to search for files with // the .mp3 extension final ExtensionFileFilterIO mp3Filter = new ExtensionFileFilterIO(); mp3Filter.addExtension("mp3"); // Get the folder "music" in the home directory of the // launching class, not the root file; musicFile = new File("music"); musicScenarioFiles = musicFile.listFiles(mp3Filter); } COM: <s> load mp3s from the music folder </s>
funcom_train/3023983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void require(String tag, String descr) { if (descr!=null && !contains(tag)) { JavaDocComponent jdc = new JavaDocComponent(); jdc.setType(tag); jdc.setDescription(descr); addJavaDocComponent(jdc); jdc.setRequired(true); } } COM: <s> make a required field </s>
funcom_train/40222559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int numberVacant () { int numEmpty = 0; for (int f = 0; f < freeCells.length; f++) { if (freeCells[f].empty()) numEmpty++; } // now count columns for (int c = 0; c < columns.length; c++) { if (columns[c].empty()) numEmpty++; } return numEmpty; } COM: <s> returns the number of vacant free cells and columns </s>
funcom_train/13271726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void skipWhiteSpaces(String text, ParsePosition fieldPosition) { while (fieldPosition.getIndex() < text.length() && Character.isWhitespace(text.charAt(fieldPosition.getIndex()))) { fieldPosition.setIndex(fieldPosition.getIndex() + 1); } } COM: <s> increases the index of code field position code to skip white spaces </s>
funcom_train/22358295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toDebugString() { return "SHIP[" + "shoreId=" + shoreId + "," + "size=" + size + "," + "damageRation=" + damageRatio + "," + "deprecatedLoad=" + deprecatedLoad + "," + "deprecatedCapacity=" + deprecatedCapacity + "]"; } COM: <s> this is a helper function for showing inner object state </s>
funcom_train/10274272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void openFile() throws HsqlException { try { FileOutputStream fos = new FileOutputStream(outFile, true); outDescriptor = fos.getFD(); fileStreamOut = new BufferedOutputStream(fos, 2 << 12); } catch (IOException e) { throw Trace.error(Trace.FILE_IO_ERROR, outFile); } } COM: <s> file is opened in append mode although in current usage the file </s>
funcom_train/8241501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setLookAndFeelList() { for (LookAndFeelInfo lnf : UIManager.getInstalledLookAndFeels()) { lookAndFeelMap.put(lnf.getName(), lnf.getClassName()); } notify(new SetLookAndFeelListType(lookAndFeelMap)); } COM: <s> receives all available look and feel types and puts them into list </s>
funcom_train/44733516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void executeCommand(String command, boolean arg) throws StellariumException { long delay = 0; String commandline = command + (arg ? "1" : "0"); executeCommand(commandline, delay, true);// Assumed to be trusted! // delay is ignored, as not needed by the ui callers } COM: <s> for easy calling of simple commands with a boolean as last argument value </s>