__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/20045589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _reload() { requiredMethod("load()") ; requiredMethod("addLoadListener()") ; boolean result = true ; oObj.reload() ; shortWait() ; result = oObj.isLoaded() && loadListener.reloadedCalled; tRes.tested("reload()", result) ; } COM: <s> reloads the form </s>
funcom_train/19618430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PolarCoordinate getPolarCoordinates(int x, int y) { // 1. First translate such that x and y are relative to (0, 0). int maxDepth = moGraphicModel.getMaxDepth(); int centerX = (maxDepth * radius + 2 * radius) / 2; int centerY = centerX; return _getPolarCoordinates(x, y, centerX, centerY); } // of method COM: <s> this one will return the polar coordinates according to the center </s>
funcom_train/18591381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processEvent(Sim_event ev) { Object data = null; data = ev.get_data(); // get the event's data if (data != null && data instanceof Gridlet) { Gridlet gl = (Gridlet)data; completedJobs.add(gl); } else { // handle ping request if (ev.get_tag() == GridSimTags.INFOPKT_SUBMIT) { processPingRequest(ev); } } } COM: <s> processes events sent to this entity </s>
funcom_train/38971769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void translationExamples() { System.out.println(translator.i18n("tr(String)")); System.out.println(translator.i18n("tr(String, Objects)", 123, "abc")); System.out.println(Translator.getTranslator(I18NJavaParserTest.class) .i18n("tr(Context,String)")); System.out.println(Translator.getTranslator(I18NJavaParserTest.class) .i18n("tr(Context,String, Objects)", 123, "abc")); System.out .println(translator.i18n("This test for processing multi line" + "texts in tr()!")); System.out.println(translator.i18n("Test!")); } COM: <s> this method just includes different representations of i18 n strings </s>
funcom_train/40433850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MendozaCommandResult refundOrder(final MendozaRequest request) { log.trace("Entering refundOrder"); MendozaRefundOrderCommand command = new MendozaRefundOrderCommand(request, this, serverState); command.execute(); log.trace("Leaving refundOrder"); return command.getResult(); } COM: <s> refunds the order </s>
funcom_train/50078233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getInstance(String logicalComponentName) { if (log.isTraceEnabled()) { log.trace("Building new component: [" + logicalComponentName + "]"); } // 1) get the component's configuration ComponentConfiguration componentConfiguration = getComponentConfig(logicalComponentName); // 2) assemble the component Component requestedComponent = assembleComponent(componentConfiguration); // 3) initialize the component initializeComponent(requestedComponent); return requestedComponent; } COM: <s> p builds the component specified by the name parameter </s>
funcom_train/10522441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object lookupHomeInstance() throws NamingException { javax.naming.Context ctx = getInitialContext(); try { return ctx.lookup(_jndiName); } catch (NameNotFoundException nnfe) { // attempt again without application scoping if (!_jndiName.startsWith(JNDI_APPSCOPED_PREFIX)) { throw nnfe; } } return ctx.lookup(_jndiName.substring(JNDI_APPSCOPED_PREFIX.length())); } COM: <s> do a jndi lookup for the home instance of the ejb </s>
funcom_train/25792724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateMultilineString() { String text = ""; String multilineText = ""; for (int i = 0; i < LENGTH_OF_MULTILINE_STRING; i++) { if (i == MSCToolTipControl.CHARACTERS_PER_LINE) { multilineText += "<br>"; } text += "a"; multilineText += "a"; } String actualMultilineText = m_mscToolTipControl.createMultilineString(text); assertEquals(multilineText, actualMultilineText); } COM: <s> test if the function adds a br tag at the correct position </s>
funcom_train/19422494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getObject(int columnIndex) { Object returnValue = null; if (curRecord != null) { String columnName = metaData.getColumnName(columnIndex).toLowerCase(); if (columnName != null) { if (curRecord.get(columnName) != null) { returnValue = curRecord.get(columnName); } } } return returnValue; } COM: <s> p gets the value of the designated column in the current row </s>
funcom_train/14461702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String qualifySheetname(String s) { try { if (s.charAt(0)!='\'' && (s.indexOf(" ")>-1 || s.indexOf("&")>-1) ) return "'" +s + "'"; } catch (StringIndexOutOfBoundsException e) { } return s; } COM: <s> return properly quoted sheetname </s>
funcom_train/28371892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialiseProcessor(String _guid, byte[] _xml) throws NoSuchProcessorException, InitialisationException, MalformedURLException, IOException, NoSuchPropertyException{ InteractionProcessor ip = processors.get(_guid); if(ip == null) throw new NoSuchProcessorException("No processor for GUID: " + _guid); ip.initialise(_xml); } COM: <s> initialises the relevant processor </s>
funcom_train/18185727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel() { if (jPanel == null) { value = new JLabel(); value.setText(new Double(defaultValue).toString()); titleLabel = new JLabel(); titleLabel.setText(title+" = "); jPanel = new JPanel(); jPanel.setLayout(new BoxLayout(getJPanel(), BoxLayout.X_AXIS)); jPanel.add(titleLabel, null); jPanel.add(value, null); } return jPanel; } COM: <s> this method initializes j panel </s>
funcom_train/1864773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createMenu() { if (myMenu != null) { return; } myMenu = new G15ControlMenu("Main"); myMenu.addItem("Reload Config", "RELOADCONFIG"); myMenu.addItem("Unload Plugin", "UNLOAD1"); myMenu.addItem("Reload Plugin", "RELOAD1"); if (configFile.findElement("noexit") == null) { myMenu.addItem("Exit G15 Control", "QUITAPP"); } myMenu.addItem("Exit Menu", "CLOSEMENU"); } COM: <s> create the menus </s>
funcom_train/47948951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Variable getGeoYAxisAsLat(Product product) throws MotuException, NetCdfVariableNotFoundException { CoordinateAxis coord = getGeoYAxis(); if (coord == null) { return null; } ParameterMetaData parameterMetaData = findLatitudeIgnoreCase(); if (parameterMetaData == null) { return null; } return product.findVariable(parameterMetaData.getName()); } COM: <s> finds latitude variable associated to y axis </s>
funcom_train/3103779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setListColumn(String listColumn) { String oldListColumn = this.listColumn; this.listColumn = listColumn; try { propertyChangeSupport.firePropertyChange("listColumn", oldListColumn, listColumn); } catch(java.lang.NullPointerException npe) { } this.refresh(); } COM: <s> setter for property list column </s>
funcom_train/3423340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hash(char[] buffer, int offset, int length) { int code = 0; for (int i = 0; i < length; i++) { code = code * 37 + buffer[offset + i]; } return code & 0x7FFFFFF; } // hash(char[],int,int):int COM: <s> returns a hashcode value for the specified symbol information </s>
funcom_train/18960439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean endAttack() { if (gameState==STATE_ATTACKING) { // if we were in the attack phase // YURA:TODO check if there are any countries with more then 1 amy, maybe even check that a move can be made gameState=STATE_FORTIFYING; // go to move phase //System.out.print("Attack phase ended\n"); return true; } return false; } COM: <s> ends the attacking phase </s>
funcom_train/1683746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showRegistrationSuccess(){ labelWaitingForAnswer.setVisible(false); JOptionPane.showMessageDialog(this, "Gratulations! You registered with the username: "+textFieldName.getText(), "Registration successful", JOptionPane.INFORMATION_MESSAGE); exit(); } COM: <s> shows the user a message if the registration was successful </s>
funcom_train/18804278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createTopPanel(final Composite parent) { // // Create top panel // Composite topPanel = new Composite(parent, SWT.NONE); topPanel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING)); GridLayout layout = new GridLayout(); layout.numColumns = 2; layout.horizontalSpacing = 10; layout.verticalSpacing = 0; layout.marginWidth = 4; layout.marginHeight = 0; topPanel.setLayout(layout); // // Create a panel with encoding selector // createEncodingPanel(topPanel, encodingTypes); //createSearchPanel(topPanel); } COM: <s> creates top panel </s>
funcom_train/7644508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLength() { int index = 0; // Look for the end of the user id. for (index = INDEX_USER_ID; buffer[index] != 0; index++) { /* * Finds the end of the user id by searching for the null * termination of the user id string. */ } // Increment the index to include the NULL character in the length; index++; return index; } COM: <s> answer the total number of bytes used for the request </s>
funcom_train/26391736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(engine e) { Object argArray[] = new Object[1]; argArray[0] = this; try { method.invoke(e, argArray); } /* End try*/ catch (Exception ex) { /* ! Clean this up later!*/ ex.printStackTrace(System.err); } /* End catch*/ } COM: <s> invoke engine method on hasd object </s>
funcom_train/18296867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClSimplexSolver getSolver() throws MalformedLayoutHierarchyException { LayoutContainer parent = this.parent; ClSimplexSolver returnValue = (parent != null) ? parent.getSolver() : null; if (returnValue != null) { return returnValue; } else { throw new MalformedLayoutHierarchyException("Unable to find solver in layout hierarchy."); } } COM: <s> returns the constraint solver that manages this objects layout </s>
funcom_train/37764111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long getOftenSeconds() { Recurrence r = ((TaskMaintenanceComponent) getComponent()).getRecurrence(); Integer oftenSeconds = r != null && r instanceof Recurrence.Often ? ((Recurrence.Often) r).getSeconds() : null; return oftenSeconds != null ? new Long(oftenSeconds) : null; } COM: <s> getter for property often seconds </s>
funcom_train/12810215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parsePdf(String pdf, String txt) throws IOException { PdfReader reader = new PdfReader(pdf); PrintWriter out = new PrintWriter(new FileOutputStream(txt)); for (int i = 1; i <= reader.getNumberOfPages(); i++) { out.println(PdfTextExtractor.getTextFromPage(reader, i)); } out.flush(); out.close(); } COM: <s> parses a specific area of a pdf to a plain text file </s>
funcom_train/50464753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setType(int type) { if(type != SwingConstants.NORTH && type != SwingConstants.SOUTH && type != SwingConstants.EAST && type != SwingConstants.WEST) { throw new IllegalArgumentException("invalid type"); } this.type = type; //update the location updateLocation(); } COM: <s> set the type swing constants </s>
funcom_train/22390023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point3D getPointAt(double angle) { // the local part double x = this.radius * Math.cos(Math.toRadians(angle)); double y = radius * Math.sin(Math.toRadians(angle)); // the wcs part ParametricPlane plane = new ParametricPlane(this.getExtrusion()); Point3D p = plane.getPoint(x + this.center.getX(), y + this.center.getY()); return p; } COM: <s> calculate a point of the arc </s>
funcom_train/35812654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean createTestTable(Database db) { boolean result = false; String createTableSql = "CREATE TABLE IF NOT EXISTS \"" + testTableName + "\" (\"id\" INTEGER);"; Statement st = null; try { Connection conn = db.getConnection(); st = conn.createStatement(); st.execute(createTableSql); result = true; } catch (Exception e) { fail(StackTraceUtil.toString(e)); } finally { db.Cleanup(st); } return result; } COM: <s> creates new table in database </s>
funcom_train/36540113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParseExpression() { String client_str = "asdf"; Iterator<ExpPair> r = ExpressionParser .parseStringExpression(client_str).iterator(); ExpPair p = r.next(); assertEquals(client_str, p.value); assertEquals(" ", p.exp); client_str = "蔡君"; r = ExpressionParser.parseStringExpression(client_str).iterator(); p = r.next(); assertEquals(client_str, p.value); assertEquals(" ", p.exp); } COM: <s> test method for </s>
funcom_train/28549203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initModel() { clearItems(); if (owlModelManager == null) return; for (final OWLOntology ont : owlModelManager.getActiveOntology().getImportsClosure()) { for (final OWLClass owlClass : ont.getClassesInSignature()) { if (isDomainClass(owlClass)) { addItem(createItemForObject(owlClass)); } } } } COM: <s> fills this model with item models </s>
funcom_train/8336642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { closeReaderStream(); _lineReader = null; // Commented out this next line since it does not make sense as the file contents are not changing <em>and</em> // we now allow fieldNames to be set once in the constructor //_fieldNames = null; currentLine = ""; // New boolean for case of no headings, so we must purposefully skip the skip lines hasSkippedLines = false; } COM: <s> resets reader stream and certain ivars so we can enumerate from scratch again </s>
funcom_train/32969951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDefaultLocaleId() { SettingsControl settingsControl = (SettingsControl)Board.getContainer().getComponentNE(SettingsControl.class); if (settingsControl != null) { return settingsControl.getSetting(PROP_DEFAULT_LOCALE_ID, "en_US"); } else { return null; } } COM: <s> returns the default locale id or null if the settings control is not </s>
funcom_train/20829255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Pattern getPattern(String pattern, String flags){ int fls = 0; if(flags.indexOf("m") > -1){ fls |= Pattern.MULTILINE; } if(flags.indexOf("i") > -1){ fls |= Pattern.CASE_INSENSITIVE; } if(flags.indexOf("s") > -1){ fls |= Pattern.DOTALL; } if(flags.indexOf("x") > -1){ fls |= Pattern.COMMENTS; } Pattern result = Pattern.compile(pattern, fls); return result; } COM: <s> method get pattern </s>
funcom_train/9990164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object apply(Context context, Object arg) { Object result = null; if (arg == null) { throw new NullArgument("Null argument to floor()"); } if (arg instanceof Number) { result = new Double(Math.floor(((Number) arg).doubleValue())); } else { throw new TypeError("Wrong argument type to floor()"); } return result; } COM: <s> returns the largest integral value that is less than or equal to </s>
funcom_train/48908211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean moveUp(){ this.bv = this.driver.readCoils(0, bitVectorLength, unitNumber); this.bv.setBit(0, false); //MoveDown this.bv.setBit(1, true); //MoveUp //TODO add check this.logger.debug("moveUp: "+this.driver.writeMultipleCoils(0, this.bv, this.unitNumber)); return true; } COM: <s> gives ldrd drive command to move up </s>
funcom_train/20295949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setColumnsNames() { openGamesColumnsNames= new String[2]; openGamesColumnsNames[0]= "Player"; openGamesColumnsNames[1]= "Game Id"; gamesForWatchColumnsNames= new String [3]; gamesForWatchColumnsNames[0]= "Player 1"; gamesForWatchColumnsNames[1]= "Player 2"; gamesForWatchColumnsNames[2]= "Game Id"; } COM: <s> sets the names of the columns </s>
funcom_train/50569260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { mainFrame = new MainFrame(); currentPanel = getPanel("welcome"); mainFrame.showPanel(currentPanel); enableButtons(); EventQueue.invokeLater(new Runnable() { public void run() { mainFrame.setLocationRelativeTo(null); mainFrame.setVisible(true); } }); } COM: <s> begins the flow of the installer panels starting with showing the </s>
funcom_train/22202968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getColumn(TologResultsSet r, int ix) { ArrayList ret = new ArrayList(); int max = r.getNumRows(); for (int i = 0; i < max; i ++) { List row = r.getRow(i); ret.add(row.get(ix)); } return ret; } COM: <s> transforms the table returned by a tolog results set into a list </s>
funcom_train/28363940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calculateError(double[] v_old, double[] v_new) { for (int i = 0; i < nD; i++) { if (v_old[i] != v_new[i]) { coords_err[i] = Math.abs(v_old[i] - v_new[i]); } } } COM: <s> calculates errors in coordinates for best solution </s>
funcom_train/19749695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isGZIPSupported(HttpServletRequest req) { String browserEncodings = req.getHeader("accept-encoding"); boolean supported = ((browserEncodings != null) && (browserEncodings.indexOf("gzip") != -1)); String userAgent = req.getHeader("user-agent"); if ( (userAgent != null) && userAgent.startsWith("httpunit") ) { if ( log.isDebugEnabled() ) { log.debug("httpunit detected, disabling filter..."); } return false; } else { return supported; } } COM: <s> convenience method to test for gzip cababilities </s>
funcom_train/18648925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void runSimulationDirectory(java.io.File dir) { java.io.File[]files=dir.listFiles(); for (int i=0; files != null && i < files.length; i++) { if (files[i].isDirectory()) { runSimulationDirectory(files[i]); } else if (files[i].getName().endsWith("."+ ScenarioManager.SCENARIO_FILE_EXTENSION)) { runSimulation(files[i].getAbsolutePath()); } } } COM: <s> this method recursively works through the supplied directory </s>
funcom_train/13850654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkGroupVM() { SharedActivationGroupDescriptor gd = envCheck.getGroupDescriptor(); if (gd != null) { String source; String serverCommand = gd.getServerCommand(); if (serverCommand == null) { source = getString("cmdlinejava", envCheck.getJavaCmd()); } else { source = getString("groupjava", serverCommand); } processReturn(envCheck.launch(null, gd, taskName), source); } } COM: <s> check the activation group vm </s>
funcom_train/34906681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getLabelPanel() { if (labelPanel == null) { GridLayout gridLayout = new GridLayout(); gridLayout.setRows(1); maxLabel = new JLabel(); maxLabel.setText("JLabel"); minLabel = new JLabel(); minLabel.setText("JLabel"); labelPanel = new JPanel(); labelPanel.setLayout(gridLayout); labelPanel.add(minLabel, null); labelPanel.add(maxLabel, null); } return labelPanel; } COM: <s> this method initializes label panel </s>
funcom_train/45354238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton1() { if (jButton1 == null) { jButton1 = new JButton(); jButton1.setBounds(322, 53, 74, 23); jButton1.setText("Cancel"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancel(); } }); } return jButton1; } COM: <s> this method initializes j button1 </s>
funcom_train/16952472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear(float r, float g, float b) { int color = 255 << 24 | (int) (255 * r) << 16 | (int) (255 * g) << 8 | (int) (255 * b); for (int i = 0; i < getWidth() * getHeight(); i++) { rgbpixels[i] = color; } } COM: <s> clear the buffer with the given color </s>
funcom_train/25523556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayPopup(final String title, final String message, final Severity severity) { // Run in another thread to stop it from blocking the reader. new Thread(new Runnable() { /** * Called when the thread is run. */ @Override public void run() { if(loginWindow.isVisible()) { new PopupDialog(loginWindow, title, message, severity).setVisible(true); } else { new PopupDialog(mainWindow, title, message, severity).setVisible(true); } } }).start(); } COM: <s> display a popup box </s>
funcom_train/31156747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu createEditMenu() { JMenu editMenu = new JMenu("Edit"); editMenu.setMnemonic('E'); editMenu.add(editRouteMenu); configureRoutesMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new ConfigureRoutesDialog(null, "Configure routes"); } }); editMenu.add(configureRoutesMenu); return editMenu; } COM: <s> creates the edit menu </s>
funcom_train/8558029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFirstName() { String tmp = null; try { tmp = (String) getPerm(User.FIRST_NAME); if (tmp.length() == 0) { tmp = null; } } catch (Exception e) { logger.error("getFirstName(): " + e.getMessage(), e); } return tmp; } COM: <s> returns the first name for this user </s>
funcom_train/444627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void visitAxiom(Axiom axiom) { WsmlFullExpressionValidator exprVal = new WsmlFullExpressionValidator(axiom, errors); Iterator axioms = axiom.listDefinitions().iterator(); while (axioms.hasNext()) { ((LogicalExpression)axioms.next()).accept(exprVal); } } COM: <s> checks if an axiom is valid to wsml full </s>
funcom_train/34889369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getSingletonNode(Document doc, String elemName) { // If any of the parameters are null, return null. if (doc == null || elemName == null) { return null; } NodeList nl = doc.getElementsByTagName(elemName); return nl.item(0); } COM: <s> returns the first element node in a document with the passed in name </s>
funcom_train/20085387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWorldBuild(TwoTupel<ThreeTupel<String, Vector3f, Quaternion>, Set<QuatTupel<String, String, Vector3f, Quaternion>>> data) { if(!worldObjects.containsKey(data.first.first)) buildObjectQueue.add( tupel.new TwoTupel<String, ThreeTupel<String,Vector3f,Quaternion>>( "",data.first) ); for(QuatTupel<String, String, Vector3f, Quaternion> elem : data.second){ if(!worldObjects.containsKey(elem.second)) buildObjectQueue.add( tupel.new TwoTupel<String, ThreeTupel<String,Vector3f,Quaternion>>( elem.first, tupel.new ThreeTupel<String, Vector3f, Quaternion>(elem.second,elem.third,elem.forth) ) ); } } COM: <s> methods which adds elements to build queue </s>
funcom_train/43100175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void damage() { if (getLayer() != null && getLayer().getEditors() != null) { Iterator it = getLayer().getEditors().iterator(); while (it.hasNext()) { ((Editor) it.next()).damageAll(); } } } COM: <s> this will mark the entire visible area of all editors to be repaired </s>
funcom_train/29272080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setQueryFields() { assert (this.query != null); for (Method method : query.getClass().getMethods()) { if (method.isAnnotationPresent(SetProperty.class)) { SetProperty setter = method.getAnnotation(SetProperty.class); Text field = this.fieldMap.get(setter.value()); String value = field.getText(); this.setValue(query, method, value); } } this.action.setConfiguredQuery(this.query); } COM: <s> sets all fields via the meta model in the given query </s>
funcom_train/23393753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLandmarkPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LandmarkFulfilment_landmark_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LandmarkFulfilment_landmark_feature", "_UI_LandmarkFulfilment_type"), FactPackage.Literals.LANDMARK_FULFILMENT__LANDMARK, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the landmark feature </s>
funcom_train/18749914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Action getSelectModeAction() { if (selectModeAction == null) { ImageIcon selectIcon = new ImageIcon(Groove.getResource("select.gif")); selectModeAction = new SetEditingModeAction(Options.SELECT_MODE_NAME, Options.SELECT_MODE_KEY, selectIcon); } return selectModeAction; } COM: <s> lazily creates and returns the action to set the editor to selection mode </s>
funcom_train/38467178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Color getColumnColor(int col, int val) { switch (col) { case 1: return new Color(val,0,0); case 2: return new Color(0,val,0); case 3: return new Color(0,0,val); } return Color.GRAY; } COM: <s> returns the color associated with a given column where the value is used </s>
funcom_train/18284579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFloat(int parameterIndex, float x) throws DAOException { try { parms.put("" + parameterIndex, "" + x); this.preparedStatement.setFloat(parameterIndex, x); } catch (SQLException e) { _log.error("Exception in setFloat() method", e); this.setTransactionRollbackOnly(); } } COM: <s> sets the designated parameter to float value </s>
funcom_train/46263886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void background(int rgb) { // if (((rgb & 0xff000000) == 0) && (rgb <= colorModeX)) { // background((float) rgb); // // } else { // if (format == RGB) { // rgb |= 0xff000000; // ignore alpha for main drawing surface // } // colorCalcARGB(rgb, colorModeA); // backgroundFromCalc(); // backgroundImpl(); // } GLColor.colorCalc(rgb); backgroundFromCalc(); } COM: <s> set the background to a gray or argb color </s>
funcom_train/9070463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Option findOption(String option) { Option opt = null; for (Iterator<Option> it = options.iterator(); it.hasNext();) { if ((opt = (Option) it.next()).compareTo(new Option(option)) == 0) { break; } else { opt = null; } } return opt; } COM: <s> finds the option from the option list given the options name </s>
funcom_train/39401024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelText() { if (jPanelText == null) { javax.swing.JLabel jLabel = new JLabel(); jPanelText = new JPanel(); jPanelText.setLayout(new BorderLayout()); //Display correct text if(this.daysLeft > 0) { jLabel.setText(trialText); } else { jLabel.setText(activateText); } jPanelText.add(jLabel, BorderLayout.CENTER); } return jPanelText; } COM: <s> this method initializes j panel text </s>
funcom_train/3115053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { Style style = this.getStyle(); style.setDrawColor(DenimConstants.DEFAULT_GROUP_COLOR); style.setFillColor(DenimConstants.DEFAULT_SCRIBBLE_BACKGROUND_COLOR); style.setDashArray(DenimConstants.DEFAULT_GROUP_DASH_ARRAY); this.setStyle(style); this.setHasClosedBoundingPoints(true); radioButtons = new HashSet(); setupInterpreters(); } COM: <s> performs common initializations </s>
funcom_train/23870194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String name){ // Set the name this.name = name; if(!name.contains("_X")){ return; } // Populate the X and Y coordinates based on name int i = name.length(); int end = i; while(name.charAt(i-1) != 'Y'){i--;} this.tileYCoordinate = Integer.parseInt(name.substring(i,end)); end = i - 1; while(name.charAt(i-1) != 'X'){i--;} this.tileXCoordinate = Integer.parseInt(name.substring(i,end)); } COM: <s> sets the name of the tile xdl name such as int x0 y5 </s>
funcom_train/36386169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void transformValues( TCharFunction function ) { Object[] keys = _set; char[] values = _values; for ( int i = values.length; i-- > 0; ) { if ( keys[i] != null && keys[i] != REMOVED ) { values[i] = function.execute( values[i] ); } } } COM: <s> transform the values in this map using tt function tt </s>
funcom_train/39847438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Color getTextForeground(boolean selected) { UIManager.getColor("SimpleInternalFrame.activeTitleForeground"); Color c = UIManager.getColor(selected ? "SimpleInternalFrame.activeTitleForeground" : "SimpleInternalFrame.inactiveTitleForeground"); if (c != null) { return c; } return UIManager.getColor(selected ? "InternalFrame.activeTitleForeground" : "Label.foreground"); } COM: <s> determines and answers the headers text foreground color </s>
funcom_train/13375523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init() { super.init(); setText(Messages.UI_PIMRefreshRelationAction_refresh); setToolTipText(Messages.UI_PIMRefreshRelationAction_refresh_tooltip); setId(ID); /* setHoverImageDescriptor( WorkbenchImages.getImageDescriptor( IWorkbenchGraphicConstants.IMG_CTOOL_DELETE_EDIT_HOVER)); setImageDescriptor( WorkbenchImages.getImageDescriptor( IWorkbenchGraphicConstants.IMG_CTOOL_DELETE_EDIT)); setDisabledImageDescriptor( WorkbenchImages.getImageDescriptor( IWorkbenchGraphicConstants.IMG_CTOOL_DELETE_EDIT_DISABLED)); */ setEnabled(false); } COM: <s> initializes this actions text and images </s>
funcom_train/29863299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RelationshipComponent getTarget() { if(isRelationshipArtefact()){ String id; if(getArtefactType()==Type.INVOCATION) id = getArtefactIdentifier().substring(getArtefactIdentifier().lastIndexOf(INVOCATION_SYMBOL)+1); else{ id = getArtefactIdentifier().substring(getArtefactIdentifier().lastIndexOf(ASSOCIATION_SYMBOL)+1, getArtefactIdentifier().length()-(getArtefactType()==Type.ONE_TO_MANY?1:0)); } return new RelationshipComponent(id,RelationshipComponent.Type.TARGET,this,isProvided()); } return null; } COM: <s> get the identifier of the target artefact that the relationship type </s>
funcom_train/37777228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMapping(Class source, Class target, Object converters) { Map m = null; if( mapping.containsKey(source) ) m = (Map) mapping.get(source); else { m = new HashMap(); mapping.put(source, m); } m.put(target, converters); log.debug("Added New Converter " + source + " to " + target); } COM: <s> add a new converter for mapping the source class to the target </s>
funcom_train/25884846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Box createBarAction() { Box box = Box.createHorizontalBox(); barMode = new JComboBox(P5Constants.BAR_TYPE); barMode.setSelectedIndex(0); barMode.setPreferredSize(new Dimension(100, 30)); barMode.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { //TODO what to put in? // JComboBox box = (JComboBox) e.getSource(); } }); box.add(barMode); return box; } COM: <s> create drop down menu to choose playback bar type </s>
funcom_train/48666167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleCountersTableChanged(TableModelEvent e) { if(!isVisible()) { return; } if(this.fSettingUp || this.fUpdatingCounterTable) { return; } try { if(e.getType() == TableModelEvent.UPDATE) { // update buttons state if not in log replay mode if(!fLogReplayMode) { calculateCommandButtonsState(); } } } catch(Exception ex) { UIExceptionMgr.userException(ex); } } COM: <s> handles counters table changed events </s>
funcom_train/9809698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Time getDuration() { if ( (long) getMediaTime().getSeconds() > lastTime) { lastTime = (long) getMediaTime().getSeconds(); updateDuration(); } if (duration.getSeconds() <= 0) { //$$ WORKAROUND return Duration.DURATION_UNKNOWN; //$$ WORKAROUND } else { return duration; } } COM: <s> get the duration of the media </s>
funcom_train/10627665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEventSetDescriptorConstructor() { try { new EventSetDescriptor(OtherBean.class, "sample", SampleListener.class, "fireSampleEvent"); } catch (Exception e) { fail("Exception of " + e.getClass() + " class with message " + e.getMessage() + " is thrown"); } } COM: <s> the test checks the constructor </s>
funcom_train/35838728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isViewContainsItself(PCSession session, String viewId) throws SQLException { // // DBConnection dbcon = getDatabaseManager().requestConnection(session.getModelName()) ; // // boolean viewContainsItself = DBViewNode.isViewContainsItself(dbcon, viewId); // // getDatabaseManager().releaseConnection(session.getModelName(),dbcon); return true; } COM: <s> does the view with the given id contain itself </s>
funcom_train/41455790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deploy(File file) { logger.info("Deploying " + file); String filePath = file.getPath(); if (filePath.endsWith(".xml")) { try { kernelDeployer.deploy(file.toURI().toURL()); kernelDeployer.validate(); logger.info("Deployed " + file); } catch (Throwable t) { logger.info("Could not deploy " + file, t); } } } COM: <s> deploys components using specified deployement descriptor </s>
funcom_train/49211277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSeparator(){ if(filename != null){ return filename.endsWith(".csv") ? "," : filename.endsWith(".ssv") ? " " : filename.endsWith(".tab") ? "\t" : filename.endsWith(".txt") ? "\t" : ""; } return ""; } COM: <s> gets the separator of </s>
funcom_train/40856140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Highlighter getHighlighter(Query query, String fieldName, SolrQueryRequest request) { SolrParams params = request.getParams(); Highlighter highlighter = new Highlighter( getFormatter(fieldName, params), getQueryScorer(query, fieldName, request)); highlighter.setTextFragmenter(getFragmenter(fieldName, params)); return highlighter; } COM: <s> return a highlighter appropriate for this field </s>
funcom_train/38950005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void simplifyIfSubracted(){ if (list.getLast() instanceof Operator) { Operator lastOp = (Operator) list.getLast(); if ("-".equals(lastOp.getOp())) { list.removeLast(); elementCount--; if (elementCount > 0) { if (lastHasVal()) { list.add(new Operator("+", basicCalcObj)); elementCount++; } } list.add(new Num(-1)); list.add(new Operator("*", basicCalcObj)); elementCount += 2; } } } COM: <s> if the last element stored was a subtraction operator removes it and </s>
funcom_train/29869995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJEditTemplateCancelButton() { if (jEditTemplateCancelButton == null) { jEditTemplateCancelButton = new JButton(); jEditTemplateCancelButton.setText("Cancel"); jEditTemplateCancelButton .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { actionJEditTemplateCancelButton(e); } }); } return jEditTemplateCancelButton; } COM: <s> this method initializes j edit template cancel button </s>
funcom_train/287270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testQueryGroup() throws Exception { new ComponentTest() { protected void testComponents() throws Exception { List<Group> groups = getService().queryGroup(new Group(), new Long(0), new Long(20), "id"); System.out.println("QUERY GROUPS**********"); for (Group group : groups) { System.out.println(group); } assertEquals(2, groups.size()); } }.run(); } COM: <s> test the query group operation </s>
funcom_train/3081502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createDisposeDirective(ServerMessage serverMessage, Component component) { Element itemizedUpdateElement = serverMessage.getItemizedDirective(ServerMessage.GROUP_ID_PREREMOVE, "EPLiveTable.MessageProcessor", "dispose", new String[0], new String[0]); Element itemElement = serverMessage.getDocument().createElement("item"); itemElement.setAttribute("eid", ContainerInstance.getElementId(component)); itemizedUpdateElement.appendChild(itemElement); } COM: <s> disposes of the live table on the client </s>
funcom_train/40413490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LayoutEditor getEditorFor(int clientX, int clientY) { for (int i = editorList.size() - 1; i >= 0; i--) { LayoutEditor ed = editorList.get(i); Widget container = (Widget)ed.getContainer(); if (LDOM.contains(container.getElement(), clientX, clientY)) { return ed; } } return null; } COM: <s> find the editor containing the coordinates given </s>
funcom_train/12768131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteTreeItemInternal(TreeItem item, boolean dispose) { if ((item != null) && !item.isDisposed()) { TreeItemDeleteEvent event = new TreeItemDeleteEvent(item); fireBeforeDeleteEvent(event); if (event.doit) { if (dispose) { /* if (item.getImage() != null) { item.getImage().dispose(); } */ item.dispose(); } fireAfterDeleteEvent(event); } } } COM: <s> doesnt fire the finished delete event or set the selection </s>
funcom_train/40622868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeRow(int row) { checkRowBounds(row); int columnCount = getCellCount(row); for (int column = 0; column < columnCount; ++column) { cleanCell(row, column, false); } DOM.removeChild(bodyElem, rowFormatter.getRawElement(row)); } COM: <s> removes the specified row from the table </s>
funcom_train/42746296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ContextSourceAdapter getContextSourceAdapter(String element, String contextSourceType) { for (ContextSourceModel contextSourceModel : contextSources) { if (contextSourceModel.getElement().equals(element) && contextSourceModel.getContextSourceType().equals(contextSourceType)) { return contextSourceModel.getContextSourceAdapter(); } } return null; } COM: <s> represents the get to obtain a </s>
funcom_train/6270266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIssueName(String name) { this.issueNameField.setText(name); this.currentIssue = name; this.selectedArgument = name; root.setUserObject(name); // = new DefaultMutableTreeNode(name); argumentModel.setRoot(root); isBoot = true; // adaptor.getParentChildTree(currentIssue); // now fill the tree refresh(); } COM: <s> issue name is the question itself </s>
funcom_train/32741860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String resolveFieldName(String typeName, String fieldName) { HashMap<String, String> resolvedCache = fieldDBNames.get(typeName); if (resolvedCache == null) { throw new MakumbaError("No cache for name resolution of type '" + typeName + "' found. Please report to developers."); } return resolvedCache.get(fieldName); } COM: <s> resolves the database level for a field given a type name </s>
funcom_train/25099465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addReferencePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MultiLevelReference_reference_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MultiLevelReference_reference_feature", "_UI_MultiLevelReference_type"), ElementsPackage.Literals.MULTI_LEVEL_REFERENCE__REFERENCE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the reference feature </s>
funcom_train/30005140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanel getExecutionPanel() { if (this.executionPanel == null) { this.executionPanel = new JPanel(); this.executionPanel.setLayout(new BorderLayout()); this.executionPanel.add(this.getNothingSelectedLabel(), BorderLayout.CENTER); this.currentlySelectedComponent = this.getNothingSelectedLabel(); } return this.executionPanel; } COM: <s> gets the sequence preparation panel </s>
funcom_train/9292471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public ijResult NoHoldForConnectionStatement() throws ParseException, SQLException { Token on=null; jj_consume_token(NOHOLDFORCONNECTION); haveConnection(); theConnection.setHoldability(ResultSet.CLOSE_CURSORS_AT_COMMIT); {if (true) return null;} throw new Error("Missing return statement in function"); } COM: <s> by default holdability is set to true for connection objects </s>
funcom_train/9643434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createToolTip() { if (insideComponent instanceof TooltipBuilder) { tip = ((TooltipBuilder) insideComponent).createTooltip(mouseEvent); } else { tip = insideComponent.createToolTip(); } tip.setTipText(toolTipText); try { // Give the HTML-Renderer enough time to render the text... Thread.sleep(80); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } COM: <s> creates the tool tip </s>
funcom_train/25222269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWriteLogfile(boolean writeLogfile) { boolean oldWriteLogFile = this.writeLogfile; if ( oldWriteLogFile != writeLogfile ) { this.writeLogfile = writeLogfile; firePropertyChange(PROP_WRITELOGFILE, oldWriteLogFile, this.writeLogfile); setRunPrepared(false); } } COM: <s> set the value of write logfile </s>
funcom_train/42507250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node mergeTrees(Node a, Node b) { Node newRoot = null; if (a.value.compareTo(b.value) < 0) { b.parent = a; a.children.add(b); a.order++; newRoot = a; } else { a.parent = b; b.children.add(a); b.order++; newRoot = b; } return newRoot; } COM: <s> merges binomial trees hang trees together </s>
funcom_train/18961257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector shuffleCountries() { Vector oldCountries = new Vector(Arrays.asList( Countries )); //Vector newCountries = new Vector(); //while(oldCountries.size() > 0) { // int a = r.nextInt(oldCountries.size()) ; // newCountries.add ( oldCountries.remove(a) ); //} //return newCountries; Collections.shuffle(oldCountries); return oldCountries; } COM: <s> shuffles the countries </s>
funcom_train/21437393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public ResidueType createZCleavage() { ResidueType ret = new ResidueType(); ret.name = "#zcleavage"; ret.description = "Z Cleavage"; ret.superclass = "cleavage"; ret.composition = ""; ret.can_redend = false; ret.can_parent = true; ret.updateMolecule(); return ret; } COM: <s> create a z cleavage type </s>
funcom_train/11092774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void process(org.apache.servicemix.nmr.api.Exchange exchange) { Continuation continuation = continuations.remove(exchange.getId()); if (continuation == null) { log.error("Unknown exchange received: " + exchange); } else { handleResponse(continuation.exchange, channel, exchange); continuation.callback.done(false); } } COM: <s> handle incoming nmr exchanges responses to the exchanges sent in </s>
funcom_train/1209724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JInternalFrame getSelectedFrame() { JInternalFrame[] frames = desk.getAllFrames(); for (int i = 0; i < frames.length; i++) { if (frames[i].isShowing()) { return frames[i]; } } return frames[frames.length - 1]; } COM: <s> returns the current selected internal frame </s>
funcom_train/34240955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeNewRow(int row) { BoardRow r = new BoardRow(); if (row >= 0) { if (row >= posRows.size()) { Utils.enlargeList(posRows, row + 1); } posRows.set(row, r); } else { if (Math.abs(row) >= negRows.size()) { Utils.enlargeList(negRows, Math.abs(row) + 1); } negRows.set(Math.abs(row), r); } } COM: <s> not safe does not check whether it is overwriting </s>
funcom_train/43226000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void switchplayer(boolean swp) { if (swp) { if (actual == 0) actual = 1; else actual = 0; } player[actual].rev = 0; // clear number of reverted pictures // pass user input to current ai if (m_pgc != null) m_pgc.registerAI(player[actual].ai); // don't notify AI if game is over if (!isEnd()) player[actual].ai.onturn(); // notify the ai } COM: <s> change current player </s>
funcom_train/2436460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean apply(NodeMapping mapping, String targetDE) { this.mapping = mapping; this.targetDE = targetDE; String expr = ui.getTranslatedExpression(); Node target = treeMapper.findTargetNode(targetDE); if (isEmptyMapping(expr)) { saveEmptyFormula(expr, target); } else { saveNonEmptyFormula(expr, target); } return ok; } COM: <s> attempts to apply the current formula to the given target data element </s>
funcom_train/33059542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addForward(String userId, List emailAddresses) { /* TODO Apache James Mail Server supports only one email for forwarding.*/ if (emailAddresses != null) { if (emailAddresses.size() > 0) { runJamesRemoteCommand("setforwarding "+userId+" "+emailAddresses.get(0)); } else { runJamesRemoteCommand("unsetforwarding "+userId); } } } COM: <s> adds forward for a user user id </s>
funcom_train/10237808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readFromBlob(Blob blob, OutputStream out) throws SQLException, IOException { InputStream in = blob.getBinaryStream(); int length = -1; long read = 0; byte[] buf = new byte[1024]; while ((length = in.read(buf)) != -1) { out.write(buf, 0, length); read += length; } in.close(); } COM: <s> read from blob file type in database </s>
funcom_train/14416142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setObjectPath(CIMObjectPath pObjectPath) { if (pObjectPath == null) throw new IllegalArgumentException("null objectpath argument"); if (this.iObjectPath == null) { this.iObjectPath = new CIMObjectPath(); } this.iObjectPath.setHost(pObjectPath.getHost()); this.iObjectPath.setNameSpace(pObjectPath.getNameSpace()); this.setName(pObjectPath.getObjectName()); } COM: <s> sets the cimobject path for the current cimclass </s>