__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/16482445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetTableColumns() { TableColumnModel columnModel = bbtTable.getColumnModel(); for(int i =0;i<bbtTable.getColumnCount(); i++) { TableColumn column = columnModel.getColumn(i); column.setPreferredWidth(genericRowHeight); column.setHeaderRenderer(getVerticalHeaderCellRenderer()); } } COM: <s> rebuilds the table columns data </s>
funcom_train/37817903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawTree(Node node, int dx, int dy) { if (node == null) return; drawTree(node.getLeftChild(), dx, dy); drawTree(node.getRightChild(), dx, dy); int x = getXFor(node); int y = getYFor(node); if (node != tree.getRoot()) drawLine(x+dx, y+dy, getXFor(node.getParent())+dx, getYFor(node.getParent())+dy, node); drawNode(x+dx, y+dy, node); } COM: <s> draws a the partial tree with the given root node and coordinate offsets </s>
funcom_train/27821592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processDragEvent(DropTargetDragEvent dtde) { if (!acceptsDrag(dtde)) { if (m_borderedViewport!=null) m_borderedViewport.setBorderShown(false); dtde.rejectDrag(); } else { if (m_borderedViewport!=null) m_borderedViewport.setBorderShown(true); dtde.acceptDrag(dtde.getSourceActions()); } } COM: <s> processes a drag event </s>
funcom_train/26130562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void regenerate() { synchronized (worm) { worm.removeAllElements(); worm.addElement(new WormLink(INIT_X, INIT_Y, INIT_LEN, INIT_DIR)); // Reset class variables currentDirection = INIT_DIR; needUpdate = false; hasEaten = false; moveOnNextUpdate = false; } } COM: <s> regenerate the worm in its initial position </s>
funcom_train/7383766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean intersects(mxCellState state, MouseEvent e) { if (isHotspotEnabled()) { return mxUtils.intersectsHotspot(state, e.getX(), e.getY(), hotspot, mxConstants.MIN_HOTSPOT_SIZE, mxConstants.MAX_HOTSPOT_SIZE); } return true; } COM: <s> returns true if the given mouse event intersects the given state </s>
funcom_train/29022097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(int rowIndex, int columnIndex) { Target target = (Target)areas.get(rowIndex); switch(columnIndex){ case 0:return target.toString(); case 1:return target.getArea(); } int variableIndex=(columnIndex-2)/2; if(values[variableIndex].isEmpty()){ System.out.println("error in export table"); } if(columnIndex%2==0)return values[variableIndex].get(rowIndex); else return valuesAve[variableIndex].get(rowIndex); } COM: <s> returns the value for the cell at code column index code and </s>
funcom_train/17853859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createPropertyEntries(JarFile jarfile, JarEntry entry) { mProp = new Properties(); try { mProp.load(jarfile.getInputStream(entry)); Enumeration<Object> keys = mProp.keys(); while (keys.hasMoreElements()) { add(new PropertiesEntryNode((String) keys.nextElement())); } } catch (IOException e) { e.printStackTrace(); } } COM: <s> creates all property entry nodes </s>
funcom_train/2517898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValues(DateProfile<E> source) { for (int sourceIndex = 0; sourceIndex <= source.getRange(); sourceIndex++) { try { E sourceEntry = source.get(sourceIndex); Calendar cal = source.indexToCal(sourceIndex); E thisEntry = getValue(cal); E mergedEntry = merge(thisEntry, sourceEntry); setValue(cal, mergedEntry); } catch (IndexOutOfBoundsException ex) { break; } } } COM: <s> sets the values in this profile to those provided in adjustments </s>
funcom_train/24535971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TableColumn getIvjTableColumn() { if(ivjTableColumn == null) { ivjTableColumn = new TableColumn() ; // Explicit Instance ivjTableColumn.setHeaderValue( "Task" ); ivjTableColumn.setPreferredWidth(40) ; // JVE Generated ivjTableColumn.setResizable(false) ; // JVE Generated ivjTableColumn.setModelIndex(0) ; // JVE Generated } return ivjTableColumn; } COM: <s> this method initializes ivj table column </s>
funcom_train/37081772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL makeUrlFromString(String urlString) { URL url; urlString = fillInDatabase(urlString); urlString = fillInPadding(urlString); try { url = new URL(urlString); } catch ( MalformedURLException ex ) { logger.error("caught exception creating URL " + urlString, ex); return(null); } return(url); } COM: <s> make url from url string replace database with selected database </s>
funcom_train/5578286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void roundEnd(RoundEvent e) { // on vérifie qu'il y aie exactement un joueur avec une main vide int emptyHands = 0; for (Player p : e.getGame().getPlayers()) { if (((UnoPlayer) p).getHand().getSortedList().isEmpty()) emptyHands++; } if (emptyHands == 1) { EndDialog end = new EndDialog(Frame.this, "Fin de la partie"); end.setVisible(true); } deck.repaint(); } COM: <s> action made when a round ends </s>
funcom_train/46618235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClassLoader getClassLoader() { ClassLoader cl; cl = ClasspathUtils.getClassLoaderForPath( getContextProject(), this.classpath, getClassLoadId(), this.reverseLoader, loaderId != null || isMagicPropertySet(getContextProject())); return cl; } COM: <s> finds or creates the classloader for this </s>
funcom_train/28768753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WsMockControl failIf(String expression, Map<String, String> namespaceMap) { XPathRequestValidator validator = new XPathRequestValidator(); validator.setExceptionMapping(Collections.singletonMap(expression, "XPath assertion \"" + expression + "\" failed.")); XPathExpressionResolver expressionResolver = new XPathExpressionResolver(); expressionResolver.setNamespaceMap(namespaceMap); validator.setExpressionResolver(expressionResolver); addRequestProcessor(validator, "failIf(\"" + expression + "\")"); return this; } COM: <s> mock will fail if the expression evaluates to true </s>
funcom_train/2786104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void skippedComparison(Node control, Node test) { if (differenceListenerDelegate != null) { differenceListenerDelegate.skippedComparison(control, test); } else { System.err.println("DifferenceListener.skippedComparison: " + "unhandled control node type=" + control + ", unhandled test node type=" + test); } } COM: <s> difference listener implementation </s>
funcom_train/4514619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateCustomDimension() { int dimension = this.commandButton.getCustomDimension(); if (dimension > 0) { this.commandButton.getIcon().setDimension( new Dimension(dimension, dimension)); this.commandButton .setDisplayState(CommandButtonDisplayState.FIT_TO_ICON); this.commandButton.invalidate(); this.commandButton.revalidate(); this.commandButton.doLayout(); this.commandButton.repaint(); } } COM: <s> updates the custom dimension </s>
funcom_train/13443948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setI(String include) { _xsds = new FileSet(); _xsds.setDir(getProject().getBaseDir()); if(include.startsWith("./") || include.startsWith(".\\") ) include = include.substring( 2, include.length() ); _xsds.setIncludes(include); } //-- setI COM: <s> sets the file to include </s>
funcom_train/37650600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void selectCheckedRenderers() { Set<String> activeNames = preferences.activeReportRenderers(); for (TableItem item : tableViewer.getTable().getItems()) { Renderer ren = (Renderer)item.getData(); item.setChecked( activeNames.contains( ren.getName()) ); } } COM: <s> check the renderers as noted from the preferences </s>
funcom_train/39101432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void popupSelectorModel() { TextSelector textSelector = TextSelectorManager.getInstance().getTextSelector(textSelectorName); if (textSelector == null) { return; } if (textSelector.popup()) { try { target.setText(textSelector.getText()); } catch (Exception ex) { throw new RuntimeException(ex); } } } COM: <s> activates the selector popup method </s>
funcom_train/20077580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void organizeMatrix(double[][] matrix) throws MSNException { int limit = matrix.length * matrix.length; int j = 0; while (!diagonalOK(matrix) && j < limit) { for (int i = 0; i < matrix.length; i++) { if (matrix[i][i] == 0) changeLines(i, findLineToChange(i, matrix), matrix); } j++; } if (j == limit) throw new MSNException("Impossivel Diagonalizar a matriz!!"); } COM: <s> try to manipulate the matrix to avoid zeros in the main diagonal </s>
funcom_train/15609612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection removeSubStructureAndRemoveAlignments(boolean deleteFromWorkspace) { Workspace theWorkspace = null; GenomeVersion theGenomeVersion = CuratedFeature.this.getGenomeVersion(); if (theGenomeVersion != null) { theWorkspace = theGenomeVersion.getWorkspace(); } return this.removeSubStructureAndRemoveAlignments( deleteFromWorkspace, theWorkspace); } COM: <s> remove the only alignment for this curated feature all its substructure </s>
funcom_train/5231101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean attrSpecified(int attr) { if (!(attr == EXISTS || attr == NO_ATTRIBUTES || attr == DOESNT_EXIST || attr == IS_DIR || attr == IS_FILE || attr == IS_READABLE || attr == IS_WRITEABLE)) { return false; } return (((attributes | attr) ^ 0xffff) != 0); } COM: <s> indicates whether an attribute has been specified for this file param </s>
funcom_train/49836253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createFileName() { String tableName = table.getName(); fileName = new String(org.dejave.attica.server.Database.ATTICA_DIR + System.getProperty("file.separator") + tableName + "_" + tableName.hashCode()); } // createFileName() COM: <s> creates a new filename for the entrys table name </s>
funcom_train/4439177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean matchBindings(Binding bindingOne, Binding bindingTwo) { boolean result = true; if ((bindingOne != null) && (bindingTwo != null)) { result = (bindingOne.getName().equals(bindingTwo.getName())) && bindingOne.getValue().toString().equals(bindingTwo.getValue().toString()); } return result; } COM: <s> compares two bindings and returns true when they are equal </s>
funcom_train/49333369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public View getItemView(MenuItemImpl item, View convertView, ViewGroup parent) { MenuView.ItemView itemView; if (convertView instanceof MenuView.ItemView) { itemView = (MenuView.ItemView) convertView; } else { itemView = createItemView(parent); } bindItemView(item, itemView); return (View) itemView; } COM: <s> prepare an item view for use </s>
funcom_train/26612840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initReportTypeMap() { addReportType( new ReportType( "count", "Count",0)); addReportType( new ReportType( "debug", "Debug",1)); addReportType( new ReportType( "info", "Info",2)); addReportType( new ReportType( "warn", "Warning",3)); addReportType( new ReportType( "error", "Error",4)); addReportType( new ReportType( "fatal", "Fatal Error",5)); } COM: <s> initialise the report type map with the default entries </s>
funcom_train/50150897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDayOfMonth(int in) { if (in<1) in=1; if (in>31) in=31; switch(getMonth()) { case 4: case 6: case 9: case 11: // Months with 30 ... if (in==31) in=30; break; case 2: int year=getYear(); if (in>28) if (year!=((year/4)*4)) in=28; else in=29; default: // 31 day months } gc.set(GregorianCalendar.DAY_OF_MONTH,in); if (debug) System.out.println(this.toString()); } COM: <s> set date day of month 1 31 </s>
funcom_train/29391769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInteger(String key, int defaultVal ) throws InvalidRequestException { String value = getMapValue(key,false); if ( null == value ) return defaultVal; try { return Integer.parseInt(value); } catch ( NumberFormatException ex) { String errMsg = "Input error during loading key=" + key + ", value=" + value; LOG.error(errMsg, ex); throw new InvalidRequestException(errMsg, ex); } } COM: <s> constructs a integer value from the http parameter </s>
funcom_train/49794186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String findFullName(String email) { for (HackystatUser user : this.users.values()) { if ((user.getEmailAccount() != null) && user.getEmailAccount().equalsIgnoreCase(email)) { return user.getFullName(); } } return null; } COM: <s> returns the full name associated with the email or null if not found </s>
funcom_train/42908939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateGeometricState(float time, boolean initiator) { if(this.update) { if(!this.dependent) this.processJoints(); for(int i = 0; i < this.meshes.length; i++) { this.meshes[i].updateMesh(); } this.update = false; } super.updateGeometricState(time, initiator); } COM: <s> updates all the geometric information for the code model node code </s>
funcom_train/22093041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void rendezVous() { Request reqHead = getHead(); if (reqHead == this) { synchronized (this) { _iRendezVous--; if (_iRendezVous==0) notifyAll(); else try { wait(); } catch (InterruptedException e) { _log.throwing( "Request", "rendezVous", e ); } } } else reqHead.rendezVous(); } COM: <s> arriving to the rendez vous then either wait </s>
funcom_train/50397019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void submitWorkAssignment(SubmitWorkAssignmentRequestDocument in, SecurityTokens tokens) throws MessagingException{ SOMessage msg=new SOMessage(in,tokens); if(logger.isDebugEnabled()){ try{ logger.debug("Sending message to service orchestrator\n"+msg.getRequest()); }catch(Exception e){ LogUtil.logException("No message.",e,logger); } } Kernel.getKernel().getMessaging().getChannel(Provider.SO_CHANNEL).publish(msg); } COM: <s> asynchronous workassignment submission </s>
funcom_train/2303992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModules(List modules) { Iterator it = modules.iterator(); allModules = new ArrayList(modules); childModules = new ArrayList(); descendantModules = new ArrayList(); while (it.hasNext()) { ResourceFinderModule module = (ResourceFinderModule)(it.next()); if (module.isChildSupported()) childModules.add(module); if (module.isDescendantSupported()) descendantModules.add(module); } } COM: <s> sets the ordered code list code of modules used by this class </s>
funcom_train/44544531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean validate(final File file) { try { Utils.checkFile(file, "inputFile"); return true; } catch (IOException ioex) { getLog().warn("\n\nQALab ==> The file " + file.getPath() + " cannot be accessed. SKIPPING....\n\n"); } return false; } COM: <s> validates the parameters supplied by maven 2 </s>
funcom_train/14093052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCalculatePercent3() { MyTestClass myClass = new MyTestClass(); myClass.setPosition(PERCENT); myClass.setReferencePoint(new Point(100, 100)); Point l = myClass.calculatePoint(new Rectangle(0, 0, 7, 7)); Point v = new Point(7, 7); assertEquals("Percent3:", v, l); } COM: <s> test calculation of southeast position with percent </s>
funcom_train/19967509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected V loadVector(Element vector){ String ontology = vector.getAttributeValue(SEMANTIC_VECTOR_ONTOLOGY); I id = idFromString(vector.getAttributeValue(SEMANTIC_VECTOR_ID)); V newVector = createVector(ontology,id); List<Element> children = vector.getChildren(SEMANTIC_VECTOR_CONCEPT); for (Element child : children){ try { C concept = stringToConceptType(child.getTextNormalize()); Float value = child.getAttribute(SEMANTIC_VECTOR_CONCEPT_VALUE).getFloatValue(); newVector.addConcept(concept, value); } catch (DataConversionException e) { e.printStackTrace(); } } return newVector; } COM: <s> used to load a semantic vector </s>
funcom_train/1903404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRegisterEntry() { boolean status = true; try { if (regMetacat != null) { status = regMetacat.registerEntry("testEntry", "", "testEntry/Resource") == EcoRegConstants.kNoError; } } catch (Exception e) { System.err.println(e); e.printStackTrace(System.err); } assertTrue(status); } COM: <s> test the registry register entry </s>
funcom_train/1109517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSet_phaseCC() { Chateau unChateau = new Chateau(); // dés la création, la phase de construction est 'DONJON' unChateau.set_phaseCC(PhaseConstructionChateau.TOURS); assertEquals(PhaseConstructionChateau.TOURS, unChateau.get_phaseCC()); } COM: <s> test of set phase cc method of class chateau </s>
funcom_train/42194597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String capitalize(String s) { String result; if (s == null || s.length() == 0) { result = s; } else { StringBuffer buf = new StringBuffer(); buf.append(Character.toUpperCase(s.charAt(0))); buf.append(s.substring(1)); result = buf.toString(); } return result; } COM: <s> turns first character to upper case </s>
funcom_train/37594082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private SymbolData _identifyVarType(String typeName, SourceInfo si) { // SymbolData sd = getSymbolData(typeName, si); // if (sd != null) return sd; // SymbolData enclosingSD = getQualifiedSymbolData(_enclosingClassName, SourceInfo.NONE); // assert enclosingSD != null; // return _enclosingClass.getInnerClassOrInterface(typeName); // // TODO: fails for nested inner classes // } COM: <s> identifies the symbol data in symbol table matching type name </s>
funcom_train/18846410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createBPDAssInternalErrorException(String tscToken) { DiagnosticsListCreator edg; edg = new DiagnosticsListCreator(); String severityType = DiagnosticsCodes.getErrorDiagnosticsCode(); String exceptionID = "80100"; String serExMsg = edg.constructErrorDocOneItem(tscToken, componentID, severityType, subSystemCode, exceptionID); return serExMsg; } COM: <s> construct diagnostics message </s>
funcom_train/4008959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void traceError(ConsoleOutput output,Throwable th) { if (trace) output.printError(th) ; else { do { String message = th.getMessage() ; output.printError(message,true) ; th = th.getCause() ; } while (th != null) ; } } COM: <s> trace an exception in the console output </s>
funcom_train/12162653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testResetAttributes() { XFImplicitAttributes attributes = new XFImplicitAttributes(); attributes.setClientVariableName("clientVariableName"); assertEquals("getClientVariableName returned wrong value", "clientVariableName", attributes.getClientVariableName()); attributes.resetAttributes(); assertNull("getClientVariableName should be null after call to" + " resetAttributes", attributes.getClientVariableName()); } COM: <s> test the reset attributes method </s>
funcom_train/36431752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object around(final ProceedingJoinPoint proceedingJoinPoint) { // TODO: get args and try to validate the ones that have validating // rules // TODO: block, or not, the business process depending on the result of // validation Object object = null; try { object = proceedingJoinPoint.proceed(); // TODO: Spread error codes to upper layers } catch (final Throwable e) { throw new TechnicalException( ValidatingBean.MBK_PROC_JOINPOINT_VALDITINGBEAN_ERROR, "Exception while proceeding to the next target method", e); } return object; } COM: <s> around advice can be used to validate bean args before proceeding the </s>
funcom_train/5859989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void todoListChanged() { PropertyChangeEvent pevent = new PropertyChangeEvent(this.naming(), this.naming(), 0, PTodoList.ENTRIES, this.getTodoListAsString()); this.getUser().getEventQueue().postEvent(pevent); } COM: <s> produces a property change event ptodo list </s>
funcom_train/32783573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public URL findInDirectory(final String path, final String filename) { URL res = null; final File file = new File(path, filename); if (file.exists() && !file.isDirectory()) { try { res = file.toURI().toURL(); } catch (final MalformedURLException e) { Debug.ignore(e); } } return res; } COM: <s> find in directory </s>
funcom_train/17201369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setImt(IMT imt) { if (VM.VerifyAssertions) VM._assert(imt.length() == IMT_METHOD_SLOTS); if (VM.VerifyAssertions) VM._assert(getType().isClassType()); set(TIB_INTERFACE_DISPATCH_TABLE_INDEX, imt); } COM: <s> set the imt of the tib </s>
funcom_train/25028159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node external_serialize(Node startAt) throws Exception { startAt.isGoodArgsCnt(1,2); Node res = null; res = abstrasy.externals.AExtTools.SerializationTK.createInitExpr("Math:Integer", new Node(number.get().toString()) ); return res; } COM: <s> s rialisation du integer </s>
funcom_train/48962721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Component getStateLists() { if(stateLists != null) return stateLists; else{ stateLists = new JPanel(); stateLists.add(getRatingsDifference(), BorderLayout.NORTH); // stateLists.add(getWelcomeMessage()); // stateLists.add(getTwitterLyricsTop100()); stateLists.add(getWorldMap()); stateLists.setPreferredSize(new Dimension(800,800)); stateLists.setBackground(Color.WHITE); return stateLists; } } COM: <s> gives the panel for the center view of the state lists </s>
funcom_train/3035552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createAndAddDesignPage() { IDesignViewer tableTreeViewer = createDesignPage(); designViewer = tableTreeViewer; // note: By adding the design page as a Control instead of an // IEditorPart, page switches will indicate // a "null" active editor when the design page is made active designPageIndex = addPage(tableTreeViewer.getControl()); setPageText(designPageIndex, tableTreeViewer.getTitle()); } COM: <s> create and add the design page using a registered factory </s>
funcom_train/32734162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doArrival() { /* System.out.println("Arrival: Time is " + SimCalendar.getSimDateTime(Schedule.getSimTime()) + "\n"); */ int oldValue = numberArrivals; numberArrivals++; firePropertyChange("numberArrivals", oldValue, getNumberArrivals()); waitDelay("Arrival", interarrivalTimeRV.generate()); } COM: <s> the event method for the arrival event </s>
funcom_train/34589377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Request startPacket(List<String> path, boolean create) { List<String> absPath = getAbsPath(path); Request req = Request.to("Registry"); req.add("cd", Data.clusterOf(Data.listOf(absPath, Setters.stringSetter), Data.valueOf(create))); return req; } COM: <s> create a new packet for the registry server </s>
funcom_train/25698580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renameOpenTab(String name, String oldFullPath){ for(int i=0; i < jTabbedPane1.getTabCount(); i++){ if( jTabbedPane1.getComponentAt(i) instanceof EditorFrame){ EditorFrame frame = (EditorFrame)jTabbedPane1.getComponentAt(i); if( frame.getFile().getAboluteFileName().equals(oldFullPath)){ jTabbedPane1.setTitleAt(i, name); } } } } COM: <s> changes title of tab after file has been renamed </s>
funcom_train/35585851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getInputText() { if (inputText == null) {//GEN-END:|29-getter|0|29-preInit // write pre-init user code here inputText = new TextField("Enter Text:", "", 1, TextField.ANY);//GEN-LINE:|29-getter|1|29-postInit // write post-init user code here }//GEN-BEGIN:|29-getter|2| return inputText; } COM: <s> returns an initiliazed instance of input text component </s>
funcom_train/10766870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CompilationMessage errPortTypeMismatch(QName portType, QName expectedPortType) { return this.formatCompilationMessage("The port type \"{0}\" does not match the expected" + " port type (\"{1}\").", portType, expectedPortType); } COM: <s> the port type 0 does not match the expected port type 1 </s>
funcom_train/51413891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean executeSuccess(String sql, boolean isNeededEntry) { ResultSet rs = null; boolean result = false; try { rs = DBHelper.executeQuery(sql, false); if(isNeededEntry) { try { result = rs.next(); } catch (SQLException e) {} }else result = true; } catch (CMExceptionDBExecuteStatement e) {} LOGGER.debug("Evaluate result of <"+sql+"> -> " + result); try { if(rs != null) { rs.close(); rs.getStatement().close(); } } catch (SQLException e) {} return result; } COM: <s> checks if a statement was able to execute successfully </s>
funcom_train/42008855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAppletInfo() { return "PlotApplet " + PlotBox.PTPLOT_RELEASE + ": A data plotter.\n" + "By: Edward A. Lee, eal@eecs.berkeley.edu and\n " + "Christopher Hylands, cxh@eecs.berkeley.edu\n" + "($Id: PlotApplet.java,v 1.1.1.1 2004/01/26 21:52:02 hyuklim Exp $)"; } COM: <s> return a string describing this applet </s>
funcom_train/39102306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exceptionAction(Throwable e) { Assert.pre(e != null, "Throwable e is not null"); FWLog.log("AbstractCommand: An exception in command '" + getCommandName() + "' during command execution"); if (e instanceof ErrorMessageException) { DialogManager.error(e); } else { throw new RuntimeException(e); } } COM: <s> action to be performed in case an exception was thrown during command </s>
funcom_train/23949353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void translateCountryList(List<String> pCountryList) throws Exception { String tempStr = null; for (int i=pCountryList.size()-1; i>=0; i--) { tempStr = countryName2ISO(pCountryList.get(i)); if (null != tempStr) { pCountryList.set(i, tempStr ); } else { pCountryList.remove(i); } } } COM: <s> translates a given country list from country names to iso codes </s>
funcom_train/21689640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String center(String s) { StringBuilder builder = new StringBuilder(width); int fill = width - s.length(); for (int i = 0; i < fill / 2; i++) builder.append(' '); builder.append(s); for (int i = 0; i < fill - fill / 2; i++) builder.append(' '); return builder.toString(); } COM: <s> returns a centered string </s>
funcom_train/3367686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SynthStyle getDefaultStyle() { if (_defaultStyle == null) { _defaultStyle = new DefaultSynthStyle(); ((DefaultSynthStyle)_defaultStyle).setFont( new FontUIResource(Font.DIALOG, Font.PLAIN,12)); } return _defaultStyle; } COM: <s> returns the style to use if there are no matching styles </s>
funcom_train/3771782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updatePrompt(String path) { StringBuffer buff = new StringBuffer(); try { buff.append("[" + httpURL.getHost().toUpperCase() + "] "); buff.append(path); } catch (Exception e) { buff.append("[ Slide ]"); } buff.append(" $ "); commandPrompt = buff.toString(); } COM: <s> update the command prompt for the display </s>
funcom_train/1011628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mapgrid2f(int nu, float u0, float u1, int nv, float v0, float v1) { if (output_triangles) { // System.out.println("TODO openglsurfaceavaluator.mapgrid2f output_triangles"); } else { gl.glMapGrid2d(nu, u0, u1, nv, v0, v1); } } COM: <s> defines 2 d mesh </s>
funcom_train/32649434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createCellWidthThemeTextField1() { GridData gridData15 = new GridData(); gridData15.widthHint = 50; cellWidthThemeTextField1 = new ThemeTextField(topComposite, SWT.NONE); cellWidthThemeTextField1.setEmbeddedInBindableGroup(false); cellWidthThemeTextField1.setBindingSubPath("cellWidth"); cellWidthThemeTextField1.setLayoutData(gridData15); cellWidthThemeTextField1.setIntValued(true); } COM: <s> this method initializes cell width theme text field1 </s>
funcom_train/46190296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAggregated() { blogEntry.setOriginalPermalink("http://www.simongbrown.com/blog/2003/04/01.html#a123456789"); assertTrue(blogEntry.isAggregated()); blogEntry.setOriginalPermalink(null); assertFalse(blogEntry.isAggregated()); blogEntry.setOriginalPermalink(""); assertFalse(blogEntry.isAggregated()); } COM: <s> tests the aggregated property </s>
funcom_train/12925091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DefineTextField setLeading(final Integer aNumber) { if ((aNumber < Coder.SHORT_MIN) || (aNumber > Coder.SHORT_MAX)) { throw new IllegalArgumentRangeException( Coder.SHORT_MIN, Coder.SHORT_MAX, aNumber); } leading = aNumber; return this; } COM: <s> sets the spacing between lines measured in twips </s>
funcom_train/29063184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addConstraintPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NamedPointcut_constraint_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NamedPointcut_constraint_feature", "_UI_NamedPointcut_type"), AspectxPackage.eINSTANCE.getNamedPointcut_Constraint(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the constraint feature </s>
funcom_train/40741426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updatePrimaryCheckColumn() { if ((getStyle() & SWT.CHECK) == SWT.CHECK) { boolean firstCol = true; for (Iterator iter = columns.iterator(); iter.hasNext();) { GridColumn col = (GridColumn) iter.next(); col.setTableCheck(firstCol); firstCol = false; } } } COM: <s> manages the setting of the checkbox column when the swt </s>
funcom_train/31160220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File f) { if (f != null) { if (f.isDirectory()) return true; String extension = getExtension(f); if (extension != null && (extension.equals("pl") || extension.equals("pro"))) return true; } return false; } COM: <s> return true if this file should be shown in the directory pane </s>
funcom_train/13490627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rule applyToRule(Collection r) { cachedToString = null; Vector newBody = new Vector(getBody().size()); for (Iterator it = getBody().iterator(); it.hasNext();) { newBody.add(((Fact) it.next()).apply(r)); } Rule rule = new RuleImpl(newBody, (Fact) getHead().apply(r)); rule.setBodyOrConnected(isBodyOrConnected()); return rule; } COM: <s> apply a set of substitutions </s>
funcom_train/20891705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { if (input != null) { BufferedReader br = new BufferedReader(new InputStreamReader(input)); try { String read = null; while ((read = br.readLine()) != null) { synchronized (buffer) { buffer.append(read); buffer.append("\n"); } lineCounter++; if (lineCounter % 1000 == 0) { synchronized (buffer) { writeToFile(); buffer.setLength(0); } } } } catch (IOException e) { e.printStackTrace(); } } } COM: <s> reads the requested file and transfers it to the controller </s>
funcom_train/48076464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStartStopWARNLogLevel() { //log.setLevel( Level.WARN ); PerformanceMonitor monitor = PerformanceMonitor.getMonitor(); PerformanceMonitor.MonitorKey key = monitor.startMonitoring(1, "Test"); monitor.stopMonitoring( key ); try { monitor.stopMonitoring( key ); fail("Handed in same key twice"); } catch (IllegalStateException ise ) { assertTrue(true); } } COM: <s> test behavior when warn log level is set </s>
funcom_train/31986559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(FileOutput file) { if ( file == null ) { sendWarning ( "Can not register FileOutput! Command ignored.", "Experiment '"+getName()+"' method void register(FileOutput file).", "The parameter given was a null reference.", "Make sure to only connect valid FileOutputs at the Experiment."); return; } if ( fileRegistry.contains(file) ) return; // file already registered fileRegistry.addElement(file); } COM: <s> registers a file output at the experiment </s>
funcom_train/45486811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonExport() { if (jButtonExport == null) { jButtonExport = new JButton(); jButtonExport.setBounds(new Rectangle(10, 691, 116, 23)); jButtonExport.setText("Export"); jButtonExport.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ControllRobot cr = new ControllRobot(); cr.setLocationRelativeTo(null); cr.setVisible(true); } }); } return jButtonExport; } COM: <s> this method initializes j button export </s>
funcom_train/45117537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkIsConnetedToRemoteAgent(){ if (RunnerEngineManager.getRunnerEngine() instanceof ApplicationRunnerEngineImpl){ return false; } JOptionPane.showOptionDialog(null, "Manual navigation can not be activated when JRunner is connected to a remote agent","Manual Fixtures Navigation", JOptionPane.OK_OPTION,JOptionPane.INFORMATION_MESSAGE, ImageCenter.getInstance().getImage(ImageCenter.ICON_INFO), new String[]{"Close"}, "Close"); return true; } COM: <s> checks the current engine type if it is </s>
funcom_train/11111912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOutputStream() throws Exception { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); XHTMLContentHandler xhtml = new XHTMLContentHandler( new BodyContentHandler(buffer), new Metadata()); xhtml.startDocument(); xhtml.element("p", "Test text"); xhtml.endDocument(); assertEquals("Test text\n", buffer.toString()); } COM: <s> test that the conversion to an </s>
funcom_train/6440009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PrintWriter getPrintWriter( File f ) throws java.io.IOException, java.io.FileNotFoundException { if( !f.exists() ) { boolean mkdirs = f.getParentFile().mkdirs(); boolean createFile = f.createNewFile(); } FileOutputStream fos = new FileOutputStream( f ); BufferedOutputStream buf = new BufferedOutputStream( fos ); return new PrintWriter( buf ); } COM: <s> utility method to create a print writer given a file </s>
funcom_train/39380599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParent(Object parent) { if (parent == this) { throw new IllegalArgumentException("Cannot set parent to itself"); } if (getName() == null) { String msg = "ActionLink name not defined."; throw new IllegalArgumentException(msg); } this.parent = parent; } COM: <s> set the parent of the action link </s>
funcom_train/16081844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyLeave(DetailAST aAST) { final ArrayList visitors = (ArrayList) mTokenToChecks.get(TokenTypes.getTokenName(aAST.getType())); if (visitors != null) { for (int i = 0; i < visitors.size(); i++) { final Check check = (Check) visitors.get(i); check.leaveToken(aAST); } } } COM: <s> notify interested checks that leaving a node </s>
funcom_train/4744419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPermissionType(int permID) { String result = null; Right found = this.getPermissionFromCollection( createUserGroupData.getPermissions(), permID); if (found != null) { result = this.rights.get(found).getRightName(); } return result; } COM: <s> returns the permission type of a given permission </s>
funcom_train/36716189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseReleased(int button, int x, int y) { //Set state back to UP unless the mouse is over, //if it is then set it to ROLLOVER. state = (inside) ? ROLLOVER : UP; //only dispatch if we've released inside of the component if (inside) dispatchEvent(); } COM: <s> called when the mouse is released </s>
funcom_train/30005578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemRemove() { if (jMenuItemRemove == null) { jMenuItemRemove = new JMenuItem(); jMenuItemRemove.setText(LanguageController.getInstance().getString(this.plugin, "Popup_Remove")); jMenuItemRemove.addActionListener(this); } return jMenuItemRemove; } COM: <s> returns a menu item to remove the test base </s>
funcom_train/3596629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List getElements(NObjectSet set) { ArrayList elements = new ArrayList(); Document doc = Document.getInstance(); NOMElement element = doc.getCorpus().getRootWithColour(set.getName()); while (element.hasNextElement()) { element = element.getNextElement(); elements.add(element); } return elements; } COM: <s> returns a list with the elements in an object set </s>
funcom_train/44166838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void move(Unit unit, Direction direction) { if (!requireOurTurn()) return; moveDirection(unit, direction, true); // TODO: check if this is necessary for all actions? SwingUtilities.invokeLater(new Runnable() { public void run() { freeColClient.getActionManager().update(); gui.updateMenuBar(); } }); } COM: <s> moves the specified unit in a specified direction </s>
funcom_train/9162527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setShape(final Shape shape) { if(shape == null) { throw new IllegalArgumentException("Shape cannot be null."); } final PropertyChangeEvent event = new PropertyChangeEvent(this,"shape",this.shape,shape); this.shape = shape; getPropertyChangeSupport().firePropertyChange(event); } COM: <s> sets the shape of the of the entity </s>
funcom_train/31625430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Model buildModel() { long startTime = System.currentTimeMillis(); //Start the building ModelNode modelNode = buildModelNode(null, root, 0); //Grab the result DefaultModel result = new DefaultModel(modelNode); if (LOG.isInfoEnabled()) { LOG.info("Model building complete. Time taken: " + (System.currentTimeMillis() - startTime) + " ms."); } return result; } COM: <s> function that builds the actual model that has been defined in the </s>
funcom_train/18847157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createInvalidSourceTargetNodeException(String tscToken, String connectableNodeID) { PropertyMap propertyMap = new PropertyMap(); DiagnosticsListCreator edg; edg = new DiagnosticsListCreator(); String severityType = DiagnosticsCodes.getErrorDiagnosticsCode(); String exceptionID = "80083"; propertyMap.addPropertyValuePair("connectableNodeID", connectableNodeID); String serExMsg = edg.constructErrorDocOneItemParam(tscToken, componentID, severityType, subSystemCode, exceptionID, propertyMap); return serExMsg; } COM: <s> create invalid source target node specification exception </s>
funcom_train/31890135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element findUser(String login) { rereadConfig(); List l = cfgFile.selectNodes("//permctrlcfg/users/user"); int i; Element usr; for (i = 0; i < l.size(); i++) { usr = (Element) l.get(i); if (usr.elementText("login").compareTo(login) == 0) { return usr; } } return null; } COM: <s> finds user element in config file for specified user </s>
funcom_train/50344667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDepartureTime(){ // check to see if the route has a departure time RouteLocation rl = getTrainDepartsRouteLocation(); if (rl != null && !rl.getDepartureTime().equals("")){ // need to forward any changes to departure time rl.removePropertyChangeListener(this); rl.addPropertyChangeListener(this); return rl.getDepartureTime(); } int hour = _departureTime.get(Calendar.HOUR_OF_DAY); int minute = _departureTime.get(Calendar.MINUTE); String h = Integer.toString(hour); if (hour < 10) h = "0"+h; if (minute < 10) return h+":0"+minute; return h+":"+minute; } COM: <s> gets trains departure time </s>
funcom_train/31059235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sortRows() { EditorRow[] arrayRows= new EditorRow[rows.size()]; arrayRows= (EditorRow[]) rows.toArray(arrayRows); Arrays.sort(arrayRows); // rows= (ArrayList) Arrays.asList(arrayRows); rows.clear(); for (int i= 0; i < arrayRows.length; i++) { rows.add(arrayRows[i]); } } COM: <s> method sort rows </s>
funcom_train/174393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int nextIndex() { checkConcurrentModification(); hasNext(); int count = 0; for (int i = 0; i < ContentList.this.size(); i++) { if (filter.matches(ContentList.this.get(i))) { if (i == cursor) { return count; } count++; } } expected = ContentList.this.getModCount(); return count; } COM: <s> returns the index of the element that would be returned by a </s>
funcom_train/48391885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addCellSavedHandler(com.smartgwt.client.widgets.grid.events.CellSavedHandler handler) { if (getHandlerCount(com.smartgwt.client.widgets.grid.events.CellSavedEvent.getType()) == 0) setupCellSavedEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.grid.events.CellSavedEvent.getType()); } COM: <s> add a cell saved handler </s>
funcom_train/24210785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LongRange intersection(LongRange r) { if(r.a < a) return r.intersection(this); if(b < r.a) return new LongRange(0L, 0L); if(r.b <= b) return r; return new LongRange(r.a, b); } COM: <s> compute the intersection of two ranges </s>
funcom_train/5600802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void show() { final JFrame frame = new JFrame("Navigateur"); // TODO: localize frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.setContentPane(desktop); frame.setSize(800, 600); frame.setVisible(true); } COM: <s> shows this browser in a frame </s>
funcom_train/29830232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireNodeEntities(InfoQuery iq, PubsubEntities entities, String id) { for (Enumeration e = pubsubListeners.elements(); e.hasMoreElements(); ) { BSPubsubListener listener = (BSPubsubListener) e.nextElement(); listener.nodeEntities(iq, entities, id); } } COM: <s> notifies pubsub listeners about received entities in node </s>
funcom_train/50915132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CMLBondSet getBondsById(String[] ids) throws RuntimeException { CMLBondSet bondSet = new CMLBondSet(); for (String id : ids) { CMLBond bond = this.getBondById(id); if (bond != null) { bondSet.addBond(bond); } else { throw new RuntimeException("Cannot find bond: " + id); } } return bondSet; } COM: <s> gets bonds by ids </s>
funcom_train/44890162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setDocumentation(Definition definition, SimpleNode node) { if (node.getNumChildren() == 0) return; SimpleNode child = node.getChild(0); if (child.getNumChildren() == 0) return; child = child.getChild(0); if (child.id != PythonGrammarTreeConstants.JJTSTRING) return; definition.setDocumentation(filterLeadingWhiteSpace((String) child.getInfo(), child.beginColumn - 1)); } COM: <s> set the documentation string of the given definition if the given </s>
funcom_train/29691173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getJComboBox() { if (jComboBox == null) { jComboBox = new JComboBox(); jComboBox.setMaximumRowCount(2); jComboBox.setLocation(new java.awt.Point(31,55)); jComboBox.setSize(new java.awt.Dimension(52, 18)); jComboBox.addItem("Am"); jComboBox.addItem("Pm"); } return jComboBox; } COM: <s> this method initializes j combo box </s>
funcom_train/29627877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void validate() throws InitializationError { List<Throwable> errors= new ArrayList<Throwable>(); // calling the super method here, since in this class, we override it to do nothing collectInitializationErrors(errors); if (!errors.isEmpty()) throw new InitializationError(errors); } COM: <s> performs validation of the test class </s>
funcom_train/3611828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAttachment (java.net.URL attachment) { java.net.URL urlAttachment = attachment; javax.activation.DataHandler dataHandler = new javax.activation.DataHandler(urlAttachment); javax.xml.soap.AttachmentPart ap = m_msg.createAttachmentPart(dataHandler); ap.setContentId(ATTACH_CONTENTID); m_msg.addAttachmentPart (ap); } COM: <s> adds an attachment to the message </s>
funcom_train/1832677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() throws ServletException { ServletContext application = getServletContext(); String resourcePath = application.getRealPath("/"); resourcePath += "/WEB-INF/PageDecorator.xml"; PageDecoratorXmlLoader pageDecoratorXmlLoader = PageDecoratorXmlLoader .getInstance(); htPageDecorating = pageDecoratorXmlLoader.loadSettings(resourcePath); // application.setAttribute("actionMapping",htActionMapping); } COM: <s> initialization of the servlet </s>