__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/38540405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(int index, float element) { if (index >= size) { set(index, element); } else { incrModCount(); ensureCapacity(size+1); int numtomove = size-index; System.arraycopy(data,index,data,index+1,numtomove); data[index] = element; size++; } } COM: <s> inserts the specified element at the specified position </s>
funcom_train/1492507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPointsTotalsToRequest(HttpServletRequest request, EntityType entityType, String entityKey, BoundingBoxDTO boundingBoxDTO) throws ServiceException{ addWmsFilterToRequest(request, entityType, entityKey); List<String> entityIds = new ArrayList<String>(); entityIds.add(entityKey); addPointsTotalsToRequest(request, entityType, entityIds, boundingBoxDTO); } COM: <s> add points totals to the request </s>
funcom_train/9680146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getClocForMethod(String name) { final BinCIType type = getType("Test"); if (type == null) { throw new IllegalArgumentException("Type Test not found"); } final BinMethod method = type.getDeclaredMethod(name, BinTypeRef.NO_TYPEREFS); return ClocMetric.calculate(method); } COM: <s> gets cloc metric for method from test class of test project </s>
funcom_train/50863151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getSimulationTimeRatio() { Element root = simulationDoc.getRootElement(); Element timeConfig = root.getChild(TIME_CONFIGURATION); Element timeRatio = timeConfig.getChild(TIME_RATIO); double ratio = Double.parseDouble(timeRatio.getAttributeValue(VALUE)); if (ratio < 0D) throw new IllegalStateException("Simulation time ratio must be positive number."); else if (ratio == 0D) throw new IllegalStateException("Simulation time ratio cannot be zero."); return ratio; } COM: <s> gets the simulation time to real time ratio </s>
funcom_train/8687596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deploy() { Java java = new Java(getTask()); java.setFork(true); java.setFailonerror(true); java.setClasspath(getClasspath()); java.setClassname(WEBLOGIC_DEPLOY_CLASS_NAME); java.createArg().setLine(getArguments()); java.execute(); } COM: <s> perform the actual deployment </s>
funcom_train/1728428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logAndExecuteTransactions() { MockTransaction t = new MockTransaction(); managedObject = tLog.start(null, managedObject); int startLogVersion = tLog.getVersion().intValue(); int startManagedObjectVersion = managedObject.version; logAndExecuteTransaction(t); logAndExecuteTransaction(t); logAndExecuteTransaction(t); assertEquals(tLog.getVersion().intValue(), 3 + startLogVersion); assertEquals(managedObject.version, 3 + startManagedObjectVersion); } COM: <s> changes are logged and then applied to the manage object </s>
funcom_train/46122920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setZoom(double z) { zoom = z; this.setPreferredSize(new Dimension( (int) (zoom * image.getWidth()), (int) (zoom * image.getHeight()) )); if (this.getParent() != null) { JViewport viewport = (JViewport) this.getParent(); viewport.setViewSize(new Dimension((int) (zoom * image.getWidth()), (int) (zoom * image.getHeight()))); } } COM: <s> sets the zoom rate </s>
funcom_train/25541358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void apply(List<ValidObservation> obs) { filteredObs = new LinkedHashSet<ValidObservation>(); filter(obs); if (filteredObs.size() != 0) { FilteredObservationMessage msg = new FilteredObservationMessage( this, filteredObs); Mediator.getInstance().getFilteredObservationNotifier() .notifyListeners(msg); } else { String errMsg = "No observations matched."; MessageBox.showWarningDialog(MainFrame.getInstance(), "Observation Filter", errMsg); } } COM: <s> applies the filter to the list of observations and sends a filtered </s>
funcom_train/11707620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void _testProcess(AnalysisEngineDescription aed, String language) throws UIMAException { // create and initialize AnalysisEngine AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(aed); cas = ae.newCAS(); ResultSpecification resultSpec = createResultSpec(language); cas.setDocumentText("new test"); ae.process(cas, resultSpec); cas.reset(); ae.destroy(); } COM: <s> auxiliary method used by test process </s>
funcom_train/24029171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { if (server != null && !server.isRunning()) { log.info("INIT"); server.setPort(Integer.parseInt(properties .getValue(PostfixConnector.SMTP_PORT))); server.getConfig().setHostName( properties.getValue(PostfixConnector.SMTP_HOST)); server.getConfig().setReceiveBufferSize(Integer.parseInt(properties .getValue(PostfixConnector.RECEIVE_BUFFER_SIZE))); server.getConfig().setDataDeferredSize(Integer.parseInt(properties .getValue(PostfixConnector.DEFERRED_SIZE))); server.start(); } } COM: <s> starts the smpt server </s>
funcom_train/1242451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createRestoreButton(Composite dialogContentContainer,final BugTreeViewer bugTreeViewer) { Button defaults = new Button(dialogContentContainer, SWT.PUSH); defaults.setText("Restore Defaults"); defaults.addListener(SWT.Selection, new Listener() { public void handleEvent(Event event) { filterOptions.loadDefault(); filter.loadDefault(); bugTreeViewer.removeBugTreeFilter(); } }); gridData = new GridData(); gridData.horizontalAlignment = GridData.END; gridData.verticalAlignment = GridData.END; defaults.setLayoutData(gridData); } COM: <s> creates a restore button to reset the checkboxgroup and the </s>
funcom_train/5662397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { // run forever while(true) { // lock the mutex so we have exclusive access to the update log.finest("MUTEX REQ UI.run"); synchronized(mutex) { log.finest("MUTEX ACQ UI.run"); try { // wait until an update is received log.info("Waiting for updates."); while(!updated) mutex.wait(); } catch(InterruptedException ex) { break; } paint(); updated = false; } log.finest("MUTEX REL UI.run"); } } COM: <s> thread entry method </s>
funcom_train/4449688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLogoutURL(boolean absolute) { StringBuffer url = new StringBuffer(); if(absolute) { url.append(WebloggerRuntimeConfig.getAbsoluteContextURL()); } else { url.append(WebloggerRuntimeConfig.getRelativeContextURL()); } url.append("/roller-ui/logout.rol"); return url.toString(); } COM: <s> url to logout page </s>
funcom_train/49102418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveWindowToFile() { String log = "Interpss_log"; NamedOutputStream out = Utilities.provideOutput(".log", "Interpss Log(*.log)", log, false); if (out == null) return; PrintStream os = new PrintStream(out.getOutputStream()); os.println(currentWindow.getText()); os.close(); clearWindow(); } COM: <s> shows a file chooser and saves the file to the selected name </s>
funcom_train/51501312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createTModelComposite() { GridData gridData1 = new GridData(); gridData1.horizontalSpan = 2; gridData1.horizontalAlignment = GridData.FILL; gridData1.verticalAlignment = GridData.CENTER; gridData1.grabExcessHorizontalSpace = true; tModelComposite = new TModelComposite(this, SWT.NONE); tModelComposite.setLayout(new GridLayout()); tModelComposite.setLayoutData(gridData1); } COM: <s> this method initializes t model composite </s>
funcom_train/49044842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDefaultGoalPropertiesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_JasimModel_defaultGoalProperties_feature"), getString("_UI_PropertyDescriptor_description", "_UI_JasimModel_defaultGoalProperties_feature", "_UI_JasimModel_type"), ModelPackage.Literals.JASIM_MODEL__DEFAULT_GOAL_PROPERTIES, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the default goal properties feature </s>
funcom_train/28405212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireTkSuspendEvent(TkSuspendEvent suspendEvent) { EventListener[] listeners = list.getListeners(CommandTaskLI.class); // Process the listeners last to first, notifying if (listeners != null) { for (int i = listeners.length - 1; i >= 0; i--) { ((CommandTaskLI) listeners[i]).taskSuspended(suspendEvent); } } } COM: <s> fire a task suspension event </s>
funcom_train/21437917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireActionEvent() { for (ActionListener al : this.getActionListeners()) { if (al != this) { if (getActionCommand() != null) al.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, getActionCommand())); else al.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, getText())); } } is_changed = false; } COM: <s> send an action event to all the listeners </s>
funcom_train/34343866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean askUserToConfigureUserDictionary(final Shell shell) { MessageDialogWithToggle toggleDialog = MessageDialogWithToggle.openYesNoQuestion(shell, Messages.AddWordProposal_dlgTitle, Messages.AddWordProposal_dlgMessage, Messages.AddWordProposal_dlgToggle, false, null, null); PreferenceConstants.getPreferenceStore().setValue(PREF_KEY_DO_NOT_ASK, toggleDialog.getToggleState()); return toggleDialog.getReturnCode() == IDialogConstants.YES_ID; } COM: <s> asks the user whether he wants to configure a user dictionary </s>
funcom_train/1104822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMinDegerPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_WindowAlan_minDeger_feature"), getString("_UI_PropertyDescriptor_description", "_UI_WindowAlan_minDeger_feature", "_UI_WindowAlan_type"), HarzemliUIPackage.Literals.WINDOW_ALAN__MIN_DEGER, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_anaPropertyCategory"), null)); } COM: <s> this adds a property descriptor for the min deger feature </s>
funcom_train/17907888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllElements() { if (objects == null) { return; } if (objects.size() > 0) { int firstIndex = 0; int lastIndex = objects.size() - 1; objects.removeAllElements(); selectedObject = null; fireIntervalRemoved(this, firstIndex, lastIndex); } else { selectedObject = null; } } COM: <s> empties the list </s>
funcom_train/9727264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextureMake checkTextureMakes(String name) { name = Util.stripExtension(name).toLowerCase(); TextureMake tm; for (int i = 0; i < textureMakes.size(); i++) { tm = (TextureMake) textureMakes.get(i); if (tm.names.match(name)) return tm; } return null; } COM: <s> check the list of texturemake items for a particular name </s>
funcom_train/28278136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SearchHitCollector getDuplicateSearchCollector(String name) { String duplicateDetectorName = name.equals("default") ? "Stack Trace" : name; Set<AbstractDuplicateDetector> allDetectors = getDuplicateSearchCollectorsList(); for (AbstractDuplicateDetector detector : allDetectors) { if (detector.getName().equals(duplicateDetectorName)) { return detector.getSearchHitCollector(repository, taskData); } } // didn't find it return null; } COM: <s> this method is duplicated in bugzilla task editor for now </s>
funcom_train/41178911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Batch findBatch(int batchNum) { for (int i = 0; i <= ListBatch.size(); i++) { if (((ListBatch.get(i)).getBatchNumber()) == batchNum) { return ListBatch.get(i); } else { return null; } } return null; } COM: <s> method which permits to find a batch with his number identifier </s>
funcom_train/11344279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onDependencyReconfiguration(ServiceReference[] departs, ServiceReference[] arrivals) { for (int i = 0; departs != null && i < departs.length; i++) { onServiceDeparture(departs[i]); } for (int i = 0; arrivals != null && i < arrivals.length; i++) { onServiceArrival(arrivals[i]); } } COM: <s> on dependency reconfiguration notification method </s>
funcom_train/40940966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processWinner(AbstractPlayer winner, AbstractPlayer loser) { gameState.addPlayerActivityRecord(new PlayerActivityRecord(winner, numRuns, BettingRound.SHOWDOWN, ResultState.WIN)); gameState.addPlayerActivityRecord(new PlayerActivityRecord(loser, numRuns, BettingRound.SHOWDOWN, ResultState.LOSE)); winner.adjustBankroll(loser.getPot()); loser.adjustBankroll(-1 * loser.getPot()); winner.processEndOfRound(ResultState.WIN); loser.processEndOfRound(ResultState.LOSE); } COM: <s> process the winner </s>
funcom_train/28156760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitJmlName(JmlName self) { if (self.isIdent()) print(self.ident()); else if (self.isThis()) print("this"); else if (self.isSuper()) print("super"); else if (self.isAll()) print("[*]"); else if (self.isPos()) { print("["); self.start().accept(this); print("]"); } else if (self.getName().equals("*")) { print("*"); } else { // self.isRange() print("["); self.start().accept(this); print(" .. "); self.end().accept(this); print("]"); } } COM: <s> prints a jml name </s>
funcom_train/34528637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadDataSources() throws InitializationException, ProjectException { // populate the data source list DefaultComboBoxModel model = (DefaultComboBoxModel) datasourceList.getModel(); model.removeAllElements(); ProjectContext projectContext = getDefaultProjectContext(); String[] dataSourceNames = projectContext.getDataSourceRepository().getDataSourceNames(); for ( String name : dataSourceNames ) { model.addElement(name); } } COM: <s> retrieve all of the datasources and load them into the datasources dropdown list </s>
funcom_train/18875554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPressed() { setPresentsDefaultValue(false); String input = getNewInputObject(Messages.ProjectionFieldEditor_addParameter, ""); //$NON-NLS-2$ if (input != null) { int index = list.getSelectionIndex(); if (index >= 0) { list.add(input, index + 1); } else { list.add(input, 0); } selectionChanged(); } } COM: <s> notifies that the add button has been pressed </s>
funcom_train/35298764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processImageComplete() { if (progressListeners == null) { return; } int numListeners = progressListeners.size(); for (int i = 0; i < numListeners; i++) { IIOWriteProgressListener listener = (IIOWriteProgressListener)progressListeners.get(i); listener.imageComplete(this); } } COM: <s> broadcasts the completion of an image write to all registered </s>
funcom_train/4040994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deregister(IWorkbenchWindow window) { window.getPartService().removePartListener(partListener); for (IWorkbenchPage page : window.getPages()) { for (IEditorReference ref : page.getEditorReferences()) { IEditorPart editor = ref.getEditor(false); if (editor instanceof JavaEditor) { deregister((JavaEditor) editor); } } } } COM: <s> removes the workbench window so that its no longer being tracked </s>
funcom_train/41720750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { if (!(object instanceof Tile)) return super.equals(object); Tile other = (Tile) object; if (this.x != other.x) { return false; } else if (this.y != other.y) { return false; } else if (!this.color.equals(other.color)) { return false; } else if (this.sign != other.sign) { return false; } else { return true; } } COM: <s> returns true if the other object is a tile and their </s>
funcom_train/18049507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void pasteAction() { try { controller.putSecretsFromClipboard(getSelectedCategory()); performSave(); showSelectedCategorySecrets(); } catch (NullPointerException e) { e.printStackTrace(); ErrorDialogs.errorUnknownError(); } catch (InvalidArgumentException e) { e.printStackTrace(); ErrorDialogs.errorPastingSecrets(); } catch (NoSuchItemException e) { e.printStackTrace(); ErrorDialogs.errorUnknownError(); } } COM: <s> the action to perform when the user clicks to paste secrets </s>
funcom_train/49455301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileInformation getSingleFileInformation() { Iterator<FileInformation> i = this.files.values().iterator(); if (i.hasNext()) { FileInformation fi = i.next(); if (i.hasNext()) // again... throw new IllegalStateException("This configuration bundle represents many XML files, cannot resolve to a single filename."); return fi; // only if unique. } else throw new IllegalStateException("No file information present"); } COM: <s> get a unique fileinformation use only when this is expected </s>
funcom_train/12625598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCarrier() throws ATCommandFailedException{ String tmp = atCmd.send("AT+COPS?\r"); int i = tmp.indexOf("\""); int j = tmp.indexOf("\"" , i+1); return (tmp.substring(i+1 , j)); } COM: <s> gets the carrier name </s>
funcom_train/22470610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(IRequestCycle cycle) { getMcService().setPlaylistProperties(getPlaylist(), getPlaylistName(), getPlaylistReleasedate()); getMcService().mergePlaylist(getPlaylist(), getUser(), getMergePlaylistBeanList()); } COM: <s> save the changed playlist properties release date playlist name </s>
funcom_train/22023597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStats() { String out = frames+" frames\n"; long old, next; old = startTime; for(int i = 1;i <= frames>>div; i++) { next = log[(map[i]+logoffset)%log.length]; out=out+1000000000f*(1<<div)/(next-old)+" "; old = next; } out = out+"\nAverage: "+mean/frames+" : "+1000000000f*frames/(oldTime-startTime); return(out); } COM: <s> returns a string with the statistics </s>
funcom_train/3276092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Role readRole(int role) throws DataAccessException { Role r = null; Log.write("Enter", Log.INFO, "readRole", KasaiFacade.class); r = RoleHandler.getInstance().read(role); Log.write("Exit", Log.INFO, "readRole", KasaiFacade.class); return r; } COM: <s> reads a role without checking permission </s>
funcom_train/13491534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadProperties(Element e,ClauseSet cs) { Element eProperties = e.getChild(GenericDriver.PROPERTIES); if (eProperties!=null) { List children = eProperties.getChildren(GenericDriver.PROPERTY); for (Iterator iter = children.iterator();iter.hasNext();) { Element eProperty = (Element)iter.next(); cs.setProperty(eProperty.getAttributeValue(GenericDriver.PROPERTY_NAME),eProperty.getAttributeValue(GenericDriver.PROPERTY_VALUE)); } } } COM: <s> load the properties into the clause set </s>
funcom_train/37082604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSubject(String feat_id, String subject_id, String subject_range) { SeqFeature feature = (SeqFeature)id2sym.get(feat_id); feature.addProperty("subject_id", subject_id); feature.addProperty("subject_range", subject_range); } COM: <s> add the subject id and range to the feature as properties </s>
funcom_train/46727768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void autoExport() throws Exception { setDefaultBaseModel(getModelList()); for (IBaseModel m : getDefaultBaseModel().getSearchResults()) { RefModel ref = (RefModel) m; Log.debug("exported " + exportObjects(ref.getDisplay()) + " " + ref.getDisplay() + " rows"); } } COM: <s> automatically export all models </s>
funcom_train/39173488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setConnectionSafely(final Connection connection) { // Called by lookupThread, but can be safely called by any thread. Runnable r = new Runnable() { public void run() { try { AnnotationDiffGUI.setConnection(connection); // MainFrame.getInstance().setStatus(AnnotationDiffGUI.getConnectionStatus()); MainFrame.getInstance().updateAllStatuses(); } catch (Exception x) { x.printStackTrace(); } } }; SwingUtilities.invokeLater(r); } COM: <s> safetly sets given connection for application </s>
funcom_train/5768796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { int x; String outputString = ""; if( myCollection.length > 0 ) for(x = 0;x < myCollection.length; x++) { if(x < (myCollection.length - 1)) outputString += myCollection[x].toString() + ", "; else outputString += myCollection[x].toString() + ". "; } return outputString; } COM: <s> to string translates the collection of card objects into a human readable string </s>
funcom_train/28982839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startGEAR(){ this.layer3 = NetworkLayer.getInstance(); this.layer3.initialize(bsAddress, lowPan, coordinateBS, bsRegion, creatingRegionProcess.getregions()); this.layer4 = TransportLayer.getInstance(); this.layer4.initialize(bsAddress, bsRegion); Utils.sleep(5000); System.out.println("End of initialisation !!!!! "); } COM: <s> starts gear protocol </s>
funcom_train/40764953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteEntries(List<Map<String, Object>> entries) throws FeedServerClientException { for (Map<String, Object> entry : entries) { URL entryUrl; try { entryUrl = new URL(getEntryId(entry)); } catch (MalformedURLException e) { throw new FeedServerClientException(e); } deleteEntry(entryUrl); } } COM: <s> deletes each entry in the supplied list of entries </s>
funcom_train/8094369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFreshCardinalityOfParents(Instances _Instances) { m_nCardinalityOfParents = 1; for (int iParent = 0; iParent < m_nNrOfParents; iParent++) { m_nCardinalityOfParents *= _Instances.attribute(m_nParents[iParent]).numValues(); } return m_nCardinalityOfParents; } COM: <s> returns cardinality of parents after recalculation </s>
funcom_train/18964214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: //public void report(PrintWriter out) { // AlignmentUtils.report(this, out); // out.println(); // aAlign.report(out); // out.println(); // cAlign.report(out); // out.println(); //} COM: <s> sort the sites by chromosome then by chromosomal location and final locus position </s>
funcom_train/22778986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToolBar getToolBar() { if (toolBar == null) { toolBar = new JToolBar(); toolBar.setLayout(new BoxLayout(getToolBar(), BoxLayout.X_AXIS)); toolbarButtons = new ArrayList<JButton>(); for (String[] definition: buttonDefinitions) { ImageIcon icon = createImageIcon(definition[1]); JButton tmp = new JButton("", icon); tmp.setToolTipText(definition[2]); tmp.setActionCommand(definition[0]); tmp.addActionListener(this); toolbarButtons.add(tmp); toolBar.add(tmp); } } return toolBar; } COM: <s> initializes the tool bar and adds buttons to it </s>
funcom_train/113545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void viewAccepted(View new_view) { super.viewAccepted(new_view); if (grpCoordinatorListener != null) { // re-entry is not a concern here if (channel.getLocalAddress().equals(new_view.getMembers().get(0))) { grpCoordinatorListener.becomeGroupCoordinator(); } } } COM: <s> override to invoke the call back </s>
funcom_train/34994852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLngamma() { System.out.println("lngamma"); double xx = 0.5; double expResult = Math.log(Math.PI)/2.0; double result = MathFunctions.lngamma(xx); assertTrue(String.format("Expected %.16f, Result=%.16f",expResult,result), MathFunctions.DoubleEqual(expResult, result)); } COM: <s> test of lngamma method of class edu </s>
funcom_train/32870530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean doIsSpecialRequest(JoinPointRequest r1) { // we get here IF AND ONLY IF (spec1.mayFilter | spec2.mayFilter) is fits the r1.mask // in case it 0, then the abstract crosscut specializer has already // said 'yes'. // the following conditions reads as follows: // (if spec1 may filter r1 AND it actually filters it) OR (spec3 may filter ..) return (spec1.isSpecialRequest(r1)) || (spec2.isSpecialRequest(r1)); } COM: <s> return true if either of the specializers passed in the crosscut </s>
funcom_train/44841988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int uploadData(String data, String baseURL) { Object o = invoke(uploadData_0, new String[]{"data","baseURL"}, new Object[]{data, baseURL}); return ((Integer)o).intValue(); } COM: <s> upload rdf s data to current repository </s>
funcom_train/11663695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Value createValue(InlineMetaMap map, byte[] data, int offset, int length) throws InlineMetaException { byte[] metadata = currentWriter.getMetadata(map); return InlineHeaderBuilder.createValue(currentWriter.getVersion(), metadata, data, offset, length); } COM: <s> create a value object containing the appropriate header and </s>
funcom_train/31527397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processBlock(SymTabAST tree, boolean makeAnonymousScopes) { BlockDef block = makeBlock((SymTabAST)tree); symbolTable.pushScope(block); walkSiblings((SymTabAST)tree.getFirstChild(), makeAnonymousScopes); symbolTable.popScope(); } COM: <s> processes the current tree node as block def </s>
funcom_train/39534130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPoints(Point2D point1, Point2D point2) { this.point1=point1; this.point2=point2; clips.clear(); if(point1!=null && point2!=null) { clips.add(new Rectangle2D.Double(point1.getX(), point1.getY(), point2.getX()-point1.getX()+1, point2.getY()-point1.getY()+1)); } } COM: <s> sets the points for the line </s>
funcom_train/29916275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getUnblockCardButton() { if (unblockCardButton == null) { unblockCardButton = new JButton(); unblockCardButton.setText(UIHelper.getText("withoutcard.unblockcard")); unblockCardButton.setBounds(new Rectangle(260, 440, 300, 60)); unblockCardButton.setIcon(UIHelper.getImage("locked_card.gif")); unblockCardButton.setHorizontalAlignment(SwingConstants.LEFT); } return unblockCardButton; } COM: <s> this method initializes remove unblock card button </s>
funcom_train/26140893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AnnotareValidator (String inIDFFileName, int verbosity) { this(); this.idfFile = new File(inIDFFileName); setVerbosity(verbosity); validateAll(inIDFFileName); /* ArrayList<ErrorItem> elist; sdrfFile = findSDRF(inIDFFileName); if(sdrfFile == null) { parseIDF (this.idfFile); } else { validateAll(inIDFFileName); } */ } COM: <s> additonal constructor to accept verosity level in log output </s>
funcom_train/50982718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object createTracingProxy( final Class clazz, final List list ) { final InvocationHandler handler = new InvocationHandler() { public Object invoke( Object proxy, Method method, Object[] methodArgs ) { list.add( method ); return null; } }; return Proxy.newProxyInstance( clazz.getClassLoader(), new Class[]{clazz}, handler ); } COM: <s> create a proxy object that tracks what methods were called </s>
funcom_train/34342045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTexto1() { if (texto1 == null) {//GEN-END:|22-getter|0|22-preInit // write pre-init user code here texto1 = new TextField("USUARIO", null, 5, TextField.ANY);//GEN-LINE:|22-getter|1|22-postInit // write post-init user code here }//GEN-BEGIN:|22-getter|2| return texto1; } COM: <s> returns an initiliazed instance of texto1 component </s>
funcom_train/5806602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer s = new StringBuffer("EventKey\n[\n\t"); for (Map.Entry<String, Object> e : entrySet()) { s.append(e.getKey() + " = " + e.getValue().toString() + "\n\t"); } s.append("\n]\n"); return s.toString(); } COM: <s> returns a string equivalent of this object </s>
funcom_train/24640992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeDataFileFromTree() { DataFile file = null; try { file = KreatorMain.getUserInterface().getSelectedFileFromTree(); } catch (DataFileNotGeneratedException e) { LOG.error(e.toString()); KreatorMain.getUserInterface().showErrorDialog(e.toString(), "Error"); } //no DataFile is selected if(file == null) { return; } removeDataFile(file); } COM: <s> removes the currently selected file in the project container from the current project </s>
funcom_train/35578976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean upload(File file) throws FileNotFoundException, IOException { boolean result = ftp.storeFile(file.getName(), new FileInputStream(file)); if (result) { log.debug("File upload is successful. " + ftp.getReplyString()); } else { log.debug("File upload failed. " + ftp.getReplyString()); } return result; } COM: <s> perform file upload </s>
funcom_train/48226601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getChkPckColors() { if (chkPckColors == null) { chkPckColors = new JCheckBox(); chkPckColors.setName(""); chkPckColors.setText("generate package colours"); chkPckColors.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { options.setGeneratePackageColors(chkPckColors.isSelected()); } }); } return chkPckColors; } COM: <s> this method initializes chk pck colors </s>
funcom_train/1533622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public GeoPoint Point(String label, Path path, double x, double y, boolean addToConstruction) { boolean oldMacroMode = false; if (!addToConstruction) { oldMacroMode = cons.isSuppressLabelsActive(); cons.setSuppressLabelCreation(true); } AlgoPointOnPath algo = new AlgoPointOnPath(cons, label, path, x, y); GeoPoint p = algo.getP(); if (!addToConstruction) { cons.setSuppressLabelCreation(oldMacroMode); } return p; } COM: <s> point on path with cartesian coordinates x y </s>
funcom_train/18525150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JCheckBox getvalueSelectedComboBox() { if (valueSelectedComboBox == null) { try { valueSelectedComboBox = new JCheckBox(); valueSelectedComboBox.setName("valueSelectedComboBox"); valueSelectedComboBox.setText(""); valueSelectedComboBox.setBackground(java.awt.Color.white); valueSelectedComboBox.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); } catch (Throwable exc) { handleException(exc); } } return valueSelectedComboBox; } COM: <s> return the value selected combo box property value </s>
funcom_train/1238312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String javify(String pkg) { StringTokenizer st = new StringTokenizer(pkg, "."); pkg = ""; while (st.hasMoreTokens()) { String token = st.nextToken(); if (JavaUtils.isJavaKeyword(token)) { token = JavaUtils.makeNonJavaKeyword(token); } pkg = pkg + token; if (st.hasMoreTokens()) { pkg = pkg + '.'; } } return pkg; } // javify COM: <s> make sure each package name doesnt conflict with a java keyword </s>
funcom_train/32156214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getNorthWestPanel() { if (northWestPanel == null) { northWestPanel = new JPanel(new BorderLayout()); northWestPanel.add(this.getAlgorithmPane(), BorderLayout.CENTER); northWestPanel.setMinimumSize(new Dimension(350, 280)); northWestPanel.setMaximumSize(new Dimension(350, 280)); northWestPanel.setPreferredSize(new Dimension(350, 280)); } return northWestPanel; } COM: <s> this method initializes north west panel </s>
funcom_train/5373875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOf (CoolItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); // return OS.SendMessage (handle, OS.RB_IDTOINDEX, item.id, 0); for (int i = 0; i < items.length; i++) { if (item == items[i]) { return i; } } return -1; } COM: <s> searches the receivers items in the order they are currently </s>
funcom_train/2620150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Long extractTrackingId(InputSource xml, XPathExpression xp, String xpath) { Double tid; try { tid = (Double)xp.evaluate(xml, XPathConstants.NUMBER); } catch (XPathExpressionException e) { throw new RuntimeException(e); } if ( tid.isNaN() ) { log.warn("Unable to extract tracking ID via XPath [{}]", xpath); return null; } return tid.longValue(); } COM: <s> extract a tracking id from an xml string </s>
funcom_train/51206507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void contactAvailabilityButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_contactAvailabilityButtonActionPerformed availabilityMenu.pack() ; Point location = contactAvailabilityButton.getLocationOnScreen(); availabilityMenu.setLocation(location.x, location.y + contactAvailabilityButton.getHeight()); availabilityMenu.setVisible(true); }//GEN-LAST:event_contactAvailabilityButtonActionPerformed COM: <s> p called when the availability button is pressed </s>
funcom_train/19748313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getDescendantDefinitionsNames(String name, Map definitions) { List result = null; try { result = getDescendantDefinitionsNames(name, null, null, definitions); } catch (DefinitionsFactoryException e) { if (log.isErrorEnabled()) { log.error(e); } } return result; } COM: <s> returns names of all definitions that are descendants of a definition </s>
funcom_train/18036271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean haveSharedCellsRaw(DoubleMatrix2D other) { if (other instanceof SelectedSparseDoubleMatrix2D) { SelectedSparseSuperDoubleMatrix2D otherMatrix = (SelectedSparseSuperDoubleMatrix2D) other; return this.elements==otherMatrix.elements; } else if (other instanceof SparseSuperDoubleMatrix2D) { SparseSuperDoubleMatrix2D otherMatrix = (SparseSuperDoubleMatrix2D) other; return this.elements==otherMatrix.elements; } return false; } COM: <s> returns tt true tt if both matrices share common cells </s>
funcom_train/37062630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SingleRunData getLastQualifiedData() { for (int i = singleDataList.size()-1; i >= 0; i-- ) { SingleRunData srd = getData( i ); if (srd != null && srd.isFullQualified()) { return srd; } } return null; } COM: <s> returns the last qualified run data </s>
funcom_train/5570514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJValidButton() { if (jValidButton == null) { jValidButton = new JButton(); jValidButton.setActionCommand("Valid"); // Generated jValidButton.setToolTipText("are you sure ?"); // Generated jValidButton.setText("Valid"); // Generated } return jValidButton; } COM: <s> this method initializes j valid button </s>
funcom_train/22233062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getStencilFunction(int[] params) { if (isLiveOrCompiled()) { if (!this.getCapability(ALLOW_STENCIL_ATTRIBUTES_READ)) { throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes17")); } } ((RenderingAttributesRetained)this.retained).getStencilFunction(params); } COM: <s> retrieves the stencil function reference value and comparison mask </s>
funcom_train/18058077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNumDataItems(int nitems) { XpProps.setNumDataItems(nitems); Dataset dataset = XpPie.getDataset(); if (dataset == null || nitems != dataset.getNumSets()) { dataset = new Dataset(nitems, 1, 1); XpPie.setDataset(dataset); } if (XpDatasetCollection == null) XpDatasetCollection = new DatasetCollection(nitems); else XpDatasetCollection.ensureCapacity(nitems); } COM: <s> set the num data items field </s>
funcom_train/21099452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { PluginManager.getInstance().shutdown(); System.exit(0); // TODO: use my own exit abstraction // Environment env = EnvironmentProvider.getEnvironment(getClass()); // env.setExitStatus(0); // env.exit(); } COM: <s> called when the menu is selected shuts down the system then exits </s>
funcom_train/45209857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkColor(ConnectedPlayer player, boolean assign) { boolean ok = true; if (player.getColour() < Colour.BLACK || player.getColour() > Colour.WHITE) ok = false; if (ok) ok = checkColorOK(player.getColour()); if (assign && !ok) { for (int col = 1; col <= numPlayers; col++) { if (checkColorOK(col)) { player.setColour(col); return true; } } } return ok; } COM: <s> check the color of a connecting player is already used </s>
funcom_train/44385408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendLibrary(String zipFile) { ProjectPropertyTask appendLib = new ProjectPropertyTask(); appendLib.setProject(this.getProject()); appendLib.setTaskName(this.getTaskName()); appendLib.setAction(ProjectPropertyTask.APPEND); appendLib.setProperty(BINARY_LIBRARIES); appendLib.setValue(zipFile); appendLib.execute(); } COM: <s> append the binrelease </s>
funcom_train/5525682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cursorUp (boolean repaint) { if (CursorLine.previous()==null) return; Line el=CursorLine; int pos=CursorLine.computePosToTrue(CursorPos,this); CursorLine=CursorLine.previous(); CursorPos=CursorLine.computeTrueToPos(pos,this); if (repaint) paintline(el,true); int le=CursorLine.length(); if (CursorPos>le) CursorPos=le; if (repaint) { if (!showCursor()) paintline(CursorLine,true); V.setVerticalScrollbar(); testCursor(); } } COM: <s> same as cursor down </s>
funcom_train/36764540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String processBinary5(String operand){ String[] possibilities = {"1","2","4","8","15"}; for(int index=0; index<possibilities.length; index++){ if(operand.contentEquals(possibilities[index])){ return convert_instance.getBitCode(operand,10); } } return "0"; } COM: <s> the process binary5 function is called when the dump instruction has been received </s>
funcom_train/41163123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoMaterial entity) { EntityManagerHelper.log("saving CoMaterial instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved co material entity </s>
funcom_train/7639404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildDName(String prefix, Text textField, StringBuilder sb) { if (textField != null) { String value = textField.getText().trim(); if (value.length() > 0) { if (sb.length() > 0) { sb.append(","); } sb.append(prefix); sb.append('='); sb.append(value); } } } COM: <s> builds the distinguished name string with the provided </s>
funcom_train/18566359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JPanel getViewPanel() { if (viewPanel == null) { GridLayout gridLayout1 = new GridLayout(); viewPanel = new JPanel(); viewPanel.setLayout(gridLayout1); gridLayout1.setRows(5); gridLayout1.setColumns(2); gridLayout1.setHgap(1); gridLayout1.setVgap(1); viewPanel.setPreferredSize(new java.awt.Dimension(203,505)); viewPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(0,1,0,1)); } return viewPanel; } COM: <s> this method initializes view panel </s>
funcom_train/20692430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void respondWithBrokenImage(HttpServletResponse res, String fileName) { // String fileName = getBrokenImageFileName(); File f = new File(fileName); res.setContentType("image/gif"); res.setHeader("Content-Disposition", "inline; filename=" + fileName); res.setContentLength((int) f.length()); try { copyInputStreamToOutputStream(new FileInputStream(f), res .getOutputStream()); } catch (Exception e) { e.printStackTrace(); } } COM: <s> copy the ressource with a broken image to the output stream </s>
funcom_train/49426322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float getAFromString(final String color) { if (isShortMode(color)) { return (Integer.valueOf(color.substring(1, 2), HEX_BASE) * SCALE_SHORT_MODE) / MAX_INT_VALUE; } else { return Integer.valueOf(color.substring(1, 3), HEX_BASE) / MAX_INT_VALUE; } } COM: <s> helper to get alpha from a string value </s>
funcom_train/550168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void entityTableMouseClicked(MouseEvent evt) { int row = getRowAtPoint(evt.getPoint()); //int column = 0; if (row == -1) return; //ICommand command = (ICommand) model.getEntityAt(row); if (model.isExecuteColumn(getColumnAtPoint(evt.getPoint())) && !evt.isPopupTrigger() ) { showExecuteDialog(); } } COM: <s> manages the clicking over the command table to select the command and </s>
funcom_train/7659917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean attemptMark(V expectedReference, boolean newMark) { ReferenceBooleanPair current = atomicRef.get(); return expectedReference == current.reference && (newMark == current.bit || atomicRef.compareAndSet (current, new ReferenceBooleanPair<V>(expectedReference, newMark))); } COM: <s> atomically sets the value of the mark to the given update value </s>
funcom_train/5403124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int totalCards (ArrayList cards) { int total = 0; int aces = 0; for (int x = 0; x < cards.size(); x++) { if ( ((Card)cards.get(x)).isAce()) ++aces; if ( ((Card)cards.get(x)).isFaceCard()) total += 10; else total += ((Card)cards.get(x)).value(); } if (aces > 0 && total <= 11) total += 10; return total; } COM: <s> sums the array of cards </s>
funcom_train/47989436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean intersectArea(double x, double y, double w, double h) { double x2 = x + w; double y2 = y + h; boolean isHorCollision = (getX() + width >= x) && (getX() <= x2); boolean isVerCollision = (getY() + height >= y) && (getY() <= y2); return isHorCollision && isVerCollision; } COM: <s> check if the shape intersects the target area </s>
funcom_train/13506073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isDatastream(String item) { if (item == null) { return false; } // Currently, I am assuming that if it has a ':' in it, it's a // dissemination. Otherwise it is a datastream. return item.indexOf(':') == -1; } COM: <s> function to determine whether a parameter is a datastream or a </s>
funcom_train/49435719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setupConstants() { MAIN_PANEL = new PaddedPanel(LionShareGUIMediator.getStringResource("CV_PANEL_TITLE")); DATA_MODEL = new ConnectionModel(); TABLE = new LimeJTable(DATA_MODEL); BUTTON_ROW = (new ConnectionButtons(this)).getComponent(); HOST_INPUT = new AutoCompleteTextField(20); PORT_INPUT = new WholeNumberField(7791, 4); SERVENT_STATUS = new JLabel(""); MIN_CONNECTIONS_INPUT = new WholeNumberField(0, 2); NEIGHBORS = new JLabel(""); } COM: <s> set up the necessary constants </s>
funcom_train/18325724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addImplNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ClassElement_implName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ClassElement_implName_feature", "_UI_ClassElement_type"), CoremodelPackage.Literals.CLASS_ELEMENT__IMPL_NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the impl name feature </s>
funcom_train/25099024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addKeyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_UserAttributeDefinition_key_feature"), getString("_UI_PropertyDescriptor_description", "_UI_UserAttributeDefinition_key_feature", "_UI_UserAttributeDefinition_type"), UserattributesPackage.Literals.USER_ATTRIBUTE_DEFINITION__KEY, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the key feature </s>
funcom_train/175216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { try { ArrayDeque result = (ArrayDeque) super.clone(); // These two lines are currently faster than cloning the array: result.elements = (Object[]) new Object[elements.length]; System.arraycopy(elements, 0, result.elements, 0, elements.length); return result; } catch (CloneNotSupportedException e) { throw new AssertionError(); } } COM: <s> returns a copy of this deque </s>
funcom_train/23842679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTableFast() { TreeObject node = currentNode(); if (node == null) return; TreeObject modelNode=node.getParent(); // get the MODEL node CreateTableFastDialog ctfd = new CreateTableFastDialog(this,true,globalOpts); ctfd.loadFromTree(modelNode, node); ctfd.setVisible(true); ctfd.dispose(); } COM: <s> create a table by asking only for a table name </s>
funcom_train/7687131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateIndicator() { if (mIndicatorVisible) { int resId = mIndicatorState ? android.R.drawable.button_onoff_indicator_on : android.R.drawable.button_onoff_indicator_off; mIndicatorDrawable = getResources().getDrawable(resId); } else { mIndicatorDrawable = null; } } COM: <s> updates m indicator drawable based on m indicator visible and m indicator state </s>
funcom_train/47541515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void accept(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction) { if (this.options.verbose) { System.out.println( Messages.bind(Messages.compilation_loadBinary, new String(binaryType.getName()))); // new Exception("TRACE BINARY").printStackTrace(System.out); // System.out.println(); } lookupEnvironment.createBinaryTypeFrom(binaryType, packageBinding, accessRestriction); } COM: <s> add an additional binary type </s>
funcom_train/2663672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean sourceDestSchemasDiffer() { //ISession sourceSession = sessionInfoProv.getCopySourceSession(); //ISession destSession = sessionInfoProv.getCopyDestSession(); // TODO: check to be sure that the source and destination schemas are // different. Abort if they are the same and inform the user. return true; } COM: <s> returns a boolean value indicating whether or not the source and </s>
funcom_train/20081500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PopupMenu createTrayPopup() { PopupMenu trayPopup = new PopupMenu(); // About MenuItem aboutItem = new MenuItem("About"); aboutItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { showAbout(); } }); trayPopup.add(aboutItem); trayPopup.addSeparator(); // Shutdown MenuItem shutdownItem = new MenuItem("Shutdown"); shutdownItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doShutdownCluster(); } }); trayPopup.add(shutdownItem); return trayPopup; } COM: <s> creates the pop up menu for system tray icon </s>