__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/2627061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PAffineTransform getGlobalToLocalTransform(final PAffineTransform dest) { PAffineTransform result = getLocalToGlobalTransform(dest); try { result.setTransform(result.createInverse()); } catch (final NoninvertibleTransformException e) { throw new PAffineTransformException(e, result); } return result; } COM: <s> return the transform that converts global coordinates to local </s>
funcom_train/32150681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPatternPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_UIDataType_pattern_feature"), getString("_UI_PropertyDescriptor_description", "_UI_UIDataType_pattern_feature", "_UI_UIDataType_type"), UIVocabularyPackage.Literals.UI_DATA_TYPE__PATTERN, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the pattern feature </s>
funcom_train/49678293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getSinkNode() { Enumeration<Node> nodes = fuzzyRoutingTable.keys(); Double fsl = null; Node sinkNode = null; while (nodes.hasMoreElements()){ Node node = nodes.nextElement(); FuzzyRoutingEntry fre = fuzzyRoutingTable.get(node); if (fsl == null){ fsl = fre.getHighestFsl(); sinkNode = node; }else{ if (fre.getHighestFsl().compareTo(fsl) > 0){ fsl = fre.getHighestFsl(); sinkNode = node; } } } return sinkNode; } COM: <s> return the sink node of the best route </s>
funcom_train/14378515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(Graphics2D g, GameObjectRendererIF r) { Iterator i = visibleObjects.iterator(); while (i.hasNext()) { GameObject object = (GameObject) i.next(); boolean visible = r.draw(g, object); // notify objects if they are visible this frame object.notifyVisible(visible); } visibleObjects.clear(); } COM: <s> draws all visible objects and marks all objects as not visible </s>
funcom_train/23411277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addActorPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IndividualDeonticStatement_actor_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IndividualDeonticStatement_actor_feature", "_UI_IndividualDeonticStatement_type"), OMPackage.Literals.INDIVIDUAL_DEONTIC_STATEMENT__ACTOR, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the actor feature </s>
funcom_train/35669779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSelectorSetValuesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CITLine_selectorSetValues_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CITLine_selectorSetValues_feature", "_UI_CITLine_type"), LCPnetPackage.Literals.CIT_LINE__SELECTOR_SET_VALUES, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the selector set values feature </s>
funcom_train/48390693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addTabContextMenuHandler(com.smartgwt.client.widgets.tab.events.TabContextMenuHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.tab.events.TabContextMenuEvent.getType()) == 0) setupTabContextMenuEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.tab.events.TabContextMenuEvent.getType()); } COM: <s> add a tab context menu handler </s>
funcom_train/28928640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean connectColumnToOne() { int nGroupSize = from.size() / to.size(); int i,j; i = 0; for (Unit v : to) { for (j = 0; j < nGroupSize; j++) { Unit u = from.get(j * to.size() + i); addConnection(u, v, wtType, wtParams); } i++; } return true; } COM: <s> makes column to one connections </s>
funcom_train/955546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String createInsertStatement() { StringBuilder sql = new StringBuilder("insert into "); sql.append(getTableName()).append(" (").append(getParamList()).append(") values ("); sql.append(getPlaceHolders()).append(");"); return sql.toString(); } COM: <s> create sql insert statement string </s>
funcom_train/3786670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDumpLMsetSpotsStr(int k, String msg) { /* getDumpLMsetSpotsStr */ return(getDumpLMsetSpotsStr(k, msg, null, null, false, false)); } /* getDumpLMsetSpotsStr */ COM: <s> get dump lmset spots str get a printable lm set k string of </s>
funcom_train/23021767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void visitChildren(ExtensionVisitor ev) throws ExtensionVisitor.StoppedException { // Visit children for (Extension ext : nonRepeatingExtensionMap.values()) { visitChild(ev, ext); } for (List<Extension> extList : repeatingExtensionMap.values()) { for (Extension ext : extList) { visitChild(ev, ext); } } } COM: <s> called to visit all children of this extension point </s>
funcom_train/38552310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addOptionalParameter(Parameter parameter) { Cube42NullParameterException.checkNull(parameter, "parameter", "addOptionalParameter", this); if (this.requiredParameters.get(parameter.getName()) != null) Logger .error( ParameterSystemCodes.DUPLICATE_PARAMETER, new Object[] { parameter.getName()}); this.optionalParameters.put(parameter.getName(), parameter); } COM: <s> adds an optional parameter to the group </s>
funcom_train/21297264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getSelectedPlugins() { ArrayList alSelectedPlugins = new ArrayList(); if (jpPluginList == null) { return null; } Object[] objs = jpPluginList.getComponents(); for (Object obj : objs) { if (obj instanceof JCheckBox && ((JCheckBox) obj).isSelected()) { alSelectedPlugins.add(((JCheckBox) obj).getText()); } } return alSelectedPlugins; } COM: <s> get selected plugins </s>
funcom_train/22527440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateEditorPanel(Object object) { if(object instanceof INotificationType) { if(fNotificationEditorComposite == null) { fNotificationEditorComposite = new NotificationEditorComposite(fStackComposite); } fStackComposite.setControl(fNotificationEditorComposite); fNotificationEditorComposite.setNotificationType((INotificationType)object); } else { fStackComposite.setControl(null); } } COM: <s> update the editor panel </s>
funcom_train/3926542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int daysLeft() { if (Henry == null) { return -1; } else { // get a calendar object for the very beginning of today long expires = Henry.getTime(); long start = new Date().getTime(); int days = (expires > start) ? (int) ((expires - start + HALF_DAY) / ONE_DAY) : 0; return (days < 0 ? 0 : days); } } COM: <s> return the number of days before this key expires </s>
funcom_train/38551862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Parameter getParameter(String name) { Cube42NullParameterException.checkNull(name, "name", "getParameter", this); Parameter tempParam = null; for(int i = 0; i < this.size(); i++) { tempParam = this.getParameterAt(i); if(tempParam.getName().equals(name)) { return tempParam; } } return tempParam; } COM: <s> returns the parameter with the specified name </s>
funcom_train/882600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetValueAsString() { int i; SimpleDateFormat sdf = (SimpleDateFormat) DateFormat.getDateInstance(); sdf.applyPattern("yyyy-MM-dd"); //$NON-NLS-1$ for (i = 0; i < testdates.length; i++) { try { d.setValue(testdates[i]); } catch (Exception e) { fail(); } assertEquals(d.getValueAsString(), sdf.format(testdates[i])); } } COM: <s> test get value as string inherited from simple instance </s>
funcom_train/48099660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void store() throws IOException { FileOutputStream out = null; try { out = new FileOutputStream(APP_PROPS_FILE); appProps.store(out, "Updated " + (new Date().toString())); } finally { if (out != null) out.close(); } } COM: <s> save the applciation properties </s>
funcom_train/11024396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMappedContains() { try { assertTrue("Can see first key", bean.contains("mappedProperty", "First Key")); } catch (Throwable t) { fail("Exception: " + t); } try { assertTrue("Can not see unknown key", !bean.contains("mappedProperty", "Unknown Key")); } catch (Throwable t) { fail("Exception: " + t); } } COM: <s> test code contains code method for mapped properties </s>
funcom_train/9304883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Message sendMessage(String recipient, String text) throws TwitterException { if (text.length() > 140) throw new IllegalArgumentException("Message is too long."); Map<String, String> vars = asMap("user", recipient, "text", text); String result = post("http://twitter.com/direct_messages/new.json", true, vars); try { return new Message(new JSONObject(result)); } catch (JSONException e) { throw new TwitterException(e); } } COM: <s> sends a new direct message to the specified user from the </s>
funcom_train/41760622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadMap() throws IOException { if (stopsList == null) { // first load map metadata reader.loadIndexes(false); synchronized (handler) { handler.post(new Runnable() { public void run() { // afficher les infos showMapMetadata(reader.getMetadata()); } }); } // load map indexes reader.loadIndexes(true); String[] t = new String[0]; stopsList = reader.getStopsList().toArray(t); } } COM: <s> loads the map data in the background </s>
funcom_train/49265079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Magic8ResponseDocument request(Magic8RequestDocument req) { // create a response document, using the generated XML Beans Magic8ResponseDocument resp = Magic8ResponseDocument.Factory.newInstance(); resp.addNewMagic8Response(); // Here is the actual procedure logic. In this case it is very simple because the service always answers with the some string String answer = answers[random.nextInt(answers.length)]; resp.getMagic8Response().setGeneratedSentence(answer); return resp; } COM: <s> implementation of the interface web service method </s>
funcom_train/9085198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchCharacter(long rowId) throws SQLException { // query(table, columns, select stmt, select args, group // clause, having, order Cursor mCursor = mDb.query(DATABASE_TABLE, new String[] { KEY_ROWID, KEY_NAME, KEY_DESC, KEY_BIO }, KEY_ROWID + "=" + rowId, null, null, null, null, null); if (mCursor != null) { mCursor.moveToFirst(); } return mCursor; } COM: <s> return a cursor positioned at the character that matches the given row id </s>
funcom_train/43245227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRetirementDate() { System.out.println("getRetirementDate"); EmploymentDataDG1Object instance = new EmploymentDataDG1Object(); Calendar expResult = null; Calendar result = instance.getRetirementDate(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get retirement date method of class org </s>
funcom_train/11381040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetMetrics() throws IOException { ContextFactory factory = ContextFactory.getFactory(); factory.setAttribute("fairscheduler.class", NoEmitMetricsContext.class.getName()); MetricsUtil.getContext("fairscheduler").createRecord("jobs").remove(); MetricsUtil.getContext("fairscheduler").createRecord("pools").remove(); } COM: <s> set up a metrics context that doesnt emit anywhere but stores the data </s>
funcom_train/5679888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void merge(LookupResults remoteLookupResults) { if (remoteLookupResults == null) { return; } LookupResult[] remoteResults = remoteLookupResults.getResults(); for (int i = 0; i < remoteResults.length; i++) { if (!this.results.contains(remoteResults[i])) { this.results.add(remoteResults[i]); } } } COM: <s> merge the remote lookup results discarding duplicates </s>
funcom_train/35647887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createEntity() { logger.debug("Calling createEntity"); try { this.entity = entityClass.newInstance(); logger.debug(String.format("Entity created", this.entity)); } catch (Exception ex) { logger.error("Unable to create entity",ex); throw new RuntimeException(ex); } } COM: <s> create a new entity </s>
funcom_train/33717727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean needsHardspace(AxedChar c) { if (c.ch != ' ') { // if its not space it will never be a hard space, duh return false; } if (c.isFirst() || // on start of line its always a hard space c.isLastChar() || // same on end of line (c.next()).ch == ' ') { // or if follow by a space return true; } return false; } COM: <s> returns true if the character at position pos needs a html hardspace </s>
funcom_train/21178022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createSelectionListener() { selectionListener = new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { Widget widget = event.widget; if (widget == upButton) { upPressed(); } else if (widget == downButton) { downPressed(); } else if (widget == list) { selectionChanged(); } } }; } COM: <s> creates a selection listener </s>
funcom_train/43540389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopListeningForAllDialogs(IUIContext ui) { PlatformActivator.logDebug("[SHELL MONITOR] STOPPING *ALL* SHELLS!!", //$NON-NLS-1$ DEBUG_OPTION_SHELLHANDLERREG); IShellMonitor shellMontitor = getShellMonitor(ui); shellMontitor.removeAll(); _registeredHandlers.clear(); } COM: <s> stop listening for all unexpected dialogs </s>
funcom_train/4891546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LapTimer reset() { this.running = false; this.startTime = 0; this.startDate = null; this.startDateStr = null; this.endTime = 0; this.lastLapTime = 0; Arrays.fill(this.lapHistory, 0); this.lapHistoryCount = 0; this.lapCount = 0; this.elapsedTime = 0; return this; } COM: <s> sets all information to 0 but does not drop the runnable </s>
funcom_train/10228776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onProjectChange(BindingUpdateEvent event) { JFrame frame = getFrame(); String title = frame.getTitle(); if (title == null) { frame.setTitle("*"); } else if (!title.startsWith("* ")) { frame.setTitle("* " + title); } } COM: <s> event handler for project modifications </s>
funcom_train/13200135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstantDownSpeed() { decider.updateCurrentStatus(100*1024); decider.updateCurrentStatus(100*1024); decider.updateCurrentStatus(100*1024); decider.updateCurrentStatus(100*1024); decider.updateCurrentStatus(100*1024); assertEquals(40, decider.getSuggestedUpRate()); } COM: <s> test decider for constant download rate </s>
funcom_train/34343454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getArticulo2() { if (articulo2 == null) {//GEN-END:|36-getter|0|36-preInit // write pre-init user code here articulo2 = new TextField("Ingrese codigo del Pedido 2", null, 5, TextField.NUMERIC);//GEN-LINE:|36-getter|1|36-postInit // write post-init user code here }//GEN-BEGIN:|36-getter|2| return articulo2; } COM: <s> returns an initiliazed instance of articulo2 component </s>
funcom_train/39950074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeItem(PIMItem item) throws PIMException { if (item == null) throw new NullPointerException(); if (!this.equals(((PIMItemImpl)item).owner)) throw new PIMException("The item does not belong to this list."); int rechandle = ((PIMItemImpl)item).rechandle; if (rechandle == -1) throw new PIMException("The item has not been commited."); else { checkListMode(PIM.READ_ONLY); checkListClosed(); removeItemN(listType, handle, rechandle); ((PIMItemImpl)item).delete(); } } COM: <s> deletes the given item from this list </s>
funcom_train/20229326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleContinue() { switch (selectedOption) { case 0: navigator.switchDisplay(Tuxedo.GAME_SCREEN, false, Tuxedo.FILE_ONE, defaultLanguage); this.shutDown(false); break; case 1: //Load file 2 //this.shutDown(false); break; case 2: //Load file 3 //this.shutDown(false); break; } } COM: <s> loads the chosen file from an rms source </s>
funcom_train/51704227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(Object source, int rowIndex, int columnIndex, Object oldValue, Object newValue){ if (hasTDListeners){ notifyTableDataChanged(new TableDataEvent( source, rowIndex, columnIndex, oldValue, newValue)); } if (hasTMListeners){ notifyTableModelChanged(new TableModelEvent2( source, rowIndex, rowIndex, columnIndex)); } } COM: <s> notifies all listeners that the content of a table field changed </s>
funcom_train/50915149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasContentEqualTo(CMLBondSet otherBondSet) { boolean result = false; if (otherBondSet != null && this.size() == otherBondSet.size()) { CMLBondSet bondSet = this.complement(otherBondSet); result = bondSet.size() == 0; } return result; } COM: <s> compare two bond sets for content </s>
funcom_train/47197119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processXPath(SimpleNode node) { // node.dump("->"); // SimpleNode lexprNode, rexprNode; for (int i = 0; i < node.jjtGetNumChildren(); i++) { SimpleNode child = (SimpleNode) node.jjtGetChild(i); if (child.getId() == XPathTreeConstants.JJTVARNAME) { processVarName(child); } processXPath(child); } } COM: <s> analyze xpath tokens </s>
funcom_train/8436978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPreparedQuery() { System.out.println("getPreparedQuery"); Object query = instance.prepareQueryPattern(new Pattern("1 hates 2")); Iterator<Corpus.Hit> result = instance.getPreparedQuery(query); assertEquals("alice hates joe bob", result.next().getText()); } COM: <s> test of get prepared query method of class nii </s>
funcom_train/48527805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTotalChildren(Channel channel) { int total = 0; Stripe[] stripes = channel.getStripes(); for (int j=0; j<stripes.length; j++) { total += scribe.getChildren(new Topic(stripes[j].getStripeId().getId())).length; } return total; } COM: <s> returns the total number of children for the given channel </s>
funcom_train/3057706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unbind(String name) throws ObjectNameNotFoundException { try { Session s = getSession(); Name nameObj; try { nameObj = (Name) s.load(Name.class, name); } catch (ObjectNotFoundException onfe) { throw new ObjectNameNotFoundException(); } s.delete(nameObj); } catch (HibernateException he) { throw new ODMGRuntimeException( he.getMessage() ); } } COM: <s> unbind the given name </s>
funcom_train/18758315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeConnection(ClientConnection clientConnection) { if (clientConnections.remove(clientConnection)) { propertyChangeSupport.firePropertyChange("ConnectionRemoved", clientConnection, null); } List<Table> fromTables = new ArrayList<Table>(tables); for (Table table : fromTables) { table.removeSpectator(clientConnection); } } COM: <s> unregisters a connection </s>
funcom_train/24085194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getServiceURLFromSessionMap(String expID){ //fetch the serviceURL - due to the modal panel we can't use a managed-property and irect FacesContext ctx = FacesContext.getCurrentInstance(); Object o = ctx.getExternalContext().getSessionMap().get(EDIT_WORKFLOW_PARAM_SERURL_MAP); if(o!=null){ HashMap<String,String> editParamSerURLMap = (HashMap<String,String>)o; return editParamSerURLMap.get(experimentId); }else{ return null; } } COM: <s> the beans input parameter thats passed within the session map </s>
funcom_train/17493485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JButton createArrowButton() { JButton button = new MyMetalComboBoxButton (comboBox, new MetalComboBoxIcon(), comboBox.isEditable() ? true : false, currentValuePane, listBox); button.setMargin(new Insets(0, 1, 1, 3 )); return button; } COM: <s> installs my metal combo box button </s>
funcom_train/44706242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void makeAllInvisible(PageState state) { m_allList.setVisible(state, false); m_shortList.setVisible(state, false); m_viewAllLink.setVisible(state, false); m_viewShortLink.setVisible(state, false); } COM: <s> makes all the components invisible </s>
funcom_train/27821524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActiveSelectionSource(SelectionSource selectionSource) { if (m_activeSelectionSource!=selectionSource) { if (m_activeSelectionSource!=null) m_activeSelectionSource.notifySelectionSecondary(); m_activeSelectionSource=selectionSource; reloadActiveSelection(); if (m_activeSelectionSource!=null) m_activeSelectionSource.notifySelectionPrimary(); fireActiveSelectionSourceChanged(); } } COM: <s> makes supplied selection source active </s>
funcom_train/29838518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double estimateMaximumTickLabelHeight(Graphics2D g2) { Insets tickLabelInsets = getTickLabelInsets(); double result = tickLabelInsets.top + tickLabelInsets.bottom; Font tickLabelFont = getTickLabelFont(); FontRenderContext frc = g2.getFontRenderContext(); result += tickLabelFont.getLineMetrics("123", frc).getHeight() * 1.05d; return result; } COM: <s> estimates the maximum tick label height </s>
funcom_train/24350591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getBeginColumn() { BaseToken t = getPrevious(); while (t != null && !t.isEOL()) { t = t.getPrevious(); } return 1 + offset - (t == null ? 0 : ((BaseToken) t.getNext()).getOffset()); } COM: <s> get the begin column relative 1 </s>
funcom_train/46061758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initScoreExpertForm() { scoreExpertForm = new EditScoreCalculationExpertForm("editscorecalcExpertForm", getTranslator(), euce, assessableChildren); scoreExpertForm.setScoreCalculator(stNode.getScoreCalculator()); scoreExpertForm.addListener(this); score.put("scoreForm", scoreExpertForm); score.contextPut("isExpertMode", Boolean.TRUE); } COM: <s> initialize an expert mode score calculator form and push it to the score </s>
funcom_train/8079599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getIndices(int which) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < m_Codebits[which].length; i++) { if (m_Codebits[which][i]) { if (sb.length() != 0) { sb.append(','); } sb.append(i + 1); } } return sb.toString(); } COM: <s> returns the indices of the values set to true for this code </s>
funcom_train/48045229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ChronologyDate minusYears(long years) { if (years == 0) { return this; } int newYears = MathUtils.safeToInt(MathUtils.safeSubtract(prolepticYear, years)); return ChronologyDate.of(chrono, newYears, monthOfYear, dayOfMonth); } COM: <s> returns a copy of this date with the specified number of years subtracted </s>
funcom_train/7580127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int handleUnregister(SipServletRequest req, Person p) { // store the contact address in the database p.setTelephone(null); ModelFacade mf = (ModelFacade) getServletContext().getAttribute("Model"); mf.updatePerson(p); return SipServletResponse.SC_OK; } COM: <s> handle an unregistration request </s>
funcom_train/41163245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoUnitUserHistory entity) { EntityManagerHelper.log("deleting CoUnitUserHistory instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoUnitUserHistory.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co unit user history entity </s>
funcom_train/33281929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String jsxGet_hash() { final boolean decodeHash = getBrowserVersion().hasFeature(BrowserVersionFeatures.JS_LOCATION_HASH_IS_DECODED); String hash = hash_; if (decodeHash && hash_ != null) { hash = decodeHash(hash); } if (!StringUtils.isEmpty(hash)) { return "#" + hash; } return ""; } COM: <s> returns the hash portion of the location url the portion following the </s>
funcom_train/3761749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAllRoles() throws SystemException { final UserRoleDAO dao = daoFactory.createUserRoleDAO(); Connection connection = null; try { connection = ds.getConnection(); final List roles = dao.findAll(connection); return roles; } catch(SQLException sqle) { throw new SystemException(sqle); } finally { if (connection != null) try { connection.close(); } catch (SQLException sqle) { } } } COM: <s> return collection of user roles </s>
funcom_train/32209395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getButton(int buttonCode) { int i = codeToIndex(buttonCode); if (i < 0) return null; String command = buttonCommands[i]; for (Iterator<AbstractButton> j = buttons.iterator(); j.hasNext(); ) { AbstractButton ab = j.next(); if (command.equals(ab.getActionCommand())) return (JButton)ab; } return null; } COM: <s> get one of the standard buttons from the row </s>
funcom_train/7507298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateStateTables(StateTables msg) { logToFile("[RCV] " + msg); addNodeToStateTables(msg.getSrc()); mergeStateTables(msg.getLeafSet(), msg.getNeighborhoodSet(), msg.getRoutingTable()); } COM: <s> merges the local state tables with the ones provided as input </s>
funcom_train/37836870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTitle(String title) { /* * Work around JLabel drawing ellipsis when it's short of space. To * avoid titles like "cor..." for corpses. Html labels do not get the * ellipsis. * * Use no-break space to avoid the title overflowing to the * next line when using html. */ title = title.replaceAll(" +", "&nbsp;"); title = "<html>" + title + "</html>"; titleLabel.setText(title); } COM: <s> set the window title </s>
funcom_train/4359043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getContextName(File war) { String contextName = "/" + war.getName().substring(0, war.getName().lastIndexOf(".war")); if("/ROOT".equals(contextName)) contextName= "" ; return contextName ; } COM: <s> create a context path from war </s>
funcom_train/927243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ArrayList sortComponents(Hashtable hBars) { ArrayList components = new ArrayList(hBars.values()); Collections.sort(components, new Comparator() { public int compare(Object o1, Object o2) { ComponentBar cb1 = (ComponentBar)o1; ComponentBar cb2 = (ComponentBar)o2; if (cb1.getDemand() > cb2.getDemand()) { return -1; } else if (cb1.getDemand() < cb2.getDemand()) { return 1; } return 0; } }); return components; } COM: <s> sort component bars </s>
funcom_train/39024169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetObjectName() { System.out.println("getObjectName"); String objectName = "name"; Object o = new NamedObject(objectName); IMetaHandler mh = new MetaHandler(); BasicSearchCriteria instance = new BasicSearchCriteria(); String expResult = "" + objectName; String result = instance.getObjectName(o, mh); assertEquals(expResult, result); } COM: <s> test of get object name method of class basic search criteria </s>
funcom_train/42199931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateRender() { TreePath selectedPath = tree.getSelectionPath(); Object object = null; if (selectedPath != null) object = selectedPath.getLastPathComponent(); if (object instanceof Spatial) { while (selectPass.size() > 0) selectPass.remove(selectPass.get(0)); selectedSpatial = (Spatial) object; selectPass.add(selectedSpatial); selectPass.resetTime(); selectPass.setEnabled(true); } else { selectPass.setEnabled(false); selectedSpatial = null; } } COM: <s> called internally from the mouse handler </s>
funcom_train/13440441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("MuserQry".equals(portName)) { setMuserQryEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/4676009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private V putForNullKey(V value) { for (PooledEntry<K,V> e = table[0]; e != null; e = e.next) { if (e.key == null) { V oldValue = e.value; e.value = value; e.recordAccess(this); return oldValue; } } modCount++; addEntry(0, null, value, 0); return null; } COM: <s> offloaded version of put for null keys </s>
funcom_train/25373585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(String classname) { String pkgname; HashSet<String> names; // classname and package classname = cleanUp(classname); pkgname = extractPackage(classname); // add to cache if (!m_Cache.containsKey(pkgname)) m_Cache.put(pkgname, new HashSet<String>()); names = m_Cache.get(pkgname); return names.add(classname); } COM: <s> adds the classname to the cache </s>
funcom_train/18874506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getResultScrollPane() { if (resultScrollPane == null) { resultScrollPane = new JScrollPane(); resultScrollPane.setPreferredSize(new Dimension(800, 600)); resultScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); resultScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); resultScrollPane.setViewportView(getResultTextArea()); } return resultScrollPane; } COM: <s> this method initializes result scroll pane </s>
funcom_train/12836494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AgentPlatformDescription getPlatformDescription(final Platform aPlatform) { final String name = aPlatform.getName(); final APTransportDescription transportProfile = generateAPTransportDescription(); AgentPlatformDescription desc = new AgentPlatformDescription(new Parameter[] { new GenericParameter("name", (Term) GenericStringLiteral.generate(name)), new GenericParameter("transport-profile", transportProfile) }); return desc; } COM: <s> gets the fipa agent platform description </s>
funcom_train/37483135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vehicle item(String vehicleName) throws Exception { for (int i = 0; i < list.size(); i++) { Vehicle findVehicle = (Vehicle) list.get(i); if (findVehicle.getVehicleName().equals(vehicleName)) { return findVehicle; } } Exception e = new Exception("The specified vehicle " + "name could not be found."); throw e; } COM: <s> gets the vehicle with the specified name from the collection </s>
funcom_train/48055448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperties(Collection<PersistentOPCItemInfo> properties) { if (properties == null || properties.isEmpty()) { return; } this.properties = new HashMap<String, PersistentOPCItemInfo>(properties.size()); for (PersistentOPCItemInfo p : properties) { this.properties.put(p.getId(), p); } } COM: <s> sets the properties for this item </s>
funcom_train/39787793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBackground() { NullComponent c = new NullComponent(); PropertyChangeEvaluator pce = new PropertyChangeEvaluator(); c.addPropertyChangeListener(pce); c.setBackground(new Color(0x12, 0x34, 0x56)); assertEquals(new Color(0x12, 0x34, 0x56), c.getBackground()); assertEquals(Component.PROPERTY_BACKGROUND, pce.lastEvent.getPropertyName()); } COM: <s> test code background code property </s>
funcom_train/44317980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFileExtensionless() { if (btnConflict.getSelection()) { return "Impasse__Operator_Conflict"; } else if (btnConstraint.getSelection()) { return "Impasse__Operator_Constraint-Failure"; } else if (btnTie.getSelection()) { return "Impasse__Operator_Tie"; } else if (btnNoChange.getSelection()) { return "Impasse__State_No-Change"; } else { // We should never get here return "Impasse"; } } // String getFileExtensionless() COM: <s> gets the name of the new impasse minus the extension </s>
funcom_train/3273239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setSpecializedSize(){ setDetails(INITIAL_BATTERY_MAX_MASS, INITIAL_BATTERY_MAX_SPACE, INITIAL_BATTERY_MAX_INTERNAL_HIT_POINTS, INITIAL_BATTERY_MAX_EXTERNAL_HIT_POINTS); setPersonalDetails(INITIAL_BATTERY_MAX_OUTPUT); } COM: <s> set the values for the specialized component version </s>
funcom_train/18479554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SplineSet3 replace(Point3 oldcp,Point3 newcp) { List<Point3> new_control_pts = new ArrayList<Point3>() ; for(Point3 cp: control_pts) { new_control_pts.add(cp == oldcp ? newcp : cp) ; } return new SplineSet3(new_control_pts) ; } COM: <s> replaces all occurrences of one control point with another </s>
funcom_train/51813554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test() throws Exception { MockJobResult job = new MockJobResult(); assertNull( job.getId() ); job.setId( "1" ); assertEquals( "1", job.getId() ); MockJobResult job2 = new MockJobResult( "2" ); assertEquals( "2", job2.getId() ); assertEquals( -1, job.compareTo( job2 ) ); assertEquals( 1, job2.compareTo( job ) ); } COM: <s> test abstract job result interfaces </s>
funcom_train/25289978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDistanceGainLength() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_DISTANCE_GAIN_READ)) throw new CapabilityNotSetException(Ding3dI18N.getString("PointSound4")); return (((PointSoundRetained)this.retained).getDistanceGainLength()); } COM: <s> get the length of this nodes distance gain attenuation arrays </s>
funcom_train/26464615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCaretColumn(int column) { m_nCaretColumn = column; int nRowLength = ((String) m_listTextRows.get(m_nCaretRow)).length(); if (m_nCaretColumn > nRowLength) { m_nCaretColumn = nRowLength; } if (m_nCaretColumn < 0) { m_nCaretColumn = 0; } } COM: <s> sets the column the caret should be in in the text </s>
funcom_train/22783501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setImage(Image img) { // is there a change? if (img == image) { return; } // unregister from old if (image != null) { image.removeListener(this); } // exchange image = img; // register to new one if (image != null) { image.addListener(this); } // update display if (image != null) { display.setIcon(RatingRepresentation.getIcon(image.getRating())); } else { display.setIcon(RatingRepresentation.getIcon(ImageRating.NONE)); } } COM: <s> exchange the image this editor is working on </s>
funcom_train/7680243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void registerContentObservers() { ContentResolver resolver = getContentResolver(); resolver.registerContentObserver(LauncherSettings.Favorites.CONTENT_URI, true, mObserver); resolver.registerContentObserver(LauncherProvider.CONTENT_APPWIDGET_RESET_URI, true, mAppWidgetResetObserver); } COM: <s> registers various content observers </s>
funcom_train/7223425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear(){ // no more examination is needed, // because there is another fault already. if(failed_){ return; } Event event = getNext("clear()"); boolean completed = false; try{ event.clear(subject_); completed = true; } finally{ // see comment in "ensureEOE" about assignment shown below. failed_ = !completed; } if(rewind_){ ensureEOE(); } } COM: <s> examine whether quot clear quot invocation is expected or not </s>
funcom_train/43608113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NodeVisitor buildTypesEnter(TypeBuilder tb) throws SemanticException { TypeSystem ts = tb.typeSystem(); ImportTable it; if (package_ != null) { it = ts.importTable(source.name(), package_.package_()); } else { it = ts.importTable(source.name(), null); } tb.setImportTable(it); return tb; } COM: <s> build type objects for the source file </s>
funcom_train/21175052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addBookToCourse(int courseID, String bookURL) { List<String> currentBooks = requestBookList(courseID); if (currentBooks.contains(bookURL)) { return false; } StringBuffer sql = new StringBuffer (256); sql.append ("insert into CourseBooks (id, URL) values ('"); sql.append (courseID); sql.append ("', '"); sql.append (bookURL); sql.append ("')"); updateQuery (sql.toString()); return true; } COM: <s> adds the book identified by the given url to the specified course </s>
funcom_train/31980592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(String key, String value) { Object o = get(key); if (o == null) { // new key Vector n = new Vector(1); n.add(value); super.put(key, n); } else { // key already exists Vector v = (Vector) o; v.clear(); v.add(value); super.put(key, v); } } COM: <s> puts a single value under the given key and clears any previous value </s>
funcom_train/8343032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireTableEditedEvent(final int row, final int col, final Object oldVal, final Object newVal){ if(editListeners != null){ TableEditedEvent e = new TableEditedEvent(this, row, col); e.setNewValue(newVal); e.setOldValue(oldVal); for(TableEditedListener l : editListeners) { l.tableEdited(e); } } } COM: <s> dispatch a table edited event </s>
funcom_train/31363094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void computeWeight() { HTModelNode child = null; for (Iterator i = children(); i.hasNext(); ) { child = (HTModelNode) i.next(); globalWeight += child.getWeight(); } if (globalWeight != 0.0) { weight += Math.log(globalWeight); } } COM: <s> compute the weight of this node </s>
funcom_train/20875523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDistanceInMeters(Long roomId1, Double lat1, Double lon1, Long roomId2, Double lat2, Double lon2) { Integer distance = getTravelTimeInMinutes(roomId1, roomId2); if (distance != null) return minutes2meters(distance); return getDistanceInMeters(lat1, lon1, lat2, lon2); } COM: <s> return travel distance between two locations </s>
funcom_train/43031390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getTitlePanel() { if (titlePanel == null) { titlePanel = new JPanel(); titlePanel.setLayout(new FlowLayout(FlowLayout.CENTER)); } JLabel label = new JLabel("Please Enter Command: "); label.setFont(new Font("Arial", Font.BOLD, 12)); label.setForeground(Color.BLUE); titlePanel.add(label); titlePanel.add(getM_commandString(), null); return titlePanel; } COM: <s> this method initializes title panel </s>
funcom_train/41164358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CoEditorReviewerPairSt2 update(CoEditorReviewerPairSt2 entity) { EntityManagerHelper.log("updating CoEditorReviewerPairSt2 instance", Level.INFO, null); try { CoEditorReviewerPairSt2 result = getEntityManager().merge(entity); EntityManagerHelper.log("update successful", Level.INFO, null); return result; } catch (RuntimeException re) { EntityManagerHelper.log("update failed", Level.SEVERE, re); throw re; } } COM: <s> persist a previously saved co editor reviewer pair st2 entity and return it </s>
funcom_train/14461854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addWorkSheet(Long lbplypos, Boundsheet sheet) { this.lastbound = sheet; if (DEBUGLEVEL > 10) Logger.logInfo( "Workbook Adding Sheet: " + sheet.getSheetName() + ":" + String.valueOf(lbplypos)); sheet.setSheetNum(WorkSheetVector.size()); WorkSheets.put(lbplypos, sheet); WorkSheetVector.add(sheet); } COM: <s> add a boundsheet to the work book </s>
funcom_train/46042163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadResources(String[] files) throws ContainerConfigException { try { for (String entry : files) { LOG.info("Reading container config: " + entry); String content = ResourceLoader.getContent(entry); loadFromString(content); } } catch (IOException e) { throw new ContainerConfigException(e); } } COM: <s> loads resources recursively </s>
funcom_train/8022164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMessagesByEditon() { System.out.println("getMessagesByEditon"); Edition edition = null; ArrayList<Message> expResult = null; ArrayList<Message> result = MessageManager.getMessagesByEditon(edition); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get messages by editon method of class vgrabber </s>
funcom_train/27677647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readZeroTerminatedString( final int length ) { // Setup the string buffer, we subtract one from the length to exlude // the zero terminator // Get the string from the file final String string = new String( this.readCharArray( length - 1 ) ); // Skip the zero termination this.skipBytes( 2 ); // and return the new string return string; } COM: <s> returns a zero terminated string of the specified length from the </s>
funcom_train/22684205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDateTimeShort() throws SynchronisationException, InvalidModelException, ParserException, RendererException{ String in = "A[hasDate hasValue _dateTime(1977, 02, 07, 10, 20, 10.0)]."; String expected = "value(a:hasDate \"1977-02-07T10:20:10\"^^<http://www.w3.org/2001/XMLSchema#dateTime>)"; testValue(in, expected); } COM: <s> this test checks for transformation of wsml date time short datavalue </s>
funcom_train/18110333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double optDouble(String key, double defaultValue) { try { Object o = opt(key); return o instanceof Number ? ((Number)o).doubleValue() : new Double((String)o).doubleValue(); } catch (Exception e) { JSONViewerLogger.logError(JSONViewerActivator.getDefault(), e.toString()); return defaultValue; } } COM: <s> get an optional double associated with a key or the </s>
funcom_train/1111062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected GraphModelEdit createRemoveEdit(Object[] cells) { // Remove from GraphStructure ConnectionSet cs = ConnectionSet.create(this, cells, true); // Remove from Group Structure ParentMap pm = ParentMap.create(this, cells, true, false); // Construct Edit GraphModelEdit edit = createEdit(null, cells, null, cs, pm, null); if (edit != null) edit.end(); return edit; } COM: <s> returns an edit that represents a remove </s>
funcom_train/48268066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addData(double x, int value) { // Save just the max value if there is a collision. Integer result = values.get(Double.valueOf(x)); if (result != null) { values.put(x, Math.max(value, result)); } else { values.put(x, value); } } COM: <s> add a data point to the model </s>
funcom_train/45649479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EngineMapEntry findMap(int _part_type){ int limit=size(); for ( int i=0 ; i<limit ; i++ ){ EngineMapEntry e=(EngineMapEntry)elementAt(i); if ( e.JPIPPartType()==_part_type ) return e; } return null; } COM: <s> returns the engine map entry indexed by the given part type </s>
funcom_train/19056557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModule(XModule[] module) { this.module_.clear(); for (int i = 0;i < module.length;i++) { addModule(module[i]); } for (int i = 0;i < module.length;i++) { module[i].rSetParentRNode(this); } } COM: <s> sets the xmodule property b module b </s>
funcom_train/38967718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double fit(Extent added){ Iterator<DPair> li1 = iterator(); Iterator<DPair> li2 = added.iterator(); Collection<Double> res = new ArrayList<Double>(); while (li1.hasNext() && li2.hasNext()) { DPair p1=li1.next(); DPair p2=li2.next(); double dist1 = p1.getRight()-p2.getLeft()+1.0; // System.out.println(dist1); res.add(dist1); } if (res.isEmpty()) { return 0.0; } else { return Collections.max(res); } } COM: <s> fit the added extent against the existing one </s>
funcom_train/5345098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clean(Set one, Set two) { synchronized(one) { for(Iterator i = one.iterator(); i.hasNext(); ) { Object o = i.next(); if(!(o instanceof File)) { i.remove(); } else { File f = (File)o; if(!f.exists()) i.remove(); else if(two != null && !containsParent(f, two)) i.remove(); } } } } COM: <s> cleans out entries from a setting that no long exist on disk or </s>