__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/40213197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void __execute() { try { _execute(); } catch(FaultException e) { if(STDERR_DIAG) e.printStackTrace(); exit(128+11,true); // SIGSEGV exitException = e; } catch(ExecutionException e) { if(STDERR_DIAG) e.printStackTrace(); exit(128+4,true); // SIGILL exitException = e; } } COM: <s> calls execute subclasss execute and catches exceptions </s>
funcom_train/9658717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StringBuffer readFileStart(File file, int pMinimumLength) { BufferedReader in=null; StringBuffer buffer = new StringBuffer(); try { // get the file start into the memory: in = new BufferedReader(new FileReader(file)); String str; while ((str = in.readLine()) != null) { buffer.append(str); if (buffer.length() >= pMinimumLength) break; } in.close(); } catch (Exception e) { e.printStackTrace(); return new StringBuffer(); } return buffer; } COM: <s> returns p minimum length bytes of the files content </s>
funcom_train/36698491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMessageFormat() throws Exception { String expected = "Hello world 'toto'"; String pattern = "Hello world ''{1}''"; String actual = MessageFormat.format(pattern, new Object[] { "Cyrille", "toto" }); assertEquals("pattern '" + pattern + "'", expected, actual); } COM: <s> method test message format </s>
funcom_train/16178122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireSimEvent(SimEvent evt) { Vector copy; synchronized(listenerList) { copy = (Vector)listenerList.clone(); } for (int i = 0; i < copy.size(); i++) { SimEventListener l = (SimEventListener)copy.elementAt(i); l.simEventPerformed(evt); } } COM: <s> broadcast the specified sim event to all this models sim event listeners </s>
funcom_train/18325678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOutgoingTransitionsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_State_outgoingTransitions_feature"), getString("_UI_PropertyDescriptor_description", "_UI_State_outgoingTransitions_feature", "_UI_State_type"), CoremodelPackage.Literals.STATE__OUTGOING_TRANSITIONS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the outgoing transitions feature </s>
funcom_train/12974758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadBankInfo() { BankInfo bi = (BankInfo)fieldBankAccount.getSelectedItem().getValue(); if (bi == null) return; labelCurrency.setText(bi.Currency); labelBalance.setText(m_format.format(bi.Balance)); // PaymentRule fieldPaymentRule.removeAllItems(); ArrayList<ValueNamePair> paymentRuleData = getPaymentRuleData(bi); for(ValueNamePair vp : paymentRuleData) fieldPaymentRule.appendItem(vp.getName(), vp); fieldPaymentRule.setSelectedIndex(0); } // loadBankInfo COM: <s> load bank info load info from bank account and valid documents payment rule </s>
funcom_train/28255207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadMovie(String movieURL) { // Prepend a "file:" if no protocol is specified if (movieURL.indexOf(":") < 3) movieURL = "file:" + movieURL; // Try to create a player try { player = Manager.createPlayer(new MediaLocator(movieURL)); player.addControllerListener(this); player.realize(); } catch (Exception e) { System.out.println("Error creating player"); return; } } COM: <s> create a player for the url and realize it </s>
funcom_train/2290508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMultiContextMenuRules(Digester digester) { // add multi context menu String xPath = "*/" + N_WORKPLACE + "/" + N_EXPLORERTYPES + "/" + N_MULTICONTEXTMENU; digester.addObjectCreate(xPath, CmsExplorerContextMenu.class); digester.addSetNext(xPath, "setMultiContextMenu"); } COM: <s> adds the digester rules for the multicontextmenu node </s>
funcom_train/1600725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintAsynchronousImage(BufferedImage image, int x, int y, int w, int h, int zoom, int cachedZoom, GMapListener listener){ buildImage(image, x,y,w,h,zoom,cachedZoom,listener); } COM: <s> method used to build image asynchronously </s>
funcom_train/38560375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int firstNonZeroRowIndex() { int m = getRowDimension(); int n = getColumnDimension(); int h = -1; for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { if (get(i, j) != 0) { return i; } } } return h; } COM: <s> find the first non zero row of a matrix </s>
funcom_train/16614658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while (true) { try { timeStamp = System.currentTimeMillis(); Thread.sleep(CONNECTION_POOL_CLOSE_TIMEOUT); if (connectionActionTimestamp < timeStamp) closeAllConnections(pool); } catch (InterruptedException e) { e.printStackTrace(); } catch (SQLException e) { e.printStackTrace(); } } } COM: <s> runs every connection pool close timeout ms and closes all pooled </s>
funcom_train/13863991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getUserAuthenticationToken(DRSUser drsUser, String clientUri) { DRSUserAuthenticationToken drsToken = userManager.getDRSUserAuthenticationToken(drsUser, clientUri, databaseManager.getIndexModel()); if (drsToken!=null && userManager.isValid(drsToken)) return drsToken.getAuthenticationToken(); return null; } COM: <s> get authentication token </s>
funcom_train/12118251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoC58(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end this.messaggiAutomaticiJMenuItem_ActionPerformed(arg1); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } COM: <s> conn eto c58 messaggi automatici jmenu item </s>
funcom_train/28367402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getCurrentMinX() { if (zoomGridLimitsV.size() == 0) { if (externalGridLimits == null || externalGridLimits.isSetXmin() == false) { return getInnerMinX(); } else { return externalGridLimits.getMinX(); } } else { GridLimits gl = zoomGridLimitsV.lastElement(); if (gl.isSetXmin() == false) { return getInnerMinX(); } return gl.getMinX(); } } COM: <s> returns the current min x attribute of the function graphs jpanel object </s>
funcom_train/3106542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Writer write(Writer writer) throws JSONException { try { boolean b = false; Iterator<String> keys = keys(); writer.write('{'); while (keys.hasNext()) { if (b) { writer.write(','); } Object k = keys.next(); writer.write(quote(k.toString())); writer.write(':'); Object v = this.myHashMap.get(k); if (v instanceof JSONObject) { ((JSONObject) v).write(writer); } else if (v instanceof JSONArray) { ((JSONArray) v).write(writer); } else { writer.write(valueToString(v)); } b = true; } writer.write('}'); return writer; } catch (IOException e) { throw new JSONException(e); } } COM: <s> write the contents of the jsonobject as json text to a writer </s>
funcom_train/9674149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPackageContents() { if (isCreated) return; isCreated = true; // Create classes and their features p16f84EClass = createEClass(P1_6F84); createEAttribute(p16f84EClass, P1_6F84__CODE); createEAttribute(p16f84EClass, P1_6F84__LOGIC); createEAttribute(p16f84EClass, P1_6F84__PROGRAM); p16f84DefinitionsEClass = createEClass(P1_6F84_DEFINITIONS); // Create data types p16f84LogicEDataType = createEDataType(P1_6F84_LOGIC); programInstructionEDataType = createEDataType(PROGRAM_INSTRUCTION); } COM: <s> creates the meta model objects for the package </s>
funcom_train/31688238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void markProfilePropertyInstanceValuesAsNew() throws PopulateException { PropertyInstanceStore propStore = (PropertyInstanceStore) m_propStores.get(Profile.class.getName()); if(propStore != null) { Collection col = propStore.getValues(); Iterator iter = col.iterator(); while (iter.hasNext()) { ProfilePropertyInstance propInst = (ProfilePropertyInstance) iter.next(); propInst.markValuesAsNew(); } } } COM: <s> mark code profile value code as new </s>
funcom_train/100639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkRemeasurable() { // enable if it's a valid index into both datasets! Year y = dv1.getSelectedYear(); int col = dv1.myTable.getSelectedColumn(); int idx = y.diff(s1.getStart()); btnRemeasure.setEnabled(col > 0 && col < 11 && idx >= 0 && idx < s1.getData().size() && idx < s2.getData().size()); } COM: <s> if weve selected something enable or disable the remeasure button </s>
funcom_train/13986662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createControl(final Composite parent) { final Composite container = new Composite(parent, SWT.NULL); // Set the layout final GridLayout layout = new GridLayout(); container.setLayout(layout); layout.numColumns = NUM_COLUMNS; layout.verticalSpacing = VERTICAL_SPACING; // Add the controls createContainerField(container); createDescriptionField(container); initialize(); dialogChanged(); setControl(container); } COM: <s> creates the top level control for this dialog page under the given parent </s>
funcom_train/42012833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJCBBarra() { if (jCBBarra == null) { jCBBarra = new JCheckBox(); jCBBarra.setText("Barra"); jCBBarra.setSize(new Dimension(60, 13)); jCBBarra.setMnemonic(KeyEvent.VK_B); jCBBarra.setName("barra"); jCBBarra.setToolTipText("Click para marcar la consumición a preparar en barra"); jCBBarra.setLocation(new Point(10, 242)); jCBBarra.addItemListener(this); } return jCBBarra; } COM: <s> this method initializes j cbbarra </s>
funcom_train/3108090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumnWeight(int col, int weight) { if (col > colCount) { throw new RuntimeException("Column index cannot be greater then " + colCount + "."); } widenWeights[col] = weight; widenWeightsSum = 0; for (int i = 1; i <= colCount; i++) widenWeightsSum += widenWeights[i]; } COM: <s> sets weight of specified column </s>
funcom_train/5716274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean showDialog() { int returnValue = FLGOptionPane.showConfirmDialog(linkDialogPanel, internationalization.getString("dialog.linkChecker.title"), FLGOptionPane.OK_CANCEL_OPTION, FLGOptionPane.PLAIN_MESSAGE); return returnValue == FLGOptionPane.OK_OPTION; } COM: <s> opens link checker dialog </s>
funcom_train/50113024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { while (!stopMessage) { for (int x = 0; x < message.length; x++) { area.setLineWrap(true); area.setText(message[x]); try { Thread.sleep(3000); } catch (Exception e) { } } } } catch (Exception e) { e.printStackTrace(); } } COM: <s> called by the start method </s>
funcom_train/19275568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getMinimumSize() { Dimension d = super.getMinimumSize(); int w = d.width; int h = d.height; if (width != -1) w = width; if (height != -1) h = height; if (minWidth != -1 && w < minWidth) w = minWidth; if (minHeight != -1 && h < minHeight) h = minHeight; return new Dimension(w, h); } COM: <s> returns the minimum size according to the given dimension </s>
funcom_train/8485734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOverloadedInstanceCreation() { try { // def instance := atTestClass.new(atTestObject) => 2 matches atTestClass.meta_newInstance(NATTable.atValue(new ATObject[] { atTestObject })); fail("expected a symbiosis failure with 2 matches"); } catch (XSymbiosisFailure e) { // expected exception: success } catch (InterpreterException e) { fail(e.getMessage()); } } COM: <s> tests whether overloaded constructors which cannot be resolved terminates cleanly </s>
funcom_train/49321136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearSelection() { if (_menuItems != null && _menuItems.length != 0) { for (int i = 0; i < _menuItems.length; i++) { if (_menuItems[i].isSelected()) { _menuItems[i].setSelected(false); } } } } COM: <s> deselect all items </s>
funcom_train/11675303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int readMarkerSegment() throws IOException { int marker; int count = 0; do { marker = in.readByte() & 0xFF; count++; } while (marker != MARK); if (count > 1) { throw new IOException("Stream not positioned at a marker segment header"); } int segID = in.readByte() & 0xFF; return segID; } COM: <s> reads the next marker segment identifier and returns it </s>
funcom_train/9734195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuBar createMenu() { JMenu file, edit, view, help; if (jJMenuBar == null) { jJMenuBar = new JMenuBar(); file = new JMenu("File"); jJMenuBar.add(file); jJMenuBar.add(config_panel.getMenu()); edit = new JMenu("Edit"); jJMenuBar.add(edit); view = new JMenu("View"); jJMenuBar.add(view); help = new JMenu("Help"); jJMenuBar.add(help); } return jJMenuBar; } COM: <s> this method initializes j jmenu bar </s>
funcom_train/32215733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean existEmail(String email) throws SQLException { try { ResultSet rs = MySQL.connection.createStatement(Statement.CLOSE_ALL_RESULTS, Statement.KEEP_CURRENT_RESULT).executeQuery("SELECT COUNT(id) AS anz FROM users WHERE email = '" + email + "'"); rs.first(); Boolean r = (rs.getInt("anz") == 1); rs.close(); return r; } catch (NullPointerException e) { System.err.println(e.getMessage()); return false; } } COM: <s> checks if the email address is allready in use </s>
funcom_train/51649274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBackground (Color value) { checkWidget (); if (value != null && value.isDisposed ()) { SWT.error (SWT.ERROR_INVALID_ARGUMENT); } if (background == value) return; if (background != null && background.equals (value)) return; background = value; if ((parent.style & SWT.VIRTUAL) != 0) cached = true; redrawItem (); } COM: <s> sets the receivers background color to the color specified </s>
funcom_train/22233963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getPosition(Point3f position) { if (((NodeRetained)retained).staticTransform != null) { Transform3D invTransform = ((NodeRetained)retained).staticTransform.getInvTransform(); invTransform.transform(this.position, position); } else { position.set(this.position); } } COM: <s> retrieves the current position of this lod node </s>
funcom_train/31805047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canSetProtections(PermissionCollection newprotections) { if (newprotections == null) { return false; } // if(_protection==null) { // return true; // } // // // needed ? // Enumeration prots = newprotections.elements(); // while(prots.hasMoreElements()) { // Permission protection = (Permission)prots.nextElement(); // if(!protections.implies(new_protection)) { // return false; // } // } return true; } COM: <s> returns that the protections can be set or not </s>
funcom_train/40560204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createInsertFields() { String sql = "("; Iterator fields = dbColumns.iterator(); int i = 0; while (fields.hasNext()) { DbColumn field = (DbColumn) fields.next(); sql += " " + field.getSource().getMinorIdentifier(); // if we're not in the last section, add a comma if (i != dbColumns.size() - 1) { sql += ","; } i++; } sql += " )"; return sql; } COM: <s> returns the sql segment in an insert statement that contains the field </s>
funcom_train/5380869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { if (menuExist()) menu.dispose(); menu = null; if (menuItem != null) { menuItem.dispose(); menuItem = null; } IContributionItem[] items = getItems(); for (int i = 0; i < items.length; i++) { items[i].dispose(); } } COM: <s> disposes of this menu manager and frees all allocated swt resources </s>
funcom_train/543487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getZoom() { int s = 0; switch (iSz) { case -8: s = 0; break; case -4: s = 1; break; case -2: s = 2; break; case 1: s = 3; break; case 2: s = 4; break; case 4: s = 5; break; case 8: s = 6; break; } return s; } COM: <s> return the current zoom factor index </s>
funcom_train/9708140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Element getFaultElement(Document doc, AxisOperation operation) { Element faultElt = doc.createElement("fault"); Element[] param = getFaultParamElements(doc, operation); for (int i = 0; i < param.length; i++) { faultElt.appendChild(param[i]); } return faultElt; } COM: <s> get the fault element no header faults are supported </s>
funcom_train/9879006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void findNext(){ if(foundRowIndices.isEmpty()) return; int row = ((Integer)foundRowIndices.remove(0)).intValue(); //take off first element table.clearSelection(); table.addRowSelectionInterval(row,row); table.scrollRectToVisible(table.getCellRect(row, 0, true)); if(foundRowIndices.size() == 0) findNextButton.setEnabled(false); } COM: <s> selects next row in table </s>
funcom_train/2552430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Sample findByID(Integer id) { String query = "from Sample as sample where sample.sampleId = ?"; Sample sample = null; Object[] parameters = {id}; List list = this.getHibernateTemplate().find(query, parameters); if (list.size() > 0) { sample = (Sample) list.get(0); } return sample; } COM: <s> finds an instance of sample in the database by the sample id </s>
funcom_train/42264558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WindowListener createFocusListener() { return new WindowAdapter() { @Override public void windowActivated(WindowEvent e) { if (root != null) { root.repaint(); } } @Override public void windowDeactivated(WindowEvent e) { if (root != null) { root.repaint(); } } }; } COM: <s> creates the focus listener </s>
funcom_train/3815060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean processMatches() { Card card0 = findUnmatchedCard(0); Card card1 = findUnmatchedCard(1); if (card0 != null && card1 != null) { if (card0.isMatch(card1)) { card0.setMatched(true); card1.setMatched(true); return true; } } return false; } COM: <s> checks if there are any matches </s>
funcom_train/16897930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Response getBaseURI() { XMLResponseREPLY response = ServletUtilities.getService().createReplyResponse(getBaseuriRequest, RepliesStatus.ok); Element dataElement = response.getDataElement(); RDFModel ontModel = ProjectManager.getCurrentProject().getOntModel(); Element baseuri = XMLHelp.newElement(dataElement, baseuriTag); baseuri.setAttribute("uri", ontModel.getBaseURI()); return response; } COM: <s> gets the baseuri for the loaded ontology </s>
funcom_train/4734961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Command getCloneCommand(ChangeBoundsRequest request) { CloneCommand clone = new CloneCommand(); clone.setParent((LogicDiagram)getHost().getModel()); EditPart after = getInsertionReference(request); int index = getHost().getChildren().indexOf(after); Iterator i = request.getEditParts().iterator(); GraphicalEditPart currPart = null; while (i.hasNext()) { currPart = (GraphicalEditPart)i.next(); clone.addPart((LogicSubpart)currPart.getModel(), index++); } return clone; } COM: <s> override to return the code command code to perform an </s>
funcom_train/15406428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPropertiesAsString() { StringBuilder sb = new StringBuilder(); Iterator<String> it = propSet.iterator(); boolean hasNext = it.hasNext(); while (hasNext) { sb.append(it.next()); hasNext = it.hasNext(); if (hasNext) { sb.append(","); } } return sb.toString(); } COM: <s> return the properties as a comma delimited string </s>
funcom_train/51376492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Vector buildDayValidValues() { Vector returnValue = new Vector(32); returnValue.add(new ValidValue("-1", "Unspecified")); for (int i = 1; i < 32; i++) { returnValue.add(new ValidValue(Integer.toString(i), Integer.toString(i))); } return returnValue; } COM: <s> build the crontab day valid values </s>
funcom_train/5342104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Border getCachedOrNewBorder(Color c) { if( c == null ) return null; if(borders == null) return null; Border b = (Border)borders.get(c); if( b == null ) { b = BorderFactory.createMatteBorder(2,5,2,5,c); borders.put(c, b); } return b; } COM: <s> gets a new or old border for this color </s>
funcom_train/48526992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertEndTag(String name) throws IOException { assertEvent(xpp.END_TAG); if (! xpp.getName().equals(name)) throw new IOException("Expected end tag '" + name + "', got a '" + xpp.getName()+"'"); } COM: <s> asserts that the provided end tag was just read </s>
funcom_train/30254457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean check(String name) { for(Iterator iter = SLAdmin.getRequestCollection().iterator(); iter.hasNext();){ RequestType rec = (RequestType)iter.next(); if( name.equals(rec.getName())){ BlockGUI.alertWarning( Messages.USERGROUP_UNIQUE); return false; } } return true; } COM: <s> check user name by unique </s>
funcom_train/13866425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void insertCells(int row, int column, int count) { Element tr = rowFormatter.getRow(bodyElem, row); for (int i = column; i < column + count; i++) { Element td = createCell(); DOM.insertChild(tr, td, i); } } COM: <s> inserts a number of cells before the specified cell </s>
funcom_train/4086340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void allocParens() { // Allocate arrays for subexpressions startn = new int[maxParen]; endn = new int[maxParen]; // Set sub-expression pointers to invalid values for (int i = 0; i < maxParen; i++) { startn[i] = -1; endn[i] = -1; } } COM: <s> performs lazy allocation of subexpression arrays </s>
funcom_train/2487613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isNumeric() { return ("java.lang.Integer".equals(getType())) || ("java.lang.Byte".equals(getType())) || ("java.lang.Long".equals(getType())) || ("java.lang.Short".equals(getType())); } COM: <s> return true if the field is a numeric field </s>
funcom_train/21502435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFromIndexPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ArrayDimension_fromIndex_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ArrayDimension_fromIndex_feature", "_UI_ArrayDimension_type"), TypeSystemPackage.Literals.ARRAY_DIMENSION__FROM_INDEX, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the from index feature </s>
funcom_train/26447714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String constructEntityStatement(DomainObjectMetaInfo aDOMI) { StringBuffer res = new StringBuffer(); res.append("<!ENTITY % "); res.append(aDOMI.getFullyQualifiedDomainObjectClassname()); res.append(" SYSTEM \""); res.append(aDOMI.getFullyQualifiedDomainObjectClassname()); res.append("."); res.append(NamespaceHelper.DTD_FILE_EXTENSION); res.append("\">"); res.append(GeneratorBase.NEWLINE); res.append(GeneratorBase.INDENT); res.append("%"); res.append(aDOMI.getFullyQualifiedDomainObjectClassname()); res.append(";"); return res.toString(); } COM: <s> constructs the external entity definition </s>
funcom_train/11389970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getUriPath(final Path p) { checkPath(p); String s = makeAbsolute(p).toUri().getPath(); if (!isValidName(s)) { throw new InvalidPathException("Path part " + s + " from URI" + p + " is not a valid filename."); } return s; } COM: <s> make the path absolute and get the path part of a pathname </s>
funcom_train/32959978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPush() { te.setValue("#{var}", "35"); te.pushContext(); te.setValue("#{var}", 96); Object pushedContextResult = te.evaluate("#{var}"); assertEquals(pushedContextResult, 96 ); te.popContext(); Object poppedContextResult = te.evaluate("#{var}"); assertEquals(poppedContextResult, "35" ); } COM: <s> test variable context push pop </s>
funcom_train/13381934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ExtObjectContainer getObjectContainer(String debateID) throws DebateOpenException{ ActiveDebate debate = activeDebates.get(debateID); if(debate==null) debate = activateDebate(debateID); debate.lastAccessTimestamp = System.currentTimeMillis(); if(debate.objectContainer.isClosed()) debate.objectContainer = debate.objectServer.openClient().ext(); return debate.objectContainer; // return debate.objectServer.openClient().ext(); } COM: <s> returns a db4 o extended object container </s>
funcom_train/43824215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open(String server, Integer port, String user, String password, List<String> clientList, XBee xbee) throws XMPPException, XBeeException { this.openInternal(server, port, user, password, clientList, xbee, null, 0); } COM: <s> creates a gateway with an existing xbee object </s>
funcom_train/26461844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initMap(Properties props) { Iterator i = props.keySet().iterator(); while (i.hasNext()) { String key = (String)i.next(); if (key.startsWith("match.")) { String match = key.substring(6); String ext = props.getProperty(key); map.put(match, ext); } } } COM: <s> initialize user agent mappings </s>
funcom_train/46161450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isType(VisualType type) { if (type == VisualType.ANY_VISUAL) { return true; } else if (type == VisualType.GROUND) { for (String planeName : groundPlaneNames) { if (this.getName().endsWith(planeName)) { return true; } } return false; } return false; } COM: <s> find out whether the visual represented by this node fits into a </s>
funcom_train/33266155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawRect(int x, int y, int width, int height) { drawLine(x, y, x + width, y); drawLine(x + width, y, x + width, y + height); drawLine(x, y, x, y + height); drawLine(x, y + height, x + width, y + height); } COM: <s> draws the outline of the specified rectangle using the current color </s>
funcom_train/35648489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getBranchId(String[] nodeParams) { StringBuffer newBranchBuffer = new StringBuffer(255); for (int bindex=0; bindex < nodeParams.length -1; bindex++) { newBranchBuffer.append(nodeParams[bindex]); newBranchBuffer.append("."); } String newBranch = newBranchBuffer.toString().substring(0, newBranchBuffer.length()-1); return newBranch; } COM: <s> calculates the current branch id and passes the branch id </s>
funcom_train/31690173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void uncheckout() throws WebDAVException { try { if (m_child.isPendingVersion() == true) { m_child.archive(); } else { throw new WebDAVException( WebDAVStatus.SC_FORBIDDEN, "Resource is not checked out"); } } catch (DataAccessException e) { throw new WebDAVException( WebDAVStatus.SC_INTERNAL_SERVER_ERROR, e.getLocalizedMessage()); } catch (EditException e) { throw new WebDAVException( WebDAVStatus.SC_INTERNAL_SERVER_ERROR, e.getLocalizedMessage()); } } COM: <s> uncheckout this resource </s>
funcom_train/7457329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int readTag() throws IOException { if (isAtEnd()) { lastTag = 0; return 0; } lastTag = readRawVarint32(); if (WireFormat.getTagFieldNumber(lastTag) == 0) { // If we actually read zero (or any tag number corresponding to field // number zero), that's not a valid tag. throw InvalidProtocolBufferException.invalidTag(); } return lastTag; } COM: <s> attempt to read a field tag returning zero if we have reached eof </s>
funcom_train/47139569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsStock (Stock st, DataBasket db) { boolean fResult = m_stSource.containsStock (st, db); if (fResult) { for (Iterator i = st.iterator (db, false); i.hasNext();) { if (!contains ((StockItem) i.next(), db)) { return false; } } } return fResult; } COM: <s> check whether the given stock is contained in the filtered stock </s>
funcom_train/34141081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addNotification(NotificationType type, String notification) { List<String> notifications = mTypeToMessageMap.get(type); if (notifications == null) { notifications = new ArrayList<String>(); mTypeToMessageMap.put(type, notifications); } return notifications.add(notification); } COM: <s> adds a notifications for a given </s>
funcom_train/28694261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int filterRGB( int x, int y, int rgb) { int red = getRed( rgb); int green = getGreen( rgb); int blue = getBlue( rgb); red = red * (100 - percent) / 100; blue = blue * (100 - percent) / 100; green = green *(100 - percent) / 100; return getRGB( rgb, red, green, blue); } COM: <s> overrides code rgbimage filter </s>
funcom_train/17521993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open(){ /* Set fixed size. */ this.setResizable(false); /* Position on screen. */ this.setLocation (parent.getLocation().x + 10, parent.getLocation().y + 10); /* Show. */ this.setVisible(true); } COM: <s> show the config dialog when requested by users menu </s>
funcom_train/8686283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected InputStream wrapStream(InputStream in) throws IOException { for (int i = 0; i < MAGIC.length; i++) { if (in.read() != MAGIC[i]) { throw new IOException("Invalid bz2 stream."); } } return new CBZip2InputStream(in); } COM: <s> decompress on the fly using </s>
funcom_train/17026529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StoreDesc generateStoreDescSdb(String dbUrl) { StoreDesc storeDesc = new StoreDesc(LayoutType.LayoutTripleNodesHash, DatabaseType.Derby); SDBConnectionDesc sdbConnDesc = SDBConnectionDesc.blank(); sdbConnDesc.setJdbcURL(dbUrl); sdbConnDesc.setUser(""); sdbConnDesc.setPassword(""); storeDesc.connDesc = sdbConnDesc; return storeDesc; } COM: <s> generates the store description that contains all </s>
funcom_train/36932304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float kerning(int theFirstGlyphCode, int theSecondGlyphCode) { if(theFirstGlyphCode < 0 || theSecondGlyphCode < 0)return 0; Integer value = _myKerningMap.get(new Key(theFirstGlyphCode, theSecondGlyphCode)); if (value == null) return 0; return value / (float)_myUnitsPerEm; } COM: <s> returns the kerning value for the specified glyphs </s>
funcom_train/51270642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String remainingLine(String httpMsg) { this.skipSpaces(httpMsg); int oldIndex = this.index; int msgLength = httpMsg.length(); while (this.index < msgLength && httpMsg.charAt(this.index) != '\n' && httpMsg.charAt(this.index) != '\r') { this.index++; } return httpMsg.substring(oldIndex, this.index); } COM: <s> returns from the current index position the complete line and increments </s>
funcom_train/10794308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isBaseTable(Table table) { if (table.getPrimaryKey() == null) return false; int type = getSecondaryType(table, true); if (type != -1) return type == TABLE_BASE; if (_custom != null) return _custom.getTableType(table, TABLE_BASE) == TABLE_BASE; return true; } COM: <s> return whether the given table is a base class table </s>
funcom_train/18254898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addToSuper(int index, Object o, boolean isParent) { try { superSpace.add(o, false); super.add(index, o, isParent); } catch (NullPointerException e) { throw new RuntimeException("No superlist specified for " + getContext().getName()); } } COM: <s> adds the to super </s>
funcom_train/20963709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double pathLength (Configuration configuration) { double distance = 0.0; for (int i = 1; i < this.dimension; ++i) { distance += distances[configuration.valueAt(i - 1)][configuration.valueAt(i)]; } distance += distances[configuration.valueAt(configuration.getDimension() - 1)][configuration.valueAt(0)]; return distance; } COM: <s> returns absolute length of a path </s>
funcom_train/18884519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void printProperties() { Properties properties = System.getProperties(); Enumeration<?> propertyNames = properties.propertyNames(); while (propertyNames.hasMoreElements()) { String name = (String)propertyNames.nextElement(); System.out.println(name + " : " + properties.getProperty(name)); } } COM: <s> print all system properties </s>
funcom_train/193993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canOccupy(int x, int y) { // can't occupy a field if game is over... if (game.getFlow().isOver()) { return false; } // or if it is not running, e.g. paused if (!game.getFlow().isRunning()) { return false; } switch (getFieldValue(x, y)) { case MARKED: return false; case OCCUPIED: return false; } return true; } COM: <s> checks if the specified field could be target of the next move </s>
funcom_train/48692078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void listen() { while (true) { try { SocketChannel clientChannel = channel.accept(); executer.submit(handleClient(clientChannel)); System.out.println("Client accepted"); } catch (IOException e) { System.err.println("accept()"); close(); } } } COM: <s> starts the data server </s>
funcom_train/27948247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(Document doc, int startPos, int len) { int endPos = startPos + len - 1; try { content = doc.getText(startPos, len); int zero = startPos; int infLimit = startPos - zero; int supLimit = endPos - zero; root = copyElementStructure(doc.getDefaultRootElement(), content, zero, infLimit, supLimit, null); } catch (BadLocationException e) {} } COM: <s> init the object with the document structure </s>
funcom_train/14615127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TemplateModel getAtIndex(long index) throws TemplateModelException { try { return list.get( (int)index ); } catch( IndexOutOfBoundsException e ) { throw new TemplateModelException( "Index out of bounds", e ); } catch( ClassCastException e ) { throw new TemplateModelException( "Element is not a TemplateModel", e ); } } COM: <s> retrieves the specified item from the list </s>
funcom_train/24951094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getList(int messageNumber) throws IOException{ String s = sendCommand("LIST " + messageNumber); if(s.startsWith("+OK")) { String[] ss = s.split(" "); return Integer.parseInt(ss[2]); } return -1; } COM: <s> get octet of one message </s>
funcom_train/47129512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reorder(int oldIndex, int newIndex1) { TestCase movingTestCase = getTestCases().remove(oldIndex); int newIndex = newIndex1; if (newIndex < 0 || newIndex > getSize()) { newIndex = getSize(); } getTestCases().add(newIndex, movingTestCase); } COM: <s> reorders child code test case code items </s>
funcom_train/3577522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String replace(String line, String findString, String repString){ StringBuffer newstring; int position = 0; int prevPos = 0; newstring = new StringBuffer(); while ((position = line.indexOf(findString, position)) != -1 ) { newstring.append(line.substring(prevPos, position)); prevPos = position + findString.length(); newstring.append(repString); position = position + findString.length(); } newstring.append(line.substring(prevPos, line.length())); return newstring.toString(); } COM: <s> replace a section of test from a given source </s>
funcom_train/49938655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void save() { Collections.sort(scores, Collections.reverseOrder(new EntryComparator())); File file = new File(path); try { FileUtils.writeLines(file, scores); } catch (IOException ex) { Logger.getLogger(HighScore.class.getName()).log(Level.SEVERE, null, ex); } } COM: <s> saves the high score list to the permanent storage </s>
funcom_train/2537311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateVerticesGlobal(){ if (this.globalVerticesDirty){ Vertex[] unTransformedCopy = Vertex.getDeepVertexArrayCopy(this.getGeometryInfo().getVertices()); //transform the copied vertices and save them in the vertices array this.verticesGlobal = Vertex.transFormArray(this.getGlobalMatrix(), unTransformedCopy); this.globalVerticesDirty = false; } } COM: <s> updates the verticesglobal array of the shape by </s>
funcom_train/19091762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer str = new StringBuffer(); str.append("name=\""+name+'"'); str.append(",ch="+ch); str.append(",position="+position); str.append(",count="+count); return str.toString(); } // toString():String COM: <s> returns a string representation of this object </s>
funcom_train/4253507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNum() { String address=(new Parser(value)).skipString().skipString().getString(); int i=address.indexOf("/"); if (i<0) return 0; int j=address.indexOf("/",i); if (j<0) return 0; return Integer.parseInt(address.substring(j)); } COM: <s> gets the number of addresses </s>
funcom_train/978046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEntrarTres() { System.out.println("entrarTres"); Calculadora instance = new Calculadora(); String expResult = "3.0"; String result = instance.entrarTres(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. } COM: <s> test of entrar tres method of class calculadora </s>
funcom_train/20780083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void doInitHistogram() { pixData = new float[numY][numX]; for (int i = 0; i < numY; i++) { for (int j = 0; j < numX; j++) { pixData[i][j] = 0.0f; } } totalSum = 0.0f; } COM: <s> re initializes the histogram of events </s>
funcom_train/22948311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double computeCorrelation(int a, int b) { double r; // =0; // correlation coeficient SpecUnit x, y; x = (SpecUnit) mapUnits.get(Integer.toString(a)); y = (SpecUnit) mapUnits.get(Integer.toString(b)); r = computeSxy(x, y) / Math.sqrt(x.getSxx() * y.getSxx()); return r; } COM: <s> compute correlation between inputs nr </s>
funcom_train/45502353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteAssignment( Assignment val ) throws IllegalArgumentException { if( !assignments.remove( val ) ) throw new IllegalArgumentException( ZLocalization.getSingleton().getString( "ds.AssignmentNotRegisteredException" ) ); if( val == null ) return; val.delete(); if( val == currentAssignment ) if( assignments.size() > 0 ) currentAssignment = assignments.get( 0 ); else currentAssignment = null; } COM: <s> deletes an assignment from the project </s>
funcom_train/25060407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String localizePrefixToOSEnvironment(String prefix) { String returnStr = prefix.replace("/", FILE_SEPARATOR).replace("\\", FILE_SEPARATOR); if (returnStr.endsWith(FILE_SEPARATOR)) { returnStr = returnStr.substring(0, returnStr.length() - FILE_SEPARATOR.length()); } return returnStr; } COM: <s> ensure that the directory location prefix is appropriate to whatever os this </s>
funcom_train/976355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double determinant(double[][] pMatrix) { int tms = pMatrix.length; double det = 1; double[][] upperTriangleMatrix = upperTriangle(pMatrix); for (int i = 0; i < tms; i++) { det = det * upperTriangleMatrix[i][i]; } // multiply down diagonal det = det * iDF; // adjust w/ determinant factor return det; } COM: <s> method to calculate the determinate of a matrix </s>
funcom_train/38536472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Number getNumLargestMin(int start, int end) { Number v = NumberMath.minValue(numberType); double precision = getPrecision(); for (int i=start; i<=end; i++) { Number min = exprs[i].getNumMin(); if (NumberMath.compare(min,v,precision,numberType) > 0) v = min; } return v; } COM: <s> returns that largest minimal value of all variables in array within </s>
funcom_train/12163452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRenderSelectionComplexSpin() throws Exception { doTestRenderSelection("menu", "<select multiple=\"false\" name=" + "\"testName\" type=\"popup\">" + "<option title=\"Prompt\" value=\"Value\">Caption</option>" + "</select>", false); } COM: <s> test the complex rendering for a menu popup </s>
funcom_train/19971690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRow(int row, Vector vector) throws IOException { if (this.getRows() < row || this.getColumns() < vector.size()) throw new ArrayIndexOutOfBoundsException(row); VectorUpdate update = new VectorUpdate(row); update.putAll(vector.getEntries()); table.put(update.getPut()); } COM: <s> set the row of a matrix to a given vector </s>
funcom_train/50046422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printVersion() throws IOException { println(APP_NAME + ", " + VersionInfo.getVersion() + " version.\n" + "Copyright (c) 2008 by udanax, " + "licensed to Apache Software Foundation.\n" + "Type 'help;' for usage.\n"); } COM: <s> print out the program version </s>
funcom_train/48877810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String tmp = null; tmp = date+"\t"+status+"\t"+customerID+"\t"+storeID+"\t"+employeeID+"\t"+payment.getAmount()+"\t"+payment.getPaymentType(); return tmp; }//toString COM: <s> to string is used for writing to log files </s>
funcom_train/8367172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetPrice() { System.out.println("setPrice"); int idx = 1; int pr = 65; StoreItem drinkItem = instance.getStoreItem(Store.DRINK, idx); instance.setPrice(idx, pr); assertEquals( pr, ((DrinksBrand)drinkItem.getContent()).getSellingPrice()); } COM: <s> test of set price method of class store controller </s>
funcom_train/35694696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void redirectTo(String uri) { warnIfSynchronous(); try { view.acquireLifecycleLock(); view.installThreadLocals(); view.getFacesContext().getExternalContext().redirect(uri); } catch (Exception e) { throw new RuntimeException(e); } finally { release(); view.releaseLifecycleLock(); } } COM: <s> redirect browser to a different uri </s>
funcom_train/1559789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initGUI() { initColorPanel(); tabbedPane = new JTabbedPane(); tabbedPane.addTab("", new JPanel()); tabbedPane.addTab("", new JPanel()); tabbedPane.addTab("", new JPanel()); tabbedPane.addTab("", colorPanel); setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); setLayout(new BorderLayout()); add(tabbedPane, BorderLayout.CENTER); } COM: <s> initialize the gui </s>
funcom_train/2387971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean performOk() { // Get the preference store IPreferenceStore preferenceStore = getPreferenceStore(); // Set the values from the fields preferenceStore.setValue(USE_DEFAULT_USERNAME, btnUseDefaultUsername.getSelection()); preferenceStore.setValue(DEFAULT_USERNAME, txtUsername.getText()); preferenceStore.setValue(QUERY_FOR_DEFAULT_USERNAME, btnQuerySetUsername.getSelection()); // Return true to allow dialog to close return true; } COM: <s> called when user clicks apply or ok </s>