__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/49427053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void intersect(Rect other) { x0 = Math.max(x0, other.x0); y0 = Math.max(y0, other.y0); x1 = Math.min(x1, other.x1); y1 = Math.min(y1, other.y1); if(x1 < x0 || y1 < y0) { x1 = x0; y1 = y0; } } COM: <s> computes the intersection of this rectangle with the other rectangle </s>
funcom_train/18072803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getEditGmapButton() { if (editGmapButton == null) { editGmapButton = new JButton(); editGmapButton.setText("Edit GMap"); editGmapButton .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setEditGMap(!editGmap); } }); } return editGmapButton; } COM: <s> this method initializes edit gmap button </s>
funcom_train/42225378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRange(StarNode toStar) { Vector3f thisLocation = this.getLocalTransform().getTranslation(); Vector3f thatLocation = toStar.getLocalTransform().getTranslation(); return (int) (FastMath.ceil(FastMath.sqrt(VecMathUtils.distanceSquared(thisLocation, thatLocation)) / (GameManager.PARSEC_SIZE * 10))); } COM: <s> calculate the range in parsecs of this star to the given star </s>
funcom_train/13993648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFind02() throws Exception { Map request = new HashMap(); List result = testObjectManager.find(request); assertEquals(2, result.size()); assertEquals(true, result.contains(testObjects[0])); assertEquals(true, result.contains(testObjects[1])); } COM: <s> tests that code test content manager code returns all objects as </s>
funcom_train/22113355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long getMinInterval(AppdefEntityID id, boolean allowStale) { Session session = this.getSession(); FlushMode oldFlushMode = session.getFlushMode(); try { if (allowStale) { session.setFlushMode(FlushMode.MANUAL); } return getMinInterval(id); } finally { session.setFlushMode(oldFlushMode); } } COM: <s> find the minimum collection interval for the given entity potentially </s>
funcom_train/26379176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setRain( String value ) { StringTokenizer tokenizer = new StringTokenizer( value, ","); this.rainSinceMidnight = new Integer( tokenizer.nextToken() ).intValue(); this.rainHour = new Integer( tokenizer.nextToken() ).intValue() ; this.rain24Hours = new Integer( tokenizer.nextToken() ).intValue(); // this.rainHour = rainHour / 100F; } COM: <s> set the rainfall values </s>
funcom_train/49461180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getLastInsertedDate(String tableName) throws Exception{ if (StringHelper.nullify(tableName) == null) throw new IllegalArgumentException("The table name cannot be null"); DbProbeStatus dps = lastIds.get(jdbcUrl+"#"+tableName); if(dps == null) return null; return DateHelper.toDateOrNull(dps.lastDate); } COM: <s> return the last inserted date from the given tablename for the probe </s>
funcom_train/10659814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateClient02() throws SaslException { try { Sasl.createSaslClient(null, null, null, null, null, null); fail("NullPointerException should be thrown when mechanisms is null"); } catch (NullPointerException e) { } assertNull("Not null result", Sasl.createSaslClient( new String[] { "NAME-999" }, null, null, null, null, null)); } COM: <s> test for code create sasl client string mechanisms </s>
funcom_train/40673975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetCedent(List<Item> cedents) { /* int len = cedents.size(); for (int i = 0; i < len; i++) { Item item = (Item) cedents.get(i); item.resetDisabled(); item.resetUsed(); }*/ for (Item item : cedents) { item.resetDisabled(); item.resetUsed(); } } COM: <s> set both used and disabled boolean arrays </s>
funcom_train/18229163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object nextElement() { try { return array[index].nextElement (); } catch (NoSuchElementException ex) { if (hasMoreElements ()) { // try once more return nextElement (); } throw ex; } catch (ArrayIndexOutOfBoundsException e) { throw new NoSuchElementException(); } } COM: <s> returns the next element of this enumeration </s>
funcom_train/11679162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OMElement fromScript(Object o) { try { OMElement omElement; if (o instanceof Node) { omElement = nodeToOMElement((Node)o); } else if (o instanceof Writable){ omElement = writableToOMElement((Writable)o); } else { throw new SynapseException("unknown type: " + o); } return omElement; } catch (Exception e) { throw new SynapseException(e); } } COM: <s> converts a groovy object into a omelement </s>
funcom_train/11648752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPermitted(PrincipalCollection principals, String permission) { assertRealmsConfigured(); for (Realm realm : getRealms()) { if (!(realm instanceof Authorizer)) continue; if (((Authorizer) realm).isPermitted(principals, permission)) { return true; } } return false; } COM: <s> returns code true code if any of the configured realms </s>
funcom_train/40347312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restoreCssAttrs(String... cssProps) { for (Element e : elements) { for (String a : cssProps) { styleImpl.setStyleProperty(e, a, (String) data(e, OLD_DATA_PREFIX + a, null)); } } } COM: <s> save a set of css properties of every matched element </s>
funcom_train/7732735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startApp() throws MIDletStateChangeException { if (isPaused) { isPaused = false; /* TODO why return? */ return; } /* init the GUI and show splash screen as the first thing */ gui = new Gui(); gui.setMidlet(this); gui.showSplash(); setPreferences(false); } COM: <s> main method i </s>
funcom_train/44155926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertAllBefore(String[] a, String[] b, String[] list) { assertNotNull(a); assertNotNull(b); for (int i = 0; i < a.length; i++) { for (int j = 0; j < b.length; j++) { assertBefore(a[i], b[j], list); } } } COM: <s> asserts that all objects in code a code are before any object form </s>
funcom_train/6202989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(K key, V value) { if (containsKey(key)) { Set<V> values = map.get(key); values.add(value); } else { Set<V> values = new HashSet<V>(); values.add(value); map.put(key, values); } } COM: <s> associates the specified value with the specified key in this multi map </s>
funcom_train/40695281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void detachHandlers() { detachMouseOverHandlers(); mapMenuController.getMapWidget().removeMapDragStartHandler( mapEventHandler); mapMenuController.getMapWidget().removeMapDragEndHandler( mapEventHandler); mapMenuController.getMapWidget().removeMapMouseOutHandler( mapEventHandler); mapMenuController.getMapWidget().removeMapClickHandler(mapEventHandler); mapMenuController.getMapWidget().removeMapZoomEndHandler( mapEventHandler); } COM: <s> detaches the observer from the map </s>
funcom_train/21436687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CoreModification getCoreModification(String name, int position) { ArrayList<CoreModification> modList = getCoreModificationsByPosition(position); for(int i = 0; i < modList.size(); i++) { if(modList.get(i).getName().equals(name)) { return(modList.get(i)); } } return(null); } COM: <s> get a core modification specified by name and position </s>
funcom_train/11667761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hash(char[] buffer, int offset, int length) { int code = 0; for (int i = 0; i < length; ++i) { code = code * 31 + buffer[offset + i]; } return code & 0x7FFFFFFF; } // hash(char[],int,int):int COM: <s> returns a hashcode value for the specified symbol information </s>
funcom_train/2725725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String openFile(File file) throws FileNotFoundException, IOException { StringBuffer buffer = new StringBuffer(); BufferedReader in = new BufferedReader( new FileReader(file.getCanonicalPath())); String line; while ((line = in.readLine()) != null) { buffer.append(line).append("\n"); } in.close(); return buffer.toString(); } COM: <s> opens a file and imports it </s>
funcom_train/4404807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Reducibility getReducibilityBenOr() { final long degree = this.degree().longValue(); for ( int i = 1; i <= (int) ( degree / 2 ); i++ ) { Polynomial b = reduceExponent( i ); Polynomial g = this.gcd( b ); if ( g.compareTo( Polynomial.ONE ) != 0 ) return Reducibility.REDUCIBLE; } return Reducibility.IRREDUCIBLE; } COM: <s> ben or reducibility test </s>
funcom_train/41344396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void matchClosedWay(RenderThemeCallback renderThemeCallback, List<Tag> tags, byte zoomLevel) { for (int i = 0, n = this.rulesList.size(); i < n; ++i) { this.rulesList.get(i).matchWay(renderThemeCallback, tags, zoomLevel, Closed.YES); } } COM: <s> matches a closed way with the given parameters against this render theme </s>
funcom_train/44707211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void submitted ( FormSectionEvent event ) throws FormProcessException { PageState state = event.getPageState(); if ( m_saveCancelSection.getCancelButton().isSelected(state) ) { throw new FormProcessException( (String) GlobalizationUtil.globalize("contenttypes.ui.mparticle.submission_cancelled").localize()); } } COM: <s> called on form submission </s>
funcom_train/25540003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void excludeCurrentSelection() { if (!selectedObs.isEmpty()) { // Create an undoable exclusion action. List<ValidObservation> undoObs = new ArrayList<ValidObservation>(); undoObs.addAll(selectedObs); ObservationExclusionAction action = new ObservationExclusionAction( undoObs, true); // Perform the exclusion action, then add its opposite to the undo // stack. action.execute(); addAction(action, UndoRedoType.UNDO); // Now that we have excluded the selected observations, // clear the collection. selectedObs.clear(); } } COM: <s> exclude the currently selected observation s </s>
funcom_train/33775252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String cleanXmlProlog(final String xml) { String cleanXml; int startXmlPos = xml.indexOf(XML_PROLOG_STARTS_WITH); if (startXmlPos > 0) { cleanXml = xml.substring(startXmlPos, xml.length()); } else { cleanXml = xml; } return cleanXml; } COM: <s> clean up any potential garbage characters before the start of the </s>
funcom_train/11415134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { if (shouldDestroyPort()) { if (factory != null && servantCount == 0) { factory.destroyForPort(port); } else { LOG.log(Level.WARNING, "FAILED_TO_SHUTDOWN_ENGINE_MSG", port); } } } COM: <s> this method will shut down the server engine and </s>
funcom_train/9500584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertRowAfter(final int selectedRow, CASTableCellValue newValue) { // TODO: remove System.out.println("insertRowAfter: " + selectedRow); if (newValue == null) newValue = new CASTableCellValue(view); tableModel.insertRow(selectedRow + 1, new Object[]{newValue}); // update height of new row startEditingRow(selectedRow + 1); } COM: <s> inserts a row after selected row and starts editing the new row </s>
funcom_train/32761279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PreparedStatement getAttachmentInsertStatement() { try { final String sql = "INSERT INTO logbook.attachment ( attachment_id, attachment_type_id, attachment_nm, attachment_data ) VALUES (?, ?, ?, ?)"; return _connection.prepareStatement( sql ); } catch( SQLException exception ) { exception.printStackTrace(); throw new RuntimeException( "Exception getting an insert statement for inserting an attachment record.", exception ); } } COM: <s> get the image attachment statement </s>
funcom_train/2389368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnTableReport() { if (btnTableReport == null) { btnTableReport = new JButton(); btnTableReport.setIcon(new ImageIcon(getClass().getResource("/images/icons/application_view_columns.png"))); btnTableReport.setToolTipText("tabellarischen Report anzeigen"); btnTableReport.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { showTableReport(); } }); } return btnTableReport; } COM: <s> this method initializes btn table report </s>
funcom_train/5373356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setImages (Image [] images) { checkWidget (); if (images == null) error (SWT.ERROR_INVALID_ARGUMENT); for (int i = 0; i < images.length; i++) { if (images [i] == null || images [i].isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); } this.images = images; //setImages (null, images); setImage(images[0]); } COM: <s> sets the receivers images to the argument which may </s>
funcom_train/2996089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isAvailableLookAndFeel(String laf) { if (debug) return true; try { Class lnfClass = Class.forName(laf); LookAndFeel newLAF = (LookAndFeel)(lnfClass.newInstance()); return newLAF.isSupportedLookAndFeel(); } catch(Exception e) { // If ANYTHING weird happens, return false return false; } } COM: <s> a utility function that layers on top of the look and feels </s>
funcom_train/48644797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getNextFreeRegister() { ArrayList<Integer> registers = this.freeRegisters.get(this.freeRegisters .size() - 1); if (registers.size() == 0) { throw new AssertionError("No more registers to allocate variables."); } return registers.remove(0); } COM: <s> returns the next free register of the current registers context </s>
funcom_train/1785759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OWLOntology buildOWLOntology() throws ComplexMappingException { //create the OWLOntologies out of the path OWLOntologyManager manager1 = OWLManager.createOWLOntologyManager(); try { return manager1.loadOntologyFromPhysicalURI(path); } catch(OWLOntologyCreationException e) { throw new ComplexMappingException(ExceptionType.CREATION_EXCEPTION, "Could not create an OWLOntology in Ontology.", e); } } COM: <s> build an owlontology out of a filepath with the help of </s>
funcom_train/48406994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBriefDescriptionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ContentDescription_briefDescription_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ContentDescription_briefDescription_feature", "_UI_ContentDescription_type"), SpemxtcompletePackage.eINSTANCE.getContentDescription_BriefDescription(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the brief description feature </s>
funcom_train/2288366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String buildMethodLookup(String methodName, int paramCount) { StringBuffer buf = new StringBuffer(32); buf.append(methodName.toLowerCase()); buf.append(" ["); buf.append(paramCount); buf.append("]"); return buf.toString(); } COM: <s> builds a method lookup string </s>
funcom_train/47105509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemWeapon06() { JMenuItem menuItem = new JMenuItem(); menuItem.setText(Weapon.W_06.getItemName()); menuItem.setEnabled(false); menuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setPlrReadiedWeapon(Weapon.W_06); } }); return menuItem; } COM: <s> creates the seventh choice for the weapon menu </s>
funcom_train/571555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void synchronizeTables( ) { for ( int i = 0; i < synchronizedTables.size( ); i++ ) { try { ( ( JTable_ ) synchronizedTables.elementAt( i ) ).refresh( ); } catch ( Throwable th ) { System.out.println( "Error in JTable_.synchronizeTables(): " + th + " - Table: " + synchronizedTables.elementAt( i ) ); } } } COM: <s> synchronize the tables added by an add synchronized table jtable </s>
funcom_train/36466032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void logCommand(Command cmd) { String n = cmd.getName(); if (n != "keyframe" && n != "unkeyframe" && n != "undo" && n != "redo" && n != "save" && n != "load" && n != "call") { currentFrame.getCommandStack().pushCommand(cmd); } } COM: <s> logs the command with the current frame if necessary </s>
funcom_train/5808889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasIfXTable() { // FIXME What should we do if the table had no error but was empty if (m_ifXTable == null) { log().debug("hasIfXTable: No interface extensions table present."); } return (m_ifXTable != null && !m_ifXTable.failed()); } COM: <s> returns true if the interface extensions table was collected </s>
funcom_train/41573245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Expr makeOutsidePrimary(boolean isStatic, Exprs args, Expr e) { if (e.getType() instanceof PrimitiveType) throw new RuntimeException(); if (isStatic) { return e; } else { args.add(0, e); return getAST().makeTypeExpr(e.getType()); } } COM: <s> make a primary expression that is usable in calling the access </s>
funcom_train/4916603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadParallelJobNode(JobNode parallelJobNode) { // Obtain the next parallel node JobNode nextNode = this.getParallelNode(); if (nextNode != null) { // Move next parallel node out parallelJobNode.setParallelNode(nextNode); nextNode.setParallelOwner(parallelJobNode); } // Set next parallel node this.setParallelNode(parallelJobNode); parallelJobNode.setParallelOwner(this); } COM: <s> loads a parallel </s>
funcom_train/3790229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNewFileString(String name, String find, String replace) { if (find.equals("")) return name; int index; int findLength = find.length(); while ((index = name.indexOf(find)) != -1) { // "%20" replaced by " " means me%20e has a length of 6 // name = name.substring(0, index) + replace + name.substring(index + findLength); } return name; } COM: <s> replace all occurences of </s>
funcom_train/38293076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnabledO2ACommunication(boolean enabled, int queueSize) { if(enabled) { if(o2aQueue == null) o2aQueue = new ArrayList(queueSize); // Ignore a negative value if(queueSize >= 0) o2aQueueSize = queueSize; } else { // Wake up all threads blocked in putO2AObject() calls Iterator it = o2aLocks.values().iterator(); while(it.hasNext()) { CondVar cv = (CondVar)it.next(); if (cv != null) cv.set(); } o2aQueue = null; } } COM: <s> this method declares this agent attitude towards object to agent </s>
funcom_train/50140839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanupTest(Connection connection) throws ConfigurationException, SQLException { if (cleanupOperations == null){ log.info("No cleanup operations defined"); } else{ Iterator iter = cleanupOperations.iterator(); while(iter.hasNext()) { IOperation op = (IOperation) iter.next(); op.run(connection); } } } COM: <s> method executed after the test for cleaning up the database e </s>
funcom_train/47358592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerFractions(Set<Fraction> fractions) { if(frozen) throw new IllegalStateException("Cannot modify frozen constraint set"); FractionVisitor<Boolean> v = new FractionVisitor<Boolean>() { @Override public Boolean named(NamedFraction fract) { constants.add(fract); return null; } @Override public Boolean one(OneFraction fract) { return null; } @Override public Boolean var(VariableFraction fract) { variables.add(fract); return null; } @Override public Boolean zero(ZeroFraction fract) { return null; } }; for(Fraction f : fractions) { f.dispatch(v); } } COM: <s> adds variables and constants in the given fraction set to the respective </s>
funcom_train/49469880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Technology getTechnology(Integer technology_id) throws Exception, RaciException { Db db = dbRO(); try { _logger.info("Asset : getTechnology "+technology_id); checkUserCanAccess(db); return DbTechnology.getTechnology(db, technology_id); } catch (Exception e) { store(e); throw e; } finally { db.safeClose(); } } COM: <s> get a technology from the database </s>
funcom_train/33600503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MUBet getLastBet(BetType betType) { MUBet lastBet = null; for (MUBet bet : muBets) { if (bet.getBetType() == betType) { if (lastBet == null) { lastBet = bet; } else if (bet.getPlacedDate().getTime() > lastBet.getPlacedDate().getTime()) { lastBet = bet; } } } return lastBet; } COM: <s> returns last bet based on a placed date </s>
funcom_train/854346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void hideSearchOptions(final boolean force) { if (force) { ((LinearLayout) findViewById(R.id.selectLanguagesLayout)) .setVisibility(View.GONE); return; } final EditText inputEditText = (EditText) findViewById(R.id.TranslationInput); if (inputEditText != null && !inputEditText.hasFocus()) { ((LinearLayout) findViewById(R.id.selectLanguagesLayout)) .setVisibility(View.GONE); } } COM: <s> hides the search options </s>
funcom_train/17493657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getEOX() throws IOException, BadSyntaxException { stok.nextToken(); if (stok.ttype == StreamTokenizer.TT_EOL || stok.ttype == '\r') { return true; } else if (stok.ttype == StreamTokenizer.TT_EOF) { stok.pushBack(); return true; } else throw (new BadSyntaxException( "Expected eol but found something different instead.")); } COM: <s> looks for an eol or an eof in the tokenizer </s>
funcom_train/31027985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText(EntityID entityID) { Cube42NullParameterException.checkNull(entityID, "entityID", "getText", this); ExpiringTextContainer tempContainer; synchronized(this.textHash) { tempContainer = (ExpiringTextContainer)this.textHash.get(entityID); if(tempContainer == null) return ""; return tempContainer.getText(); } } COM: <s> returns the text that is attached to the specified entity </s>
funcom_train/25936583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void consumeSpaces(BufferedInputStream bis) throws IOException { char c; while(true) { mark(bis); c = readChar(bis); if(c == ' ' || c == '\r' || c == '\f' || c == '\t') { mark(bis); } else { break; } } reset(bis); } COM: <s> consumes spaces until a non space char is detected </s>
funcom_train/10911040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void renderInlineSpace(Space space) { renderInlineAreaBackAndBorders(space); // an inline space moves the inline progression position // for the current block by the width or height of the space // it may also have styling (only on this object) that needs // handling currentIPPosition += space.getAllocIPD(); } COM: <s> render the given space </s>
funcom_train/44898147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init(String serviceName, Scope scope, String sessionKey) { this.type = new WSServerComponentType(serviceName, scope); setType(this.type); this.sessionKey = Scope.SESSION.equals(scope) ? sessionKey : ""; try { setEJBWSFlag(getService()); } catch (ComponentMonitorException cme) { // ignore -- keep default value for isEJB } } COM: <s> initialization for constructor or deserialization </s>
funcom_train/4751950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public C union(final C result, final Range<E, L, C> secondList) { if ((size() == 0) && (secondList.size() == 0)) { return result; } Set<E> set1 = Sets.newHashSet(this); Set<E> set2 = Sets.newHashSet(secondList); Set<E> set3 = Sets.union(set1, set2); for (E e : set3) { result.add(e); } return result; } COM: <s> create the unordered union set from both ranges </s>
funcom_train/1653342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCompactRepeated(){ StringBuilder strBuffer[] = new StringBuilder[6]; for (int i = 0; i < strBuffer.length; i++) strBuffer[i] = new StringBuilder(); for (int i=0;i<100;i++) { //adding different "whitespaces" strBuffer[0].append(WHITESPACE); strBuffer[1].append(TAB); strBuffer[2].append(UNIX_NEWLINE); strBuffer[3].append(MAC_NEWLINE); strBuffer[4].append(CONTROL); strBuffer[5].append(ZEROWIDTHSPACE); for (int j = 0; j < strBuffer.length; j++) assertEquals(" ", HTMLDecoder.compact(strBuffer[j].toString())); } } COM: <s> tests compact string method </s>
funcom_train/11735496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isExcluded(EventImpl event) { try { return excludePath != null && excludePath.isAncestorOf(event.getQPath()); } catch (MalformedPathException ex) { log.error("Error filtering events.", ex); return false; } catch (RepositoryException ex) { log.error("Error filtering events.", ex); return false; } } COM: <s> checks if the given event should be excluded based on the </s>
funcom_train/15616274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean redirectSetup(HttpServletRequest request) { if (!WikiUtil.isFirstUse()) { return false; } if (this.isIgnoreableFile(request)) { return false; } if (ServletUtil.isTopic(request, "Special:Setup")) { return false; } if (ServletUtil.isTopic(request, "jsp/setup.jsp")) { return false; } return true; } COM: <s> determine whether or not to redirect to the setup page </s>
funcom_train/13994194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyChangeSubscribers(ChangeEvent event, Set subscribers) { if (subscribers == null) { return; } for (Iterator i = subscribers.iterator(); i.hasNext();) { WeakReference subscriberReference = (WeakReference) i.next(); ChangeSubscriber subscriber = (ChangeSubscriber) subscriberReference .get(); if (subscriber != null) { subscriber.notifyChanged(event); } else { i.remove(); } } } COM: <s> notifies all code change subscriber code s from </s>
funcom_train/35304650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setItem(Object anObject) { String text; if ( anObject != null ) { text = anObject.toString(); oldValue = anObject; } else { text = ""; } // workaround for 4530952 if (! text.equals(editor.getText())) { editor.setText(text); } } COM: <s> sets the item that should be edited </s>
funcom_train/43512943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getArchivesByYear(String year) { ArrayList comments = null; ArrayList archives = null; try { archives = (ArrayList) smc.queryForList("getArchivesByYear", year); } catch (SQLException e) { System.err.println("bad query-- getArchivesByYear"); // TODO: get a 404 going here return null; } return archives; } COM: <s> returns an array list of links </s>
funcom_train/29828987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setExpendGroupsButton(boolean expanded) { Icon icon = new ImageIcon(ClassLoader.getSystemResource(expanded? "images/collapse2.gif" : "images/expand3.gif")); expandGroupsButton.setIcon(icon); expandGroupsButton.setSelected(!expanded); expandGroupsButton.setToolTipText(expanded? "Expand all groups" : "Collapse all groups"); } COM: <s> sets state of the button for expanding colapsing groups </s>
funcom_train/39468403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(final IOBase<T> module) { if (module instanceof Importer && !importers.contains(module)) { importers.add((Importer<T>) module); } if (module instanceof Exporter && !exporters.contains(module)) { exporters.add((Exporter<T>) module); } } COM: <s> register a module </s>
funcom_train/42535203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o){ if(!(o instanceof Trans))return false; if(o == this)return true; Trans oo = (Trans)o; return (((Object)l).equals(oo.l))&&(((Object)frm).equals(oo.frm))&&(((Object)to).equals(oo.to)); } COM: <s> is the given object equal to this trans </s>
funcom_train/26453903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNotes(String notes) { NOTES = notes; for (int i=0; i<observers.size(); i++) { SensorObserver observer = (SensorObserver)observers.get(i); if (observer != null) { observer.sensorUpdated(getHostName(), this); } else { observers.remove(i); } } } COM: <s> sets the notes associated with this sensor </s>
funcom_train/15820873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updatePageComplete() { this.setPageComplete(false); // the name of the project must be defined String modelName = theModelNameField.getText(); if ((modelName == null) || (modelName.length() == 0)) { this.setMessage("Enter a model name"); this.setPageComplete(false); return; } this.setMessage(null); this.setPageComplete(true); } COM: <s> asserts that all conditions for completing this wizard page are met </s>
funcom_train/12587702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEntry(String alias, String scheme) throws URISyntaxException { SchemaDeclarationType schemaDeclarationType = new SchemaDeclarationType(); schemaDeclarationType.setSchemeAlias(alias); schemaDeclarationType.setSchemeURI(new URI(scheme)); m_catalog.addSchemeDeclaration(schemaDeclarationType); if (m_context.isControledVocabularies()) m_context.getCatalogContext().registerSchemaDeclarationType(schemaDeclarationType); } COM: <s> build catalog with new entry </s>
funcom_train/6515154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object itemAt(int pos){ if ((pos<1) || (pos>fields.size())){ return _tbl.formatError("Invalid index: " + pos + ". The column index must be between 1 and " + fields.size()); } return fields.getEntry(pos-1); } COM: <s> allows access to columns within a row by position 1 based </s>
funcom_train/3863383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void GradeSupress(int pGrade) throws BladeOutOfRangeException{ if (pGrade<0 || pGrade>GProduct.getGradeCount()) { throw new BladeOutOfRangeException(this, "Blade:"+pGrade+" not contained in Monad"); } for (int l=this.GradeRange[pGrade][0]; l<this.GradeRange[pGrade][1]+1; l++) { this.Coeff[l]=0.0; } } COM: <s> this method suppresses the grade in the monad equal to the integer passed </s>
funcom_train/39184647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String labelString () { String labelstring = labels.toString(); labelstring = labelstring.replace(',', ' '); labelstring = labelstring.replace('[', ' '); labelstring = labelstring.replace(']', ' '); labelstring = labelstring.trim(); return labelstring; } COM: <s> returns a string of all data labels </s>
funcom_train/3400047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(char buf [], int off, int len) throws IOException { int val; if (closed) return -1; // throw new IOException ("closed"); val = in.read(buf, off, len); if (val == -1) close(); return val; } COM: <s> reads the number of characters read into the buffer or 1 on eof </s>
funcom_train/21897079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void renderAddChild(RenderContext rc, ServerComponentUpdate update, Node parentNode, Component child) { ComponentSynchronizePeer syncPeer = SynchronizePeerFactory.getPeerForComponent(child.getClass()); if (syncPeer instanceof DomUpdateSupport) { ((DomUpdateSupport) syncPeer).renderHtml(rc, update, parentNode, child); } else { syncPeer.renderAdd(rc, update, getContainerId(child), child); } } COM: <s> renders a child component </s>
funcom_train/1443281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(CoachVisualInfo info) { if (info != null) { // Remove the last element if the CoachVisualInfo history is full if (DAInamiteConstants.FB_HIST_SIZE_C <= this.visualHistory.size()) this.visualHistory.remove(this.visualHistory.lastElement()); // Backup old CoachVisualInfo this.visualHistory.add(0, this.currentCVinfo); // Update current CoachVisualInfo this.currentCVinfo = info; } // end if } COM: <s> code update code backups old coach visual info </s>
funcom_train/18807834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSeries(final TimePeriodValues series) { // check argument... if (series == null) { throw new IllegalArgumentException( "TimePeriodValuesCollection.addSeries(...): cannot add null series."); } // remove the series... this.data.remove(series); series.removeChangeListener(this); fireDatasetChanged(); } COM: <s> removes the specified series from the collection </s>
funcom_train/5436941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void inputChanged(Object input, Object oldInput) { preservingSelection(new Runnable() { public void run() { Control tree = getControl(); tree.setRedraw(false); removeAll(tree); tree.setData(getRoot()); createChildren(tree); Object input = getInput(); System.out.println("Received input of type: " + input.getClass().getName()); if(input != null && input instanceof ProtocolTree) { TreeParent root = ((ProtocolTree)input).getRoot(); expandNodes(root); } tree.setRedraw(true); } }); } COM: <s> tries to map the existing nodes in the tree </s>
funcom_train/36828887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double sQLGetAirportTax(String airportLoc) { double tax = 0; ArrayList<Airport> airportList = sQLGetAirports(); for (int i = 0; i < airportList.size(); i++) { Airport ap = (Airport) airportList.get(i); if (ap.getAirportLoc().equals(airportLoc)) { tax = ap.getAirportTax(); } } return tax; } COM: <s> returns the airport tax from the airport specified in the parameter airport loc </s>
funcom_train/44989442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updatePoll(net.sf.evalon.entity.Poll poll) { //PROTECTED REGION ID(net.sf.evalon.dao.PollDAO~updatePoll~poll~void) START session = HibernateHelper.currentSession(); Transaction tx = session.beginTransaction(); try { session.update(poll); tx.commit(); } catch (Exception e) { if (tx != null) { tx.rollback(); } e.printStackTrace(); } //PROTECTED REGION END } COM: <s> p updates the poll </s>
funcom_train/17426589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean fixUpAttachmentFilters() { assert Thread.holdsLock(this); final int expect = this.attachmentFormatters.length; final int current = this.attachmentFilters.length; if (current != expect) { this.attachmentFilters = (Filter[]) copyOf(attachmentFilters, expect); return current != 0; } return false; } COM: <s> expand or shrink the attachment filters </s>
funcom_train/32764860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare( final KeyedRecord record1, final KeyedRecord record2 ) { int comparison = 0; for ( int index = 0 ; index < _keys.length ; index++ ) { String key = _keys[index]; comparison = ((Comparable)record1.valueForKey( key )).compareTo( (Comparable)record2.valueForKey( key ) ); if ( comparison != 0 ) return comparison; } return comparison; } COM: <s> compare two records </s>
funcom_train/31911690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected XMLException createXMLException(String message) { String m; try { m = formatMessage(message, new Object[] { new Integer(reader.getLine()), new Integer(reader.getColumn()) }); } catch (MissingResourceException e) { m = message; } return new XMLException(m); } COM: <s> returns an xmlexception initialized with the given message key </s>
funcom_train/50297496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean nullsAreSortedAtStart() throws SQLException { // in Firebird 1.5.x NULLs are always sorted at the end // in Firebird 2.0.x NULLs are sorted low if (getDatabaseMajorVersion() == 1) { return false; } else if (getDatabaseMajorVersion() == 2) { return false; } else throw new FBDriverNotCapableException(); } COM: <s> are null values sorted at the start regardless of sort order </s>
funcom_train/3101067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CycConstant (String name, Guid guid, Integer id) { if ((name != null) && (name.startsWith("#$"))) this.name = name.substring(2); else this.name = name; this.guid = guid; setId(id); } COM: <s> constructs a new tt cyc constant tt object from name guid and id </s>
funcom_train/46791877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public CMap loadCMap(COSName name) { ClassLoader loader = NamedCMap.class.getClassLoader(); InputStream is = loader.getResourceAsStream("/cmaps/" + name.stringValue() + ".cmap"); if (is == null) { return null; } try { byte[] bytes = StreamTools.toByteArray(is); NamedCMap map = new NamedCMap(name); CSContent content = CSContent.createFromBytes(bytes); map.initializeFromContent(content); return map; } catch (IOException e) { return null; } } COM: <s> todo not set implemented </s>
funcom_train/20629057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() throws ApelonException { //do any initialization and call the initsocket of the parent class //initSocket(); try { token = ApelEncrypt.createToken( username, password ); } catch ( Exception ex ) { Categories.dataClient().error( "Unable to create secure socket with " + "username and password provided.", ex ); throw new ApelonException( ex.getMessage() ); } } COM: <s> initializes the server connection </s>
funcom_train/8492824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getResolution() { if (resolution == null) { resolution = new JComboBox(); resolution.addItem("320x240"); // 0 resolution.addItem("640x480"); // 1 resolution.addItem("800x600"); // 2 resolution.addItem("1024x768"); // 3 resolution.addItem("1280x1024");// 4 resolution.setBounds(new Rectangle(118, 64, 129, 21)); resolution.setSelectedIndex(2); } return resolution; } COM: <s> this method initializes resolution </s>
funcom_train/26344612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void compile(){ for (int i=0; i<nodes.length; i++) nodes[i].compile(this); for (int i=0; i<linedefs.length; i++) linedefs[i].compile(this); for (int i=0; i<sidedefs.length; i++) sidedefs[i].compile(this); for (int i=0; i<segs.length; i++) segs[i].compile(this); for (int i=0; i<ssectors.length; i++) ssectors[i].compile(this); for (int i=0; i<things.length; i++) things[i].compile(this); } COM: <s> create this level </s>
funcom_train/40433995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void chmodUnixFile(File file) { try { ProcessWatcher pw = new ProcessWatcher(new String[] { "chmod", "+x", file.getAbsolutePath() }); pw.startProcess(System.out, System.err); pw.waitFor(); } catch (Exception e) { throw new RuntimeException(e); } } COM: <s> util to chmod unix file </s>
funcom_train/21881003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void invalidateCtx(String key) { boolean seen = false; for (int i = 0; i < CTX_KEYS.length; i++) { if (!seen && CTX_KEYS[i].equals(key)) { seen = true; } if (seen) { clearCtx(CTX_KEYS[i]); } } } COM: <s> empty a context level and all lower levels </s>
funcom_train/51010321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteCounter() throws Exception { try { Connection con = connect(); try { PreparedStatement ps = con.prepareStatement( "delete from " + tableName + " where name=?"); try { ps.setString(1, name); ps.executeUpdate(); } finally { ps.close(); } } finally { con.close(); } } catch (Exception e) { Log.error(e); throw e; } } COM: <s> deletes the current counter </s>
funcom_train/6254931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkOpen() throws IOException { synchronized (stateLock) { if (aborted) { throw new IOException("request aborted"); } switch (inState) { case OPEN: return true; case EOF: return false; case CLOSED: throw new IOException("stream closed"); case INVALID: throw inException; } inState = OPEN; } try { if (startInput()) { return true; } else { endInput(); synchronized (stateLock) { inState = EOF; if (outState >= CLOSED) { done(outState == INVALID); } } return false; } } catch (Throwable th) { invalidate(th); throw new InternalError(); // unreached } } COM: <s> checks to make sure stream is open and start input has been called </s>
funcom_train/39186100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Calibration copy() { Calibration copy = new Calibration(); copy.pixelWidth = pixelWidth; copy.pixelHeight = pixelHeight; copy.pixelDepth = pixelDepth; copy.frameInterval = frameInterval; copy.xOrigin = xOrigin; copy.yOrigin = yOrigin; copy.invertY = invertY; copy.unit = unit; copy.units = units; copy.valueUnit = valueUnit; copy.function = function; copy.coefficients = coefficients; copy.cTable = cTable; copy.invertedLut = invertedLut; copy.bitDepth = bitDepth; return copy; } COM: <s> returns a clone of this object </s>
funcom_train/43320758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setServer(String server) { this.serverText.setText(server); /* * If server is not empty, open the server options */ if (!(server.length() == 0) && serverOptionsExpandableComposite != null && !serverOptionsExpandableComposite.isDisposed()) { serverOptionsExpandableComposite.setExpanded(true); } } COM: <s> sets the given server to the server field </s>
funcom_train/16388673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String list(){ String result=""; try{ // get changed requisition BasicHttpMethods basicHttpMethods= new BasicHttpMethods(); basicHttpMethods.setLog(log); result = basicHttpMethods.sendGetRequest(opennmsUrl+requisitionCmd,"", username, password); log.debug("Requisition after command is : " + result.replace("<", "\n<")); } catch (Exception e){ log.error("OpenNmsXmlClient add() command error: ",e); return "failed to get result; Error: "+e; } return result; } COM: <s> list list the available requisition foreign sources </s>
funcom_train/5551540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getNextReplay() throws IOException { String str = null; if (filePointer == null) { resetReplayFile(); } if ((str = filePointer.readLine()) == null) { closeReplayFile(); resetReplayFile(); str = filePointer.readLine(); } return new Double(str).doubleValue(); } COM: <s> gets next sequential value from the code values file url code </s>
funcom_train/50688722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputSource newEmbeddedSource(String file_or_resource) throws SAXException { File file = new File(file_or_resource); if (file.exists()) { return newSource(file); } else { return newSource(Styler.class.getResource("/" + file_or_resource)); } } COM: <s> return a sax input source representing either a file or a java resource </s>
funcom_train/37426609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsTask(Task task) { if (!tasks.containsKey(task.getID())) { for (Iterator taskIt = getTasks().iterator(); taskIt.hasNext();) { Task selTask = (Task) taskIt.next(); if (selTask instanceof TaskContainer) { if (((TaskContainer)selTask).containsTask(task)) { return true; } } } } else { return true; } return false; } COM: <s> checks whether a certain task object is contained within the gantt </s>
funcom_train/36231271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDimensions(int width, int height) { // --- Verification de la memoire disponible --- if (!directAccess) { super.setDimensions(width, height); int w = super.getWidth(); int h = super.getHeight(); if ( (w > 0) && (h > 0)) { this.width = w; this.height = h; scanSize = w; pixeloffset = 0; } } } COM: <s> the set dimensions method is part of the image consumer api which </s>
funcom_train/4357837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drainSocket () throws Exception { InputStream in = socket.getInputStream(); // loop while data available, channel is non-blocking byte[] buf = new byte[1024]; int length = in.read(buf); while ( length >= 0 ) { int count = reader.append(buf,0,length,true); if ( count > 0 ) execute(reader); length = in.read(buf); } } COM: <s> the actual code which drains the channel associated with </s>
funcom_train/12180785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addValidationListener(ValidationListener listener) { Collection validationManagers = getValidationManagers(); if (validationManagers.size() > 1) { throw new IllegalStateException( "Expected only 1 ValidationManager" + " but there were " + validationManagers.size()); } ((ValidationManager) validationManagers.iterator().next()). addValidationListener(listener); } COM: <s> add a validation listener to the first validation manager in the </s>
funcom_train/8080626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCover(Instance inst){ boolean isCover=false; if(!inst.isMissing(att)){ if(Utils.eq(value, 0)){ if(Utils.smOrEq(inst.value(att), splitPoint)) isCover=true; } else if(Utils.gr(inst.value(att), splitPoint)) isCover=true; } return isCover; } COM: <s> whether the instance is covered by this antecedent </s>
funcom_train/3500166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { MatchConditions mc = new MatchConditions(this.returnField); for (int i=0;i<mcs.size();i++) { mc.mcs.addElement( ((MatchCondition)this.mcs.elementAt(i)).clone() ); } return mc; } COM: <s> create a deep copy of this object </s>