__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/25706375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getButtonsPanel() { if( buttonsPanel == null ) { final FlowLayout flowLayout = new FlowLayout(); flowLayout.setAlignment(java.awt.FlowLayout.RIGHT); buttonsPanel = new JPanel(); buttonsPanel.setLayout(flowLayout); buttonsPanel.add(getOkButton(), null); buttonsPanel.add(getCancelButton(), null); } return buttonsPanel; } COM: <s> this method initializes buttons panel </s>
funcom_train/30005574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemEdit() { if (jMenuItemEdit == null) { jMenuItemEdit = new JMenuItem(); jMenuItemEdit.setText(LanguageController.getInstance().getString(this.plugin, "Popup_Edit")); jMenuItemEdit.addActionListener(this); } return jMenuItemEdit; } COM: <s> returns a menu item to edit the test base </s>
funcom_train/17465932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copy(File source, File dest) throws IOException { System.out.println("copy " + source + " -> " + dest); FileInputStream in = new FileInputStream(source); try { FileOutputStream out = new FileOutputStream(dest); try { byte[] buf = new byte[1024]; int len = 0; while ((len = in.read(buf)) > 0) out.write(buf, 0, len); } finally { out.close(); } } finally { in.close(); } } COM: <s> copy source to dest overwriting dest </s>
funcom_train/20307479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(boolean ignoreBrules, Finder inserts) { if (clauseIndex == null) compile(rules, ignoreBrules); findAndProcessAxioms(); nAxiomRulesFired = nRulesFired; logger.debug("Axioms fired " + nAxiomRulesFired + " rules"); fastInit(inserts); } COM: <s> process all available data </s>
funcom_train/13274789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModelRotation(float [][] modelRotation) { if (modelRotation != this.modelRotation) { float [][] oldModelRotation = this.modelRotation; this.modelRotation = modelRotation; this.propertyChangeSupport.firePropertyChange(Property.MODEL_ROTATION.name(), oldModelRotation, modelRotation); } } COM: <s> sets the orientation pitch angle of the imported piece model </s>
funcom_train/7652587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkBoundedTypeParameter(Method method) { TypeVariable<Method> typeParameter = getTypeParameter(method); assertEquals("T", typeParameter.getName()); assertEquals(method, typeParameter.getGenericDeclaration()); Type[] bounds = typeParameter.getBounds(); assertLenghtOne(bounds); Type bound = bounds[0]; assertEquals(BoundedWildcardsGenericMethods.class, bound); } COM: <s> tests whether the type parameter is bounded by bounded generic methods like </s>
funcom_train/27727221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VectorN getPosition(VectorN rISS){ // get a unit vector along ISS position vector VectorN ISSunit = rISS.unitVector(); // multiply by dr to get the change VectorN delta = ISSunit.times(this.delr); // obtain the STS position VectorN out = rISS.plus(delta); return out; } COM: <s> get the position of the gps receiver from the iss position vector </s>
funcom_train/42283116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void applyEditorValueAndDeactivate() { if (!isValueValid()) { // try to insert the current value into the error message. setErrorMessage(MessageFormat.format(getErrorMessage(), new Object[] { comboBox.getText() })); } comboBox.select(selection); fireApplyEditorValue(); deactivate(); } COM: <s> applies the currently selected value and deactiavates the cell editor </s>
funcom_train/50862679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNextStageType() { String result = null; if (buildingStage != null) result = null; else if (frameStage != null) result = ConstructionStageInfo.BUILDING; else if (foundationStage != null) result = ConstructionStageInfo.FRAME; else result = ConstructionStageInfo.FOUNDATION; return result; } COM: <s> gets the next construction stage type </s>
funcom_train/49635981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SortField getSortField(boolean reverse) { if (comparator == COMPARATOR.lucene) { throw new UnsupportedOperationException( "Lucene trunk does not support search time locale based " + "sorting"); //return new SortField(field, new Locale(sortLanguage), reverse); } return new SortField(field, getComparator(), reverse); } COM: <s> return the sort field </s>
funcom_train/44822208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void closeDialog(java.awt.event.WindowEvent evt) { setVisible(false); dispose(); // When window is closed, kill the process and the threads. if (process != null) { if (stdoutThread.isAlive()) stdoutThread.interrupt(); if (stderrThread.isAlive()) stderrThread.interrupt(); process.destroy(); } } COM: <s> closes the dialog and kills the process threads </s>
funcom_train/26489105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void switchLogFile(String fileName) { try { PrintStream stream = new PrintStream(new FileOutputStream(fileName, true)); PrintStream oldStream = printStream; printStream = stream; if ( oldStream != System.out ) { oldStream.close(); } } catch ( Exception e ) { e.printStackTrace(); } } COM: <s> switch to new logfile </s>
funcom_train/21850993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(int cols, int rows) { enableEvents(FormUtils.isDesignMode()); StringBuffer colspec = new StringBuffer(); for (int col = 1; col <= cols; col++) { if (col > 1) colspec.append(","); colspec.append("f:d:n"); } StringBuffer rowspec = new StringBuffer(); for (int row = 1; row <= rows; row++) { if (row > 1) rowspec.append(","); rowspec.append("c:d:n"); } initialize(colspec.toString(), rowspec.toString()); m_cell_painters = new Matrix(getRowCount(), getColumnCount()); } COM: <s> call this only once to initialize to the default settings for a given </s>
funcom_train/50982877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCommandConstructor() { final ObjectStoreCommand command = new ObjectStoreCommand() { private static final long serialVersionUID = 1L; }; final ObjectStoreCommandNotSupportedException e = new ObjectStoreCommandNotSupportedException( command ); assertEquals( command.getClass().getName(), e.getMessage() ); assertSame( command, e.getCommand() ); } COM: <s> simple test for the constructor that takes a command and accessors </s>
funcom_train/12181727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetElementNamespace() { PolicyProxyElementDetails details = new PolicyProxyElementDetails("imageComponent"); Namespace expected = Namespace.getNamespace("lpdm", PolicySchemas.MARLIN_LPDM_2006_02.getNamespaceURL()); assertEquals(expected, details.getElementNamespace()); } COM: <s> test that get element namespace returns the expected value </s>
funcom_train/43768207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean present(T x) { int h0 = hash0(x) % capacity; if(table[0][h0].contains(x)) { return true; } else { int h1 = hash1(x) % capacity; if(table[1][h1].contains(x)) { return true; } } return false; } COM: <s> unsynchronized version of contains </s>
funcom_train/787663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cancel() { boolean fire = false; synchronized ( this ) { if ( isScheduled() ) { // attempt to remove this activity, if the remove fails, // this activity is not currently scheduled with the manager ActivityManager.removeActivity(this); fire = true; } setRunning(false); } if ( fire ) fireActivityCancelled(); } COM: <s> cancels this activity if scheduled </s>
funcom_train/22683480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String makeSqlWhereClause() { StringBuilder buffer = new StringBuilder(); buffer.append(WHERE).append(SPACE); boolean first = true; for (Like like : mLikes) { if (first) first = false; else buffer.append(COMMA).append(SPACE); buffer.append(convertVariableToColumnName(like.mVariable)).append(SPACE); buffer.append(LIKE).append(SPACE).append( quoteIfNecessary( like.mPattern) ); } return buffer.toString(); } COM: <s> format the where clause for the sql query </s>
funcom_train/44447279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setFieldInputs() { if (property != null && property.isValid()) { Object data = property.get(); Iterator i = awareFields.iterator(); while (i.hasNext()) { IAwareWidget awareField = (IAwareWidget) i.next(); awareField.setValue(data); } } } COM: <s> method set field inputs </s>
funcom_train/44452366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URI addChildToVersion(String thName, VersionModel vm, String parentUri, boolean isver) throws Exception { URI uri = ontologyManager.addChildToVersion(thName,vm,parentUri, isver); try { addThreadAuthor(uri.toString()); } catch (Exception e) { addThreadAuthor(getUserFoaf().getEmail(),uri.toString()); } return uri; } COM: <s> adds a child version to thread </s>
funcom_train/4674909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeOldArchives(long timeStamp) throws SQLException { String sql; sql = "DELETE FROM contract_archive WHERE " + "archive_time < " + timeStamp + ";"; statement.executeQuery(sql); sql = "DELETE FROM pricing_archive WHERE " + "archive_time < " + timeStamp + ";"; statement.executeQuery(sql); sql = "DELETE FROM market_zone_adjustment_archive WHERE " + "archive_time < " + timeStamp + ";"; statement.executeQuery(sql); } COM: <s> remove the outdated archives by certain date in epoch time format </s>
funcom_train/3785433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getImageForXformInput() { /* getImageForXformInput */ Image img= (!flk.allowXformFlag) ? this.iImg : ((flk.composeXformFlag) ? ((this.oImg==null) ? this.iImg : this.oImg) : this.iImg); return(img); } /* getImageForXformInput */ COM: <s> get image for xform input get the image for input to image transform </s>
funcom_train/26628744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isOpenSourceCompatable() { return distributeCopy.equalsIgnoreCase( "yes" ) && source.equals( "yes" ) && ( distributeDerivative.equals( "yes" ) || distributeDerivative.equals( "share-alike" ) ) && ( distributeCopy.equals( "yes" ) || distributeCopy.equals( "patch" ) && commercial.equals( "yes" ) ); } COM: <s> does this license info appear to be compatible with the open source </s>
funcom_train/2624980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void activityFinished() { setRelativeTargetValueAdjustingForMode(1); super.activityFinished(); final PActivityScheduler scheduler = getActivityScheduler(); if (loopCount > 1) { if (loopCount != Integer.MAX_VALUE) { loopCount--; } firstLoop = false; setStartTime(scheduler.getRoot().getGlobalTime()); scheduler.addActivity(this); } } COM: <s> called whenever the activity finishes </s>
funcom_train/4969489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addFreeStation() { numFreeStations++; metaDistribution.addFreeStation(); LOGGER.debug("Adding free station of type " + stationType); for (Iterator<FreeStationAddedListener> iter = freeStationAddedListeners .iterator(); iter.hasNext();) { iter.next().freeStationAdded(this); } } COM: <s> adds a free station to the number of stations to be created </s>
funcom_train/43520843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void installClientDecorations(final JRootPane root) { this.installBorder(root); final JComponent titlePane = this.createTitlePane(root); this.setTitlePane(root, titlePane); this.installWindowListeners(root, root.getParent()); this.installLayout(root); if (this.window != null) { root.revalidate(); root.repaint(); } } COM: <s> installs the necessary state onto the jroot pane to render client </s>
funcom_train/3603286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getDisconnectedFileName(String path) { int length = path.length(); int lastDelim = path.lastIndexOf(PATH_DELIM); if (lastDelim + 1 == length) { lastDelim = path.lastIndexOf(PATH_DELIM, length - 1); return path.substring(lastDelim, length - 1); } else { return path.substring(lastDelim); } } COM: <s> from ftp jon </s>
funcom_train/27817297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void putHeaderInformation(PrintStream output, String result) { output.println("HTTP/1.0 " + result + "\r"); output.println("Date: " + new Date() + "\r"); output.println("Server: RNA Newsfeed HttpManagingServer\r"); output.println("Content-type: text/html\r\n"); } COM: <s> puts return header information in the print stream given </s>
funcom_train/4751791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean compareAdjacent(BiPredicate<E> predicate) { if (fStart >= fEnd - 1) { return false; } E elem = fList.get(fStart); for (int i = fStart + 1; i < fEnd; i++) { if (!predicate.apply(elem, fList.get(i))) { return false; } elem = fList.get(i); } return true; } COM: <s> compare all adjacent elemants from lowest to highest index and return true </s>
funcom_train/35807032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void btnAtMark_clicked(ActionEvent arg0) { if (windTable.getSelectedRow() > -1){ windTableModel.setValueAt(strength.getText(), windTable.getSelectedRow(), 0); windTableModel.setValueAt(direction.getText(), windTable.getSelectedRow(), 1); }else{ JOptionPane.showMessageDialog(new JFrame(), lng.get("dlg-table-err-text"), lng.get("dlg-table-err"), JOptionPane.WARNING_MESSAGE); } } COM: <s> h3 btn at mark clicked h3 </s>
funcom_train/22168791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SimpleItem getSimpleItem(String id) throws DataModelException { // Get the item and search if this item is a String FenixObject item = getItem(id); if(item instanceof SimpleItem) { return (SimpleItem)item; } throw new DataModelException("The item data '" + id + "' stored in the unit '" + getId() + "' is not the type '" + Item.SIMPLE + "'."); } COM: <s> obtain an item of type simple whose identifier is equal to id </s>
funcom_train/7518199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(PropostaServicoLocalAtuacao entity) { EntityManagerHelper.log( "deleting PropostaServicoLocalAtuacao instance", Level.INFO, null); try { entity = getEntityManager().getReference( PropostaServicoLocalAtuacao.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent proposta servico local atuacao entity </s>
funcom_train/35322896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void forceTermination() { // Only need to change root state final Phaser root = this.root; long s; while ((s = root.state) >= 0) { if (UNSAFE.compareAndSwapLong(root, stateOffset, s, s | TERMINATION_BIT)) { // signal all threads releaseWaiters(0); releaseWaiters(1); return; } } } COM: <s> forces this phaser to enter termination state </s>
funcom_train/27823676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addElement(SideBarElement element,boolean isRemovable) { JComponent component=element.getComponent(); component.putClientProperty("sidebar.element",element); addItem(element.getLabel(),element.getIcon(),element.getDescription(),component,isRemovable); } COM: <s> adds a sidebar element to the sidebar </s>
funcom_train/40797776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MetaTypeInformation getMTP(Bundle b) { ServiceReference cmSR = cmTracker.getServiceReference(); MetaTypeInformation mti = null; if(cmSR != null && cmSR.getBundle() == b) { mti = cmMTP; } else if(b.getBundleId() == 0) { mti = this; } else { mti = (MetaTypeInformation)providers.get(b); } return mti; } COM: <s> get a loaded metatype provider given a bundle </s>
funcom_train/22232592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDirection(float x, float y, float z) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_DIRECTION_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("SpotLight4")); if (isLive()) ((SpotLightRetained)this.retained).setDirection(x,y,z); else ((SpotLightRetained)this.retained).initDirection(x,y,z); } COM: <s> sets light direction </s>
funcom_train/16141874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prepareForStorage() { if ( getTransformationDocFromUserFile() != null ) { state.setTransformationToMCASTableFile(new File(DataSourceUtilities.composeTransformationDocName(getName()))); } if ( getValidationDocFromUserFile() != null ) { state.setDataValidationFile(new File(DataSourceUtilities.composeValidationDocName(getName()))); } } COM: <s> makes the absolute file path relative to the local file storage </s>
funcom_train/10213460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ConditionMatch evaluateBoolCondition(boolean outcome) { if (log.isTraceEnabled()) { log.trace("outcome " + outcome); } if (operator == OPERATOR_NOT_EQUAL) { log.debug("not equal operator in use"); return !outcome ? new ConditionMatch() : null; } return outcome ? new ConditionMatch() : null; } COM: <s> evaluate taking into account the operator not only boolean operators considered </s>
funcom_train/22034418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScaleOn(boolean on) { boolean oldOn = scaleOn; scaleOn = on; if (on) { scale_switch.setWhichChild(1); // on } else { scale_switch.setWhichChild(0); // off } if (scaleOn != oldOn) { canvas.scratchImages(); } } COM: <s> allow scales to be displayed if they are set on </s>
funcom_train/4684155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean start() { if (status == STOPPED) { status = RUNNING; Thread th = new Thread(this, "Heartbeat thread"); th.setPriority(Thread.MIN_PRIORITY); VM.setAsDaemonThread(th); th.start(); return true; } return false; // already running } COM: <s> start the heartbeat service if not already running </s>
funcom_train/47781374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int readBufferPercentFull(long startTime) { if(m_fileReadThread == null || !m_fileReadThread.isAlive()) { return 101; } int queueFull = 100*m_queue.size()/m_queueSize; int timeFull = 100*getLastTimestampDiff(startTime)/m_maxBufferTime; if(queueFull > timeFull) return queueFull; return timeFull; } COM: <s> if file is being read return percentage of buffer that is full </s>
funcom_train/35528475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadSinogram(final CTScanner ctscanner, final String path) { final SwingWorker worker = new SwingWorker() { public Object construct() { mBufferedImage = ctscanner.CreateSinogram(path); return mBufferedImage; } //Runs on the event-dispatching thread. public void finished() { setPixelData(); PerformWindowing(); repaint(); } }; worker.start(); } COM: <s> loads a sinogram image into the panel from a file </s>
funcom_train/18961745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double evaluateProbability(double[] instDat) { double v = m_Par[0]; for (int k = 1; k <= m_NumPredictors; k++) { v += m_Par[k] * instDat[k]; } v = 1 / (1 + Math.exp(-v)); return v; } COM: <s> evaluate the probability for this point using the current coefficients </s>
funcom_train/35607236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setHourPanelFocus() { lblHourHighlighted = lblHour; lblHourHighlighted.setFont(hourFocusFont); lblTimeFormatHighlighted = lblTimeFormat; lblTimeFormat.setFont(timeFormatFocusFont); pnHourHighlight = pnHour; lblHourHighlighted.setForeground(hourFocusForegroundColor); lblTimeFormatHighlighted.setForeground(hourFocusForegroundColor); } COM: <s> focus hour panel by setting its colur </s>
funcom_train/35620532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadFloorTexture(TextureState textureState) { ImageIcon imagemTextura = new ImageIcon( Room.class.getClassLoader().getResource(ResourcesPath.TEXTURE_PATH + "roomFloor.jpg")); Texture texture = TextureManager.loadTexture( imagemTextura.getImage(), Texture.MM_LINEAR_LINEAR, Texture.FM_LINEAR, true); texture.setWrap(Texture.WM_WRAP_S_WRAP_T); texture.setScale(ROOM_TEXTURE_SCALE); textureState.setTexture(texture); floorBlock.setRenderState(textureState); } COM: <s> loads a texture of the floor </s>
funcom_train/3362530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (!(obj instanceof JMXServiceURL)) return false; JMXServiceURL u = (JMXServiceURL) obj; return (u.getProtocol().equalsIgnoreCase(getProtocol()) && u.getHost().equalsIgnoreCase(getHost()) && u.getPort() == getPort() && u.getURLPath().equals(getURLPath())); } COM: <s> p indicates whether some other object is equal to this one </s>
funcom_train/38415329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isURL() { return true; /* THIS CODE IS TOO RESTRICTIVE : String src = (String) fElement.getAttributes().getAttribute(HTML.Attribute.SRC); return src.toLowerCase().startsWith("file") || src.toLowerCase().startsWith("http"); */ } COM: <s> determines if path is in the form of a url </s>
funcom_train/44011370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetEmpCity() { System.out.println("setEmpCity"); String empCity = ""; EmployeeBO instance = new EmployeeBO(); instance.setEmpCity(empCity); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set emp city method of class edu </s>
funcom_train/47244529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBrowseDictionaryCommand() { if (browseDictionaryCommand == null) {//GEN-END:|44-getter|0|44-preInit // write pre-init user code here browseDictionaryCommand = new Command("Browse Dictionary File", Command.ITEM, 0);//GEN-LINE:|44-getter|1|44-postInit // write post-init user code here }//GEN-BEGIN:|44-getter|2| return browseDictionaryCommand; } COM: <s> returns an initiliazed instance of browse dictionary command component </s>
funcom_train/39059400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IAxisFormatter getAxisFormatter(IAxis axis) { if (axis.getType() == AxisType.X) { return _xAxisFormatter; } else if (axis.getType() == AxisType.Y) { return _yAxisFormatter; } throw new IllegalArgumentException( "An axis with AxisType " + axis.getType().toString() + "is not currently catered for." ); } // End of method. COM: <s> gets the iaxis formatter object corresponding to the iaxis object supplied </s>
funcom_train/9202591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUpperLimit(double upperLimit) { if (upperLimit < this.lowerLimit) throw new IllegalArgumentException("The upper limit cannot be less than the lower limit."); // only wake the bodies if the motor is enabled and the limit has changed if (this.limitEnabled && upperLimit != this.upperLimit) { // wake up the bodies this.body1.setAsleep(false); this.body2.setAsleep(false); } // set the new value this.upperLimit = upperLimit; } COM: <s> sets the upper rotational limit </s>
funcom_train/14027695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public byte getOpcode() { if ((_index < 0) || (_index >= _instructionList.size())) { throw new IndexOutOfBoundsException( "The program index (" + _index + ") is not within the instruction list (length=" + _instructionList.size() + ")"); } return _instructionList.get(_index).getOpcode(); } COM: <s> return the opcode at the program index </s>
funcom_train/28293204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRequiredForSatisfied() { if (_Debug) { System.out.println(" :: SeqActivity --> BEGIN - " + "getRequiredForSatisfied"); System.out.println(" :: SeqActivity --> END - " + "getRequiredForSatisfied"); } return mRequiredForSatisfied; } COM: <s> retrieves satisfied rollup rule consideration sequencing model element </s>
funcom_train/23854311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect(VCanvas canvas) { if (isConnected()) disconnect(); viewedCanvas = canvas; synchronizeLayers(); viewedCanvas.getCamera().addPropertyChangeListener(PCamera.PROPERTY_LAYERS, layerListener); viewedCanvas.addPropertyChangeListener(VCanvas.PROPERTY_INTERACTING, interactionListener); } COM: <s> connects a new canvas to this component </s>
funcom_train/32756864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void saveTo(DataAdaptor cavDataAdaptor) { XmlDataAdaptor topLevelAdaptor = (XmlDataAdaptor) cavDataAdaptor.createChild(generalData_SR); topLevelAdaptor.setValue("cavity", cavity); topLevelAdaptor.setValue("firstBPM", firstBPM); topLevelAdaptor.setValue("secondBPM", secondBPM); saveScanOnData(cavDataAdaptor); saveScanOffData(cavDataAdaptor); } COM: <s> save all the data intrinsic here to a data adaptor </s>
funcom_train/40735706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClientName(String newVal) { if ((newVal != null && clientName != null && (newVal.compareTo(clientName) == 0)) || (newVal == null && clientName == null && clientNameIsInitialized)) { return; } clientName = newVal; clientNameIsModified = true; clientNameIsInitialized = true; } COM: <s> setter method for client name </s>
funcom_train/25307206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFileReference(String reference, File file) { if (regexp != null) { if (reference.matches(regexp)) { if (super.add(reference)) { hash.put(reference, file); } } return; } if (super.add(reference)) { hash.put(reference, file); } } COM: <s> add a reference to file </s>
funcom_train/13246468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel getTitleLabel() { if (titleLabel == null) { titleLabel = new JLabel(RESOURCE_BUNDLE.getString(ConverterResource.LICENSE_TITLE), SwingConstants.CENTER); titleLabel.setFont(new Font("Arial", Font.BOLD, 22)); titleLabel.setLabelFor(getLicenseFrame()); } return titleLabel; } COM: <s> returns the title label for this license </s>
funcom_train/43570914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Socket createTunnelServerSocket(String targethost, Socket socket) throws IOException { // ZAP: added host name parameter SSLSocket s = (SSLSocket) getTunnelSSLSocketFactory(targethost).createSocket(socket, socket .getInetAddress().getHostAddress(), socket.getPort(), true); s.setUseClientMode(false); s.startHandshake(); return s; } COM: <s> create a sslsocket using an existing connected socket </s>
funcom_train/10659746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAuthenticationException04() { AuthenticationException tE = new AuthenticationException(null, null); assertNull("getMessage() must return null", tE.getMessage()); assertNull("getCause() must return null", tE.getCause()); } COM: <s> test for code authentication exception string detail throwable ex code constructor </s>
funcom_train/3762334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent event){ String comm = event.getActionCommand(); if ( comm.equals("new") ){ handleNew(m_tableToApply); } else if ( comm.equals("mod") ) { handleModify(m_tableToApply); } else if ( comm.equals("del") ) { handleDelete(m_tableToApply); } } COM: <s> handles the action events generated by the buttons which depend on </s>
funcom_train/5342316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean shouldInform(LocalClientInfo info) { long now = System.currentTimeMillis(); // If we aren't allowed to report a bug, exit. if( now < _nextAllowedTime ) return false; Long allowed = (Long)BUG_TIMES.get(info.getParsedBug()); return allowed == null || now >= allowed.longValue(); } COM: <s> determines if the bug has already been reported enough </s>
funcom_train/40867082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getBillMeLaterAccounts() { List billMeLaterAccounts = new ArrayList(); PaymentMethod paymentMethod; for(Iterator it = paymentMethods.iterator(); it.hasNext(); ) { paymentMethod = (PaymentMethod) it.next(); if(paymentMethod instanceof BillMeLaterAccount) { billMeLaterAccounts.add(paymentMethod); } } return Collections.unmodifiableList(billMeLaterAccounts); } COM: <s> returns the bill me later payment methods in this list </s>
funcom_train/12118775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoC68(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end this.cercaJMenuItem_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 c68 cerca jmenu item </s>
funcom_train/20943863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void moveCaretRight() { int len = buffer.length(); if (++insertionPoint > len) { insertionPoint = len; beep(); } context.dispatchInputMethodEvent( InputMethodEvent.CARET_POSITION_CHANGED, null, 0, TextHitInfo.leading(insertionPoint), null); } COM: <s> move the insertion point one position to the right in the composed text </s>
funcom_train/16893954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isCompatible(EObject target, PartnerLink partner) { if (partner.getMyRole() == null && partner.getPartnerRole() == null) return true; if (target instanceof Invoke && partner.getPartnerRole() != null) return true; if ((target instanceof Receive || target instanceof OnEvent || target instanceof OnMessage || target instanceof Reply) && partner.getMyRole() != null) return true; return false; } COM: <s> incompatible partners are the ones that do not have a role compatible </s>
funcom_train/12243394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu createHelpMenu() { //OPTIONS MENU JMenu menu = createMenu(langStrings.mi_options, langStrings.mim_options); //ABOUT BOX//////////////////////////////////////////// JMenuItem menuItem = createItem(langStrings.mi_about, langStrings.mim_about); menuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { a_about();} }); menu.add(menuItem); return menu; } COM: <s> this method creates the help menu of the menu bar </s>
funcom_train/44448671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SunAu open(String filename) { SunAu sn = null; try { sn = new SunAu(new DataInputStream(new FileInputStream(filename))); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (DataFormatException e) { e.printStackTrace(); } if (sigDisp != null) sigDisp.setFrame(sn.getByteArray(1)); return sn; } COM: <s> loads an audio file </s>
funcom_train/5527613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getTextArea() { if (!label.equals("") && labelLoc != null) { Dimension labelSize = getTextSize(); int descent = getGraphics().getFontMetrics().getDescent(); int ascent = getGraphics().getFontMetrics().getAscent(); return new Rectangle(labelLoc.x, labelLoc.y + descent, labelSize.width, ascent); } else { return new Rectangle(0, 0, 0, 0); } } COM: <s> return the area of text in the button </s>
funcom_train/17201258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void recordSample(int CMID) { // reserve the next available slot int idx = Synchronization.fetchAndAdd(this, AosEntrypoints.methodListenerNumSamplesField.getOffset(), 1); // make sure it is valid if (idx < sampleSize) { samples[idx] = CMID; } if (idx + 1 == sampleSize) { // The last sample. activateOrganizer(); } } COM: <s> this method records a sample containing the cmid compiled method id </s>
funcom_train/48962811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateSquares(){ float[] center = new float[2]; float rotation; String name; float n = maxSquares; for(int i = 0; i < n; i++){ center[0] = 0.5f * screenSizeX; center[1] = 0.5f * screenSizeY; rotation = (float) ((i/n) * Math.PI * 2f + 3*Math.PI/2); name = String.format("user%3d", i); // this.addSquare(new Square(this, center, radius, rotation, name)); } } COM: <s> generates a ring of squares </s>
funcom_train/6409772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasChild(Spatial spat) { if(children == null) { return false; } if (children.contains(spat)) return true; for (int i = 0, max = getQuantity(); i < max; i++) { Spatial child = children.get(i); if (child instanceof Node && ((Node) child).hasChild(spat)) return true; } return false; } COM: <s> determines if the provided spatial is contained in the children list of </s>
funcom_train/18808093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RegularTimePeriod next() { Second result = null; if (this.second != LAST_SECOND_IN_MINUTE) { result = new Second(this.second + 1, this.minute); } else { final Minute next = (Minute) this.minute.next(); if (next != null) { result = new Second(FIRST_SECOND_IN_MINUTE, next); } } return result; } COM: <s> returns the second following this one </s>
funcom_train/24152005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getLineHeight(int index) { int lastPos = sizes.getPosition(index) + textTopInset; int height = textFontHeight; try { Element map = text.getDocument().getDefaultRootElement(); int lastChar = map.getElement(index).getEndOffset() - 1; Rectangle r = text.modelToView(lastChar); height = (r.y - lastPos) + r.height; } catch (BadLocationException ex) { ex.printStackTrace(); } return height; } COM: <s> get the height of a line from the jtext component </s>
funcom_train/9237995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCallback(final String callbackName, final ICallbackInterface o) throws CallbackNotFoundException { if (o == null) { throw new NullPointerException("CallbackInterface is null"); } final CallbackObject cb = getCallbackType(callbackName); if (cb != null) { cb.add(o); } else { throw new CallbackNotFoundException("Callback '"+callbackName+"' could not be found."); } } COM: <s> add a callback </s>
funcom_train/40359994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDestinationExistsWithOverwrite() throws Exception { Document filter = createFilter(true, PROP1, CLEAN_STRING, EXTRA_STRING); Map<String, List<Value>> expectedProps = createProperties(); expectedProps.put(PROP1, expectedProps.get(PROP4)); checkDocument(filter, expectedProps); } COM: <s> test add to existing property with overwrite should replace the </s>
funcom_train/3081385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setRendered(ContainerInstance ci, StackedPaneEx stackedPane, Component child) { StackedPaneExRenderState renderState = (StackedPaneExRenderState) ci.getRenderState(stackedPane); if (renderState == null) { renderState = new StackedPaneExRenderState(); ci.setRenderState(stackedPane, renderState); } renderState.renderedChildren.add(child); } COM: <s> sets a flag in the code render state code to indicate that a </s>
funcom_train/36171407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void DrawInheritance(){ DrawInheritance t1 = new DrawInheritance(JP.getInheritance(), Classes, FontSize); JScrollPane JSP = new JScrollPane(t1); JSP.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); JSP.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); Right.addTab("Inheritance Diagram", JSP); Window.setRightComponent(Right); Window.setDividerLocation(200); } COM: <s> method used to draw the inheritance diagram </s>
funcom_train/9139532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean seek(final String docno) { //int readDocid = 0; long low = 0; long high = numberOfDocumentIndexEntries-1; long i=0; int compareResult = 0; final int DOCNOLENGTH = DOCNO_BYTE_LENGTH; while (high>=low) { i = (long)(high+low)/2; System.arraycopy(bytes, (int)i*shortEntryLength+4, buffer, 0, DOCNOLENGTH); compareResult = sComp.compare(docno, new String(buffer).trim()); if (compareResult == 0) break; if (compareResult < 1) high = i-1; else low = i+1; } if (compareResult == 0) return seek((int)i); else return false; } COM: <s> overrides the seek string s method of </s>
funcom_train/2362225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Document loadContextSendRequest() throws Exception { Map<String, String> params = new HashMap<String, String>(); params.put("GAME", game.getName()); params.put("RACE", game.getYourName()); params.put("PASSWORD", game.getPassword()); return doPost(new URL(url + "?get=context"), params); } COM: <s> create and send request for loading context from server </s>
funcom_train/3158510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addParameter(Parameter parameter) { if (parameter != null && !_parameters.contains(parameter)) { if (getParameterIndex(parameter.getName()) >= 0) { throw new IllegalArgumentException( ParamConstants.ERR_MSG_PARAM_IN_GROUP_1 + parameter.getName() + ParamConstants.ERR_MSG_PARAM_IN_GROUP_2); } _parameters.add(parameter); } } COM: <s> adds the given parameter to this group </s>
funcom_train/39124213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commitEventsAdd() { if (multiEvents == null ) return; // System.out.println("Committing " + multiEvents.size() + " events"); for(MultiEvent multiEvent : multiEvents) { long tick=multiEvent.getStartTick(); if (tick >= getStartTick() && tick < getEndTick()) multiEvent.commitAdd(); } } COM: <s> generate native midi event out of generic frinika multi events </s>
funcom_train/35715241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onFocusRangeChanged(RevisionRange previousRange, RevisionRange nextRange) { if (DEBUG) System.out.println("range: " + previousRange + " > " + nextRange); //$NON-NLS-1$ //$NON-NLS-2$ fFocusRange= nextRange; Revision revision= nextRange == null ? null : nextRange.getRevision(); updateFocusRevision(revision); } COM: <s> handles a changing focus range </s>
funcom_train/25009907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DungeonSegment getDungeonEntry() { DungeonSegment segment = new DungeonSegment(); segment.addSide(SidePosition.TOP, SideType.CORRIDOR); segment.addSide(SidePosition.RIGHT, SideType.WALL); segment.addSide(SidePosition.BOTTOM, SideType.WALL); segment.addSide(SidePosition.LEFT, SideType.WALL); // rotate it 0-3 times segment.rotate(0); //segment.rotate(Diceroller.rolldXPlusY(4, -1)); segment.setPosition(new SegmentPosition()); segment.setFeature(RoomFeature.ENTRY); return segment; } COM: <s> gets the entrance to the dungeon </s>
funcom_train/12849148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setSize(300,200); setLayout(new BorderLayout()); this.add(getChangesChartPanel(), BorderLayout.CENTER); this.scrollPane.setName(_("Changes chart")); this.scrollPane.setToolTipText(_("Changes chart")); } COM: <s> this method initializes this </s>
funcom_train/31296678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetArrayString() throws Throwable { XmlConfiguration xc = new XmlConfiguration(new URL( "file:testdata/config/xmlconfig.xml")); // String [] defaultArray = new Stroing [5] ; String[] array = xc.getArray("arrayKey"); assertNotNull("arrayKey present", array); assertEquals("array length", 3, array.length); for (int i = 0; i < array.length; i++) { assertEquals("elem" + (i + 1), array[i]); } } COM: <s> class to test for string get array string </s>
funcom_train/42897196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setQueueAttribute(String attribute, String value) throws SQSException { Map<String, String> params = new HashMap<String, String>(); params.put("Attribute.Name", attribute); params.put("Attribute.Value", value); HttpGet method = new HttpGet(); // SetQueueAttributesResponse response = makeRequestInt(method, "SetQueueAttributes", params, SetQueueAttributesResponse.class); } COM: <s> sets a queue attribute </s>
funcom_train/42851153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSeen(File mediaDirectory,File file) { Set<SeenEntry>entryList = entries.get(mediaDirectory); if (entryList!=null) { for (SeenEntry entry : entryList) { if (entry.getFileName().equals(file.getAbsolutePath())) { if (file.lastModified()==entry.getLastModified()) { return true; } } } } return false; } COM: <s> used to work out if a file has been seen already </s>
funcom_train/47603542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCancelCommand() { if (cancelCommand == null) {//GEN-END:|81-getter|0|81-preInit // write pre-init user code here cancelCommand = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|81-getter|1|81-postInit // write post-init user code here }//GEN-BEGIN:|81-getter|2| return cancelCommand; } COM: <s> returns an initiliazed instance of cancel command component </s>
funcom_train/44136586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyTxtMediaSet(OSMElement elt) { for(int i = 0;i < m_ClientList.size();i++) { OSMElementEventListener lster = (OSMElementEventListener)m_ClientList.get(i); lster.onTxtMediaSet(new OSMElementEvent(elt)); } } COM: <s> to notify the set of a text media </s>
funcom_train/32655909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rank getRank(byte opcode) { for(int i=0; i < ranks.length; i++) { byte[] opcodes = ranks[i].opcodes; for(int j=0; j < opcodes.length; j++) { if(opcodes[j] == opcode) { return ranks[i]; } } } return null; } COM: <s> finds the rank for a given opcode </s>
funcom_train/10616355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDefineClassStringbyteArrayintintCodeSource() { SecureClassLoader ldr = new SecureClassLoader(); Class klass = ldr.defineClass(null, klassData, 0, klassData.length, null); assertEquals(klass.getName(), klassName); } COM: <s> tests define class string byte int int code source </s>
funcom_train/29019139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char getEchoChar () { checkWidget (); char echo = (char) OS.SendMessage (handle, OS.EM_GETPASSWORDCHAR, 0, 0); if (echo != 0 && (echo = Display.mbcsToWcs (echo, getCodePage ())) == 0) echo = '*'; return echo; } COM: <s> returns the echo character </s>
funcom_train/12188646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCurrentEnvironmentInteraction() throws Exception { // create an environment interactions EnvironmentInteraction e1 = createInteraction(); trackersStack.push(e1); // ensure the items are popped of in the correct order assertEquals("interaction e1 should be current", e1, tracker.getCurrentEnvironmentInteraction()); } COM: <s> tests the get current environment interaction method </s>
funcom_train/4300027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRow(Object[] r) { Object[] row = new Object[r.length]; // System.arraycopy(r, 0, row, 0, r.length); for (int i = 0; i < r.length; i++) { row[i] = r[i]; if (row[i] == null) { // row[i] = "(null)"; } } rows.addElement(row); } COM: <s> append a tuple to the end of the table </s>
funcom_train/32228883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMemberToGroup(String userName, String gid) { SecMembersBO secMem = this.getMember(userName); SecGroupsBO secgrp = this.getGroup(gid); SecGroupMembersBO secGroupMemberBO = new SecGroupMembersBO(); if (secMem!=null) { secGroupMemberBO.setUsername(secMem); } if (secgrp!=null) { secGroupMemberBO.setGroup_id(secgrp); } this.save(secGroupMemberBO); } COM: <s> add member to group </s>
funcom_train/45692141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPatternNumberPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SongPattern_patternNumber_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SongPattern_patternNumber_feature", "_UI_SongPattern_type"), EsxPackage.Literals.SONG_PATTERN__PATTERN_NUMBER, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the pattern number feature </s>
funcom_train/17026493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IProject getFeaturedProject() throws SimalRepositoryException { IProject project; Set<IProject> allProjects = getAllProjects(); Random rand = new Random(); int size = allProjects.size(); if (size > 0) { int idx = rand.nextInt(size); project = (IProject) allProjects.toArray()[idx]; } else { project = null; } return project; } COM: <s> get a featured project </s>
funcom_train/21468927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDaylightAdjustment(Date date) { if (transitionPoints == null) { return 0; } long timeInHours = date.getTime() / 1000 / 3600; int index = 0; while (index < transitionPoints.length && timeInHours >= transitionPoints[index]) { ++index; } return (index == 0) ? 0 : adjustments[index - 1]; } COM: <s> return the daylight savings time adjustment in minutes for the given </s>
funcom_train/189734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateEntryForPage(DataPageMain dpMain, Entry entry) { if(dpMain._leaf != entry.isLeafEntry()) { throw new IllegalStateException( "Trying to update page with wrong entry type; pageLeaf " + dpMain._leaf + ", entryLeaf " + entry.isLeafEntry()); } } COM: <s> verifies that the given entry type node leaf is valid for the given </s>